Hi All,
I have landed a large(ish) refactor of the ACPI/x86 backlight detection code in the kernel for 6.1. It has come to my attention that this may cause backlight control to stop working on laptops where the original BIOS has been replaced with coreboot, see this patch, which is the root cause of the possible regression + its replies: https://lore.kernel.org/platform-driver-x86/20220825143726.269890-3-hdegoede...
On ACPI/x86 laptops there may be multiple methods available to control the backlight (native GPU control, ACPI video bus, vendor specific) and even though a method is available it does not always work, basically the only method guaranteed to work is the one preferred by the Windows version with which the laptop shipped.
The kernel so far has delegated part of this problem by registering multiple backlight devices under /sys/class/backlight and then letting userspace figure it out. One goal of the refactor is to only register 1 backlight device per panel.
On many (somewhat older) laptops "ls /sys/class/backlight" would show 2 backlight devices: "acpi_video0" and "intel_backlight" and the various (per desktop) userspace backlight helpers would prefer the "acpi_video0". The goal of the linked kernel patch is to simply not register "intel_backlight" in this case, just like the kernel was already not registering "acpi_video0" on the models where "intel_backlight" should be used.
But this may cause problems / a change in behavior if:
1. You have an unusual / or customized userspace which prefers intel_backlight over acpi_video0 when both are present
2. You always only had intel_backlight and that now no longer gets registered, leaving you completely without backlight support.
I would like to try and find and resolve any such problems before 6.1 gets released. As such if you are using a laptop with coreboot please run the following tests:
1. Boot kernel 6.0 or older, and collect the output of:
ls /sys/class/backlight
2. Boot kernel 6.1, note for ChromeBooks please used Torvalds latest master and not rc2 since a fix for ChromeBooks has just landed, and collect the output of:
ls /sys/class/backlight
3. Check if everything still works as expected with kernel 6.1
Report the results of 1-3 either on the list or in a direct email to me (your choice).
Please include the model of your laptop and please report this even if everything still works fine, I need to know how things work on coreboot laptops which have not regressed too, to avoid accidentally regressing those if I need to do fixes for some other coreboot capable models.
4. Run:
sudo dmidecode > dmidecode.txt sudo acpidump -o acpidump.txt
And then send me a *private* off-list email with the dmidecode.txt and acpidump.txt files attached. Please don't forget to mention the model of your laptop in this email.
Sorry for any breakage my backlight refactor may have caused and thank you in advance for taking the time to test this.
Regards,
Hans