HowTo: Working Linux Backlight Control for the 2021 Razer Blade
If you run Linux on a Razer Blade laptop then you might have difficulty adjusting the brightness on a fresh install. That was the case with my Razer Blade Pro 17 (2021), which is a model with NVIDIA Optimus tech, switching between the integrated Intel HD Graphics and the dedicated RTX 3060.
I found that the brightness function keys worked, the desktop widget showed a change in the value, and so did the values in /sys/class/backlight. The only problem was that nothing actually changed in terms of brightness! I managed to get things working by setting some extra kernel parameters but I didn’t find these in one place so…here’s that information collected for you.
These laptops can be set up in two ways by toggling Optimus in the BIOS. Here’s the trick: with Optimus enabled the Intel driver handles brightness control and with Optimus disabled (dedicated GPU only) the NVIDIA driver handles brightness control.
Important note: If you have an OLED panel these instructions are unlikely to work for you. OLED panels don’t have a backlight so the method of brightness control is totally different. I don’t have an OLED-equipped laptop to try.
Intel Driver (Optimus On)
If you have an LCD panel like me (the 165Hz option, in my case) then you probably need to explicitly disable eDP-based brightness control in the Intel open-source driver:
i915.enable_dpcd_backlight=0
Depending on the exact display, however, you might find that it actually needs to be enabled! Unfortunately it depends on the panel and the default setting for your distro, so you may need to try both 0 and 1 and see what works.
NVIDIA Driver (Optimus Off)
Okay, so the above handles the case where the Intel driver is in control of brightness. What about if you’re using the NVIDIA GPU alone? Recent versions of the proprietary driver (~460/470 and onwards) changed the way that brightness control works and seem to require a kernel parameter, which is:
nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1
Notes
While researching, I saw a lot of comments and posts relating to setting the acpi_backlight= kernel parameter but after setting up my kernel parameters as described here I didn’t need to use that one. If you’re still having issues and want to experiment then the common values are: none, video, vendor, native.
Do note that kernel parameters are case sensitive when entering them.
If you need help setting kernel parameters then taking a look at the Arch Wiki isn’t a bad place to start: https://wiki.archlinux.org/title/kernel_parameters . The exact method you’ll use depends on your distro and bootloader.