Will there be a Plasma 6 Wayland Nvidia Guide

As im new to linux i find it a bit confusing to make Wayland and nvidia work together and since plasma 6 will hit the mirrors in about 1 month i have been getting more and more anxious since i cant find a good up to date guide with all the important information bundled together.

These are my findings after a lot of digging and piecing together information from a lot of different places after hours of work

All i ask is for someone to make a comprehensive guide with the correct order of the steps and help out with the endeavour specfic things ( kernel params / dracut).

It would be lovely if you could answer the questions i ask too.

ENV for Wayland & Nvidia

QT_QPA_PLATFORMTHEME="wayland;xcb"
GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia
LIBVA_DRIVER_NAME=nvidia
WLR_NO_HARDWARE_CURSORS=1

i see nvidia_drm.modeset=1 is already set by default in endeavour so i wont be adding it in the list
You could easily check it with cat /sys/module/nvidia_drm/parameters/modeset

Make sure that qt6-wayland is installed.

  1. Question: Do i just add these in kernel options in /etc/kernel/cmdline as the wiki suggests for systemd-boot? I remeber in grub you had to rebuild something after setting kernel params , is this not the case for systemd-boot?

  2. Question: I’m guessing that you would have to build initramfs again. When exactly do i do that, after the kernel params changes? Do i just find the version of the kernel and sudo dracut --kver ? I have 0 experience with dracut since ive only used endeavour and started with linux 1.5 months ago , everyone else just uses mkinitcpio in their guides.

I already have egl-wayland installed as the kde wiki suggests.

Stupid Electron apps

I have read that you have to enable flags for electron apps to work natively in Wayland.
I will not mention the firefox env you had to add for wayland , since firefox finally uses wayland by default in their new versions

These flags should be enabled if your fonts are blurry and dont look sharp. I dont entirely know if they are needed today or the apps run natively in wayland.

#VScode
--enable-features=UseOzonePlatform --ozone-platform=wayland  
# Obsidian
OBSIDIAN_USE_WAYLAND=1 obsidian -enable-features=UseOzonePlatform -ozone-platform=wayland  
  1. Question: how do i add these flags?

Is this fine for a trial run?

code --enable-features=UseOzonePlatform --ozone-platform=wayland

According to the arch wiki : https://wiki.archlinux.org/title/Desktop_entries#Modify_desktop_files

I would have to copy
/usr/share/applications/code.desktop to .local/share/applications/code.desktop
to make sure the local takes effect and i can just delete this if i make a mistake.

Xwayland

  1. Question: okay so the compability layer for x11 apps. Do i just pacman -S xorg-xwayland and it just works out of the box? Do i have to do anything extra?

  2. Question: How do i figure out if an app is running in Xwayland or Wayland?
    From a bit of digging, using xeyes if you hover over the apps you want to test and the eyes move it is running under xwayland.

Alternatives of x11 apps

Im aware that a lot of apps that i use in X11 just dont work in wayland and i will have to find a replacement, for some im happy to change to something better (waybar) for some im sad that there are problems (flameshot)

xclip → wl-clipboard (needed for neovim )
xdotool → ydotool or wtype
flameshot ??? ( i hope this works or im going to be sad)
polybar → waybar ( actually a good change , finally better customizations)
latte-dock ( sadly dead and will never get updated to qt6 , maybe i will just not use a dock altogether)

I just ask of someone with more experience to please use all this and make a guide for plasma 6 and wayland. Put the steps in order and add anything i missed ,to just hopefully make mine and other people’s lives who are new to linux a bit better.

  • Thank you for reading this at least

These are environment variables, not kernel params.

sudo dracut-rebuild if you need to

It should come in on it’s own. You probably don’t need to do anything at all.

Flameshot works on wayland but last I tested it had some issues under plasma with multiple monitors.

My bad, Where and how do i exactly put these env’s ?

Like for the firefox env it was pretty simple and made sense to figure out but where do i add
WLR_NO_HARDWARE_CURSORS=1 for example

You should start by finding out which ones you need to set on plasma.

Some of those look like things you would set on wlroots based environment like sway or hyprland.

For example, I am guessing you don’t need to set QT_QPA_PLATFORMTHEME on plasma. Also, isn’t WLR_NO_HARDWARE_CURSORS specific to wlroots?

A little hard to do when i dont know what issues i will even have when plasma 6 comes out, im just trying to take precautions against possible problems

Well i did in fact grab these env’s from here https://www.reddit.com/r/kde/comments/19e9uzr/kde_60_how_many_users_will_bug_out/

I thought since he used plasma he would use kwin as the compositor , but since from your context i guess these are wlroots specific env’s?? So he used something like Hyprland i guess?

Now im confused for what fixes exist for the kwin compositor and nvidia…

Why not wait and see. Wayland will be the default, not required. Give it a few weeks and wait what other people with Nvidia cards find out when testing plasma 6 with Wayland and stay with X11 until then.

1 Like

Probably not. But that is just a random user on reddit. It would probably be good to find a more authoritative source. Also, keep in mind, you don’t have to urgently switch to wayland. X11 will still be supported so you can go back and forth as you need to.

Well this is probably the most logical choice, i just got excited by how smooth it is and the those animations etc… plus im afraid of things dropping x11 and i figured i have to get my feet wet with wayland and test the waters since everyone is moving there

Nobody is going drop X11 support anytime soon. We are just at the threshold where Wayland becomes viable to be shipped as default.

Also a lot of the workarounds that were necessary a few years ago - e.g. to run electron apps - are slowly going away and aren’t necessary anymore.

I would wait until the plasma 6 ships and then look into the issues you’re actually run into.

You can put vscode flags in the desktop file, but you can also use a config file. Make a file ~/.config/code-flags.conf and put the flags in there. See https://wiki.archlinux.org/title/Visual_Studio_Code#Running_natively_under_Wayland, https://wiki.archlinux.org/title/Wayland#Electron. I don’t know about obsidian, but it looks like it uses electron 25, so the second link probably applies.

If you’re using plasma 6, the built-in plasma panel can do a lot of the same things as latte dock, though I don’t know about your specific use case.

users alrey try it

xlsclients might help.