Nvidia module not loaded after installing the drivers in Fedora 37

Hello,

I might need some help, I just have:

  • Installed the NVidia drivers with the akmod-nvidia package from RPMFusion.

  • Added the following kernel parameters to grub: rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1

  • Created /usr/lib/modprobe.d/blacklist-nouveau.conf with:

blacklist nouveau
options nouveau modeset=0

However, I do not seem to be able to load the nvidia module by default:

# modprobe nvidia
modprobe: FATAL: Module nvidia not found in directory /lib/modules/6.0.15-300.fc37.x86_64
# nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

However, if I insert the module manually, everything works correctly:

insmod /lib/modules/6.0.15-300.fc37.x86_64/extra/nvidia/nvidia.ko.xz

# nvidia-smi
Thu Dec 29 15:07:42 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.60.11    Driver Version: 525.60.11    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| 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 ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   60C    P0    N/A /  N/A |      0MiB /  2048MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

This is an Asus X550J with an i5 4200H CPU and an NVidia 850m.

Any ideas about what could I be doing wrong?

Thanks

This step should have done everything you show below since that is part of the process of installing the drivers.

Please post the output of dnf list installed \*nvidia\* and lsmod | grep nvidia and dmesg | grep -i secure along with cat /proc/cmdline

Necroing this because this is the exact issue I’m having.

I got here because I’m having an issue on startup: xorg-x11-drv-nouveau system failure

Following a few different threads led me here because when i use lshw -c display I only show my integrated graphics on my CPU.

Sorry I’m brand new to fedora, and my linux knowledge is sparse at best.

Thanks for the detailed infomation.

We need to check if the hardware is actually seen by the system.
Please use the preformatted text tags with the </> button on the toolbar to paste the screen text into your posts.

Please post the output of lspci -nnv | grep -A 12 -iE 'network|ethernet' so we may see the actual hardware details

[hal@localhost-live ~]$ lspci -nnv | grep -A 12 -iE 'network|ethernet'
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
	Subsystem: Tongfang Hongkong Limited Device [1d05:1104]
	Flags: bus master, fast devsel, latency 0, IRQ 50, IOMMU group 10
	I/O ports at e000 [size=256]
	Memory at fc804000 (64-bit, non-prefetchable) [size=4K]
	Memory at fc800000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: r8169
	Kernel modules: r8169

03:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX200 [8086:2723] (rev 1a)
	DeviceName: Onboard LAN Brodcom
	Subsystem: Intel Corporation Wi-Fi 6 AX200NGW [8086:0084]
	Flags: bus master, fast devsel, latency 0, IRQ 24, IOMMU group 11
	Memory at fc700000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi

04:00.0 Non-Volatile memory controller [0108]: Phison Electronics Corporation PS5013 E13 NVMe Controller [1987:5013] (rev 01) (prog-if 02 [NVM Express])
	Subsystem: Phison Electronics Corporation PS5013 E13 NVMe Controller [1987:5013]
	Flags: bus master, fast devsel, latency 0, IRQ 54, NUMA node 0, IOMMU group 12
	Memory at fc600000 (64-bit, non-prefetchable) [size=16K]

My error. :upside_down_face:
I asked for the network information when I intended to ask for the GPU info.
Please repeat that at follows.
lspci -nnv | grep -A10 -i vga

[hal@localhost-live ~]$ lspci -nnv | grep -A10 -i vga
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117M [10de:1f99] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Tongfang Hongkong Limited Device [1d05:1104]
	!!! Unknown header type 7f
	Memory at fb000000 (32-bit, non-prefetchable) [size=16M]
	Memory at b0000000 (64-bit, prefetchable) [size=256M]
	Memory at c0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at f000 [size=128]
	Expansion ROM at fc000000 [disabled] [size=512K]
	Kernel driver in use: nouveau
	Kernel modules: nouveau, nvidia_drm, nvidia

--
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir [1002:1636] (rev c7) (prog-if 00 [VGA controller])
	Subsystem: Tongfang Hongkong Limited Device [1d05:1100]
	Flags: bus master, fast devsel, latency 0, IRQ 40, IOMMU group 6
	Memory at d0000000 (64-bit, prefetchable) [size=256M]
	Memory at e0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at d000 [size=256]
	Memory at fc500000 (32-bit, non-prefetchable) [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

I was wondering what was going on! No problem though lol.

The laptop is supposed to have a GTX 1650 GPU in it

That shows the nvidia GPU, so now please post the output of dnf list installed '*nvidia*' to verify what is installed, as well as mokutil --sb-state

[hal@localhost-live ~]$ dnf list installed '*nvidia*'
Installed Packages
akmod-nvidia.x86_64                       3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.2.15-300.fc38.x86_64.x86_64 3:530.41.03-1.fc38 @@commandline      
nvidia-gpu-firmware.noarch                20230515-150.fc38  @updates           
nvidia-settings.x86_64                    3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64      3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64        3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64           3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64          3:530.41.03-1.fc38 @rpmfusion-nonfree-nvidia-driver
[hal@localhost-live ~]$ mokutil --sb-state
SecureBoot enabled

This is probably the issue.
By default the nvidia module is not signed, so when secure boot is enabled the drivers cannot be loaded.

Very easy to fix, in one of 2 ways.

  1. Disable secure boot in bios, which will allow the modules to load as-is

or

  1. sign the modules so they can be loaded with secure boot enabled.

The modules signing can be enabled by following the steps in the file
‘/usr/share/doc/akmods/README.secureboot’.
Before the reboot at the end of those steps one must remove the current modules and rebuild the modules as signed with the following
a. dnf remove kmod-nvidia-* to remove the unsigned modules
b. akmods --force to rebuild the module with the signature key created above.
c. Finallly reboot and enroll the key as per the final step in the README above.
Now when you reboot the modules should load properly with secure boot enabled.

1 Like

I got through all the steps, rebooted, and then there was supposed to be a MOK Management launched, but that did not happen. Confirmation of enrollment failed when I used the commands listed at the bottom of the README

Did bios show the blue screen for mok enrollment when you booted?

If not then go back to the README and carefully follow the steps. Note that all steps there must be done using sudo, both to run sudo kmodgenca -a and sudo mokutil --import /etc/pki/akmods/certs/public_key.der

The reboot following the import should bring up the mok blue screen with bios to complete the import of the signing key.

It did not bring up the blue screen for mok enrollment.

I used sudo for the steps. Will it cause a problem to go through the steps one more time? Or is there something I should do/remove before starting again?

The command mokutil --list-enrolled should show all keys already enrolled.
If the new key just generated is not shown then you can repeat the kmodgenca command using sudo kmodgenca -a -f to force building a new key pair, then repeat the import step to import that new key into bios.

Reboot after doing the import to ensure the key is enrolled into bios then repeat the steps above to remove and rebuild the modules with the newest keys before once again rebooting to load them.

Well something went way wrong because now after logging into the desktop it freezes within 5 seconds of login.

After about 5 reboots I was able to use my PC again.

[hal@localhost-live akmods]$ mokutil --list-enrolled | grep Issuer
        Issuer: CN=Fedora Secure Boot CA
                CA Issuers - URI:https://fedoraproject.org/wiki/Features/SecureBoot

So it’s not showing akmods as an issuer. I do see the public_key.der file generated from when I did the sudo kmodgenca command. I will try force building a new key pair.


Resolved my issues, thank you!

I don’t know what compelled me to turn secure boot back on… But I found this thread and got Nvidia graphics back on.