My laptop seems to be on max brightness and the brightness control slider/Fn keys have no effect on the screen brightness except showing a pop-up notification of the slider. This problem isn't really new to the legion series (or some other laptops) but unlike other (old) legion 5 laptops, none of the potential solutions worked for me for Ubuntu 20.04.2. There are solutions for the exact same laptop on a different variant of Ubuntu and Manjaro but that still doesn't work on normal Ubuntu 20.04 which is why it is a bit confusing.
So my laptop's configuration is AMD 5800H + Nvidia RTX3070. I am currently on mainline kernel 5.10.0-051000-generic with ubuntu 20.04.2. I have added the Nvidia graphics PPA and currently on driver v460.67. I am on dGPU mode (graphics card directly connected to screen). This the conf location:
/usr/share/X11/xorg.conf.d$ ll total 36 drwxr-xr-x 2 root root 4096 Apr 6 21:34 ./ drwxr-xr-x 5 root root 4096 Feb 9 19:50 ../ -rw-r--r-- 1 root root 92 Okt 22 2019 10-amdgpu.conf -rw-r--r-- 1 root root 239 Apr 6 20:34 10-nvidia-brightness.conf -rw-r--r-- 1 root root 206 Apr 6 21:34 10-nvidia.conf -rw-r--r-- 1 root root 1350 Jan 17 10:13 10-quirks.conf -rw-r--r-- 1 root root 92 Okt 22 2019 10-radeon.conf -rw-r--r-- 1 root root 1429 Aug 13 2019 40-libinput.conf -rw-r--r-- 1 root root 3458 Mär 11 2020 70-wacom.conf
Here are the output of relevant files:
/usr/share/X11/xorg.conf.d$ cat 10-nvidia-brightness.conf Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce RTX 3070 Laptop GPU" Option "RegistryDwords" "EnableBrightnessControl=1" EndSection /usr/share/X11/xorg.conf.d$ cat 10-nvidia.conf Section "OutputClass" Identifier "nvidia" MatchDriver "nvidia-drm" Driver "nvidia" Option "AllowEmptyInitialConfiguration" ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg" EndSection
Note: Even for 10-nvidia.conf, I have tried the
Option "RegistryDwords" "EnableBrightnessControl=1" but still no results.
I have blacklisted nouveau drivers:
cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf blacklist nouveau options nouveau modeset=0
And also added the below so that Nvidia drivers load first:
cat /etc/initramfs-tools/modules # List of modules that you want to include in your initramfs. # They will be loaded at boot time in the order below. # # Syntax: module_name [args ...] # # You must run update-initramfs(8) to effect this change. # # Examples: # # raid1 # sd_mod # Other settings... nvidia nvidia-drm nvidia-modeset
I have tried to add parameters to the grub such as
video.use_native_backlight=1 but none of them work.
So here are few relevant outputs if someone requires it:
sudo lshw -C display *-display description: VGA compatible controller product: NVIDIA Corporation vendor: NVIDIA Corporation physical id: 0 bus info: pci@0000:01:00.0 version: a1 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress vga_controller bus_master cap_list rom configuration: driver=nvidia latency=0 resources: iomemory:fa0-f9f iomemory:fc0-fbf irq:76 memory:d0000000-d0ffffff memory:fa00000000-fbffffffff memory:fc00000000-fc01ffffff ioport:2000(size=128) memory:d1080000-d10fffff lspci | grep -i vga 01:00.0 VGA compatible controller: NVIDIA Corporation Device 24dd (rev a1)
There is also a bug https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-455/+bug/1905591 in the driver which caused people with different laptops to have similar problems but for some, their problem was solved by adding modules to /etc/initramfs-tools/modules but for some it is still not solved. Now here is another thing, I have seen two reports with the same laptop as me mention that it is working for them by following a few combinations of the above-mentioned steps:
This guy uses Regolith Linux 1.5.3 https://www.reddit.com/r/GamingLaptops/comments/ls9k5r/legion_5_pro_other_info_64gb_ram_upgrade_linux/
I have also tried Kernel 5.11.11 but still, it doesn't work and one final thing, changing the slider or pressing the buttons changes the value of the file
/sys/class/backlight/nvidia_0/brightness the other two files always show this :
cat actual_brightness 0 cat max_brightness 100
So this is everything I have tried and tested. If anyone has any new ideas or pointers regarding this issue, I would be really grateful to know that.
One final thing, I am currently using
xrandr --output DP-4 --brightness 0.5 to save my eyes right now. Would be helpful if someone could comment if this would be helpful to reduce (in any way) the strain on the backlight of the screen on the hardware level, since it is normally at max brightness.