I can confirm that this backlight brightness bug has been fixed at long last with the latest beta driver 510.39.01. Tested on up-to-date Arch Linux with beta driver 510.39.01 from AUR repository on Lenovo Legion 5 Pro 16ACH6H (AMD) laptop with RTX 3070 card in discrete mode, of course.
There was no need for any module parameters. The only bug remaining is that the backlight does not get restored at new boot, so a custom systemd unit and a local script are still needed.
The fix below has also been successully tested on the same machine, running Debian GNU/Linux 11 (bullseye) which comes with 460.91.03 (unaffected) version of NVIDIA driver. The only difference is that the custom script “save-nvidia-brightness.sh” was saved to /etc/init.d folder which is present on said Debian release.
sudo nano /usr/local/bin/save-nvidia-brightness.sh
#!/bin/bash
# Saves nvidia brightness settings on reboot/shutdown
cat /sys/class/backlight/nvidia_0/actual_brightness | /usr/lib/systemd/systemd-backlight save backlight:nvidia_0
sudo chmod +x /usr/local/bin/save-nvidia-brightness.sh
sudo nano /lib/systemd/system/save-nvidia-brightness.service
[Unit]
Description=Save nvidia brightness
DefaultDependencies=no
Before=shutdown.target reboot.target halt.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/save-nvidia-brightness.sh
[Install]
WantedBy=halt.target reboot.target shutdown.target
systemctl enable save-nvidia-brightness
After adjusting brightness level to your liking, check by rebooting your machine and verifing that the brightness level has been restored.
Reference:
http://dalvikplanet.blogspot.com/2019/08/save-current-screen-brightness-before.html