Error Installing Nvidia Driver

im trying to install the nvidia driver on fedora 35 but on reboot get the following error.
kernel module missing reverting back to back to nouveau driver.

heres log file.

2022/03/21 23:31:44 akmods: Checking kmods exist for 5.14.10-300.fc35.x86_64
2022/03/21 23:31:44 akmods: Files needed for building modules against kernel
2022/03/21 23:31:44 akmods: 5.14.10-300.fc35.x86_64 could not be found as the following
2022/03/21 23:31:44 akmods: directories are missing:
2022/03/21 23:31:44 akmods: /usr/src/kernels/5.14.10-300.fc35.x86_64/
2022/03/21 23:31:44 akmods: /lib/modules/5.14.10-300.fc35.x86_64/build/
2022/03/21 23:31:44 akmods: Is the correct kernel-devel package installed?
2022/03/21 23:34:14 akmods: Checking kmods exist for 5.16.15-201.fc35.x86_64
2022/03/21 23:34:15 akmods: Building and installing nvidia-470xx-kmod
2022/03/21 23:34:15 akmods: Building RPM using the command '/sbin/akmodsbuild --kernels 5.16.15-201.fc35.x86_64 /usr/src/akmods/nvidia-470xx-kmod.latest'
2022/03/21 23:35:48 akmods: Installing newly built rpms
2022/03/21 23:35:49 akmods: DNF detected
2022/03/21 23:36:28 akmods: Successful.
2022/03/22 17:24:37 akmods: Checking kmods exist for 5.16.15-201.fc35.x86_64
2022/03/23 04:44:38 akmods: Checking kmods exist for 5.16.15-201.fc35.x86_64
2022/03/23 04:54:00 akmods: Checking kmods exist for 5.16.15-201.fc35.x86_64



heres terminal

