Fedora 39 with KDE Plasma Wayland - Nvidia drivers issue

Hello,

I hope someone can clear things up a bit for me regarding the Nvidia drivers and KDE on Wayland. So, before I installed the KDE Plasma desktop I followed the below guide to install the Nvidia drivers on Xorg.

Then I installed the KDE Plasma and logged in with Wayland. The problem is now that the default drivers are the Intel integrated ones.

Device: 0
Name: Intel® HD Graphics 630
Default: yes
Environment: DRI_PRIME=pci-0000_00_02_0

Device: 1
Name: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile]
Default: no
Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only

Is it possible to have the Nvidia driver as default on Wayland? Or will this only work on X11?

Do I need to uninstall the Nvidia drivers and follow another process to have this work with Wayland?

Based on the below it seems that Wayland and Nvidia are compatible, but I just can’t find the steps needed to enable this.

"Wayland
NVIDIA works under Wayland (and Xwayland) starting with Fedora 35 and NVIDIA driver 495 and later. With GNOME 41, Wayland can be selected explicitly with GDM.

Please remind that video acceleration with VDPAU isn’t available under Wayland."

Thank you!

You are seeing exactly what would be expected.

The instructions you linked are for use with xorg and do not set the nvidia gpu as primary when using wayland. The clue there is that the nvidia.conf file is placed in the /etc/X11/xorg.conf.d/ directory.

There have been comments in the past about trying to set nvidia to be used as primary for wayland but I have no clue as to how that worked out. Maybe someone else knows.

In the meantime you can run apps on the nvidia gpu with wayland by right click on the desktop icon and select to run it with the discrete gpu.

Thanks for your response, @computersavvy ! I did try editing for example GNU to run with the discrete GPU but when checking the Nvidia X Server Settings it still shows that the graphics card is not being used. Not sure how to tell if it’s being used or not.

Not sure if I am missing something, but according to everything I found, Wayland is supposed to support Nvidia drivers with Fedora 39. I guess I’ll keep digging.

You have to choose when to use the nvidia GPU, it’s per application. For example when I used Blender I right click and choose run with discrete gpu.

Unfortunately, I don’t have that option when right clicking applications.

Lets check that the nvidia gpu is working properly. The following commands will provide most of the needed info.
lsmod | grep -E 'nvidia|nouveau'
dnf list installed \*nvidia\*
inxi -Fzxx

Thanks for your time and willingness to help out. I got frustrated in trying to fix the issue and ended up removing Fedora from my machine. I will return in the future once it will be easier for a nvidia gpu to run on Fedora or when I’ll buy another laptop/desktop with an AMD gpu. Right now, it just feels like it’s too much work to patch something that should just work. Thank you!

Unfortunately the nvidia driver is proprietary so it requires the user to take action to properly support that gpu on fedora.

Maybe you could try the nobara distro since they are based on the current fedora version but have modified the installation to support nvidia out of the box.

Thanks! I tried Nobara, installed it, but after boot there was no Grub bootloader (dual boot with windows). Windows did not even see the partition with free space as being used. So, I proceeded to remove the install with Aomei. I know I could have maybe added a boot entry for Nobara, but yeah, so much for that.

Follow up question: If I am installing the Nvidia drivers on Xorg that means that if i am logged in on Wayland, the Nvidia drivers are not used at all right? Not even seen by the system, even if I can somehow instruct the system to open apps with dGPU.

Or am I completely not understanding the process? Thanks!

No
The drivers are for the hardware and work regardless of the DE in use.

One major difference between wayland & xorg is that with xorg it is possible to set the nvidia GPU to be the primary and always used on optimuis laptops that have dual gpus. This is not easily done when using wayland.

If you run lsmod | grep nvidia and get back a few lines of response then the drivers are loaded and the GPU can be used.

Whether it is actually used after that point is up to the OS itself and the way the app is launched.

Nobara does not use grub. They use systemd boot instead. If you read the web site you should be aware of that.

Thanks for the explanation! I think then I will return to Fedora 39 for now and continue to use Wayland.

Not sure I understand regarding the Nobara issue. After installation, it only booted into windows, with no option to select Nobara. BIOS showed only the Windows entry in the Boot Manager. How could I have technically booted into Nobara after the installation?

Thanks!

I have never installed Nobara for dual boot with windows so cannot answer that.

I think you can add some code to .bashrc file to use the Nvidia primary gpu on the application you don’t need to set. Nvidia as primary gpu on wayland and wayland its more stable than x org

Add this to .bashrc file

export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=“nvidia”
export __VK_LAYER_NV_optimus=“NVIDIA_only”
export __GL_SHOW_GRAPHICS_OSD=1

And after that type exec bash or reboot the system it will use the Nvidia as primary gpu for. All applications even if you don’t set it as primary GPU in wayland with kde

Tell us if it’s work for you :grin: