I’m new to Fedora (and Linux in general) and I’ve been trying to install and setup Fedora 37 i3 spin on my Laptop. I’m running a Ryzen 7 5800H with integrated graphics and also an RTX 3070. Secure boot is turned off and I enabled encryption.
I was only able to boot into Fedora using the nomodeset parameter in grub (I assume because of the missing Nvidia drivers). I ran dnf update and then installed the latest Nvidia drivers from the Nvidia CUDA repository (Later I also tried the RPM Fusion method with the same results).
After rebooting, I tried starting Fedora using the kernel 6.1.14 without the nomodeset parameter and I was able to get to the decryption screen and enter my password. The loading animation starts but the screen goes black before I can see the login screen.
I then tried booting the kernel my installation came with; 6.0.7. And that seems to work (though I’m not sure which GPU it is using right now and how to switch between them yet).
I’ve been trying to find related issues, but I was only able to find recent issues involving a black screen right before the decryption.
I’d like to include more information and relevant log files, but I’m not sure what is relevant. I’d really appreciate if you could tell me what to include and how to better format this question.
Furthermore, running nvidia-settingsgives the output:
ERROR: NVIDIA driver is not loaded
(nvidia-settings:3605): GLib-GObject-CRITICAL **: 17:50:10.391: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** (nvidia-settings:3605): CRITICAL **: 17:50:10.392: ctk_powermode_new: assertion '(ctrl_target != NULL) && (ctrl_target->h != NULL)' failed
ERROR: nvidia-settings could not find the registry key file or the X server is not
accessible. This file should have been installed along with this driver at
/usr/share/nvidia/nvidia-application-profiles-key-documentation. The application
profiles will continue to work, but values cannot be prepopulated or validated, and
will not be listed in the help text. Please see the README for possible values and
For my current installation of the Nvidia drivers, I tried to follow the first option of this guide (the second option results in the same problems, though I haven’t compared the specifics):
Installing the nvidia drivers from the fedora-cuda repo I think requires using dkms and AFAIK does not automatically recompile the drivers with a kernel update.
I always suggest to never use the fedora-cuda repo and instead use the rpmfusion repo for the nvidia drivers. That method does automatic updates when a new version is released and also does an automatic recompile of the kernel modules with every kernel update. Once installed from rpmfusion it is almost a ‘set it and forget it’ process that just keeps things up to date automatically.
My suggestion is to remove what was installed from the cuda repo and instead enable the rpmfusion-nonfree-nvidia-driver repo and install from there with sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda which will give you both the nvidia drivers and cuda as well.
Trying to install xorg-x11-drv-nvidia-cuda results in the following problem:
Last metadata expiration check: 0:40:44 ago on Fri 03 Mar 2023 05:20:48 PM CET.
All matches were filtered out by modular filtering for argument: xorg-x11-drv-nvidia-cuda
Error: Unable to find a match: xorg-x11-drv-nvidia-cuda
Before, I ran sudo dnf module remove nvidia-driver:latest-dkmsto remove the previously installed drivers.
I try to avoid using modules and have disabled the modular repos.
I believe that seems an artifact from installing nvidia from the cuda repo and while I don’t work with modules enough to be fully versed on how to disable the interference I seem to recall that there are ways to disable the modular filtering.
This will tell you what modules are enabled sudo dnf module list --enabled
There are several threads on this forum about that specific error and a search for matches were filtered out by modular filtering will show lots of responses and several with the actual fix.
Thank you, this allowed me to install xorg-x11-drv-nvidia-cuda. However, now I’m back at square one: I still get the exact same black screen problem. Looking at the bootlog, there is no “FAILED” field. It seems to be stuck at:
[ OK ] Started crond.service - Command Scheduler.
Starting lightdm.service - Light Display Manager...
Starting plymouth-quit-wai… until boot process finishes up...
Maybe, the following is a useful observation: When I boot using the older kernel 6.0.7, I get
[FAILED] Failed to start dkms.servi…l new kernel modules through DKMS.
See 'systemctl status dkms.service' for details.
but the system boots normally. I’ve been using my laptop with that kernel since.
Looking up systemctl status dkms.servicegives the output:
dkms.service - Builds and install new kernel modules through DKMS
Loaded: loaded (/usr/lib/systemd/system/dkms.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sat 2023-03-04 18:39:11 CET; 14min ago
Process: 1286 ExecStart=/usr/sbin/dkms autoinstall --verbose --kernelver 6.0.7-301.fc37.x86_64 (code=exited, status=11)
Main PID: 1286 (code=exited, status=11)
Mar 04 18:39:11 fedora systemd: Starting dkms.service - Builds and install new kernel modules through DKMS...
Mar 04 18:39:11 fedora dkms: Sign command: /lib/modules/6.0.7-301.fc37.x86_64/build/scripts/sign-file
Mar 04 18:39:11 fedora dkms: Binary /lib/modules/6.0.7-301.fc37.x86_64/build/scripts/sign-file not found, modules won't be signed
Mar 04 18:39:11 fedora dkms: Error! Your kernel headers for kernel 6.0.7-301.fc37.x86_64 cannot be found at /lib/modules/6.0.7-301.fc37.x86_64/build or /lib/modules/6.0.7-301.fc37.x86_64/source.
Mar 04 18:39:11 fedora dkms: Please install the linux-headers-6.0.7-301.fc37.x86_64 package or use the --kernelsourcedir option to tell DKMS where it's located.
Mar 04 18:39:11 fedora dkms: Error! One or more modules failed to install during autoinstall.
Mar 04 18:39:11 fedora dkms: Refer to previous errors for more information.
Mar 04 18:39:11 fedora systemd: dkms.service: Main process exited, code=exited, status=11/n/a
Mar 04 18:39:11 fedora systemd: dkms.service: Failed with result 'exit-code'.
Mar 04 18:39:11 fedora systemd: Failed to start dkms.service - Builds and install new kernel modules through DKMS.
Again, this error only occurs on the “working” kernel. There is no error (as far as I can tell) on the newest kernel 6.1.14.
The nvidia driver from rpmfusion is built using akmods and for that purpose dkms.service is not needed. The fix for the dkms error may be to disable the dkms service with systemctl disable dkms.service then reboot.
Please post the output of dnf list installed '*nvidia*' and dmesg | grep -iE 'secure|nvidia|nouveau'