Nvidia driver not used/broken after F39->F40 upgrade

Hi. I’ve upgraded Fedora from 39 to 40 on my Lenovo Legion laptop and I’m experiencing odd issues with the Nvidia driver from Howto/NVIDIA - RPM Fusion (installed with CUDA).

Despite the installed driver, I suspect the Nvidia GPU isn’t used at all, because in Nvidia settings utilization is always at 0%, nvidia-msi output doesn’t look right (N/A & no processes), and glxinfo reports integrated GPU is used instead.

There’s also an issue with the screen brightness, the setting is ignored, and the display brightness is set to maximum. Sometimes the brightness goes back to normal, but for a short period. While the laptop is charging this issue is no longer present.

Reinstalling the driver doesn’t help, and some solutions didn’t help either.

Here are some outputs for the context:

➜  ~ glxinfo | grep "OpenGL renderer"
OpenGL renderer string: AMD Radeon Graphics (radeonsi, renoir, LLVM 18.1.6, DRM 3.57, 6.9.6-200.fc40.x86_64)
➜  ~ nvidia-smi
Fri Jun 28 18:30:19 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.90.07              Driver Version: 550.90.07      CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3060 ...    Off |   00000000:01:00.0 Off |                  N/A |
| N/A   40C    P0            752W /   60W |       9MiB /   6144MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      2837      G   /usr/libexec/Xorg                               4MiB |
+-----------------------------------------------------------------------------------------+

➜  ~ mokutil --sb-state
SecureBoot disabled
➜  ~ sudo dnf repolist 
repo id                                                            repo name
code                                                               Visual Studio Code
docker-ce-stable                                                   Docker CE Stable - x86_64
fedora                                                             Fedora 40 - x86_64
fedora-cisco-openh264                                              Fedora 40 openh264 (From Cisco) - x86_64
google-chrome                                                      google-chrome
pgdg-common                                                        PostgreSQL common RPMs for Fedora 40 - x86_64
pgdg12                                                             PostgreSQL 12 for Fedora 40 - x86_64
pgdg13                                                             PostgreSQL 13 for Fedora 40 - x86_64
pgdg14                                                             PostgreSQL 14 for Fedora 40 - x86_64
pgdg15                                                             PostgreSQL 15 for Fedora 40 - x86_64
pgdg16                                                             PostgreSQL 16 for Fedora 40 - x86_64
rpmfusion-free                                                     RPM Fusion for Fedora 40 - Free
rpmfusion-free-updates                                             RPM Fusion for Fedora 40 - Free - Updates
rpmfusion-nonfree                                                  RPM Fusion for Fedora 40 - Nonfree
rpmfusion-nonfree-updates                                          RPM Fusion for Fedora 40 - Nonfree - Updates
updates                                                            Fedora 40 - x86_64 - Updates
➜  ~ sudo dnf list installed | grep nvidia
akmod-nvidia.x86_64                                  3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
kmod-nvidia-6.9.6-200.fc40.x86_64.x86_64             3:550.90.07-1.fc40                  @@commandline             
nvidia-modprobe.x86_64                               3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
nvidia-persistenced.x86_64                           3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
nvidia-settings.x86_64                               3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64                           3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda.x86_64                      3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64                 3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64                   3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64                      3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-power.x86_64                     3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
➜  ~ /sbin/lspci | grep -e VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c4)
➜  ~ /sbin/lspci | grep -e 3D
# Nothing
➜  ~ modinfo -F version nvidia
550.90.07

I would appreciate any help in addressing this issue.

Are you on a laptop ? If so, you are running PRIME, so it basically uses the gpu when needed.

what is the output of inxi -Fzxx

Yes, I’m on a laptop. Interestion point about PRIME, because I’ve heard that having Nvidia driver will disable integrated GPU, so only Nvidia discrete GPU will be used. Here’s the output of that command:

➜  ~ inxi -Fzxx
System:
  Kernel: 6.9.6-200.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.41-37.fc40
  Desktop: GNOME v: 46.2 tk: GTK v: 3.24.42 wm: gnome-shell dm: GDM
    Distro: Fedora Linux 40 (Workstation Edition)
Machine:
  Type: Laptop System: LENOVO product: 82K8 v: Legion S7 15ACH6
    serial: <superuser required> Chassis: type: 10 v: Legion S7 15ACH6
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0R32862WIN
    serial: <superuser required> part-nu: LENOVO_MT_82K8_BU_idea_FM_Legion S7
    15ACH6 UEFI: LENOVO v: HACN34WW date: 12/31/2021
