Desktop Environment with nvidia and wayland support

I would like to reinstall system.
I would like to use KDE or Gnome (I’m a xfce user)

Before installation, I started research about wayland.

What I found is that on Gnome it’s not a piece of cake and even if I succeed in running wayland it can run poorly
An on our forum there is something like this:

I’m closer to KDE then Gnome and I’ve found this article:
https://community.kde.org/Plasma/Wayland/Nvidia

And on arch wiki in KDE installation guide there is:

To enable support for Wayland in Plasma, also install the plasma-wayland-session package.

How is Manjaro handling nvidia + wayland + plasma?
Is it on usable at usable stage currently?

1 Like

These topics is usually toxic - so I will be watching - and the slightest sign of intoxication - the topic closes.

It is no secret that Nvidia and Linux kernel don’t go well together.

That topic is covered here

The drivers works - I am writing this on a system with Linux59 and nvidia 455 but if you are looking for CUDA support and OpenCL.

According to the Phoronix article quoting Nvidia

" Linux Kernel 5.9+ is incompatible with current and previous NVIDIA Linux GPU drivers. We advise customers to defer updating to Linux Kernel 5.9+ until mid-November when an NVIDIA Linux GPU driver update with Kernel 5.9+ support is expected to be available. NVIDIA is aware of the impact this will have on customers, and we are working diligently to provide the driver update with Kernel 5.9+ support as soon as possible. "

I think most people are aware of nvidias attitude towards linux and hopefully the thread won’t become toxic. I’m quite keen to know the state of play with wayland and nvidia myself. I’ve been following the gnome wayland default thread trying to get as much information as I can. I definitely think wayland is the way forward but is it usable for gaming etc on nvidia yet? That’s the type of thing that I’d like feedback on

I’m aware of recent nvidia + linux5.9x problem

But to

Is CUDA or OpenCL required for wayland to work?
I need CUDA for Blender and Darktable uses OpenCL but I could just use lts-kernel (I believe)

I run Manjaro Gnome live with proprietary drivers enabled.
It detects my Nvidia Card but it runs with Xorg. Maybe it’s normal for live.

On Arch wiki I read about Nvidia drivers, wayland, EGLStreams.

Maybe it’s too much for me.

I’m not interested in Nvidia - Linux war.
If I could, I would change Nvidia card for AMD to avoid complications.
It’s quite a long time since I decided to completely move from Windows to Linux. A lot of fun, quite a bumpy learning curve.

I would like to know if currently waylany + Nvidia is a pain in the a… and maybe I should just stick with xorg

1 Like

KDE is moving towards Wayland, but is currently still way behind X11, around Alpha quality last time I tried (i.e. it can even crash right away after the desktop shows, of course this will vary from one device to another). One guarantee, though: no further development on X11 backend, everything will be focused on Wayland.

With regard to Nvidia, please keep your expectations low. If Wayland alone with graphics card whose driver is directly committed by the vendor (e.g. Intel) to the kernel tree is not yet stable, let alone an out of tree proprietary driver from Nvidia.

If you need these things - then hope for the best.

I read somewhere the kernel developers will back port the change which plugged what they call a bug - a bug which enabled shims to claim they were GPL when in fact they were not.

So using a LTS kernel may be a solution - but as they back port the plug - it will eventually block CUDO and OpenCL on LTS as well.

I run Xorg as well on Nvidia drivers - my use case are not gaming - just running virtual machines for hacking code together.

And for gaming is there any difference between xorg and wayland ?
I wanted to install steam today :joy:

I have absolutely no idea :grin:

1 Like

Help me a little please.
On official KDE page there is an advice to use modesetting driver

To do this I should do:

modify kernel command line and add the line nvidia-drm.modeset=1 . Search for “kernel parameters” in your distribution; Kernel parameters - ArchWiki

I checked arch wiki and solution there is to edit /etc/grub/default

Edit /etc/default/grub and append your kernel options between the quotes in the GRUB_CMDLINE_LINUX_DEFAULT line:

GRUB_CMDLINE_LINUX_DEFAULT=" quiet splash "

so should I replace quiet splash with:
nvidia-drm.modeset=1
should it look like this:?
GRUB_CMDLINE_LINUX_DEFAULT=“nvidia-drm.modeset=1”
?

And for the future.
If I would like to add another kernel parameter how to do this?
GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1,another-parametr=2"
or
GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1","another-parameter=2"

On official KDE page there is an advice to use modesetting driver

Yes, AFAIK it’s necessary to make NVIdia + Wayland work at all.

so should I replace quiet splash with:
nvidia-drm.modeset=1
should it look like this:?
GRUB_CMDLINE_LINUX_DEFAULT=“nvidia-drm.modeset=1”
?

Just append the new arguments after the old ones, like so:

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash nvidia-drm.modeset=1”

I thought that nvidia (proprietary driver) also doesnt work well with wayland…
https://wiki.archlinux.org/index.php/Wayland#Requirements
But hey let us know I guess.

I tried to configure Wayland for KDE. I’m not sure If I did everything properly but windows were grayish and very unstable. I did some other changes and system die.
Before everything, I used btrfs snapshots, so I have my system clean and ready to another try :smiley:

I would like to sum up this topic a little bit.
Wayland:
https://wiki.archlinux.org/index.php/Wayland#Requirements

Most Wayland compositors requite KMS
so :arrow_down:

https://wiki.archlinux.org/index.php/Kernel_mode_setting
KMS for Nvidia has to be enabled manually
so :arrow_down:

