Brightness not working Ubuntu 20.04 Lenovo Legion 5 (15IMH05)

Making an account just to document that

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1"

works for me on Lenovo Thinkpad W530 (GK107GLM [Quadro K1000M] graphics card) running on Ubuntu 24.04 LTS. Problem started after installing nvidia-driver-470 as it is the correct driver for this card according to this post so I can use Android Studio emulator.

Top result when I google ubuntu nvidia brightness returns this link. I don’t know if I did it wrongly, but following either answers results in a black screen on reboot. This simple grub change does the trick without having to do any update-initramfs -u.

I hope this helps future confused people.