Brightness control not working on Fedora 35 Gnome 41

First, let’s tidying your GRUB. Looks like you have some double parameters.rd.driver.blacklist=nouveau, modprobe.blacklist=nouveau, nvidia-drm.modeset=1 it’s written twice. Clean the duplicate parameters, then recreate the GRUB with grub2-mkconfig. Reboot.

1 Like

That is very weird indeed, I think supergfxctl duplicates them. Anyway, when I logged in I saw this in the loading screen

NVIDIA kernel module missing. Falling back to nouveau.

So it seems that something stops working after a while, idk if it’s supergfxctl or else. Then after that, I changed the grub file and rebooted.

I have seen those terms get duplicated by installing the nvidia drivers from rpmfusion twice.

The message about the NVIDIA kernel module missing. Falling back ot nouveau seems mostly to be related to those individuals/systems that recently updated to fedora 35 but have secure boot enabled. The fedora 35 (& some 34) kernels (notably the 5.15 kernels) seem to absolutely prevent loading unsigned kernel modules when secure boot is active.

2 Likes

Yeah, I kinda saw that and disabled secure boot, but I’m using UEFI instead of legacy mode. Not sure if this is the cause.

I don’t think that was an issue with legacy mode boot in the past since it is the newer bios that supports secure boot. I see it mostly talked about with uefi booting, but definitely newer machines and all that support uefi boot even if using legacy mode.

Hi, on the very bottom RPMFussion page there a guide on how to uninstall and recover from Nvidia Driver. You could follow those 2 steps first. Then you could try use @t0xic0der Nvidia auto installer.

1 Like

Ok, now it seems I have two problems,

  • I uninstalled and recovered the driver then used nvidia auto installer, but the problem persists.
  • I also found this tutorial from Dell to fix the brightness control, which also didn’t work.

Could you post the result of sudo grubby --info=ALL then lsmod | grep drm and systemctl status supergfxd.service?

1 Like

Here’s the outputs

$ sudo grubby --info=ALL
index=0
kernel="/boot/vmlinuz-5.15.6-200.fc35.x86_64"
args="ro rootflags=subvol=root rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
root="UUID=8ba428b3-d9bf-4f4d-889e-243b7bc7c1a3"
initrd="/boot/initramfs-5.15.6-200.fc35.x86_64.img"
title="Fedora Linux (5.15.6-200.fc35.x86_64) 35 (Workstation Edition)"
id="7ccebcb1f2c043ecbdda0f1a5b5777b9-5.15.6-200.fc35.x86_64"
index=1
kernel="/boot/vmlinuz-0-rescue-7ccebcb1f2c043ecbdda0f1a5b5777b9"
args="ro rootflags=subvol=root rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
root="UUID=8ba428b3-d9bf-4f4d-889e-243b7bc7c1a3"
initrd="/boot/initramfs-0-rescue-7ccebcb1f2c043ecbdda0f1a5b5777b9.img"
title="Fedora Linux (0-rescue-7ccebcb1f2c043ecbdda0f1a5b5777b9) 35 (Workstation Edition)"
id="7ccebcb1f2c043ecbdda0f1a5b5777b9-0-rescue"
$ lsmod | grep drm
drm_ttm_helper         16384  1 amdgpu
ttm                    81920  2 amdgpu,drm_ttm_helper
drm_kms_helper        311296  1 amdgpu
cec                    61440  1 drm_kms_helper
drm                   630784  12 gpu_sched,drm_kms_helper,amdgpu,drm_ttm_helper,ttm
$ systemctl status supergfxd.service
● supergfxd.service - SUPERGFX
     Loaded: loaded (/usr/lib/systemd/system/supergfxd.service; enabled; vendor preset: disabled)
     Active: active (running) since Sun 2021-12-19 10:40:17 -03; 1 day 7h ago
   Main PID: 1052 (supergfxd)
      Tasks: 1 (limit: 18336)
     Memory: 1.7M
        CPU: 58ms
     CGroup: /system.slice/supergfxd.service
             └─1052 /usr/bin/supergfxd

Dec 19 10:40:17 fedora supergfxd[1052]: INFO: GFX: 0000:06:00.3: Function for 0000:06:00.0
Dec 19 10:40:17 fedora supergfxd[1052]: INFO: GFX: 0000:01:00.0: NVIDIA graphics, setting PM to auto
Dec 19 10:40:17 fedora supergfxd[1052]: INFO: GFX: Writing /etc/X11/xorg.conf.d/90-nvidia-primary.conf
Dec 19 10:40:17 fedora supergfxd[1052]: INFO: GFX: Writing /etc/modprobe.d/supergfxd.conf
Dec 19 10:40:17 fedora supergfxd[1052]: INFO: snd_hda_intel: Unbinding 0000:01:00.1
Dec 19 10:40:17 fedora supergfxd[1052]: INFO: 0000:01:00.0: Removing
Dec 19 10:40:17 fedora supergfxd[1052]: INFO: 0000:01:00.1: Removing
Dec 19 10:40:17 fedora supergfxd[1052]: INFO: Removed all gfx devices
Dec 19 10:40:17 fedora supergfxd[1052]: INFO: GFX: Disabling nvidia-fallback.service
Dec 19 10:40:17 fedora supergfxd[1052]: INFO: GFX: Reloaded gfx mode: Integrated

You need to switch to nvidia to test out if there are no longer messages NVIDIA kernel module missing. Falling back to nouveau. Then check with lsmod | grep drm again. If your nvidia installation was succeed, you should get the result mentioning nvidia. If failed, you’ll get nouveau or no result. Don’t forget to reboot to make sure everything loaded correctly.

