Skip to content

Instantly share code, notes, and snippets.

@probonopd
Last active May 24, 2025 19:29
Show Gist options
  • Save probonopd/9feb7c20257af5dd915e3a9f2d1f2277 to your computer and use it in GitHub Desktop.
Save probonopd/9feb7c20257af5dd915e3a9f2d1f2277 to your computer and use it in GitHub Desktop.
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

For the record, even in the latest Raspberry Pi OS you still can't drag a file from inside a zip file onto the desktop for it to be extracted. So drag-and-drop is still broken for me.

And Qt move() on a window still doesn't work like it does on all other desktop platforms (and the Wayland folks think that is good).

And global menus still don't work (outside of not universally implemented things like qt_extended_surface set_generic_property).


The Wayland project seems to operate like they were starting a greenfield project, whereas at the same time they try to position Wayland as "the X11 successor", which would clearly require a lot of thought about not breaking, or at least providing a smooth upgrade path for, existing software.

In fact, it is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incomprehensible words like "xdg_toplevel" instead).

DO NOT USE A WAYLAND SESSION! Let Wayland not destroy everything and then have other people fix the damage it caused. Or force more Red Hat/Gnome components (glib, Portals, Pipewire) on everyone!

Please add more examples to the list.

Wayland seems to be made by people who do not care for existing software. They assume everyone is happy to either rewrite everything or to just use Gnome on Linux (rather than, say, twm with ROX Filer on NetBSD).

Edit: When I wrote the above, I didn't really realize what Wayland even was, I just noticed that some distributions (like Fedora) started pushing it onto me and things didn't work properly there. Today I realize that you can't "install Wayland", because unlike Xorg, there is not one "Wayland display server" but actually every desktop envrironment has its own. And maybe "the Wayland folks" don't "only care about Gnome", but then, any fix that is done in Gnome's Wayland implementation isn't automatically going to benefit all users of Wayland-based software, and possibly isn't even the implementation "the Wayland folks" would necessarily recommend.

Edit 12/2023: If something wants to replace X11 for desktop computers (such as professional Unix workstations), then it better support all needed features (and key concepts, like windows) for that use case. That people also have displays on their fridge doesn't matter the least bit in that context of discussion. Let's propose the missing Wayland protocols for full X11 feature parity.

Edit 08/2024: "Does Wayland becoming the defacto standard display server for Linux serve to marginalize BSD?" https://fossforce.com/2024/07/the-unintended-consequences-linuxs-wayland-adoption-will-have-on-bsd/

Wayland is broken by design

  • A crash in the window manager takes down all running applications
  • You cannot run applications as root
  • You cannot do a lot of things that you can do in Xorg by design
  • There is not one /usr/bin/wayland display server application that is desktop environment agnostic and is used by everyone (unlike with Xorg)
  • It offloads a lot of work to each and every window manager. As a result, the same basic features get implemented differently in different window managers, with different behaviors and bugs - so what works on desktop environment A does not necessarily work in desktop environment B (e.g., often you hear that something "works in Wayland", even though it only really works on Gnome and KDE, not in all Wayland implementations). This summarizes it very well: https://gitlab.freedesktop.org/wayland/wayland/-/issues/233

Apparently the Wayland project doesn't even want to be "X.org 2.0", and doesn't want to provide a commonly used implementation of a compositor that could be used by everyone: https://gitlab.freedesktop.org/wayland/wayland/-/issues/233. Yet this would imho be required if they want to make it into a worthwile "successor" that would have any chance of ever fixing the many Wayland issues at the core.

