X11 doesn't work after upgrading the Fedora KDE Spin from version 37 to 38

Hello all! After upgrading from Fedora 37 to 38, I am no longer able to start X11, seemingly because of issues with the NVIDIA drivers after upgrading. Wayland seems to work fine, though I’m not able to use it for any games. When upgrading it seemed that the packages for kernal and kernal-core were removed, so I wasn’t able to reinstall them, though I tried reinstalling akmod-nvidia and rebuilding it with akmods --force but it just outputs

Checking kmods exist for 6.2.15-300.fc38.x86_64            [  OK  ]

Without anything further

startx provided these logs

[   133.175] 
X.Org X Server 1.20.14
X Protocol Version 11, Revision 0
[   133.178] Build Operating System:  6.2.8-200.fc37.x86_64 
[   133.179] Current Operating System: Linux ByronGPC 6.2.15-300.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 11 17:37:39 UTC 2023 x86_64
[   133.179] Kernel command line: BOOT_IMAGE=(hd0,gpt2)/boot/vmlinuz-6.2.15-300.fc38.x86_64 root=UUID=33377dc3-e2c5-4b2e-9395-b55bf2481aa3 ro rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
[   133.182] Build Date: 25 April 2023  12:00:00AM
[   133.183] Build ID: xorg-x11-server 1.20.14-23.fc38 
[   133.184] Current version of pixman: 0.42.2
[   133.185] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[   133.185] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   133.189] (==) Log file: "/home/alazydope/.local/share/xorg/Xorg.0.log", Time: Sun May 28 19:25:49 2023
[   133.190] (==) Using config file: "/etc/X11/xorg.conf"
[   133.191] (==) Using config directory: "/etc/X11/xorg.conf.d"
[   133.192] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   133.193] (==) ServerLayout "layout"
[   133.193] (**) |-->Screen "Screen0" (0)
[   133.193] (**) |   |-->Monitor "Monitor0"
[   133.193] (**) |   |-->Device "Device0"
[   133.193] (==) Automatically adding devices
[   133.193] (==) Automatically enabling devices
[   133.193] (==) Automatically adding GPU devices
[   133.193] (==) Automatically binding GPU devices
[   133.193] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   133.193] (==) FontPath set to:
	catalogue:/etc/X11/fontpath.d,
	built-ins
[   133.193] (==) ModulePath set to "/usr/lib64/xorg/modules"
[   133.193] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[   133.193] (II) Loader magic: 0x557c8aef8a80
[   133.193] (II) Module ABI versions:
[   133.193] 	X.Org ANSI C Emulation: 0.4
[   133.193] 	X.Org Video Driver: 24.1
[   133.193] 	X.Org XInput driver : 24.1
[   133.193] 	X.Org Server Extension : 10.0
[   133.194] (++) using VT number 2

[   133.195] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[   133.196] (II) xfree86: Adding drm device (/dev/dri/card0)
[   133.197] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 13 paused 0
[   133.204] (--) PCI:*(11@0:0:0) 10de:2482:1462:5053 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/268435456, 0xf0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/65536
[   133.204] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[   133.204] (II) LoadModule: "dbe"
[   133.205] (II) Module "dbe" already built-in
[   133.205] (II) LoadModule: "extmod"
[   133.205] (II) Module "extmod" already built-in
[   133.205] (II) LoadModule: "glx"
[   133.205] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[   133.206] (II) Module glx: vendor="X.Org Foundation"
[   133.206] 	compiled for 1.20.14, module version = 1.0.0
[   133.206] 	ABI class: X.Org Server Extension, version 10.0
[   133.206] (II) LoadModule: "nvidia"
[   133.206] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[   133.207] (II) Module nvidia: vendor="NVIDIA Corporation"
[   133.207] 	compiled for 1.6.99.901, module version = 1.0.0
[   133.207] 	Module class: X.Org Video Driver
[   133.207] (II) NVIDIA dlloader X Driver  530.41.03  Thu Mar 16 19:25:45 UTC 2023
[   133.207] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   133.207] (II) systemd-logind: releasing fd for 226:0
[   133.208] (II) Loading sub module "fb"
[   133.208] (II) LoadModule: "fb"
[   133.208] (II) Loading /usr/lib64/xorg/modules/libfb.so
[   133.208] (II) Module fb: vendor="X.Org Foundation"
[   133.208] 	compiled for 1.20.14, module version = 1.0.0
[   133.208] 	ABI class: X.Org ANSI C Emulation, version 0.4
[   133.208] (II) Loading sub module "wfb"
[   133.208] (II) LoadModule: "wfb"
[   133.208] (II) Loading /usr/lib64/xorg/modules/libwfb.so
[   133.208] (II) Module wfb: vendor="X.Org Foundation"
[   133.208] 	compiled for 1.20.14, module version = 1.0.0
[   133.208] 	ABI class: X.Org ANSI C Emulation, version 0.4
[   133.214] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[   133.214] (EE) NVIDIA:     system's kernel log for additional error messages and
[   133.214] (EE) NVIDIA:     consult the NVIDIA README for details.
[   133.219] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[   133.219] (EE) NVIDIA:     system's kernel log for additional error messages and
[   133.219] (EE) NVIDIA:     consult the NVIDIA README for details.
[   133.223] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[   133.223] (EE) NVIDIA:     system's kernel log for additional error messages and
[   133.223] (EE) NVIDIA:     consult the NVIDIA README for details.
[   133.226] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[   133.226] (EE) NVIDIA:     system's kernel log for additional error messages and
[   133.226] (EE) NVIDIA:     consult the NVIDIA README for details.
[   133.226] (EE) No devices detected.
[   133.226] (EE) 
Fatal server error:
[   133.226] (EE) no screens found(EE) 
[   133.226] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[   133.226] (EE) Please also check the log file at "/home/alazydope/.local/share/xorg/Xorg.0.log" for additional information.
[   133.226] (EE) 
[   133.228] (EE) Server terminated with error (1). Closing log file.