When you’re using nvidia GPU, please check if the brightness working or not.

After that, please remove nvidia-drm.modeset=1 by using sudo grubby --remove-args="nvidia-drm.modeset=1" --update-kernel=ALL then reboot (no need to run grub2-mkconfig).

I believe nvidia-drm.modeset=1 will preventing your system to accessing amdgpu driver capabilities when you’re currently using amdgpu.

Each time you switching the gpu, I believe you should at least logout the login again since supergfxd maybe also make modification in user .xsession file.

1 Like

Yeah, that was the problem… For some reason when using supergfxd, I need to logout and then reboot, only rebooting doesn’t work, so I was changing from integrated to hybrid but the change wasn’t persisted on reboot. Now it works perfectly and the message doesn’t appear anymore.

Unfortunately the problem persists either way :frowning: .

For some reason this command didn’t work, so I removed myself and regenerated a new grub file and reboot.

Yeah, I should logout every time, but it seems there’s a way of doing that without rebooting (I didn’t try tho).

Now running the commands:

sudo grubby --info=ALL
[sudo] password for lucas: 
index=0
kernel="/boot/vmlinuz-5.15.6-200.fc35.x86_64"
args="ro rootflags=subvol=root rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
root="UUID=8ba428b3-d9bf-4f4d-889e-243b7bc7c1a3"
initrd="/boot/initramfs-5.15.6-200.fc35.x86_64.img"
title="Fedora Linux (5.15.6-200.fc35.x86_64) 35 (Workstation Edition)"
id="7ccebcb1f2c043ecbdda0f1a5b5777b9-5.15.6-200.fc35.x86_64"
index=1
kernel="/boot/vmlinuz-0-rescue-7ccebcb1f2c043ecbdda0f1a5b5777b9"
args="ro rootflags=subvol=root rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
root="UUID=8ba428b3-d9bf-4f4d-889e-243b7bc7c1a3"
initrd="/boot/initramfs-0-rescue-7ccebcb1f2c043ecbdda0f1a5b5777b9.img"
title="Fedora Linux (0-rescue-7ccebcb1f2c043ecbdda0f1a5b5777b9) 35 (Workstation Edition)"
id="7ccebcb1f2c043ecbdda0f1a5b5777b9-0-rescue"
lsmod | grep drm
nvidia_drm             73728  2
nvidia_modeset       1150976  3 nvidia_drm
drm_ttm_helper         16384  1 amdgpu
ttm                    81920  2 amdgpu,drm_ttm_helper
drm_kms_helper        311296  2 amdgpu,nvidia_drm
cec                    61440  1 drm_kms_helper
drm                   630784  18 gpu_sched,drm_kms_helper,nvidia,amdgpu,drm_ttm_helper,nvidia_drm,ttm

So supergfxd is working just fine at least, though the brightness problem still haunts me.

I tried to find around and found this, you need to disable optimus in BIOS.

And also suprisingly, on supergfxctl readme it also said:

This switcher conflicts with other gpu switchers like optimus-manager, suse-prime
or ubuntu-prime, system76-power, and bbswitch.

Hope this will solve your problem.

Yeah, that doesn’t work either, I can’t even boot into Fedora, the screen goes black and nothing happens :pensive: . But Windows works fine.

My bad. Are enabling optimus in bios make everything back as before? Btw, may be you could re-read the supergfxctl readme page again.

1 Like

Yeah, it’s fine now.

No problem, I am much appreciated for your help on this!

About this, I interpreted Switching to/from Hybrid and Nvidia modes requires a logout only. (no reboot) as “you only need to logout”, but I thought rebooting was a more general form of logout. I haven’t checked the code, but based on what happened, it seems it only applies the changes on logout.

The current desktop session is started with the current GPU. If you switch GPUs then you need to logout and log in again to restart your desktop with the new config. I am actually surprised it does not also require a reboot.

1 Like

This also didn’t work (in my case was /etc/X11/xorg.conf.d/90-nvidia-primary.conf generated by supergfxctl ):

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

I disabled and removed the service from startup so it wouldn’t regenerate the default file.

From link you shared, there also other solution by adding parameter nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1 on kernel parameter.

On Fedora you could try by running:

# Adding parameter
$ sudo grubby --args="nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1" --update-kernel=ALL

Reboot to see if it work or not.

If somethings goes wrong during the boot, on boot list press c on keyboard then using arrow keys move the cursor to above parameter then delete it. After that continue booting by pressing ctrl+x. After login run bellow command to remove parameter permanently.

# Removing parameter
$ sudo grubby --remove-args="nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1" --update-kernel=ALL

Source: here

Note: Make sure the session are using Nvidia GPU.

1 Like

I was able to boot, but that didn’t work either.

I think the problem is indeed with the NVIDIA card, here for reference. A very useful comment:

Since I know (or, well, experimentally found out) that the backlight brightness can be changed by the Linux kernel via ACPI before loading the nVidia driver, I figured that I could disable the backlight handling in the nVidia driver in order to let the kernel handle this component.

To this effect, I found the documented kernel option NVreg_EnableBacklightHandler , but this one has been removed without notice or updating the documentation in the 465 version branch, like other users reported.

I reimplemented the kernel module option as a kernel module option local to nvidia-modeset instead, which merely stubs out nvkms_register_backlight() and nvkms_unregister_backlight() . This… worked, to some degree. Enabling it at least kept the acpi_video0 node instead of creating a nvidia_0 node, but upon loading the nVidia driver, the brightness is still reset to 100 % (even though I previously set it to, e.g., a value of 20).

The only workaround would be to not use the nVidia driver, but that’s probably even more annoying.

It seems something was removed from the driver and the kernel can’t change the brightness since then.