Wayland breaks screen recording applications

  • MaartenBaert/ssr#431 ❌ broken since 24 Jan 2016, no resolution ("I guess they use a non-standard GNOME interface for this")
  • https://github.com/mhsabbagh/green-recorder ❌ ("I am no longer interested in working with things like ffmpeg/wayland/GNOME's screencaster or solving the issues related to them or why they don't work")
  • vkohaupt/vokoscreenNG#51 ❌ broken since at least 7 Mar 2020. ("I have now decided that there will be no Wayland support for the time being. Reason, there is no budget for it. Let's see how it looks in a year or two.") - This is the key problem. Wayland breaks everything and then expects others to fix the wreckage it caused on their own expense.
  • obsproject/obs-studio#2471 ❌ broken since at least 7 Mar 2020. ("Wayland is unsupported at this time", "There isn't really something that can just be easily changed. Wayland provides no capture APIs")
  • There is a workaround for OBS Studio that requires a obs-xdg-portal plugin (which is known to be Red Hat/Flatpak-centric, GNOME-centric, "perhaps" works with other desktops)
  • phw/peek#1191 ❌ broken since 14 Jan 2023. Peek, a screen recording tool, has been abandoned by its developerdue to a number of technical challenges, mostly with Gtk and Wayland ("Many of these have to do with how Wayland changed the way applications are being handled")

As of February 2024, screen recording is still broken utterly on Wayland with the vast majority of tools. Proof

Workaround: Find a Wayland compositor that supports the wlr-screencopy-unstable-v1 protocol and use wf-recorder -a. The default compositor in Raspberry Pi OS (Wayfire) does, but the default compositor in Ubuntu doesn't. (That's the worst part of Wayland: Unlike with Xorg, it always depends on the particular Wayand compositor what works and what is broken. Is there even one that supports everything?)

Wayland breaks screen sharing applications

  • jitsi/jitsi-meet#2350 ❌ broken since 3 Jan 2018
  • jitsi/jitsi-meet#6389 ❌ broken since 24 Jan 2016 ("Closing since there is nothing we can do from the Jitsi Meet side.") See? Wayland breaks stuff and leaves application developers helpless and unable to fix the breakage, even if they wanted.

NOTE: As of November 2023, screen sharing in Chromium using Jitsi Meet is still utterly broken, both in Raspberry Pi OS Desktop, and in a KDE Plasma installation, albeit with different behavior. Note that Pipewire, Portals and whatnot are installed, and even with them it does not work.

Wayland breaks automation software

sudo pkg install py37-autokey

This is an X11 application, and as such will not function 100% on 
distributions that default to using Wayland instead of Xorg.

Wayland breaks Gnome-Global-AppMenu (global menus for Gnome)

Wayland broke global menus with KDE platformplugin

Good news: According to this report global menus now work with KDE platformplugin as of 4/2022

Wayland breaks global menus with non-KDE Qt platformplugins

Wayland breaks AppImages that don't ship a special Wayland Qt plugin

  • https://blog.martin-graesslin.com/blog/2018/03/unsetting-qt_qpa_platform-environment-variable-by-default/ ❌ broke AppImages that don't ship a special Wayland Qt plugin. "This affects proprietary applications, FLOSS applications bundled as appimages, FLOSS applications bundled as flatpaks and not distributed by KDE and even the Qt installer itself. In my opinion this is a showstopper for running a Wayland session." However, there is a workaround: "AppImages which ship just the XCB plugin will automatically fallback to running in xwayland mode" (see below).

Wayland breaks Redshift

Update 2023: Some Wayland compositors (such as Wayfire) now support wlr_gamma_control_unstable_v1, see https://github.com/WayfireWM/wayfire/wiki/Tutorial#configuring-wayfire and jonls/redshift#663. Does it work in all Wayland compositors though?

Wayland breaks global hotkeys

Wayland does not work for Xfce?

See below.

Wayland does not work properly on NVidia hardware?

Apparently Wayland relies on nouveau drivers for NVidia hardware. The nouveau driver has been giving unsatisfactory performance since its inception. Even clicking on the application starter icon in Gnome results in a stuttery animation. Only the proprietary NVidia driver results in full performance.

See below.

Update 2024: The situation might slowly be improving. It remains to be seen whether this will work well also for all existing old Nvidia hardware (that works well in Xorg).

Wayland does not work properly on Intel hardware

Wayland prevents GUI applications from running as root

  • https://bugzilla.redhat.com/show_bug.cgi?id=1274451 ❌ broken since 22 Oct 2015 ("No this will only fix sudo for X11 applications. Running GUI code as root is still a bad idea." I absolutely detest it when software tries to prevent me from doing what some developer thinks is "a bad idea" but did not consider my use case, e.g., running truss for debugging on FreeBSD needs to run the application as root. https://bugzilla.mozilla.org/show_bug.cgi?id=1323302 suggests it is not possible: "These sorts of security considerations are very much the way that "the Linux desktop" is going these days".)

