Can't adjust screen brightness (Lenovo Laptop, NVIDIA, XFCE)

For Lenovo Y540 (using Manjaro KDE) I’ve managed to fix it.

I’ve edited /etc/default/grub file to look like this

GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3 acpi_backlight=vendor"
GRUB_CMDLINE_LINUX="reboot=acpi"

I’ve also edited /usr/share/X11/xorg.conf.d/10-amdgpu-nvidia-drm-outputclass.conf by adding this line to the Nvidia OutputClass section

Option "RegistryDwords" "EnableBrightnessControl=1;"

Working file looks like this

Section "ServerLayout"
    Identifier "layout"
    Option "AllowNVIDIAGPUScreens"
EndSection

Section "OutputClass"
    Identifier "AMDgpu"
    MatchDriver "amdgpu"
    Driver "amdgpu"
EndSection

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
    Option "RegistryDwords" "EnableBrightnessControl=1;"
EndSection

Alternative way:

I’m currently using the optimus-switch-sddm tool to switch between GPU’s and on Nvidia driver, my /etc/default/grub file looks like

GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"
GRUB_CMDLINE_LINUX="reboot=acpi"

it was also working with

GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3 i915.enable_dpcd_backlight=0"
GRUB_CMDLINE_LINUX="reboot=acpi"

and I also added

Option "RegistryDwords" "EnableBrightnessControl=1;"

to the /usr/share/X11/xorg.conf.d/10-amdgpu-nvidia-drm-outputclass.conf to the the Nvidia OutputClass section as above.

Additional info

After some updates /usr/share/X11/xorg.conf.d/10-amdgpu-nvidia-drm-outputclass.conf was overwritten so I had to edit it again.

Don’t forget to run it after editing the grub file

sudo update-grub
2 Likes