Battery:
  ID-1: BAT0 charge: 69.2 Wh (94.7%) condition: 73.1/71.0 Wh (102.9%)
    volts: 15.4 min: N/A model: LGC L20L4PD3 serial: <filter>
    status: discharging
CPU:
  Info: 8-core model: AMD Ryzen 9 5900HX with Radeon Graphics bits: 64
    type: MT MCP arch: Zen 3 rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB
  Speed (MHz): avg: 847 high: 1574 min/max: 400/4680 cores: 1: 1397 2: 400
    3: 400 4: 1397 5: 400 6: 400 7: 400 8: 1396 9: 1397 10: 400 11: 1397 12: 400
    13: 1397 14: 1574 15: 400 16: 400 bogomips: 105402
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Lenovo
    driver: nvidia v: 550.90.07 arch: Ampere pcie: speed: 8 GT/s lanes: 8 ports:
    active: none empty: DP-3,DP-4,eDP-2 bus-ID: 01:00.0 chip-ID: 10de:2560
  Device-2: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
    vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5 pcie: speed: 8 GT/s
    lanes: 16 ports: active: eDP-1 empty: DP-1,DP-2 bus-ID: 05:00.0
    chip-ID: 1002:1638 temp: 36.0 C
  Device-3: Syntek Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-3:3 chip-ID: 174f:2435
  Display: x11 server: X.Org v: 1.20.14 with: Xwayland v: 24.1.0
    compositor: gnome-shell driver: X: loaded: amdgpu,nvidia
    unloaded: fbdev,modesetting,nouveau,vesa alternate: nv dri: radeonsi
    gpu: amdgpu display-ID: :1 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96
  Monitor-1: eDP-1 mapped: eDP model: AU Optronics 0xb69b res: 1920x1080
    dpi: 142 diag: 394mm (15.5")
  API: OpenGL v: 4.6 vendor: amd mesa v: 24.1.2 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: AMD Radeon Graphics (radeonsi renoir LLVM
    18.1.6 DRM 3.57 6.9.6-200.fc40.x86_64) device-ID: 1002:1638
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: NVIDIA GA106 High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s lanes: 8 bus-ID: 01:00.1
    chip-ID: 10de:228e
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo driver: N/A
    pcie: speed: 8 GT/s lanes: 16 bus-ID: 05:00.5 chip-ID: 1022:15e2
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: speed: 8 GT/s lanes: 16 bus-ID: 05:00.6 chip-ID: 1022:15e3
  API: ALSA v: k6.9.6-200.fc40.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.0.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel Wi-Fi 6 AX200 vendor: Rivet Networks Killer driver: iwlwifi
    v: kernel pcie: speed: 5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 8086:2723
  IF: wlp2s0 state: up mac: <filter>
  IF-ID-1: br-01170ebce352 state: down mac: <filter>
  IF-ID-2: br-4307d2fa408c state: down mac: <filter>
  IF-ID-3: br-7621d0afbb50 state: down mac: <filter>
  IF-ID-4: br-de1249bf8a68 state: down mac: <filter>
  IF-ID-5: docker0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 1-3:2 chip-ID: 8087:0029
  Report: btmgmt ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 5.2
    lmp-v: 11
Drives:
  Local Storage: total: 953.87 GiB used: 32.54 GiB (3.4%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB1T0HBLR-000L2
    size: 953.87 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 33.9 C
Partition:
  ID-1: / size: 682.98 GiB used: 31.97 GiB (4.7%) fs: btrfs
    dev: /dev/nvme0n1p7
  ID-2: /boot size: 973.4 MiB used: 533.8 MiB (54.8%) fs: ext4
    dev: /dev/nvme0n1p6
  ID-3: /boot/efi size: 256 MiB used: 47.5 MiB (18.6%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 682.98 GiB used: 31.97 GiB (4.7%) fs: btrfs
    dev: /dev/nvme0n1p7
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: N/A mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 32 GiB note: est. available: 30.71 GiB used: 3.79 GiB (12.3%)
  Processes: 458 Power: uptime: 1m wakeups: 0 Init: systemd v: 255
    target: graphical (5) default: graphical
  Packages: pm: flatpak pkgs: 2 Compilers: gcc: 14.1.1 Shell: Zsh v: 5.9
    running-in: gnome-terminal inxi: 3.3.34

These are very old “sayings” and has not been the case “on laptops” for a Long time. You can disable one or the other in some UEFI, but that is dependant on OEM. I have a similar machine, with AMD/Nvidia.

Do you have games or productivity apps. I use Blender, Krita, Inkscape. I can force the use of the GPU by right clicking on the app and choosing which to run.

Screenshot from 2024-06-21 16-01-16
Screenshot from 2024-06-21 16-01-29

If this is not the case for you, we can try other things.

Here is my nvidia-smi output :

nvidia-smi
Fri Jun 28 13:45:27 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.52.04              Driver Version: 555.52.04      CUDA Version: 12.5     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3050 ...    Off |   00000000:01:00.0 Off |                  N/A |
| N/A   40C    P8              6W /   60W |     267MiB /   4096MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      8126      G   /usr/bin/gnome-shell                            1MiB |
|    0   N/A  N/A     37647    C+G   /usr/bin/blender                              155MiB |
|    0   N/A  N/A     37834      G   krita                                           1MiB |
|    0   N/A  N/A     37966      G   inkscape                                       88MiB |
+-----------------------------------------------------------------------------------------+

  • I will defer to @computersavvy and others if they are on with some help on X11.

You are missing one very important package in that list of installed nvidia packages.
The nvidia-gpu-firmware package that provides firmware for nvidia GPUs has somehow disappeared and should be reinstalled.
sudo dnf install nvidia-gpu-firmware

The missing firmware package may cause several strange behaviors.

You also seem to be missing the xorg-x11-drv-nvidia-cuda-libs.i686 package.
I am not sure if that is required, but it was installed when I installed cuda from rpmfusion.

3 Likes

I’ve installed both packages as @computersavvy suggested and rebooted, but it doesn’t look like it changed anything.

➜  ~ sudo dnf list installed | grep nvidia
akmod-nvidia.x86_64                                  3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
kmod-nvidia-6.9.6-200.fc40.x86_64.x86_64             3:550.90.07-1.fc40                  @@commandline             
nvidia-gpu-firmware.noarch                           20240610-1.fc40                     @updates                  
nvidia-modprobe.x86_64                               3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
nvidia-persistenced.x86_64                           3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
nvidia-settings.x86_64                               3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64                           3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda.x86_64                      3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.i686                   3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64                 3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64                   3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64                      3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-power.x86_64                     3:550.90.07-1.fc40                  @rpmfusion-nonfree-updates

@hamrheadcorvette, I’ve tried launching some apps (Chrome, VSCode, Blender) with the ‘Launch using Discrete GPU’ option, but it doesn’t change the output of nvidia-smi and in Nvidia settings usage is at 0%.
image

Also, about brightness, there is only Nvidia, but no integrated GPU backlight. I wonder if that’s the cause of unstable brightness. I have a theory that when Nvidia GPU is used then brightness works as expected, but most of the time when integrated GPU is used it can’t adjust brightness thus it’s set to the maximum.

➜  ~ ls /sys/class/backlight/
nvidia_wmi_ec_backlight

I guess, reinstalling the driver would not be out of the question at this point? :thinking:

Just tried reinstalling the driver - no changes, same behavior.

To be sure I’m installing & installing it correctly, here’s the steps I’ve done from Howto/NVIDIA - RPM Fusion

Uninstall:

sudo dnf remove xorg-x11-drv-nvidia\*
sudo rm -f /usr/lib{,64}/libGL.so.* /usr/lib{,64}/libEGL.so.*
sudo rm -f /usr/lib{,64}/xorg/modules/extensions/libglx.so
sudo dnf reinstall xorg-x11-server-Xorg mesa-libGL mesa-libEGL libglvnd\*
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.saved
# Reboot

PS. After uninstalling the driver, I can’t open any apps, and some UI glitches\freezes in Gnome.

Installing:

sudo dnf update -y # and reboot if you are not on the latest kernel
sudo dnf install akmod-nvidia # rhel/centos users can use kmod-nvidia instead
sudo dnf install xorg-x11-drv-nvidia-cuda #optional for cuda/nvdec/nvenc support
# Wait until `modinfo -F version nvidia` has version output.
# Reboot

I’ve tried the suggestions but the issue persists. Any further ideas or additional steps to resolve this issue?