Fedora 40 Nvidia Drivers Not Working / Installed Properly

I’ve installed Fedora 40 today again in order to try to solve Nvidia driver problem I’ve been dealing for 3 days. I installed every package related with Nvidia drivers (I’ve disabled Secure Boot before installing or configurating anything and my RPM Fusion option for Nvidia is open). I followed the steps from this guide and did every step with caution (I waited 10-15 minutes for the steps which includes kernel operations). After those steps, I edited my X11 configuration as told at step 8 at the guide. However;

glxinfo | egrep "OpenGL vendor|OpenGL renderer"

this command should give me an output that includes Nvidia GPU but instead, it outputs the Intel’s integrated GPU:

$ glxinfo | egrep "OpenGL vendor|OpenGL renderer"

OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (RPL-P)

Since my laptop has both Intel integrated GPU and Nvidia’s dedicated GPU the guide from docs of Fedora should have worked. Another issue is that X Server Settings has few options to configure as like in this picture:

I thought that maybe because I use my external monitor and not my internal monitor on my laptop the Nvidia driver doesn’t recognize it. But my external monitor (which I’m using with HDMI connection) has been already giving output without any problems even before installing any drivers or updates. And integrated GPU doesn’t works on my laptops internal monitor too, doesn’t matter if I plug out the external monitor or not. I couldn’t find where did I make a mistake while installing Nvidia drivers or while making any kind of configuration.

I will put some outputs here that could help you gather more information about this situation I’m dealing with. I really don’t want to return to other distros and Windows of course. And excuse me if I’ve written this topic with lots of spelling and grammar mistakes.

nvidia-smi output:

$ nvidia-smi

Tue May 21 15:24:37 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.78                 Driver Version: 550.78         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 4050 ...    Off |   00000000:01:00.0  On |                  N/A |
| N/A   39C    P8              3W /   60W |      53MiB /   6141MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      2370      G   /usr/bin/gnome-shell                           41MiB |
+-----------------------------------------------------------------------------------------+

lsmod output:

$ lsmod | grep nvidia

nvidia_drm            131072  8
nvidia_modeset       1605632  2 nvidia_drm
nvidia_uvm           6778880  2
nvidia              60518400  52 nvidia_uvm,nvidia_modeset
video                  77824  3 xe,i915,nvidia_modeset

modinfo output:

$ modinfo -F version nvidia

550.78

the guide and the method is pretty outdated the optimus guide you trying to use is only working on xorg/x11 fedora 40 is wayland by default.

propper guide to do this is here for FEDORA 40 and other versions
https://rpmfusion.org/Howto/NVIDIA

for the screenshots it shows nvidia drives are installed, but if you trying to make dedicated as on boot there is other way to do it, but i recommend to use build in automatic hybrid system where fedora uses igpu as default and then switch to dgpu when needed

power mode is automatically set as balanced using performance mode should force dgpu to be enabled all the time

I’ve deleted everything that I installed with the outdated guide and I’m doing the instructions from RPM Fusion guide. I’ll keep writing here after the setting up everything. I hope I don’t have to install Fedora again in order to make clean install with Nvidia drivers.

Thanks for the reply.

Update: I’ve installed the drivers with the updated guide and waited for kernel to build up after the installation (before that, I enrolled MOK keys as the guide says). I rebooted and tested to see if drivers are installed. The drivers are installed but still, the issues I’ve wrote are still there:

  • Nvidia X Server Settings application still doesn’t show much of a configuration (which normally there should lots of options to configure but there seems to be no change after the re-install).

  • My both screens (one external and internal) are still handled with Intel’s integrated GPU:

    $ glxinfo | egrep "OpenGL vendor|OpenGL renderer"
    OpenGL vendor string: Intel
    OpenGL renderer string: Mesa Intel(R) Graphics (RPL-P)
    

    You may ask why I don’t want my monitor to be handled by Intel’s GPU, the thing is integrated GPU handles Gnome awfully. And it is not something strictly related with Gnome itself. I’ve tried other desktops and they weren’t smooth just like Gnome. But I could somewhat solve that with using Nvidia GPU all the time so that I can get 144fps on my 144hz monitor. But on Fedora, I haven’t acquired that solution yet.