Suggested solution

Wayland is biased toward Linux and breaks BSD

  • https://blog.netbsd.org/tnf/entry/wayland_on_netbsd_trials_and ❌ broken since 28 Sep 2020 ("Wayland is written with the assumption of Linux to the extent that every client application tends to #include <linux/input.h> because Wayland's designers didn't see the need to define a OS-neutral way to get mouse button IDs. (...) In general, Wayland is moving away from the modularity, portability, and standardization of the X server. (...) I've decided to take a break from this, since it's a fairly huge undertaking and uphill battle. Right now, X11 combined with a compositor like picom or xcompmgr is the more mature option."

Wayland complicates server-side window decorations

  • https://blog.martin-graesslin.com/blog/2018/01/server-side-decorations-and-wayland/ ❌ FUD since at least 27 January 2018 ("I heard that GNOME is currently trying to lobby for all applications implementing client-side decorations. One of the arguments seems to be that CSD is a must on Wayland. " ... "I’m burnt from it and are not interested in it any more.") Server-side window decorations are what make the title bar and buttons of all windows on a system consistent. They are a must have_ for a consistent system, so that applications written e.g., Gtk will not look entirely alien on e.g., a Qt based desktop, and to enforce that developers cannot place random controls into window titles where they do not belong. Client-side decorations, on the other hand, are destroying uniformity and consistency, put additional burden on application and toolkit developers, and allow e.g., GNOME developers to put random controls (that do not belong there) into window titles (like buttons), hence making it more difficult to achieve a uniform look and feel for all applications regardless of the toolkit being used.

Red Hat employee Matthias Clasen ("I work at the Red Hat Desktop team... I am actually a manager there... the people who do the actual work work for me") expicitly stated "Client-side everything" as a principle, even though the protocol doesn't enforce it: "Fonts, Rendering, Nested Windows, Decorations. "It also gives the design more freedom to use the titlebar space, which is something our designers appreciate" (sic). Source

Wayland breaks windows rasing/activating themselves

Wayland breaks RescueTime

Wayland breaks window managers

Apparently Wayland (at least as implemented in KWin) does not respect EWMH protocols, and breaks other command line tools like wmctrl, xrandr, xprop, etc. Please see the discussion below for details.

Wayland requires JWM, TWM, XDM, IceWM,... to reimplement Xorg-like functionality

  • Screen recording and casting
  • Querying of the mouse position, keyboard LED state, active window position or name, moving windows (xdotool, wmctrl)
  • Global shortcuts
  • System tray
  • Input Method support/editor (IME)
  • Graphical settings management (i.e. tools like xranrd)
  • Fast user switching/multiple graphical sessions
  • Session configuration including but not limited to 1) input devices 2) monitors configuration including refresh rate / resolution / scaling / rotation and power saving 3) global shortcuts
  • HDR/deep color support
  • VRR (variable refresh rate)
  • Disabling input devices (xinput alternative)

As it currently stands minor WMs and DEs do not even intend to support Wayland given the sheer complexity of writing all the code required to support the above features. You do not expect JWM, TWM, XDM or even IceWM developers to implement all the featured outlined in ^1.

Wayland breaks _NET_WM_STATE_SKIP_TASKBAR protocol

  • https://git.521000.bestelectron/electron#33226 ("skipTaskbar has no effect on Wayland. Currently Electron uses _NET_WM_STATE_SKIP_TASKBAR to tell the WM to hide an app from the taskbar, and this works fine on X11 but there's no equivalent mechanism in Wayland." Workarounds are only available for some desktops including GNOME and KDE Plasma.) ❌ broken since March 10, 2022

Wayland breaks NoMachine NX

Wayland breaks xclip

xclip is a command line utility that is designed to run on any system with an X11 implementation. It provides an interface to X selections ("the clipboard"). Apparently Wayland isn't compatible to the X11 clipboard either.

This is another example that the Wayland requires everyone to change components and take on additional work just because Wayland is incompatible to what we had working for all those years.

Wayland breaks SUDO_ASKPASS

Wayland breaks X11 atoms