nvidia 364.16 adds support for DRM (Direct Rendering Manager) kernel mode setting. To enable this feature, add the nvidia-drm.modeset=1 kernel parameter.

so :arrow_down:
We should edit:
/etc/default/grub
and in line GRUB_CMDLINE_LINUX_DEFAULT="" add nvidia-drm.modeset=1
so it should look like this:
GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1"
For basic functionality that should suffice but:

If you want to ensure it’s loaded at the earliest possible occasion, or are noticing startup issues you can add nvidia , nvidia_modeset , nvidia_uvm and nvidia_drm to the initramfs according to Mkinitcpio#MODULES

so :arrow_down:
We can edit /etc/mkinitcpio.conf
and in line:
MODULES=()
add modules so it will look like this:
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
And then with command
mkinitcpio -P
rebuild initramfs

One thing I’m not sure.
Are
GRUB_CMDLINE_LINUX_DEFAULT="nvidia-drm.modeset=1"
and
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

Can/should be set in the same time or is this one or another?
Is Grub way the Late KMS Start and Modules way Early KMS Start ?

And that should be all I think. Could you evaluate this and check if I made a any mistake?

p.s.0.
I didn’t see anything on Wiki but on kde community page
https://community.kde.org/Plasma/Wayland/Nvidia
there is information:>

ake sure to have the Nvidia egl library installed. For example on Ubuntu and Neon the relevant package is called libnvidia-egl-wayland1

In arch repos it’s probably egl-wayland package but I’m not sure if this is only for KDE. If this package is must have (didn’t find info on wiki)
Will it work with Gnome - I don’t know.

p.s.1.
At the begening of KMS article on arch wiki there is:

At first, note that for any method you use, you should always disable:

  • Any vga= options in your bootloader as these will conflict with the native resolution enabled by KMS.
  • Any video= lines that enable a framebuffer that conflicts with the driver.
  • Any other framebuffer drivers (such as uvesafb).

But I’m not sure where should I look for vga or video.
I checked /boot/grub/grub.cfg and /etc/default/grub
Is that ok?

p.s.2.
https://wiki.archlinux.org/index.php/Kernel_mode_setting#Troubleshooting
This is only if something go wrong right?

p.s.3.
At the begening of
https://wiki.archlinux.org/index.php/Wayland#Requirements
There is a table:

Buffer API GPU driver support Wayland compositor support
GBM All except NVIDIA All
EGLStreams NVIDIA GNOME, KDE, Weston

But after all knowledge I have from reading everything I mentioned above I don’t understand Buffer API. Don’t know If doing all this steps will enable EGLStreams

I don’t want to be forum parasite. I always try to go by the rule RTFM and I believe I did my homework. Maybe this post could be changed it to tutorial in the future :slight_smile:

6 Likes

It seems that with the 455.38 CUDA and OpenCL is back when using Linux 5.9 kernel.

At least that what I hear on the wine :slight_smile:

When reading Arch Wiki then use the KISS principle on what is stated in a sentence - understand this as - if they did mention nvidia-drm.modeset=1 - then they will not mention it again but may choose to just refer to nvidia-drm as a general term.

Knowing this - you learn to piece the wiki together - just like a puzzle - you learn to spot the corners and the borders and you quickly sort the grass and sky and the clouds in different piles - get my drift?

I’m not sur if I understand what you mean.

I can take any part of wiki and treat it as one whole piece?

Yes, I’m using CUDA with nvidia 455 on linux59 for couple of days

1 Like

No - not the whole piece - one piece in a puzzle with a number of pieces.

Sometimes the puzzle is 4 pieces but often they are a little more complicated. If you start with the installer section - you are beginning a puzzle with 100’s of pieces :slight_smile:

But just as with puzzles the picture is on top of the box - and you have to figure out which piece belongs where.

Something like this A complete waste of time - or a convenient break

1 Like

How did it go? Anything interesting to report?

Currently I’m in a painful process of pc upgrade.
Bought new ryzen and had to return it because of random reboots.

Before that I managed to run kde with wayland but it looked like very early testing stage. Not usable.

Om not sure but it seems that gnome progrsmmers implemented in gnome something that when nvidia is detected waykand is forced to turn off.

Because of problems with cpu my main pc is not working so I can’t fight with waykand now.
To be honest I don’t need wayland. Wanted to make it work without reason. If I’ll find the time I’ll try ti make it work.

@860lacov - don’t know if you’re still into wayland, but just completed my kde setup based on your analysis here. KDE works smooth as it should

Steps taken:

  1. ensure kernel modules get loaded (early)

sudo vim /etc/mkinitcpio.conf

MODULES line updated from:

MODULES=""

…to:

MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

update kernel:
sudo mkinitcpio -P

  1. update bootloader (grub) - add nvidia-drm.modeset=1

sudo vim /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT updated from:

GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3"

… to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3 nvidia-drm.modeset=1"

update grup config:
sudo grub-mkconfig -o /boot/grub/grub.cfg

  1. install egl-wayland drivers:
    pamac install egl-wayland

  2. install plasma-wayland-session
    pamac install plasma-wayland-session

reboot, select wayland as kde session and start.

all working fine and smooth now - one exception: I had to remove latte dock, this produced a “black banner” behind it that could not be used for anything but latte dock itself

5 Likes

Plasma wayland does not support multiple monitors, because you can not set primary monitor and there are other known issues :

We are waiting for the supports and fix.
GNOME Wayland already supports ahead.

1 Like