Brightness control keys don't work on Lenovo Y540 but xrandr does
Solution 1:
I have This Issue with Lenovo Y540 that comes with NVIDIA GeForce GTX 1660Ti Graphics Card
Ubuntu version: 19.10
Also, I have upgraded to version 20.04 and working fine
you need to edit or create this file
sudo nano /usr/share/X11/xorg.conf.d/10-nvidia.conf
and add this line
Option "RegistryDwords" "EnableBrightnessControl=1;"
after this line Option "AllowEmptyInitialConfiguration"
so the file 10-nvidia.conf will look like this:
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "RegistryDwords" "EnableBrightnessControl=1;" # Line need to be added
ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection
and save the restart your laptop
and the brightness control keys will work
Solution 2:
Setting the bios to switchable graphics works for me (y540 with gtx1650). Also setting "acpi_backlight=intel_backlight" as kernel option works but also seems to mess with resume from suspend.