and cat /proc/cmdline gave me this

BOOT_IMAGE=(hd0,gpt2)/boot/vmlinuz-6.2.15-300.fc38.x86_64 root=UUID=33377dc3-e2c5-4b2e-9395-b55bf2481aa3 ro rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1

kernal version from uname -r if it helps

6.2.15-300.fc38.x86_64

If there is any other useful information I can provide let me know!

Please provide the output of
lsmod | grep -iE 'nouveau|nvidia'
dnf list installed '*nvidia*'
mokutil --sb-state

Ah, I just found another discussion that mentions the RPM Fusion common bugs, where running sudo depmod -ae is listed as a solution to this problem, and it seems to have worked.

Although it’s listed as a solution for Fedora 36, it seems to have worked in this case as well.

I wonder if you have both kmod-nvidia and kmod-nvidia-6.2.15-300.fc38.x86_64.x86_64 installed.

If so then it causes problems.

Please post the output of dnf list installed '*nvidia*' so we may see at least that part of the requested info.

I only installed kmod-nvidia after having the issue, but uninstalled it immediately after realizing that they shouldn’t both be installed.

Output of dnf list installed '*nvidia*'

Installed Packages
akmod-nvidia.x86_64                                                    3:530.41.03-1.fc38                              @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.2.14-200.fc37.x86_64.x86_64                              3:530.41.03-1.fc37                              @@commandline                   
kmod-nvidia-6.2.15-200.fc37.x86_64.x86_64                              3:530.41.03-1.fc37                              @@commandline                   
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-persistenced.x86_64                                             3:530.41.03-1.fc38                              @rpmfusion-nonfree              
nvidia-settings.x86_64                                                 3:530.41.03-1.fc38                              @rpmfusion-nonfree              
xorg-x11-drv-nvidia.x86_64                                             3:530.41.03-1.fc38                              @rpmfusion-nonfree              
xorg-x11-drv-nvidia-cuda.x86_64                                        3:530.41.03-1.fc38                              @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.i686                                     3:530.41.03-1.fc38                              @rpmfusion-nonfree              
xorg-x11-drv-nvidia-cuda-libs.x86_64                                   3:530.41.03-1.fc38                              @rpmfusion-nonfree              
xorg-x11-drv-nvidia-kmodsrc.x86_64                                     3:530.41.03-1.fc38                              @rpmfusion-nonfree              
xorg-x11-drv-nvidia-libs.i686                                          3:530.41.03-1.fc38                              @rpmfusion-nonfree              
xorg-x11-drv-nvidia-libs.x86_64                                        3:530.41.03-1.fc38                              @rpmfusion-nonfree              
xorg-x11-drv-nvidia-power.x86_64                                       3:530.41.03-1.fc38                              @rpmfusion-nonfree

If you are still having problems then it is relatively simple to
dnf remove kmod-nvidia-$(uname -r).x86_64 and follow that with
akmods --kernels $(uname -r) --force to rebuild the modules for that specific kernel.
Once that completes and the prompt returns then a reboot should load the newly built modules.

You have already marked a post above as the solution so this may not be needed.

I’ve done that as well just in case, but depmod alone seems to have resolved my issues