This solution didn’t work unfortunately. I think I messed fatally somewhere but I can’t find it.

True that the guide is dated. However, those procedures have not changed in years.

Also true that the result is only seen when using xorg.
The only thing missing from the guide used by @orcungln is the reminder that it only works when using xorg as the DE. (I believe that guide was created before wayland was made default by fedora)

@orcungln
removing and reinstalling things does not provide any benefit since the latest driver is already functional. The steps in the link provided by @phatle omits the part about making the nvidia gpu primary which was in the guide you followed.

I would caution you that you should run the command dnf list installed \*nvidia\* and verify that the nvidia-gpu-firmware package is still shown in that list. If not then you will need to reinstall it using dnf.

EDIT
I just saw your last update.
You do have to do the last step (step 8) in the guide you initially followed to make the nvidia driver primary, then you also have to log in using xorg in order to force the nvidia gpu to be used as primary and to give it access to both the laptop screen and the external screen.

The nvidia driver should allow the 144 Hz refresh with using either xorg or wayland but there are other benefits when using xorg and having the nvidia gpu as primary. The only drawback I encounter is a (slight) impact on the battery life of the laptop (10% or so less time).

1 Like

Here is the output of the command:

$ dnf list installed \*nvidia\*

Installed Packages
akmod-nvidia.x86_64                                                                                                3:550.78-1.fc40                                                                            @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.8.9-300.fc40.x86_64.x86_64                                                                           3:550.78-1.fc40                                                                            @@commandline                   
nvidia-gpu-firmware.noarch                                                                                         20240513-1.fc40                                                                            @updates                        
nvidia-modprobe.x86_64                                                                                             3:550.78-1.fc40                                                                            @rpmfusion-nonfree-nvidia-driver
nvidia-persistenced.x86_64                                                                                         3:550.78-1.fc40                                                                            @rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                                                                                             3:550.78-1.fc40                                                                            @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                                                                                         3:550.78-1.fc40                                                                            @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda.x86_64                                                                                    3:550.78-1.fc40                                                                            @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64                                                                               3:550.78-1.fc40                                                                            @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64                                                                                 3:550.78-1.fc40                                                                            @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64                                                                                    3:550.78-1.fc40                                                                            @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64     

If you meant “nvidia-gpu-firmware.noarch” package as you wrote, it’s showed as installed. I wanted to re-install Fedora 40 again to do the steps again but since you said it’s not going to make any difference I gave up on that idea.

Edit: I saw your update, now I’ll do the step 8 and I’ll keep you updated afterwards.

I just noted that you said server in the tags.
Please post the output of inxi -Fzxx so we may see the entire system config and cat /etc/fedora-release so we can see the spin installed.

What you just posted shows that everything needed appears to be installed.

Added workstation and removed server

I’m very sorry for that misunderstood. I didn’t setup the tags, it seems they have been automatically set up when I opened this topic. Now I updated the tags and revert back to workstation.

$ inxi -Fzxx

System:
  Kernel: 6.8.9-300.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.41-34.fc40
  Desktop: GNOME v: 46.1 tk: GTK v: 3.24.41 wm: gnome-shell dm: GDM
    Distro: Fedora Linux 40 (Workstation Edition)
Machine:
  Type: Laptop System: HP product: Victus by HP Gaming Laptop 15-fa1xxx v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 8BB1 v: 63.31 serial: <superuser required>
    part-nu: 7P8M3EA#AB8 UEFI: AMI v: F.14 date: 11/07/2023
Battery:
  ID-1: BAT0 charge: 69.8 Wh (100.0%) condition: 69.8/70.1 Wh (99.6%)
    volts: 17.3 min: 15.4 model: HP Primary serial: <filter> status: full
