Lenovo IdeaPad – Backlight Control Not Working with AMDGPU

amd-graphicsbacklightbrightness

The brightness (LCD backlight) controls on a Lenovo IdeaPad Gaming 3 (15ARH05, LCD display, AMD Renoir CPU Ryzen 5 4600H, discrete NVIDIA GeForce 1650 Ti Mobile) are not working:

  • Fn keys show the brightness slider on the display moving.
  • /sys/class/backlight/amdgpu_bl0/brightness changes accordingly from 0 to 255.
  • The display does not show any brightness change.
  • Manually writing to brightness does not change the display's brightness either.
  • /sys/class/backlight/amdgpu_bl0/actual_brightness stays at 311. I figure this indicates a problem with the amdgpu driver.
  • The display seems to stay at full brightness always.

Adjustments work fine on Windows 10. The laptop is running:

  • Kali Linux Rolling
  • linux-image-5.8.0-kali[23]-amd64 (based on 5.8.14) and custom-built kernels 5.9, 5.9.1 and 5.10-rc1, mostly based off the Kali config
  • X with amdgpu drivers, discrete graphics unused (proprietary NVIDIA drivers loaded and unloaded for testing).

I have tried booting with various acpi_backlight kernel options, which lead to various backlights being available in /sys/class/backlight/*/brightness:

  • acpi_backlight=video: acpi_video0 acpi_video1 amdgpu_bl0
  • acpi_backlight=vendor: amdgpu_bl0 ideapad
  • acpi_backlight=native: amdgpu_bl0
  • acpi_backlight=none: amdgpu_bl0

Other things that did not work:

  • acpi_osi=Linux (no change)
  • acpi_osi= (hangs at boot)
  • BIOS update (no other version available)
  • moving /lib/firmware/amdgpu/renoir_dmcu.bin away
  • patching amdgpu_dm.c

I am aware that there has been a number of updates related to backlights for AMDGPUs, like general support and fixes in kernel 5.7.x and updates to the scaling of brightness values >255 in 5.9, but so far this seems not to have helped my case (or possibly, broke more things). I am not looking for:

  • software alternatives
  • adjusting the gamma values
  • using discrete graphics (if it can be avoided)

What else can I do or look into to gain control of the backlight?

I came across this comment and this bug report, which seem to suggest that some kernel fixes may have broken other things. What would be the best place to report that?

Best Answer

Kernels 5.11.7, 5.12-rc3, and later allow the kernel parameter amdgpu.backlight=0 to be passed at boot to fix this issue for Lenovo IdeaPad Gaming 3, Lenovo Legion 5 and possibly other laptops.

For Debian-based distributions using GRUB the parameter can be added in /etc/default/grub:

GRUB_CMDLINE_LINUX="amdgpu.backlight=0"

After running update-grub and rebooting the backlight controls should work.

Previous kernels required patching: The workaround can be found in a GitLab issue. Forcing caps->aux_support = false; in drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c fixed the issue.

Related Question