Bug 216954 - display backlight not worked at kernel above 6.1.3
Summary: display backlight not worked at kernel above 6.1.3
Status: RESOLVED ANSWERED
Alias: None
Product: ACPI
Classification: Unclassified
Component: Other (show other bugs)
Hardware: AMD Linux
: P1 high
Assignee: acpi_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-19 20:25 UTC by Bogdan
Modified: 2023-01-23 08:31 UTC (History)
2 users (show)

See Also:
Kernel Version: 6.1.5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Bogdan 2023-01-19 20:25:13 UTC
HP Pavilion Gaming laptop 15-ec1002ur;
AMD Ryzen 5 4600H;
Gentoo, Cinnamon-5.6.0;

Details about system: https://linux-hardware.org/?probe=7aa00b2d9f

Display backlight function is controlled by Fn+F2 (backlight down) and Fn+F3 (backlight up) key sequences. No need any configuration for set up key sequences - they are worked natively in X subsystem (Cinnamon, KDE, Gnome). acpid daemon not configured to use those key-sequences.

kernel 6.1.3 - backlight worked:

> # find /sys -name "*backlight*"
> /sys/class/backlight
> /sys/devices/pci0000:00/0000:00:08.1/0000:05:00.0/backlight
> /sys/bus/platform/drivers/pwm-backlight
> /sys/module/video/parameters/register_backlight_delay
> /sys/module/amdgpu/parameters/backlight

kernel 6.1.5, 6.1.6 and 6.1.7 - backlight not worked:

> # find /sys -name "*backlight*"
> /sys/class/backlight
> /sys/bus/platform/drivers/pwm-backlight
> /sys/module/video/parameters/register_backlight_delay
> /sys/module/amdgpu/parameters/backlight

E.g.: backlight device not found.

Press any of Fn+F2 or Fn+F3 key sequence produce messages in syslog:

> kernel: atkbd serio0: Unknown key pressed (translated set 2, code 0xab on
> isa0060/serio0).
> kernel: atkbd serio0: Use 'setkeycodes e02b <keycode>' to make it known.
> pkexec[24931]: pam_unix(polkit-1:session): session opened for user
> root(uid=0) by (uid=1000)
> pkexec[24931]: username: Executing command [USER=root] [TTY=unknown]
> [CWD=/home/username] [COMMAND=/usr/libexec/csd-backlight-helper
> --set-brightness 88 -b firmware -b platform -b raw]
> kernel: atkbd serio0: Unknown key released (translated set 2, code 0xab on
> isa0060/serio0).
> kernel: atkbd serio0: Use 'setkeycodes e02b <keycode>' to make it known.
Comment 1 Bogdan 2023-01-20 02:49:19 UTC
Syslog messages are generated in any case, regardless of the availability of the backlight device: both in 6.1.3 and at 6.1.5+.

But backlight level is changed only if backlight device is present in the system (6.1.3).

Backlight level stay at 100% (maximum), if backlight device dows not found in system (6.1.5 and above).

At 100% level of backlight, the eyes are damaged by high intensity of the led light.

I do not test the kernel 6.1.4.

I think that the backlighting device was not found in my system, and the link at /sys/devices/pci0000:00/0000:00:08.1/0000:05:00.0/backlight path was not created using this function added to the kernel 6.1.4 or 6.1.5:
For kernel 6.1.4:
> $ curl -s https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.4 | grep
> -i -B 8 -A 6 backlight | grep -A 5 ^commit
>commit 8af3d02aae3ecc23ee84d7078d1ebb3df7557dda
>Author: Hans de Goede <hdegoede@redhat.com>
>Date:   Mon Nov 14 15:44:59 2022 +0100
>
>    ACPI: video: Prefer native over vendor
>    
>--
>commit 923c1922bdbe44bdbebe57b5b976d40f68853653
>Author: Hans de Goede <hdegoede@redhat.com>
>Date:   Mon Nov 14 15:44:58 2022 +0100
>
>    ACPI: video: Simplify __acpi_video_get_backlight_type()

For kernel 6.1.5:
> $ curl -s https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.5 | grep
> -i -B 8 -A 7 backlight | grep -A 5 ^commit
>commit 9c152189a7e85dac1f759d6ba95f877af91ccf8c
>Author: Mario Limonciello <mario.limonciello@amd.com>
>Date:   Thu Dec 8 10:42:07 2022 -0600
>
>    ACPI: video: Don't enable fallback path for creating ACPI backlight by
>    default
>    
>--
>commit adaf41b56803fe7a9a4ac625c7e41615ef23591f
>Author: Mario Limonciello <mario.limonciello@amd.com>
>Date:   Thu Dec 8 10:42:06 2022 -0600
>
>    drm/amd/display: Report to ACPI video if no panels were found
>    
>--
>commit 0ba8892d86ad69775e4ee3de53b021ae33aca8c0
>Author: Mario Limonciello <mario.limonciello@amd.com>
>Date:   Thu Dec 8 10:42:05 2022 -0600
>
>    ACPI: video: Allow GPU drivers to report no panels
Comment 2 Artem S. Tashkinov 2023-01-20 07:24:09 UTC
Please repost here:

https://gitlab.freedesktop.org/drm/amd/-/issues
Comment 3 Bogdan 2023-01-21 01:16:04 UTC
But reported: https://gitlab.freedesktop.org/drm/amd/-/issues/2361
Comment 4 Hans de Goede 2023-01-23 08:31:52 UTC
Artem, thank you for all the kernel bugzilla triaging work you do, this is much appreciated.

For future backlight bugs, please just Cc me (I use jwrdegoede@fedoraproject.org here) instead of forwarding people to the drm-driver bug-tracker.  Often these bugs have to do with the heuristics for picking which (acpi_video / vendor / GPU-native) backlight driver to use and those heuristics are maintained by me.

Note, since this has been forwarded to the amd-gpu drm tracker at gitlab.freedesktop, lets continue discussing the actual bug there.

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