Desktop Environment with nvidia and wayland support

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

Thank you.
I’m tryying to follow most Linux news. Some time ago I read that with new Nvidia drivers we will be able to use Wayland. I checked it about week ago :smiley:

I recently tried Gnome. I prefer KDE (look and feel) but I have a new laptop with touch support, so I consider moving to Gnome (I think that there is no more touch friendly DE) on this machine.

I know so far, touchpad with GNOME Wayland is faster and smoother than Xorg, even I have already experienced with it on my laptop.

In my opinion, GNOME Wayland is good for Laptop (with multiple monitors), KDE Xorg is good for PC Desktop.

I’m not sure if it’s Gnome or Wayland problem but in KDE with Xorg my laptop touchpad works very smooth.
On Gnome there is a problem. When I use touchpad, sometimes it stops working.
When I move cursor from left to direction is nor important, then cursor stops for a second or something.

Thanks for your step-by-step description.
This is exactly what helped for me.

Basically i can feel everything running smoother but

  • i also have a broken latte dock
  • krunner does freeze
  • browser window is flickering

So i will proceed with X11 and try wayland time over time :sweat_smile: