Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Lenovo Legion 5 Backlight Fix

Brief explanation

Linux exposes a special interface to control screen brightness via sysfs in /sys/class/backlight (source). The problem is that in Lenovo Legion 5 there are two modules registered to control screen brightness - AMDGPU and ideapad modules:

$ ls /sys/class/backlight
amdgpu_bl0
ideapad

On boot, GNOME and other DE uses ideapad module to control brightness instead of correct amdgpu_bl0.

This solution is tested in GNOME with Wayland and should work in X11 sessions as well.

Prerequisites

  1. Set Switchable Graphics option in BIOS
  2. Install AMDGPU driver and ensure that it's loaded (lsmod | grep amdgpu)

Steps

  1. Disable backlight sync for ideapad backlight module
sudo systemctl mask systemd-backlight@backlight\:ideapad
  1. Set ACPI backlight type in Linux boot params

GRUB (default option for most distros)

Open /etc/default/grub and modify GRUB_CMDLINE_LINUX_DEFAULT variable:

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
- GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
+ GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noveau.modeset=0 acpi_backlight=native"

Rebuild grub config and initramfs:

sudo update-grub

Other bootloaders (like systemd-boot)

Add noveau.modeset=0 acpi_backlight=native to Linux boot params.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment