How to disable XWayland for the Plasma Wayland Session?

There is interest in being able to remove the XWayland capability, including XWaylandVideobridge.

This may save RAM and reduce attack surface.

People generally agree that having control over these things helps a lot.

Having a way to disable these (apart from a Flatpak override, for all apps) would help.

You need to turn off this CMake option: CMakeLists.txt · master · Plasma / KWin · GitLab

1 Like

Edit plasma-kwin_wayland.service to it doesn’t use the --xwayland commmand line option.

No recompilation needed.

2 Likes

thanks! that is the right answer, for now

Hi, after edit splash screen taking long time to show desktop any fix? thanks

You edited the desktop file and now it takes forever?

I think this could be because startup may be waiting for ksmserver to start which needs XWayland (its our x session manager).

Since xwayland less start right now is not something we do upstream I guess the only workaround I can think of is disabling splash?

1 Like

I’ll tell what worked for me to those of you that run a non-systemd OS, such as FreeBSD, and want to run the fully featured GUI without the Xwayland-on-demand feature: I replaced StartServiceJob kwinWaylandJob(QStringLiteral(“kwin_wayland_wrapper”), {QStringLiteral(“–xwayland”)}, QStringLiteral(“org.kde.KWinWrapper”)); line with StartServiceJob kwinWaylandJob(QStringLiteral(“kwin_wayland_wrapper”), {QStringLiteral(“”)}, QStringLiteral(“org.kde.KWinWrapper”)); line in https://invent.kde.org/plasma/plasma-workspace/-/raw/master/startkde/plasma-session/startup.cpp , rebuilt plasma-workspace, and typed “ck-launch-session /usr/local/lib/libexec/plasma-dbus-run-session-if-needed startplasma-wayland”, which made kwin load. I typed Super+W to open kwin’s search bar, typed plasmashell , and finally, the fully featured GUI loaded. To gain access to power management, I typed “/usr/local/lib/libexec/org_kde_powerdevil”. I have no idea why plasmashell and org_kde_powerdevil have to be loaded manually in this setup, but the point is that I ended up with the fully featured GUI that had the Xwayland-on-demand feature disabled. The suggestion that was made in this thread about turning off CMakeLists.txt · master · Plasma / KWin · GitLab didn’t work for me.

Well, after replacing things such as “ksmserver”, “org.kde.ksmserver”, and “/KSMServer” with “” in that file, plasmashell and other things no longer have to be started manually.

1 Like