Gdm fails to start after installing nvidia package, missing X11 driver?

I previously had the nvidia driver installed using the installer from NVIDIA, but I wanted to switch to the one from rpmfusion instead. Per the instructions, I did

sudo dnf install akmod-nvidia

followed by

modprobe nvidia

The nvidia kernel module loads, but when I try to start gdm it doesn’t open the greeter and in the logs I see:

xec/gdm-x-session[92359]: (II) LoadModule: "nvidia"
xec/gdm-x-session[92359]: (WW) Warning, couldn't open module nvidia
xec/gdm-x-session[92359]: (EE) Failed to load module "nvidia" (module does not >
xec/gdm-x-session[92359]: (EE) No drivers available.
xec/gdm-x-session[92359]: (EE)
xec/gdm-x-session[92359]: Fatal server error:
xec/gdm-x-session[92359]: (EE) no screens found(EE)
xec/gdm-x-session[92359]: (EE)
xec/gdm-x-session[92359]: Please consult the The X.Org Foundation support
xec/gdm-x-session[92359]:          at http://wiki.x.org
xec/gdm-x-session[92359]:  for help.
xec/gdm-x-session[92359]: (EE) Please also check the log file at "/var/lib/gdm/>
xec/gdm-x-session[92359]: (EE)
xec/gdm-x-session[92359]: (EE) Server terminated with error (1). Closing log fi>
xec/gdm-x-session[92357]: Unable to run X server

So it looks like:

  1. gdm is trying to run on X11 instead of wayland
  2. The xorg-x11-drv-nvidia package didn’t get installed as a dependency of akmod-nvidia like it should

When I run rpm -qa|grep nvidia I get:

nvidia-gpu-firmware-20240909-1.fc39.noarch
xorg-x11-drv-nvidia-kmodsrc-560.35.03-5.fc39.x86_64
nvidia-modprobe-560.35.03-1.fc39.x86_64
akmod-nvidia-560.35.03-1.fc39.x86_64
nvidia-kmod-common-560.35.03-1.fc39.noarch
kmod-nvidia-6.10.11-100.fc39.x86_64-560.35.03-1.fc39.x86_64

It looks like xorg-x11-drv-nvidia-kmodsrc is there, but apparently I’m missing some other piece.

I guessed that xorg-x11-drv-nvidia-libs might be the package I’m missing, but when I try to install it I get an error about “modular filtering”:

$ sudo dnf install xorg-x11-drv-nvidia-xorg-libs
Last metadata expiration check: 3:09:18 ago on Mon 30 Sep 2024 12:53:33 PM EDT.
Error: 
 Problem: package xorg-x11-drv-nvidia-xorg-libs-3:560.35.03-5.fc39.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:560.35.03, but none of the providers can be installed
  - package xorg-x11-drv-nvidia-3:560.35.03-5.fc39.x86_64 from rpmfusion-nonfree-updates requires nvidia-settings(x86-64) = 3:560.35.03, but none of the providers can be installed
  - conflicting requests
  - package nvidia-settings-3:560.35.03-1.fc39.x86_64 from cuda-fedora39-x86_64 is filtered out by modular filtering
  - package nvidia-settings-3:560.35.03-1.fc39.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering

Is xorg-x11-nvidia-drv-libs the package I’m missing? If so, why won’t it install?

It appears that you may have not fully removed the drivers installed from nvidia and that can cause a conflict. You also have packages installed from cuda-fedora39-x86_64 which are known to cause problems.

Please show us the output of dnf list installed '*nvidia*' so we can tell what is installed and from where. Add the result of dnf repolist so we can tell the repos that may be involved and dnf module list so we may see what is causing the modular filtering.

All in all, installed packages from nvidia and cuda-fedora repos must be cleanly removed before the system will cleanly install the packages from rpmfusion.

$ dnf list installed "*nvidia*"
Installed Packages
akmod-nvidia.x86_64                3:560.35.03-1.fc39 @rpmfusion-nonfree-updates
kmod-nvidia-6.10.11-100.fc39.x86_64.x86_64
                                   3:560.35.03-1.fc39 @@commandline             
nvidia-gpu-firmware.noarch         20240909-1.fc39    @updates                  
nvidia-kmod-common.noarch          3:560.35.03-1.fc39 @cuda-fedora39-x86_64     
nvidia-modprobe.x86_64             3:560.35.03-1.fc39 @cuda-fedora39-x86_64     
nvidia-settings.x86_64             3:555.58.02-1.fc39 @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64
                                   3:560.35.03-5.fc39 @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64 3:560.35.03-5.fc39 @rpmfusion-nonfree-updates
$ dnf repolist
repo id                                        repo name
copr:copr.fedorainfracloud.org:phracek:PyCharm Copr repo for PyCharm owned by phracek
cuda-fedora37-x86_64                           cuda-fedora37-x86_64
cuda-fedora39-x86_64                           cuda-fedora39-x86_64
docker-ce-stable                               Docker CE Stable - x86_64
fedora                                         Fedora 39 - x86_64
fedora-cisco-openh264                          Fedora 39 openh264 (From Cisco) - x86_64
google-chrome                                  google-chrome
rpmfusion-free                                 RPM Fusion for Fedora 39 - Free
rpmfusion-free-updates                         RPM Fusion for Fedora 39 - Free - Updates
rpmfusion-nonfree                              RPM Fusion for Fedora 39 - Nonfree
rpmfusion-nonfree-nvidia-driver                RPM Fusion for Fedora 39 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam                        RPM Fusion for Fedora 39 - Nonfree - Steam
rpmfusion-nonfree-updates                      RPM Fusion for Fedora 39 - Nonfree - Updates
updates                                        Fedora 39 - x86_64 - Updates
$ dnf module list
Fedora 39 - x86_64 - Updates                    127 kB/s |  29 kB     00:00    
Last metadata expiration check: 0:00:01 ago on Mon 30 Sep 2024 03:59:22 PM EDT.
cuda-fedora37-x86_64
Name          Stream          Profiles               Summary                    
nvidia-driver latest-dkms [x] default [d], fm, ks    Nvidia driver for latest-dk
                                                     ms branch                  
nvidia-driver open-dkms [x]   default [d], fm, ks, s Nvidia driver for open-dkms
                              rc                      branch                    
nvidia-driver 525-dkms [x]    default [d], fm, ks    Nvidia driver for 525-dkms 
                                                     branch                     
nvidia-driver 525-open [x]    default [d], fm, ks, s Nvidia driver for 525-open 
                              rc                     branch                     
nvidia-driver 530-dkms [x]    default [d], fm, ks    Nvidia driver for 530-dkms 
                                                     branch                     
nvidia-driver 530-open [x]    default [d], fm, ks, s Nvidia driver for 530-open 
                              rc                     branch                     
nvidia-driver 535-dkms [x]    default [d], fm, ks    Nvidia driver for 535-dkms 
                                                     branch                     
nvidia-driver 535-open [x]    default [d], fm, ks, s Nvidia driver for 535-open 
                              rc                     branch                     
nvidia-driver 545-dkms [x]    default [d], fm, ks    Nvidia driver for 545-dkms 
                                                     branch                     
nvidia-driver 545-open [x]    default [d], fm, ks, s Nvidia driver for 545-open 
                              rc                     branch                     

cuda-fedora39-x86_64
Name          Stream          Profiles               Summary                    
nvidia-driver latest-dkms [x] default [d], fm, ks    Nvidia driver for latest-dk
                                                     ms branch                  
nvidia-driver open-dkms [x]   default [d], fm, ks, s Nvidia driver for open-dkms
                              rc                      branch                    
nvidia-driver 550-dkms [x]    default [d], fm, ks    Nvidia driver for 550-dkms 
                                                     branch                     
nvidia-driver 550-open [x]    default [d], fm, ks, s Nvidia driver for 550-open 
                              rc                     branch                     
nvidia-driver 555-dkms [x]    default [d], fm, ks    Nvidia driver for 555-dkms 
                                                     branch                     
nvidia-driver 555-open [x]    default [d], fm, ks, s Nvidia driver for 555-open 
                              rc                     branch                     
nvidia-driver 560-dkms [x]    default [d], fm, ks    Nvidia driver for 560-dkms 
                                                     branch                     
nvidia-driver 560-open [x]    default [d], fm, ks, s Nvidia driver for 560-open 
                              rc                     branch                     

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Looks like I still have nvidia-kmod-common.noarch and nvidia-modprobe.x86_64 left from the cuda-fedora39 repository. Not sure if either of those would affect the X11 driver though.

When I try to remove nvidia-kmod-common and nvidia-modprobe, dnf says it will remove a bunch of other thangs that aren’t from the cuda repo, including the rpmfusion akmod-nvidia package:

$ sudo dnf remove nvidia-kmod-common nvidia-modprobe
[sudo] password for jhaiduce: 
Dependencies resolved.
================================================================================
 Package                  Arch   Version            Repository             Size
================================================================================
Removing:
 nvidia-kmod-common       noarch 3:560.35.03-1.fc39 @cuda-fedora39-x86_64  66 M
 nvidia-modprobe          x86_64 3:560.35.03-1.fc39 @cuda-fedora39-x86_64  55 k
Removing dependent packages:
 akmod-nvidia             x86_64 3:560.35.03-1.fc39 @rpmfusion-nonfree-updates
                                                                           92 k
 kmod-nvidia-6.10.11-100.fc39.x86_64
                          x86_64 3:560.35.03-1.fc39 @@commandline          50 M
 nvidia-settings          x86_64 3:555.58.02-1.fc39 @rpmfusion-nonfree-nvidia-driver
                                                                          4.1 M
Removing unused dependencies:
 akmods                   noarch 0.5.8-6.fc39       @updates               48 k
 fakeroot                 x86_64 1.36-1.fc39        @updates              163 k
 fakeroot-libs            x86_64 1.36-1.fc39        @updates              133 k
 http-parser              x86_64 2.9.4-9.fc39       @fedora                99 k
 kmodtool                 noarch 1.1-8.fc39         @fedora                28 k
 libgit2                  x86_64 1.7.2-1.fc39       @updates              1.2 M
 python3-babel            noarch 2.12.1-6.fc39      @fedora                31 M
 python3-click-plugins    noarch 1.1.1-17.fc39      @fedora                24 k
 python3-progressbar2     noarch 3.53.2-9.fc39      @fedora               256 k
 python3-pygit2           x86_64 1.14.0-1.fc39      @updates              1.2 M
 python3-rpmautospec      noarch 0.7.2-1.fc39       @updates              149 k
 python3-rpmautospec-core noarch 0.1.5-1.fc39       @updates               10 k
 python3-utils            noarch 3.3.3-4.fc39       @fedora               139 k
 rpmdevtools              noarch 9.6-4.fc39         @fedora               214 k
 xorg-x11-drv-nvidia-kmodsrc
                          x86_64 3:560.35.03-5.fc39 @rpmfusion-nonfree-updates
                                                                           54 M

Transaction Summary
================================================================================
Remove  20 Packages

Freed space: 208 M
Is this ok [y/N]: 

I could let dnf uninstall everything listed and then try reinstalling the akmod-nvidia package afterward, but I wonder if there is a better way…

You must do 3 things to clean that up.

  1. Remove the nvidia packages
    sudo dnf remove '*nvidia*' --exclude nvidia-gpu-firmware
  2. Disable the 2 cuda-fedora repos.
    sudo dnf config-manager --disable cuda-fedora*
  3. install the drivers again from rpmfusion.
    sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
    If the install complains about the modular filtering at this point run
    sudo dnf module --disable nvidia-driver then repeat the install command.

It is not wise to attempt a shortcut since it could leave something behind that might later cause a problem. Reinstalling the nvidia driver from rpmfusion will also reinstall anything that might otherwise be removed but is necessary.

Please note that F41 is scheduled to be released in about a month and that f39 will go EOL a month later. It is very close to time where the upgrade to either f40 or f41 will be necessary.

Thanks @computersavvy , that did the trick! Restarted gdm after running the above commands and it worked!

1 Like

Now working on upgrading to f40…