Bug 218223 - Ambient light sensor on Framework 13 AMD laptop stops working in Linux 6.7
Summary: Ambient light sensor on Framework 13 AMD laptop stops working in Linux 6.7
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: IIO (show other bugs)
Hardware: AMD Linux
: P3 normal
Assignee: Virtual Assignee for Drivers/IIO
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-04 23:56 UTC by Michael Marley
Modified: 2024-09-09 15:19 UTC (History)
6 users (show)

See Also:
Kernel Version: 6.7-rc4
Subsystem:
Regression: Yes
Bisected commit-id: 286d528bf0fae9f334fba857825b9701df1675b2


Attachments
Full output of dmesg on an affected kernel (103.23 KB, text/plain)
2023-12-06 12:22 UTC, Michael Marley
Details
Patch to fix this issue (3.49 KB, patch)
2023-12-15 16:09 UTC, Srinivas Pandruvada
Details | Diff

Description Michael Marley 2023-12-04 23:56:42 UTC
The ambient light sensor on the Framework 13 worked properly with Linux 6.6.  With 6.7 (currently tested with -rc4), the driver fails to load with:

hid_sensor_als HID-SENSOR-200041.1.auto: failed to setup attributes
hid_sensor_als: probe of HID-SENSOR-200041.1.auto failed with error -1

If I revert 286d528bf0fae9f334fba857825b9701df1675b2, 5f05285df691b1e82108eead7165feae238c95ef, and ee3710f39f9d0ae5137a866138d005fe1ad18132, it starts working again.

This has also been reported in the Framework forums at https://community.frame.work/t/tracking-auto-brightness-aka-ambient-light-sensor-in-linux-details/16746.
Comment 1 Bagas Sanjaya 2023-12-06 12:02:16 UTC
(In reply to Michael Marley from comment #0)
> The ambient light sensor on the Framework 13 worked properly with Linux 6.6.
> With 6.7 (currently tested with -rc4), the driver fails to load with:
> 
> hid_sensor_als HID-SENSOR-200041.1.auto: failed to setup attributes
> hid_sensor_als: probe of HID-SENSOR-200041.1.auto failed with error -1
> 
> If I revert 286d528bf0fae9f334fba857825b9701df1675b2,
> 5f05285df691b1e82108eead7165feae238c95ef, and
> ee3710f39f9d0ae5137a866138d005fe1ad18132, it starts working again.
> 
> This has also been reported in the Framework forums at
> https://community.frame.work/t/tracking-auto-brightness-aka-ambient-light-
> sensor-in-linux-details/16746.

What is full dmesg log?
Comment 2 Michael Marley 2023-12-06 12:22:37 UTC
Created attachment 305549 [details]
Full output of dmesg on an affected kernel

I attached the dmesg output.
Comment 3 Srinivas Pandruvada 2023-12-15 16:09:23 UTC
Created attachment 305607 [details]
Patch to fix this issue

Please try the attached patch. I also posted upstream. This issue broke ALS on almost all Intel systems.
Comment 4 Michael Marley 2023-12-15 16:54:15 UTC
With the patch, the light sensor is working again.  Thanks!
Comment 5 Andy Shevchenko 2024-09-09 14:37:48 UTC
AFAIU the commit f2a71ebdf231 ("iio: hid-sensor-als: Assign channels dynamically") has to fix this. Correct me, if I'm wrong.
Comment 6 Srinivas Pandruvada 2024-09-09 15:19:46 UTC
That is correct. This issue should be closed.

Note You need to log in before you can comment on or make changes to this bug.