X11 atoms can be used to store information on windows. For example, a file manager might store the path that the window represents in an X11 atom, so that it (and other applications) can know for which paths there are open file manager windows. Wayland is not compatible to X11 atoms, resulting in all software that relies on them to be broken until specifically ported to Wayland (which, in the case of legacy software, may well be never).

Possible workaround (to be verified): Use the (Qt proprietary?) Extended Surface Wayland protocol casually mentioned in https://blog.broulik.de/2016/10/global-menus-returning/ "which allows you to set (and read?) arbitrary properties on a window". Is it the set_generic_property from https://github.com/qt/qtwayland/blob/dev/src/extensions/surface-extension.xml?

Wayland breaks games

Games are developed for X11. And if you run a game on Wayland, performance is subpar due to things like forced vsync. Only recently, some Wayland implementations (like KDE KWin) let you disable that.

Wayland breaks xdotool

(Details to be added; apparently no 1:1 drop-in replacement available?)

Wayland breaks xkill

xkill (which I use on a regular basis) does not work with Wayland applications.

What is the equivalent for Wayland applications?

Wayland breaks screensavers

Is it true that Wayland also breaks screensavers? https://www.jwz.org/blog/2023/09/wayland-and-screen-savers/

Wayland breaks setting the window position

Other platforms (Windows, Mac, other destop environments) can set the window position on the screen, so all cross-platform toolkits and applications expect to do the same on Wayland, but Wayland can't (doesn't want to) do it.

  • PCSX2/pcsx2#10179 PCX2 (Playstation 2 Emulator) ❌ broken since 2023-10-25 ("Disables Wayland, it's super broken/buggy in basically every scenario. KDE isn't too buggy, GNOME is a complete disaster.")

Wayland breaks color mangement

Apparently color management as of 2023 (well over a decade of Wayland development) is still in the early "thinking" stage, all the while Wayland is already being pushed on people as if it was a "X11 successor".

https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/color-management-model.md

Wayland breaks DRM leasing

According to Valve, "DRM leasing is the process which allows SteamVR to take control of your VR headset's display in order to present low-latency VR content".

Wayland breaks In-home Streaming

Wayland breaks NetWM

Extended Window Manager Hints, a.k.a. NetWM, is an X Window System standard for the communication between window managers and applications

Wayland breaks window icons

Update 6/2024: Looks like this will get unbroken thanks to xdg_toplevel_icon_manager_v1, so that QWindow::setIcon will work again. If, and that's a big if, all compositors will support it. At least KDE is on it.

Wayland breaks drag and drop

Wayland breaks ./windowmanager --replace

  • Many window managers have a --replace argument, but Wayland compositors break this convention.

Wayland breaks Xpra

