Laptop screen brightness function keys no longer working on laptop screen after upgrade from Fedora 39 (Workstation edition) to 40 (Nvidia RTX 4070)


After upgrading from Fedora 39 (Workstation edition) to Fedora 40 on a laptop, the screen brightness function keys no longer work. The little brightness slider pop-up does work (it pops up and the slider goes up and down according to the key presses), but the laptop screen stays at 100%.

I’ve completely removed all Nvidia packages (sudo dnf remove '*nvidia*') and re-installed akmod-nvidia (sudo dnf install akmod-nvidia).
I’ve also enabled the backlight handler: sudo grubby --update-kernel=ALL --args='nvidia.NVreg_EnableBacklightHandler=1'.
After that I’ve installed brightnessctl, but it throws the following error: Failed to set brightness: Protocol error.
When I use xrandr --output DP-4 --brightness 0.5 (DP-4 is my laptop screen), it does change the brightness, the brightness slider also doesn’t seem to reflect the new brightness.


Not yet known, upgraded from Fedora 39 Workstation edition to version 40.

Note that running that command also removes the nvidia-gpu-firmware package which comes with fedora and is required for proper functioning of most nvidia GPUs even when using the nouveau drivers.

Also note that the laptop brightness is NOT in any way related to the drivers for the GPU. It is a totally different hardware control; as should be apparent with the fact that desktops and laptops use the exact same driver for the GPUs and only laptops have brightness controls for the screen.

You can also reinstall that nvidia-gpu-firmware package with dnf.

Same bug happening here, laptop without NVIDIA, only Intel integrated graphics

Fixed it for me by running

sudo grubby --update-kernel=ALL --args='acpi_backlight=nvidia_wmi_ec'  
1 Like

Okay, so after a clean install (alongside pre-existing Windows 11, with Secure Boot enabled (yes, sadly I need it)), the brightness for my built-in laptop screen still wasn’t working (the pop-up icon updated, but brightness stayed at 100%, even when using xrandr, xbacklight, brightnessctl, and changing the /sys/class/backlight/acpi_video0/brightness (since the Nvidia driver install, this no longer exists, and I have a /sys/class/backlight/nvidia_0/brightness instead), none worked (properly)).

But… I got it working, and it turned out to be quite simple: install Nvidia drivers and enroll the MOK key. (I’m fairly certain I had the latest drivers installed before I did the upgrade, if that’s the case: I don’t know what went wrong, and I also don’t know if this approach works after updating. Again: this is on a clean install)
I never messed with any grub/kernel changes, just followed the steps listed below.

  1. to install the latest Nvidia driver, I’ve followed this guide
    in short, I ran these commands:

    • (optional) sudo dnf update -y
    • sudo dnf install akmod-nvidia (the 510+ driver itself)
    • (optional) sudo dnf install xorg-x11-drv-nvidia-cuda (I did install this as well)
      The I rebooted, but it gave me a quick warning that the Nvidia driver wasn’t loaded, and it falls back to nouveau (indicating it got rejected because the key was never enrolled).
  2. to enroll the MOK key I followed this guide:

    1. sudo dnf install kmodtool akmods mokutil openssl (install needed tools if not already present)
    2. sudo kmodgenca -a (generate key with default values)
    3. sudo mokutil --import /etc/pki/akmods/certs/public_key.der (import the key, you will be prompted for a password you need to enter upon next boot)
    4. systemctl reboot (just reboot the PC)
    5. click “Enroll MOK” or similar to enroll the key

And that was it.

Side note: on this clean install I did suffer major flickering and other graphical glitches on an external monitor. This was fixed by logging out and selecting GNOME on Xorg (instead of default Wayland. Just log out, click your name, and in the bottom right a cogwheel icon shows up, there you can select Xorg (or some other option)).

Hopefully, this was helpful to some.

1 Like

glad to know you got that working.

Just to be clear.
If you follow step 2 first, then when you perform step 1 the driver will already be signed and can be loaded with the first boot after it is installed.