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.
-
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? -
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
- 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
-
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? -
Question: How do i figure out if an app is running in Xwayland or Wayland?
From a bit of digging, usingxeyes
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