CPU:
  Info: 12-core (4-mt/8-st) model: 13th Gen Intel Core i5-13500H bits: 64
    type: MST AMCP arch: Raptor Lake rev: 2 cache: L1: 1.1 MiB L2: 9 MiB
    L3: 18 MiB
  Speed (MHz): avg: 425 high: 800 min/max: 400/4700:3500 cores: 1: 400
    2: 400 3: 400 4: 400 5: 800 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400
    12: 400 13: 400 14: 400 15: 400 16: 400 bogomips: 101990
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Raptor Lake-P [Iris Xe Graphics] vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen-13 ports: active: none off: eDP-1
    empty: DP-1 bus-ID: 00:02.0 chip-ID: 8086:a7a0
  Device-2: NVIDIA AD107M [GeForce RTX 4050 Max-Q / Mobile]
    vendor: Hewlett-Packard driver: nvidia v: 550.78 arch: Lovelace pcie:
    speed: 2.5 GT/s lanes: 8 ports: active: none off: HDMI-A-1 empty: none
    bus-ID: 01:00.0 chip-ID: 10de:28a1
  Device-3: Luxvisions Innotech HP Wide Vision HD Camera driver: uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-6:4 chip-ID: 30c9:0069
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 23.2.6
    compositor: gnome-shell driver: X: loaded: modesetting alternate: fbdev,vesa
    dri: iris,nouveau gpu: i915,nvidia,nvidia-nvswitch display-ID: 0
  Monitor-1: HDMI-A-1 model: E238FHD-G res: 1920x1080 dpi: 92
    diag: 609mm (24")
  Monitor-2: eDP-1 model: ChiMei InnoLux 0x1521 res: 1920x1080 dpi: 142
    diag: 394mm (15.5")
  API: OpenGL v: 4.6 vendor: intel mesa v: 24.0.7 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: Mesa Intel Graphics (RPL-P)
    device-ID: 8086:a7a0 display-ID: :0.0
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: Intel Raptor Lake-P/U/H cAVS vendor: Hewlett-Packard
    driver: sof-audio-pci-intel-tgl bus-ID: 00:1f.3 chip-ID: 8086:51ca
  Device-2: NVIDIA vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
    pcie: speed: 2.5 GT/s lanes: 8 bus-ID: 01:00.1 chip-ID: 10de:22be
  Device-3: Barco Display Systems USBGH8-Plus-7.1-ENC
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 bus-ID: 3-1:2 chip-ID: 0600:8316
  API: ALSA v: k6.8.9-300.fc40.x86_64 status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.0.6 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
Network:
  Device-1: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    vendor: AzureWave driver: mt7921e v: kernel pcie: speed: 5 GT/s lanes: 1
    bus-ID: 04:00.0 chip-ID: 14c3:7961
  IF: wlp4s0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: 3000 bus-ID: 05:00.0 chip-ID: 10ec:8168
  IF: eno1 state: down mac: <filter>
Bluetooth:
  Device-1: IMC Networks Wireless_Device driver: btusb v: 0.8 type: USB
    rev: 2.1 speed: 480 Mb/s lanes: 1 bus-ID: 3-7:6 chip-ID: 13d3:3567
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.2
    lmp-v: 11
Drives:
  Local Storage: total: 476.94 GiB used: 5.97 GiB (1.3%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVL2512HCJQ-00BH1
    size: 476.94 GiB speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 39.9 C
Partition:
  ID-1: / size: 475.35 GiB used: 5.59 GiB (1.2%) fs: btrfs dev: /dev/nvme0n1p3
  ID-2: /boot size: 973.4 MiB used: 368.2 MiB (37.8%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 19 MiB (3.2%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 475.35 GiB used: 5.59 GiB (1.2%) fs: btrfs
    dev: /dev/nvme0n1p3
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 40.0 C mobo: N/A
  Fan Speeds (rpm): cpu: 2678 fan-2: 2401
Info:
  Memory: total: 16 GiB note: est. available: 15.25 GiB used: 3.49 GiB (22.9%)
  Processes: 378 Power: uptime: 25m wakeups: 0 Init: systemd v: 255
    target: graphical (5) default: graphical
  Packages: Compilers: gcc: 14.1.1 Shell: Bash v: 5.2.26
    running-in: gnome-terminal inxi: 3.3.34

cat /etc/fedora-release output:

$ cat /etc/fedora-release

Fedora release 40 (Forty)

Again, I’m sorry for not paying attention to the tags. I’ve attached the outputs of the commands that you’ve wrote.

@computersavvy Thank you for sharing your knowledge. It seems that I’ve had lots of confusions while installing Nvidia drivers. After booted up, I changed Wayland to XOrg and it runs smooth without any flicker; tearing, sloppy effect, frame loss. And my laptops fans are now running a little bit quieter than it was. Here are some other changes;

  • Nvidia X Server Settings now showing up much more options to configure. Which is meaning that Nvidia GPU is working like a charm.

  • Now, my both external and internal monitors are handled by Nvidia GPU and not Intel’s integrated GPU. And this leads to Gnome working and running smoothly without interruption. Screen is outputting with 144hz now.

    $ glxinfo | egrep "OpenGL vendor|OpenGL renderer"
    OpenGL vendor string: NVIDIA Corporation
    OpenGL renderer string: NVIDIA GeForce RTX 4050 Laptop GPU/PCIe/SSE2
    

Thanks again for helping me finally be able to configure the Nvidia drivers. I thought I couldn’t solve this issue forever to be honest (Because last time I used Fedora, my laptop and it’s specs were different and I didn’t had to install Nvidia drivers to solve any issue since there were none). But I have one more question if you excuse: Do I need to do any necessary or “would be good if it were done” configuration from X Server Settings itself?

1 Like

It appears you are logged in with wayland so it cannot put the nvidia GPU as primary and thus the glxinfo is correct.
To make the nvidia gpu primary you must log out then log back in and on the screen where you enter your password select ‘gnome on xorg’ with the gear at the lower right corner. It should then use only the nvidia gpu and should change the glxinfo output.

1 Like

Changes there are totally up to you. I don’t make changes since I believe everything is already properly configured but may be slightly tweaked for your individual use case.

Note that nvidia has only recently began supporting wayland and their apps (nvidia-settings specifically among others) do not function the same in wayland as they do in X11. That is shown with the differences you have already noted.

1 Like

So let’s help, or find the maintainer of the Guide and get it updated. This is maybe the 5th time in 30-45 days we get the same interactions with the documentation being outdated. Not counting the amount of people in side conversations who bring it up or are generally confused about how it works.

I only bring it up because @computersavvy is an Nvidia User and answers a majority of the Nvidia issues with reference to the guide and procedures supported by the Forum, community.

@phatle Also being an Nvidia and recently helping out a lot with Nvidia, DaVinci, Blender related issues.

That guide might be from Fedora 32 release period, as I recall that’s around when the Docs were moved to this format.

3 Likes

On my side, I installed the nvidia driver via fedy:

How is installing Fedy relevant to the discussion ? :thinking:

On Fedora 40, via fedy, the nvidia drivers was installed corrrectly and worked on my side …

But the issue was not that the driver was mis-configured, but ultimately the OP did not use a Desktop with Xorg in the explicit scenario of making the Nvidia GPU a Primary GPU. This does not currently work on Wayland without other configurations.

The OP followed the Documentation, that has not been updated since Fedora 32, well before the time Fedora went Wayland first.

2 Likes

OK, thanks for this message.
ISorry for the noise.

1 Like

I tried updating that doc but found that it is still on pagure and I do not have access to pagure.

I just tagged you here :

I forked the document, just wanted to see if you agreed with the minor changes. I don’t know how far it will go, but if it’s ignored then there’s a bigger problem here.