``[john@UNKNOWN ~]$ sudo dnf install kernel-devel-5.16.15-201.fc35.x86_64
Last metadata expiration check: 0:08:51 ago on Wed 23 Mar 2022 04:51:06 GMT.
Package kernel-devel-5.16.15-201.fc35.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[john@UNKNOWN ~]$`
type or paste code here

Welcome to :fedora:
Can you show output of inxi -G in </>
dnf list installed *nvidia*

Are any of the nvidia modules loaded? lsmod | grep -E 'nvidia|nouveau'

[john@fedora ~]$ inxi -G
Graphics:
  Device-1: NVIDIA GF114M [GeForce GTX 675M] driver: nouveau v: kernel
  Device-2: DigiTech SC-20FHL11146M type: USB driver: uvcvideo
  Display: wayland server: X.Org v: 1.21.1.4 with: Xwayland v: 21.1.4
    compositor: gnome-shell v: 41.4 driver: gpu: nouveau
    resolution: 1920x1080~60Hz
  OpenGL: renderer: NVCE v: 4.3 Mesa 21.3.7
[john@fedora ~]$ 

john@fedora ~]$ dnf list installed *nvidia*
Installed Packages
akmod-nvidia-470xx.x86_64                        3:470.103.01-1.fc35 @rpmfusion-nonfree-updates
kmod-nvidia-470xx-5.16.15-201.fc35.x86_64.x86_64 3:470.103.01-1.fc35 @@commandline
nvidia-persistenced.x86_64                       3:510.47.03-1.fc35  @rpmfusion-nonfree-updates
nvidia-settings-470xx.x86_64                     3:470.103.01-1.fc35 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-470xx.x86_64                 3:470.103.01-1.fc35 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-470xx-cuda.x86_64            3:470.103.01-1.fc35 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-470xx-cuda-libs.x86_64       3:470.103.01-1.fc35 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-470xx-kmodsrc.x86_64         3:470.103.01-1.fc35 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-470xx-libs.x86_64            3:470.103.01-1.fc35 @rpmfusion-nonfree-updates
[john@fedora ~]$ 

[john@fedora ~]$ lsmod | grep -E 'nvidia|nouveau'
nouveau              2387968  14
i2c_algo_bit           16384  1 nouveau
drm_ttm_helper         16384  1 nouveau
ttm                    81920  2 drm_ttm_helper,nouveau
drm_kms_helper        315392  1 nouveau
drm                   634880  11 drm_kms_helper,drm_ttm_helper,ttm,nouveau
mxm_wmi                16384  1 nouveau
video                  57344  1 nouveau
wmi                    32768  2 mxm_wmi,nouveau
[john@fedora ~]$ 

Have you disable secure boot
Switch to xorg while login in bottom right corner have a settings icon and switch to xorg. Then see if nvidia loads.

yes secure boot disabled.
how do i see if nvidia loaded

Here see this commend

[john@UNKNOWN ~]$ lsmod | grep -E 'nvidia|nouveau'
nouveau              2387968  8
i2c_algo_bit           16384  1 nouveau
drm_ttm_helper         16384  1 nouveau
ttm                    81920  2 drm_ttm_helper,nouveau
drm_kms_helper        315392  1 nouveau
drm                   634880  8 drm_kms_helper,drm_ttm_helper,ttm,nouveau
mxm_wmi                16384  1 nouveau
video                  57344  1 nouveau
wmi                    32768  2 mxm_wmi,nouveau
[john@UNKNOWN ~]$ 



Remove nvidia driver and reinstall that.
sudo dnf remove nvidia*
https://rpmfusion.org/Howto/NVIDIA

right uninstalled nvidia, ran dnf update -y
kernel cores been updated to 5.16.16
kernel modules updated to 5.16.16
installing nvidia now

[john@UNKNOWN ~]$ lsmod | grep -E 'nvidia|nouveau'
nouveau              2387968  7
i2c_algo_bit           16384  1 nouveau
drm_ttm_helper         16384  1 nouveau
ttm                    81920  2 drm_ttm_helper,nouveau
drm_kms_helper        315392  1 nouveau
drm                   634880  8 drm_kms_helper,drm_ttm_helper,ttm,nouveau
mxm_wmi                16384  1 nouveau
wmi                    32768  2 mxm_wmi,nouveau
video                  57344  1 nouveau
[john@UNKNOWN ~]$ 

no nvidia on boot up got the original erroe so booted into xorg and no driver as above terminal says

Firstly give us ‘uname -r’ and list kernel packeges you install ‘dnf list --installed | grep ‘kernel-*’’

does that include the ’

dnf list --installed | grep ‘kernel-*’

john@UNKNOWN ~]$ dnf list --installed | grep 'kernel-*'
abrt-addon-kerneloops.x86_64                      2.14.6-9.fc35                          @anaconda                 
kernel.x86_64                                     5.14.10-300.fc35                       @anaconda                 
kernel.x86_64                                     5.16.15-201.fc35                       @updates                  
kernel.x86_64                                     5.16.16-200.fc35                       @updates-archive          
kernel-core.x86_64                                5.14.10-300.fc35                       @anaconda                 
kernel-core.x86_64                                5.16.15-201.fc35                       @updates                  
kernel-core.x86_64                                5.16.16-200.fc35                       @updates-archive          
kernel-devel.x86_64                               5.16.16-200.fc35                       @updates-archive          
kernel-headers.x86_64                             5.16.5-200.fc35                        @updates                  
kernel-modules.x86_64                             5.14.10-300.fc35                       @anaconda                 
kernel-modules.x86_64                             5.16.15-201.fc35                       @updates                  
kernel-modules.x86_64                             5.16.16-200.fc35                       @updates-archive          
kernel-modules-extra.x86_64                       5.14.10-300.fc35                       @anaconda                 
kernel-modules-extra.x86_64                       5.16.15-201.fc35                       @updates                  
kernel-modules-extra.x86_64                       5.16.16-200.fc35                       @updates-archive          
kernel-srpm-macros.noarch                         1.0-6.fc35                             @fedora                   
libreport-plugin-kerneloops.x86_64                2.15.2-8.fc35                          @updates                  
[john@UNKNOWN ~]$ 


ok now sudo dnf remove nvidia*

Do one thing first give all output of inxi -Fxz
It will have all we might neeed

removed nvidia*

[john@UNKNOWN ~]$ inxi -Fxz
System:
  Kernel: 5.16.16-200.fc35.x86_64 x86_64 bits: 64 compiler: gcc
    v: 2.37-10.fc35 Desktop: GNOME 41.4 Distro: Fedora release 35 (Thirty Five)
Machine:
  Type: Laptop System: SAMSUNG product: 700G7C v: P04ABA
    serial: <superuser required>
  Mobo: SAMSUNG model: NP700G7C-S02UK v: SEC_SW_REVISION_1234567890ABCD
    serial: <superuser required> UEFI: American Megatrends
    v: P04ABA.046.140311.DK date: 03/11/2014
Battery:
  ID-1: BAT1 charge: 62.2 Wh (98.1%) condition: 63.4/89.1 Wh (71.2%)
    volts: 16.8 min: 15.1 model: SAMSUNG Electronics SR Real Battery
    status: N/A
CPU:
  Info: quad core model: Intel Core i7-3630QM bits: 64 type: MT MCP
    arch: Ivy Bridge rev: 9 cache: L1: 256 KiB L2: 1024 KiB L3: 6 MiB
  Speed (MHz): avg: 1202 high: 1239 min/max: 1200/3400 cores: 1: 1239
    2: 1197 3: 1198 4: 1197 5: 1198 6: 1197 7: 1197 8: 1197 bogomips: 38312
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: NVIDIA GF114M [GeForce GTX 675M] vendor: Samsung Co
    driver: nouveau v: kernel bus-ID: 01:00.0
  Device-2: DigiTech SC-20FHL11146M type: USB driver: uvcvideo
    bus-ID: 1-1.4:3
  Display: x11 server: X.Org v: 1.20.14 driver: X: loaded: modesetting
    unloaded: fbdev,vesa gpu: nouveau resolution: 1920x1080~60Hz
  OpenGL: renderer: NVCE v: 4.3 Mesa 21.3.7 direct render: Yes
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio
    vendor: Samsung Co driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
  Device-2: NVIDIA GF114 HDMI Audio vendor: Samsung Co
    driver: snd_hda_intel v: kernel bus-ID: 01:00.1
  Sound Server-1: ALSA v: k5.16.16-200.fc35.x86_64 running: yes
  Sound Server-2: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel Centrino Advanced-N 6235 driver: iwlwifi v: kernel
    bus-ID: 02:00.0
  IF: wlp2s0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Samsung Co driver: r8169 v: kernel port: d000 bus-ID: 03:00.0
  IF: enp3s0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Centrino Bluetooth Wireless Transceiver type: USB
    driver: btusb v: 0.8 bus-ID: 2-1.5:3
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 1.37 TiB used: 4.59 GiB (0.3%)
  ID-1: /dev/sda vendor: Hitachi model: HTS727575A9E364 size: 698.64 GiB
    temp: 34 C
  ID-2: /dev/sdb vendor: SanDisk model: SSD i100 8GB size: 7.46 GiB
  ID-3: /dev/sdc vendor: Hitachi model: HTS727575A9E364 size: 698.64 GiB
    temp: 29 C
Partition:
  ID-1: / size: 697.05 GiB used: 4.33 GiB (0.6%) fs: btrfs dev: /dev/sda3
  ID-2: /boot size: 973.4 MiB used: 246.2 MiB (25.3%) fs: ext4
    dev: /dev/sda2
  ID-3: /boot/efi size: 598.8 MiB used: 13.8 MiB (2.3%) fs: vfat
    dev: /dev/sda1
  ID-4: /home size: 697.05 GiB used: 4.33 GiB (0.6%) fs: btrfs
    dev: /dev/sda3
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 49.0 C mobo: 49.0 C gpu: nouveau temp: 54.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 289 Uptime: 41m Memory: 15.57 GiB used: 1.92 GiB (12.3%)
  Init: systemd runlevel: 5 Compilers: gcc: 11.2.1 Packages: N/A
  note: see --pkg Shell: Bash v: 5.1.8 inxi: 3.3.13
[john@UNKNOWN ~]$ 


aftter that sudo dnf install akmod-nvidia

That is nice make a reboot and reinstall nvidia and reboot like rpm fusion mentioned and you can find more info in itsfoss or linuxtoday and other websites just search that in web

once you install akmod-nvidia reboot twice