Brightness control not working on Legion 5 Pro. Ubuntu 20.04.2 LTS

I know I'm not the only one running into this issue. I have been following a lot of instructions on several posts here and elsewhere. I will sum up what I have tried to fix this.

First my system: Legion 5 Pro with a Nvidia RTX3070 on Ubuntu 20.04.2 LTS.

It was a real chore to get ubuntu running properly on this machine, mainly because of nvidia drivers. But it's alomost working now, except for the screen brightness control, which is quite an issue because this screen is way to bright at 100%.

What I tried:

sudo vim /usr/share/X11/xorg.conf.d/10-nvidia-conf

Added this: Option "RegistryDwords" "EnableBrightnessControl=1"

So now it looks like this:

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

Also added Option "RegistryDwords" "EnableBrightnessControl=1" and Option "Backlight" "nvidia_0" to the Device section of /etc/X11/xorg.conf

So it looks like this:

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce RTX 3070 Laptop GPU"
    Option         "RegistryDwords" "EnableBrightnessControl=1"
    Option         "Backlight" "nvidia_0"
EndSection

I also updated:

sudo nano /etc/initramfs-tools/modules

And added

nvidia
nvidia-drm
nvidia-modeset

Then updated initramfs like this

sudo update-initramfs -u

I also updated the grub configuration like this:

sudo vim /etc/default/grub

And added acpi_backlight=vendor to this variable: GRUB_CMDLINE_LINUX_DEFAULT so now it looks like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

And updated grup: sudo update-grub

None of those things make any difference. The nvidia driver itself seems to work properly, but the brightness controls do not work. I do see the ui on screen with the bar changing, but the screen does not do anything. I also have the slider available in power control, but sliding it does not make any change.

I'm at a loss here, hopefully someone has another idea on how to fix this.


Solution 1:

Well... after a day of searching I figured I might just as well try to downgrade my drivers. From 470.x to 460.x. Now it works! It seems some bug introduced in the newer drivers. Hope nvidia makes a fix soon enough.