The NVIDIA driver automation transitions to Wayland era

The refresh applies a new strategy in helping the NVIDIA driver installer succeed.

  1. Some time ago, dkms was fine including running kernel 6.0. Then, false-positives started appearing (lots of it > 190,000 lines). Ditto on Fedora Linux. Solution: The pre-installer script installs the lts2021 kernel for better success with the NVIDIA driver installation.
  2. Recently, x11-server and many other bundles are no longer installed during the OS installation. But the x11-server bundle is needed minimally or xkbcommon segfaults along with GNOME shell. Solution: The pre-installer script installs the x11-server bundle, if missing.
  3. X11 is no more for new CL 38270+ OS installations. Attempting to login into X11 may bring you back to the login screen. Solution: The installer automation configures GNOME on Wayland as default, only if the file is missing, to not effect the user’s current setting (e.g. running KDE). Manually select GNOME on Wayland, otherwise.
  4. Please refer to the README file.

Edit: The automation no longer installs the lts2021 kernel. Instead, it creates a dkms wrapper passing the --force flag to /usr/bin/dkms. This resolves dkms failing running the native or 6.x kernel.


Many thanks @marioroy

I strictly followed your steps at your GitHub repo. When I chose the lts2021 kernel it would not boot and gave the error messages below and went into a kernel panic. I could not SSH either.
I unplugged all the RTX4090 cables and plugged in an old GT 120 I had lying around. Booted successfully and completed the next steps via SSH.

It worked!!! High five.

Then I installed the latest native kernel, updated the dkms using your script, rebooted into the latest native kernel. It is Wayland too!

Thank you very much.

In case anyone else is curious about the hardware:
Core i9-13900K, Asus ROG Maximus Z790 Apex, GeForce RTX 4090, OS installed on a Nvme drive with resizable bar on, Intel Rapid Storage Technology on.


Thanks to your scripts I was able to correctly install NVIDIA drivers v520 (not 525 because I am aware of the errors you mentioned in your guide) with kernel-lts on my Laptop powered by NVIDIA Optimus. I wasn’t able to use kernel-native nor make GNOME Wayland use the NVIDIA GPU as the primary GPU because it showed a black screen, but, I have it as primary GPU on X11, fully accelerated. Anyway, I would like to contribute to those who have a desktop PC with an individual NVIDIA GPU card (not Optimus), so they can use it as primary GPU on Wayland using GNOME.

The trick resides on one file and one line that has to be added:

[ /usr/lib/udev/rules.d/61-mutter.rules ]

ENV{DEVNAME}=="/dev/dri/card1", TAG+="mutter-device-preferred-primary"

If you have several GPU cards on your desktop PC then you need to set the correct card#. Thats all you need to have GNOME with Wayland using your accelerated graphics card as primary GPU.

1 Like

Thank you for the report. I made an update so that the NVIDIA driver installation may work running the native kernel. The automation no longer installs the lts2021 kernel. - Blessings and grace.


Thank you for the solution for folks having (edit) multiple NVIDIA/AMD GPUs on PCIe. What a wonderful tip! This is a configuration I’m unable to test.

For the change to persist (not overwritten by future OS updates), preferably create 62-mutter.rules in /etc/udev/rules.d. Your device dri card path may differ.

sudo mkdir -p /etc/udev/rules.d
( echo 'ENV{DEVNAME}=="/dev/dri/card1", TAG+="mutter-device-preferred-primary"'
) | sudo sponge /etc/udev/rules.d/62-mutter.rules

I updated the repo adding support for beta driver 530.30.02 and CUDA 12.1.0.

Today is my last day maintaining the repo, now archived. Life is about to take me to a new direction having little time to continue forward. Anybody can move forward with it, if so desired :blush:.

Thank you CL team for resolving several swupd-dkms related issues.


Let me clarify. I have a laptop with Intel and NVIDIA GPU, which is accesed through Optimus (no direct access). I am able to use the NVIDIA GPU as primary GPU only on X11. You almost have all the required configurations in your automation repo. The things that you lack in order to change from Intel to NVIDIA as primary GPU on X11 is the next:

[ /etc/X11/xorg.conf.d/nvidia-drm-outputclass.conf ]
Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes" # This can be commented if wanted Intel as primary GPU
    Option "SLI" "Auto"
    Option "BaseMosaic" "on"

Section "OutputClass"
    Identifier "intel"
    MatchDriver "i915"
    Driver "modesetting"
    Option "AccelMethod" "none" # Comment when using Intel as primary
[ /etc/X11/xorg.conf.d/nvidia-modules.conf ]
Section "Files"
	ModulePath	"/usr/lib64/xorg/modules"
	ModulePath	"/opt/nvidia/lib64/xorg/modules"
[ /etc/gdm/custom.conf ]
WaylandEnable=false # This can be commented if wanted Wayland as default

Now, as for Wayland. I am unable to use NVIDIA GPU as primary GPU because it stays at a black screen when it starts. What I gave you about Mutter selecting a different GPU as primary is for people who have a desktop PC and a NVIDIA/AMD GPU on PCIe (no Optimus).


Good luck in your new path

1 Like

Thank you, for the clarification. I made another update.

The “/opt/nvidia/lib64/xorg” folder does not exist on my system. NVIDIA xorg modules reside in “/usr/lib64/xorg/modules/{drivers, extensions}”. No problem having “/etc/X11/xorg.conf.d/nvidia-modules.conf” in the event the installer places xorg modules in the “/opt/nvidia/lib64/xorg/modules” location.

1 Like

I had to add the configuration I placed into nvidia-modules.conf because X server couldn’t load NVIDIA drivers after I installed the drivers with your scripts. After I did that and disable Wayland on GDM I was running accelerated with the NVIDIA GPU.

1 Like

Some screenshots of my GNOME.


Thank you for confirming. I added a comment to keep the code block.

Thank you for the parting gift @marioroy but hoping you will come back to maintain the repo. I am sure it was a lot of fun!

I have an update. I installed the 38400 live desktop.
It boots to text mode without nomodeset 3 with the RTX4090.
I did not have to use any kernel flags.
After installing the beta driver using your scripts, booted to desktop WITHOUT ibt=off

Many thanks for your help and wish you good luck if I do not see you here again.


Do you have a desktop PC or a laptop with hybrid GPU config (Optimus)?

Did you applied the mutter trick to select NVIDIA GPU as primary in order to use Wayland with NVIDIA GPU?

If you are asking me, I have a desktop assembled to play around with stable diffusion.

1 Like

Did you applied the trick of Mutter in order to select NVIDIA as primary GPU using Wayland?

Nope. My system obviously does not have the ‘Optimus’ problem like your laptop. Just followed instructions @marioroy github repo: cloned it, ran the bash ./xxxx update, install-driver etc, as instructed.

1 Like

Uuhhmm, so GNOME automatically selects the accelerated GPU when it starts using Wayland. Thank you for your feedback.

I don’t have 2 GPUs like your laptop. Just a RTX4090!

You have two: integrated (Intel Core i9) and NVIDIA (PCIe). You can check that information with the next command:

lshw -c display