Xpra is an open-source multi-platform persistent remote display server and client for forwarding applications and desktop screens.

  • Under Xpra a context menu cannot be used: it opens and closes automatically before you can even move the mouse on it. "It's not just GDK, it's the Wayland itself. They decided to break existing applications and expect them to change how they work." (Xpra-org/xpra#4246) ❌ broken since 2024-06-01

Xwayland breaks window resizing

Workarounds

  • Users: Refuse to use Wayland sessions. Uninstall desktop environments/Linux distributions that only ship Wayland sessions. Avoid Wayland-only applications (such as PreSonus Studio One) (potential workaround: run in https://github.com/cage-kiosk/cage)
  • Application developers: Enforce running applications on X11/XWayland (like LibrePCB does as of 11/2023)

Examples of Wayland being forced on users

This is exactly the kind of behavior this gist seeks to prevent.

History

  • 2008: Wayland was started by krh (while at Red Hat)
  • End of 2012: Wayland 1.0
  • Early 2013: GNOME begins Wayland porting

Source: "Where's Wayland?" by Matthias Clasen - Flock 2014

A decade later... Red Hat wants to force Wayland upon everyone, removing support for Xorg

References

@alerikaisattera
Copy link

is not kdeconnect problem

It is

Xwayland depends on wayland it uses libwayland-client

This does not make it related to Wayland. On the contrary, Xwayland is just Xorg modified to run as a Wayland client, therefore all problems of Xwayland are only there due to problems of Xorg

@alerikaisattera
Copy link

I don't understand why you need to turn this formal discussion into a barrage of personal attacks against howdev, please stop.

  1. There is nothing personal here.
  2. Don't tell me what to do, filthy dog

@UltraBlackLinux
Copy link

Alright, thanks for that. Github will take care of that then.

@howdev
Copy link

howdev commented May 12, 2025

@UltraBlackLinux

I get this often, I never said any bad language and thing to anyone on any discussion. and people start attacking me, picking on my English since they have no arguments left.

I used Linux since the 1990s I know what tinkering is. Is for an ordinary user that is a problem. If they log in to wayland which is default on the major distributions, they will find they have bad experience, that is as bad if the wayland were to crash. I do not feel as bad as wayland is to crash, not in that way. Important apps I use does not work. It doesn't matter which side of the problem. is bad user experience for me.

current version of gamescope does not work on Ubuntu, I just use an gamescope from an older distribution.

Some apps are not unusable, is just not working properly. while other apps with functions that does not work.

I don't mind Zorin's tiny user base. Zorin just pick Zorin connect based on kdeconnect as their personal feature. That was what I mean.

As I mentioned before user experience is priority. If I use wayland with blurry apps, why would I continue to use it. Little blurry is acceptable, worst than short-sighted is not acceptable experience.

There is no point to be in agreement, if personal applications are different. As I said way above in the early comments, if you don't use the same applications and same setup as mine, then you may have a good experience. When you do serious work, that is more likely to encounter wayland problems.

@UltraBlackLinux
Copy link

UltraBlackLinux commented May 12, 2025

If they log in to wayland which is default on the major distributions, they will find they have bad experience, that is as bad if the wayland were to crash

I would argue that specifically the default experience shows how well wayland can actually work, since distro maintainers tend to only pre-install applications that work well and have default configurations that are potentially wayland-optimised.

current version of gamescope does not work on Ubuntu

Which means what specifically? Ubuntu uses the same gamescope version as Debian, and since it's on the stable repos it's most likely to work. Going off your setup you might be trying to run gamescope on top of x11, which I don't think is what it was designed for since from what I've seen it's more used to combat compatibility issues between xwayland and wayland. I myself haven't needed gamescope for workarounds for months now.

There is no point to be in agreement, if personal applications are different.

For me it's not about being in agreement over different setups, but more so to defend wayland from the (imo baseless) hatred it's receiving. I'd go as far as to assume that the regulars in this discussion haven't touched wayland in quite a while. What this thread does is that it scares new users off wayland who are most likely never going to encounter any significant issues with it.

When you do serious work

I would describe my applications as "serious". I'm using the odd closed source xwayland application, I'm doing CAD work, I'm using wine/proton, ... I think I've at this point come across pretty much every instance of xwayland incompatibilities. Specifically with the closed source application I had some quite significant issues a while ago but I manged to solve these entirely with window rules within hyprland. Specifically window rules are quite a useful tool for dealing with xwayland incompatibilities I've found.

@howdev
Copy link

howdev commented May 12, 2025

is not kdeconnect problem

It is

Xwayland depends on wayland it uses libwayland-client

This does not make it related to Wayland. On the contrary, Xwayland is just Xorg modified to run as a Wayland client, therefore all problems of Xwayland are only there due to problems of Xorg

you don't know what you are saying? wayland client is not related to wayland? Xwayland is wayland client, so is all wayland apps

@howdev
Copy link

howdev commented May 12, 2025

@UltraBlackLinux

I don't just distribution applications, ordinary users use that.

No I try the current gamescope does not work on Ubuntu, I tell you is dependencies. I even try compile from source also missing specific version of dependencies. Gamescope runs in X11 no problem, if you get the right version without dependency problems.

hatred is from bad user experience. that is normal for any software. When a software claimed by some group of users to be production quality when is not.

I gave wayland many chances, including recently.

@Consolatis
Copy link

Consolatis commented May 12, 2025

you do not rely on applications to scale widgets. Display server scales it. You don't scale manually. wayland scales it. that is flaw to losing monitor resolution.

This is only the case for applications not supporting the fractional scale and viewporter protocols. If applications support both of these protocols they submit a buffer that is scale * size and thus they in fact scale themselves making things crisp and the compositor doesn't do any scaling for that buffer whatsoever.

One of the most important part kdeconnect is remote input. That is what Zorin advertises as its feature.
wayland blocks remote input. That is wayland design problem. Kdeconnect manages the security. not the display server. If you don't pair the device, you cannot get security problem. If you pair the device, you already confirmed it is safe, why block it.

is not kdeconnect problem. wayland design problem, you need to do your due diligence. wayland blocks the remote input.
Xwayland depends on wayland it uses libwayland-client

That sounds like kdeconnect uses some X11 input functions to inject its mouse events. It should instead use uinput which is a kernel interface written specifically for input emulation. That should work everywhere regardless of X11 or wayland because it just shows up as a usual pointer.

Audacity

If some random app leaks memory that is caused by wayland? Seems like kind of a stretch to me.

@UltraBlackLinux
Copy link

I even try compile from source also missing specific version of dependencies

That problem more so seems to stem from the fact you're trying to compile bleeding edge software on a non-bleeding-edge distro... That's the price you pay for stability. I guess you could just download the pre-compiled libraries manually and point the compiler to your downloads

hatred is from bad user experience [...] recently

From when? When was the last time that you tried a full-wayland setup, without running it on top of xorg? You have an Nvidia GPU I saw, and as far as I'm aware those should by now play pretty nicely with wayland. Maybe you should give wayland on bleeding edge a try, because things are stellar over here. If the gamescope version from the repos is 2+ years old then I don't want to know what state wayland is still in on ubuntu

@howdev
Copy link

howdev commented May 12, 2025

@Consolatis

Audacity is not a random app. Ported to wayland, so is a wayland app. Why the wayland display server affects the core function of an app that is not related. Recording is where the memory leak is. Is just using the X11 backend for now.

@howdev
Copy link

howdev commented May 12, 2025

@UltraBlackLinux

You assumed I did not use wayland because I used gamescope?
I recently log into wayland many times and used the latest Nvidia drivers. how can I continue to give wayland a try? I am using fractional scaling, and apps are blurry. Doesn't matter what bleeding edge or latest driver.

no, no, The latest stable gamescope and Ubuntu 24.04 that does not work, no matter what you do. I checked already.

@UltraBlackLinux
Copy link

You assumed I did not use wayland because I used gamescope?

I mean, the github issue you opened clearly states that you tried to run gamescope on x11 so I don't know what you're trying to tell me here

I am using fractional scaling, and apps are blurry

I don't understand this argument either. What's the point of using a higher screen resolution when things are too small for you? Just lower your resolution. My screen can do 4k and I set it to 2560x1440 because that's just way more comfortable to use. Scaling the whole screen indeed made some applications blurry, but aren't both options functionally pretty much the same?

@Consolatis
Copy link

I think at the moment the best experience for scaled xwayland apps is using a KDE wayland session. They do some trickery to allow xwayland applications supporting it to scale themselves. Another option could be running Xwayland rootful, something like Xwayland -decorate -hidpi -noreset :55 and in another terminal DISPLAY=:55 your-favorite-x11-application.

@howdev
Copy link

howdev commented May 12, 2025

@UltraBlackLinux

setting a 4K monitor to 1440p, that is not just blurry for some apps, that is blurry for everything, that is losing the 4k clarity. Using Wayland scaling, only blur if X11 apps, not everything.
The scaling makes 1.5x bigger than native 4k which is too tiny.

@UltraBlackLinux
Copy link

UltraBlackLinux commented May 12, 2025

My screen is 28 inches across and I can't tell that it's slightly blurry at all, at least not from like 60cm (not even at half the distance, and my eyes are in great shape) away, which I'd say is an adequate distance. I honestly don't know why anyone would need the pixels that I gave up.

@probonopd
Copy link
Author

probonopd commented May 12, 2025

A quarterly service reminder to everyone to please stay friendly and on subject. Thanks.

@howdev
Copy link

howdev commented May 12, 2025

@probonopd please check that person's comment, is abusive.

@Monsterovich
Copy link

I've said some of this before.

Wayland: An Accessibility Nightmare

@Consolatis
Copy link

Consolatis commented May 13, 2025

I've said some of this before.

Wayland: An Accessibility Nightmare

Why aren't you using the uinput kernel interface? That should work for X11 and every Wayland compositor (and whatever else comes up in the future).

@kkmzero
Copy link

kkmzero commented May 21, 2025

I did experiment with Wayland recently. I set up two machines, one with KDE Plasma and other with GNOME for testing. My goal was to learn what it would take me to have C library that "talks" to Wayland in the back and then I would be able to write a simple C program which would open a blank window, preferably with title bar and at least a close button. This application then could be distributed as standalone binary which wouldn't care about what DE or WM the user has as long as they are running Wayland.

After a lot of random guess work, reading one of the worst documentations known to man, and a lot of hacking-things-together, I could open a resizable Wayland window with customizable title bar - (I can have borderless window or a window with tile bar with buttons for window minimize/maximize/close) - with just about 20 simple lines of C code in the front. However, in the back, there is roughly 1500 LOC monster of a library that does all the work. This library was a nightmare to write, it has barely any functionality and thanks to Wayland people and their inability to name things reasonably I already know I won't be able to maintain this library in the future. I have no interest in learning what xdg_moisty_fart and wl_wear_programming_socks really do every time I want to change things around after few months.

Opening a window which would work on most Linux installations in the future (since apparently everyone is excited about switching to Wayland) is not possible for me, I'm too stupid for this advanced computer science problem. I don't know how to do it reliably if I don't want to depend on SDL, Qt, GTK or something else. X.org was much better solution in this regard because it was de-facto a standard and it did a lot of the work itself. I don't know what developers of standalone desktop applications should do, honestly. Windows solved this problem in the 90s so I don't know how deluded penguin enjoyers have to be to talk about year of Linux desktop while it crumbles under their feet. Maybe if all DEs would use one compositor instead of each having their own, maybe then it would be easier but that will never happen so I will never know.

No, having long list of dependencies which have to be installed with your application is not a solution - it's idiotic and it's idiotic by design.
No, Flatpak or AppImage are not solutions, they are merely a clownish band-aids for huge wound.
Yes, it is a skill issue and that's the point. Anyone with at least 1 braincell can get a window running on Windows and produce binary that will work on all other Windows installations, granted all the stuff needed for this task are standard components of the OS itself.
And yes, this is not a problem exclusively related to Wayland but it sure as hell does not make things better, especially when nearly every DE/distro developer decided that it's Wayland time even when the functionality is questionable at best.

@Consolatis
Copy link

I assume those 1520 LOC were mostly about client side decorations and resize / maximize / .. requests for GNOME specifically? Any other sane compositor should support server side decorations and I'd be surprised if you'd end up with more than like 200 (verbose) lines at most (+ libwayland) if you also want to handle pointer and keyboard input. If not then its more like 100 verbose lines max.

Now if you also want to parse the wire protocol (e.g. not using libwayland) that is obviously a completely different ballpark but I assume you do not parse the X11 wire protocol either but rather use something like libxcb for it.

@kkmzero
Copy link

kkmzero commented May 21, 2025

It's not mainly about lines of code, it's about not having a standardized way of opening a window on Linux distros without dragging in dependencies that may or may not be available on the system. LOC count matters in this instance only because anyone who has to implement similar code themself has to also maintain it while it could be part of the system, you know, like in past if you had X11 running you could also open a window, the code was somewhat straightforward and X11 was available everywhere. Instead I feel like with Wayland all of this work gets multiplied across various compositors/WMs and libraries, so in my very uninformed opinion Wayland does not really solve anything at all for developers, it only took the functionality away. I understand that if stars align and everything magically works on your machine(tm) then it might work better for the users but I'd question that. I've seen this presentation called Why YOU should write a Wayland compositor by Victoria Brekenfeld and I lost all hope for Linux desktop right then and there. You definitely should not write a Wayland compositor.

By the way, 200 or even 100 lines of code for opening a window is still a joke. As I mentioned, I'm not Windows fanboy but they solved it back in the 90s. Their solution is ugly as hell though.

@sertraline
Copy link

After 14 years even cursors are an unsolved problem. The advantage of using hardware cursors had been eradicated, because now cursors are managed by a compositor, which means when you put a load on your CPU and GPU you will start having huge issues with cursor movement. There are no resource reservation mechanisms for Linux userland to ensure that compositor will always provide smooth rendering, and I honestly don't understand how do Linux users not notice this; all you have to do to start having this issue is to actually use your computer! Render something in blender and your computer is now completely unusable as you cannot use your mouse. This is a problem that also, as mentioned above, was solved about 30 years ago.

{4E106D9E-8296-4093-987B-A7DC9495910D} {92DB8544-47AC-4284-A2B7-40BC234BBCD9} {0240B3C4-7962-462C-8045-DAFED002DDA4}

@Consolatis
Copy link

For the CPU part, your compositor should run with higher priority than the applications spawned by it (could also be emulated by starting e.g. blender with nice to lower its CPU priority). At least wlroots based compositors use the cursor hardware plane if available and compatible so there should be no compositing involved at all when just moving the cursor and the thing under the cursor not changing anything due to that movement. There is also a gles2 priority context extension which wlroots uses automatically if available. I don't know anything about other compositors.

@sertraline
Copy link

At least wlroots based compositors use the cursor hardware plane if available and compatible so there should be no compositing involved at all when just moving the cursor and the thing under the cursor not changing anything due to that movement.

As I know offloading to the GPU plane happens inside the compositor. Hence why it would lag under high load and why it won't happen in xorg, as in xorg cursors are handled by the X server and compositor only sets the theme. Then, we have the implicit sync model which typically shouldn't be an issue with a HW cursor, but with a software cursor it will lag if misses deadlines.

I may be wrong but this is an issue I experience under high load on my AMD hardware, with a HW cursor. Cursor also becomes jittery if you use a mice with over 1000Hz polling rate which I used to own, now I own a wireless mice. Before I was forced to switch my mice to a 300hz polling rate to make it behave normally. Either way, to me this is insane that I am supposed to figure out and do all of this just to move my mouse like on any other sane operating system.

@probonopd
Copy link
Author

I'm not Windows fanboy but they solved it back in the 90s.

I share the sentiment. The Wayland guys could be so much further ahead if they had started with the objective to create a windowing system that does what Windows and the Mac do, but (at least in the case of Windows) with nicer APIs. Instead, they thought they know everything better.

@regs01
Copy link

regs01 commented May 22, 2025

Why aren't you using the uinput kernel interface? That should work for X11 and every Wayland compositor (and whatever else comes up in the future).

It's low level. It requires root access. The whole point is that Wayland should provide an interlayer between it and widgetset.

@regs01
Copy link

regs01 commented May 22, 2025

My screen is 28 inches across and I can't tell that it's slightly blurry at all, at least not from like 60cm (not even at half the distance, and my eyes are in great shape) away, which I'd say is an adequate distance. I honestly don't know why anyone would need the pixels that I gave up.

Most people have perfect eyesight, so large pixels are quite annoying. That's what high density is for.

I don't understand this argument either. What's the point of using a higher screen resolution when things are too small for you? Just lower your resolution. My screen can do 4k and I set it to 2560x1440 because that's just way more comfortable to use. Scaling the whole screen indeed made some applications blurry, but aren't both options functionally pretty much the same?

And this is exactly what UI scaling is intended for. But Wayland, GTK and Qt devs can't understand it. They pushing for raster scaling, like System in Windows, which is pointless.

@Consolatis
Copy link

It's low level. It requires root access. The whole point is that Wayland should provide an interlayer between it and widgetset.

IMHO reading and injecting key / mouse events is a privileged operation. Just for the record, it does not require root access, it requires access to the /dev/uinput and /dev/input/event* chardevs, often archived via a input group. And it works for the whole system, regardless of it being TTY, X11, wayland or whatever else.

@regs01
Copy link

regs01 commented May 22, 2025

It's low level. It requires root access. The whole point is that Wayland should provide an interlayer between it and widgetset.

IMHO reading and injecting key / mouse events is a privileged operation. Just for the record, it does not require root access, it requires access to the /dev/uinput and /dev/input/event* chardevs, often archived via a input group. And it works for the whole system, regardless of it being TTY, X11, wayland or whatever else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment