Note: If you are visiting from the future please refer to the wiki here which will be more up-to-date than this blog post.
I recently switched to running wayland fulltime on all my machines, including my Nvidia box. It was good that I did as it seems Qt regressed, fortunately I was able to fix it just in time for the final Qt LTS.
I've also updated the wiki with the steps needed to run nvidia wayland whilst I had the information fresh.
You need a very up-to-date Qt. Make sure you have >= Qt5.15.0 or 4bd13402f0293e85b8dfdf92254e250ac28094c7 cherry-picked.
Check our driver is running in modesettings mode
It should print "Y"
If not, modify your kernel command line and add the line
nvidia-drm.modeset=1. Search for "kernel parameters" in your distribution's documentation. Though https://wiki.archlinux.org/index.php/Kernel_parameters is typically a good guide for any distro.
Tell kwin to run with EGLStreams.
You should set the environment variable "KWIN_DRM_USE_EGL_STREAMS=1"
The easiest place is to add a file
/etc/profile.d/kwin.sh with the line
Verify this is working with the command line tool
env after rebooting.
Select "Plasma (wayland)" from your login manager
Enjoy your beautiful super-fast accelerated wayland desktop!
That's a lot of steps!
Obviously this number of manual steps is unnacceptable and I hope to reduce this over the next Plasma cycle.
With the user telemetry we get from Plasma users, we know a sizable amount of X11 users run the proprietory nvidia wayland driver. Ultimately user experience comes first above all else, so it is important.
Clearing up some facts on Nvidia and wayland
I read a lot of misinformation that on the wayland nvidia situation on the social medias. I'll try and clarfify some bits.
You cannot say "Nvidia doesn't support wayland". This doesn't make any sense. There's no relevant part of wayland for it to support or not support.
You can say "Nvidia doesn't support GBM" . A system for passing buffers (window contents) between places. Despite the name "Generic" Buffer Manager, GBM is very closely tied to Mesa. Mesa is the base of effectively all the open source Linux drivers.
You cannot say "Nvidia doesn't follow /the/ standard". There are a few. EGLStreams actually is a fully defined open standard defined in Khronos, which is as much of a core extension as possible. It's used by multiple vendors, albeit mostly horrible Mali chips
You can say it would be better if there was just one magic implementation that compositors and toolkits had to support. Maybe Vulkan (or more specifically WSI) will fix it 🙂
You cannot say that the experience of using wayland apps is worse on wayland. Practically it's just as fast, accelerated with all the shiny effects.
You can say that the experience of using GL X11 apps on wayland is worse. As XWayland doesn't have EGLStream support data gets copied the slow way. If you're playing an X game or doing some Blender work this is noticable.
You cannot say that KDE devs won't fix it. As this post starts with me literally fixing a toolkit when it came up!
You can say that Nvidia wayland experience has fewer testers. Though like all things wayland this is something you can help with! Get involved, file bugs, come join us on #kwin on Freenode. Start your kwin wayland hacking journey!