Brightness control not working on Fedora 35 Gnome 41

I am curious why you seem to think the GPU switching would affect screen brightness. The GPU has nothing to do with screen brightness.

It appears that utility supports switching between the GPUs, but does not have anything to do with controlling the backlight brightness, so search further for the proper tool or use what is native in linux to manage it. (I don’t have a Dell and have never seen a need to adjust the brightness on my Asus laptop so cannot assist there.)

There are 24 earlier posts in this forum that come up with a ‘laptop brightness’ search so maybe one of those can provide some pointers.

1 Like

Hi all,

I’m not sure if brightness related directly to GPU driver directly or through other driver. But the value of current state of brightness are available under directory /sys/class/backlight/<gpu-name>/brightness.

In my laptop the full path is /sys/class/backlight/amdgpu_bl0/brightness.

We could change it manually, but first we need login as root (regular sudo echo will not work). After that just echo-ing value between 0 and what written inmax-brightness file in the same directory (beware not change the value above the value inside max-brightness file).

# Login as root, type su then enter and typing your password.
sudo su

# Change the value of brightness file as root, 
# replace <gpu-name> with the folder you found 
# in /sys/class/backlight/
echo 100 > /sys/class/backlight/<gpu-name>/brightness

If the brightness changed after you running above command, most likely you having trouble with any app or GUI interface or physical key (usually on laptop) that controlling the value in brightness file.

But if not changed, after your running the command, most likely it related to the driver that could be your monitor driver (not always GPU) or port connection like hdmi or usb port.

1 Like

Thanks for the further pointers @oprizal
Using your info I checked on my laptop and found max_brightness at 24000.
I also found brightness at 7368.

My laptop is dual GPU with the IGP as intel and the dGPU as nvidia.
The driver that controls the brightness is the intel since I found

$ ls /sys/class/backlight
intel_backlight

I have never directly changed the brightness, although in gnome I have gone to settings → displays → nightlight and have adjusted the color temp there for a warmer setting at night. While I don’t know if that only changes the colors to reduce the blue light or if it also adjusts the backlight, that may be one place to look. Warmer color temps do visually dim the screen.

I am curious why you seem to think the GPU switching would affect screen brightness. The GPU has nothing to do with screen brightness.

I thought my setup was messing with the brightness control somehow.

There are 24 earlier posts in this forum that come up with a ‘laptop brightness’ search so maybe one of those can provide some pointers.

Yeah, I tried pretty much everything I saw and nothing worked :slightly_frowning_face:

Hi,

Thanks for the thorough example, but that doesn’t work for me :confused:
I’m trying to change the brightness on the laptop screen, so it’s probably the monitor driver, then. Would you happen to know how can I proceed from here?

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.