Skip to content

Instantly share code, notes, and snippets.

@probonopd
Last active September 19, 2024 18:58
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.

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.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

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

@Eatwand
Copy link

Eatwand commented Sep 5, 2024

Wayland FTW and Xorg malders can keep malding

@Eatwand
Copy link

Eatwand commented Sep 5, 2024

Wayland FTW and Xorg malders can keep malding

True and real

@Eatwand
Copy link

Eatwand commented Sep 5, 2024

He is not wrong about that

@Espionage724
Copy link

Espionage724 commented Sep 5, 2024

When Wayland has session restore, and makes my 1000Hz mouse have a proper cursor (non-floaty), then I might entertain it as usable. Otherwise it's offering no benefit (besides theoretical security which I manage by only running trustworthy apps and MAC) and only downsides.

What is the fascination on using (whatever Wayland is classified as) on a workstation when the wind blowing in the wrong direction can crash the DE and take everything else out with it? Why are people entertaining a needless instability gamble? How did this bypass any notion of experimental without session restore for years?

I'm not even arguing that on some theoretical could-happen; I actually had it happen on new-shiny Plasma 6 Wayland when OOM killer took out Plasma desktop while I was trying to compile an Android ROM, with 1TB swap (thread). And I lost work because session restore is somehow not necessary; DE gets killed, so does Firefox, text editors, file transfers from GUI, stuff transferring over adb from a GUI terminal, everything unrelated that was working fine; some wind made OOM killer (in all its wisdom even with available impossible-to-fill 1TB swap) make the fantastic automated decision to kill Plasma, which took everything else with it. Yeah year of the Linux desktop QA :p

GNOME stopped being a “major DE” starting with version 3, when they removed all the features from it and turned it into a half-tablet mutant.

Yeah, except that still hasn't stopped it from being a major DE, still prioritized by all mainstream distros, and an option on any non-mainstream worthwhile. The DE doesn't matter when you're using apps; I'm typing this from maximized Firefox that's possible everywhere.

@Sivecano
Copy link

Sivecano commented Sep 5, 2024

If one is pessimistic, the implication of Wayland being "just a protocol" is that "the Wayland user experience across the whole diverse open source desktop universe" will stay in various states of broken indefinitely depending on each implementation, and there is no single entity at fault for it. Further splintering an alredy tiny market share.

I think the important bit people seem to be missing here is that wayland can work perfectly fine with only some protcols being implemented. Expectation is only made once a protocol becomes part of wayland stable.

through this server and client can negotiate which protocols to use (at runtime, I think xcb also does such a thing but tbh last time I looked at xcb, it made me want to quit computers altogether). It's not gonna be permanently broken but instead various states of working with different extra stuff. But I know this is not going to satisfy you since what you want is a single compositor preferably implementing every protocol under the sun and versatile enough to be the only thing you'll ever need to use.

@Monsterovich
Copy link

@Espionage724

Yeah, except that still hasn't stopped it from being a major DE, still prioritized by all mainstream distros

Nonsense. The first two most popular distributions on Distrowatch don't have GNOME by default. Maybe GNOME is the default on Debian, but that distribution's user-base is unlikely to use GNOME ever because people have a choice.

Imagine how much effort it takes to push this crap into distributions and still most of the people use other DEs.

@max0x7ba
Copy link

max0x7ba commented Sep 6, 2024

One of the major justifications for Wayland development was that it would handle multiple displays with different dpi resolutions correctly by displaying objects and fonts specified in pt and metric units at the very same metric unit size on any display regardless of its actual resolution. E.g. you move your browser window to a lower resolution display but everything the browser window displays remains at exactly the same metric size regardless of its current display (the pixel size has to change).

All that fractional-and-not-scaling nonsense was a band-aid for legacy UI libraries not being able to adjust their output resolution to resolutions different from rather arbitrary 96dpi. People seem to forget that goal and still bang about the scaling in Wayland. Wayland was conceived and promised to obviate that scaling band-aid. Which never happened but people forget that scale-invariance was the major motivation for Wayland to emerge and solve.

I wonder why Apple and Google managed to create fresh new desktops without X in one year for their mobile OSs, but Wayland developers keep failing since 2008? Could it be that Wayland developers are woefully inept, and there is no evidence to the contrary, and that they keep making silly excuses that NVidia sabotaged their Wayland efforts, despite the fact that all games run pixel-perfect without any screen-tearing in Windows, while Wayland requires some never-before-seen feature from NVidia driver to match that quality of Windows games?

@max0x7ba
Copy link

max0x7ba commented Sep 6, 2024

Re-implementing an existing hairy and ugly solution that worked for decades is a recipe for disaster.

Teenagers don't want to read all that massive and twisted X11 codebase and declare that they can do better because they like typing more than reading. They rush ahead implementing their own square wheel, repeating all the same mistakes but without better solutions. This kind thinking and process brought Wayland about in 2008, in 2024 Wayland feels like an early alpha version, aka "hello world in displaying 2d rectangles on screen".

There is something fundamentally wrong with GNOME developers adjusting GNOME design for some hypothetical tablet with GNOME3, alienating their user-base in the process. That hypothetical tablet powered by GNOME3 never realised, but the anti-user attitude of GNOME developers telling users to suck it up poisoned not only GNOME but also KDE developers. Plasma 6 features new kinds of ugly clunky modal windows, a-la my first KDE dialog, which ignore decades of UI best practices, and create horrible user experiences.

Microsoft spent fortunes on researching and designing the UI users want. There is monetary feedback from Windows users to Microsoft UI designers which made Windows UI most popular and accessible, whether you like it or not.

There is no monetary feedback from Wayland, GNOME, KDE users to its developers. Which is why GNOME and KDE are so anti-user and insist on shoving their weird ideas onto users regardless of user feedback. That's pure Marxism producing products no user wants.

@lukefromdc
Copy link

lukefromdc commented Sep 6, 2024

Microsoft spent fortunes on researching and designing the UI users want. There is monetary feedback from Windows users to Microsoft UI designers which made Windows UI most popular and accessible, whether you like it or not.

There is no monetary feedback from Wayland, GNOME, KDE users to its developers. Which is why GNOME and KDE are so anti-user and insist on shoving their weird ideas onto users regardless of user feedback. That's pure Marxism producing products no user wants.

That in a nutshell is probably why MATE is so good: Sun Microsystems (long before Oracle took them over) spent well over a million dollars on a usability study for the successor to GNOME 1. GNOME 2 with compiz as WM in my personal opinion was the last real improvement on the original Windows 95 UI. That one in turn, Microsoft spent buckets and buckets of money getting it right.

@Emily511511
Copy link

@max0x7ba
The problem isn't what you think. Not only do FOSS projects lack resources and manpower to develop UI and UX, but in practice, it's pretty much impossible to change the UI of these projects.
If you suggest an UI change, at best they will tell you that they cannot change it, because "people had been used to it", which may hold some truth to be fair.

At worst, they won't want to implement it because they see no value in trying to improve the UI, or berate the people proposing these changes, because "they are not a developer".

The only way to truly improve the UI and UX of most FOSS projects is starting a whole new fork, and good luck with maintaining it.

The whole structure makes it impossible for dedicated UI/UX designers to contribute, only programmers sometimes can. In the same way that the best javascript programmer isn't the best C programmer, the best programmer isn't necessarily the best to develop the UI. Lack of specialization. Ironically, it kinda violates the UNIX philosophy in a way (do one thing, and do it well).

It also doesn't help that most Linux power users don't use the GUI because they consider it slow, buggy, and confusing, and prefer to use the terminal. If they don't often use the GUI, they have less of an incentive to get it improved.

In simpler words: there are way too many cooks in the kitchen.

@iharob
Copy link

iharob commented Sep 6, 2024

Just 1 setup. Mixed HiDPI and FHD monitors DON'T WORK ON Xorg. Wayland right now IMHO in pretty good shape. Even Jetbrains now works natively on wayland. The only thing that is still problematic is ironically google chrome. I say ironically because I use slack (I have to) and I set it up to use wayland. It has minimal issues. Whereas chrome, simply too buggy to use as the main browser on wayland.

@lukefromdc
Copy link

Just 1 setup. Mixed HiDPI and FHD monitors DON'T WORK ON Xorg. Wayland right now IMHO in pretty good shape. Even Jetbrains now works natively on wayland. The only thing that is still problematic is ironically google chrome. I say ironically because I use slack (I have to) and I set it up to use wayland. It has minimal issues. Whereas chrome, simply too buggy to use as the main browser on wayland.

Seconding this: in x11 the various xrandr applets (e.g mate-display-properties) can only apply scaling system wide, to all monitors. It's possible to manually configure xrandr to use different scaling on two monitors, but the code used is very heavy, probably by using the CPU for a graphical task.

On wayfire (as used in the new MATE wayland sesson) using two monitors with different scaling is supported as easily as using two different resolutions. Even fractional scaling is supported but for mathmatical reasons fractional scaling without introducing blurriness is very difficult.

@Espionage724
Copy link

Espionage724 commented Sep 7, 2024

I just want to put out there that FreeBSD 14.1, Xfce, Xorg with forced Intel DDX (not modesetting) and evdev/synaptics (not libinput) is the smoothest and lowest-latency set-up I've experienced in years outside of Windows. I thought I was over Arch Linux-style DIY OS set-ups but this has been totally worth it so far! (notes)

I have serious questions to how modesetting and libinput are supposed to be better to push as defaults, but I have a feeling I'm not going to like any answers to that :p I actually had spam and dropped event errors with both my touchpad and mouse with libinput.

I'm not confident mixed DPI/scaling can work ideally anywhere when it doesn't on Windows (I saw a performance hit that had me forcing app-scaling compat settings on all games and doing 100% OR 200% scaling on Windows). Wayland for me isn't solving that considering it's slowing down everything else. I absolutely require the lowest input and display latency possible, so anything slowing any part of that down has to have an incredibly good reason to be doing it, or else it gets disabled. My real-world physical input needs to be displayed on the screen ASAP. That's my biggest gripe with GNOME/Plasma Wayland having my 1000Hz cursor feeling floaty. If it's not offering lower latency, it's not an improvement.

Nonsense. The first two most popular distributions on Distrowatch don't have GNOME by default. Maybe GNOME is the default on Debian, but that distribution's user-base is unlikely to use GNOME ever because people have a choice.

I'm 100% confident page rankings 6-months on the right-side from the home page isn't accurate to what Linux distros are being actively-used on desktops, by real users. Wtf is MX Linux lol; how does anyone even find that? And regardless of whatever SteamOS is as a base, that has to be used by a majority of Deck owners and surely show as it's own distro.

Mainstream is: Ubuntu, Fedora, openSUSE, Arch Linux, Manjaro, Linux Mint, Debian, RHEL, CentOS, Rocky, and probably a handful of others (I stretched past the first 4). The first 3 prioritize GNOME or have it as a featured option. Debian iirc also. CentOS/Fedora/Rocky are RH, that sponsors GNOME primarily. Canonical also sponsors GNOME.

Teenagers don't want to read all that massive and twisted X11 codebase and declare that they can do better because they like typing more than reading. They rush ahead implementing their own square wheel, repeating all the same mistakes but without better solutions. This kind thinking and process brought Wayland about in 2008, in 2024 Wayland feels like an early alpha version, aka "hello world in displaying 2d rectangles on screen".

I'm feeling that vibe with Rust :p

What exactly is wrong with C++ besides being able to implement it incorrectly? Just do it, correctly? All I hear is Rust being safe; so just do that stuff in C++? (I don't program but if I wanted to learn anything today it'd be C++)

@dm17
Copy link

dm17 commented Sep 7, 2024

@Espionage724 Curious how FBSD has reduced your latency. Mine is better than ever with a high refresh rate display + awesomewm (compiled luajit) + X11 + kitty terminal (on a minimalist Linux distro). High polling rate mouse & keyboard feel great as well.

@Espionage724
Copy link

@dm17 I've only been using Fedora, Ubuntu, or openSUSE, so it's possible those distros do something different with system-wide compiler flags, tie things up in different ways (like dbus), or include different background daemons or logging defaults, and it could be power-saving stuff within the kernel, but basically I'm not entirely sure if FreeBSD by itself feels faster, something with how it handles power management, or if it's because of my lighter cherry-picked set-up. But whatever contributes to it, it feels great!

I'm thinking forcing Intel's DDX and evdev on my mouse helped the most. Intel's DDX driver is also using UXA instead of SNA (in log), where I've only used SNA on Linux. I mainly used libinput on Linux but I noticed on FreeBSD it mentioned errors about my touchpad and mouse; the errors were gone with evdev and synaptics. With Linux kernel (3-6.9) my Corsair Harpoon mouse would sometimes have usbhid errors and either not work/timeout or delay boot (even with ckb-next's hid/core flags). After probably 60 reboot of FreeBSD I've had no mouse issues, so maybe they just really do things differently or better :p

I went with an as-minimal a set-up as I can get and I'm pretty sure I have way less things running in the background compared to any mainstream Linux distro, so lower CPU and disk I/O overall is probably helping too! I trust rc is worlds-lighter than systemd, and the audio system seems more-simple too; stuff's surprisingly manageable without PipeWire and PulseAudio :p

I don't have LightDM and startx seems to work without requiring anything extra; I'm not sure what performance impact a display manager like GDM had all this time.

Before I left Linux I noticed my wifi card having a high IRQ increase, and I'm confident that's been happening forever (it's high on 5GHz, not 2.4GHz, but I've only ever used 5GHz). On FreeBSD I'm not using my wifi card yet. I'm not sure at all if the high IRQ ordeal was an issue, abnormal, or any performance hit on Linux.

@trinitronx
Copy link

@Espionage724:

I've only been using Fedora, Ubuntu, or openSUSE, [...SNIP...] if it's because of my lighter cherry-picked set-up.

Likely it's precisely this. Xfce + any more minimal OS (or *nix distro) in general will seem much more performant when compared to the heavier weight (usually GNOME-centric) distros mentioned (especially if comparing w/KDE spins).

Glad you've found an OS + desktop that works for you! 🎉

@stefonarch
Copy link

Lot of activity here... I stumpled upon

Why don't the major players e.g GNOME properly allow for other things to be choosen from.
You want tiling? You pick Sway in GNOME.
You want fancier tiling? You pick Hyprland in GNOME.

If you drop "mayor player" and replace GNOME with LXQt you have exactly that now. A minimal DE around a compositor - 3 tiling and 3 stacking and more to come probably.

@zDEFz
Copy link

zDEFz commented Sep 11, 2024

Lot of activity here... I stumpled upon

Why don't the major players e.g GNOME properly allow for other things to be choosen from.
You want tiling? You pick Sway in GNOME.
You want fancier tiling? You pick Hyprland in GNOME.

If you drop "mayor player" and replace GNOME with LXQt you have exactly that now. A minimal DE around a compositor - 3 tiling and 3 stacking and more to come probably.

Thanks.
I ran i3, then sway. In both cases, I have 40 workspaces, and tons of window rules and keyboard shortcuts. I can try LXQT, but since neither GNOME or KDE did like so many rules as they crash, my hopes are not that high for LXQT to not fall apart, either.

@probonopd about xdotool - I made a replacement script using dotool that just works fine for scrolling in thunar to create thumbnails. I know, it's dumb, but thats the only thing working for me for that thing thunar/tumbler lacks.
Have a look:

https://0x0.st/XxSn.sh

@stefonarch
Copy link

I ran i3, then sway. In both cases, I have 40 workspaces, and tons of window rules and keyboard shortcuts.

That's all handled by the compositor, not by LXQt itself, should be no issue.

@zDEFz
Copy link

zDEFz commented Sep 11, 2024

I ran i3, then sway. In both cases, I have 40 workspaces, and tons of window rules and keyboard shortcuts.

That's all handled by the compositor, not by LXQt itself, should be no issue.

You say that so easily. KDE plasma e.g crashes with confidence after couple of rules OR has framebuffer issues afterwards.
GNOME was stable no matter what but didnt allow for enough customization

@lukefromdc
Copy link

lukefromdc commented Sep 13, 2024

Lot of activity here... I stumpled upon

Why don't the major players e.g GNOME properly allow for other things to be choosen from.
You want tiling? You pick Sway in GNOME.
You want fancier tiling? You pick Hyprland in GNOME.

If you drop "mayor player" and replace GNOME with LXQt you have exactly that now. A minimal DE around a compositor - 3 tiling and 3 stacking and more to come probably.

For a full-featured DE with a choice of compositors, you can drop "major player" and replace GNOME with MATE, using the 1.28 version with the experimental wayland session. By default this uses Wayfire, which seems to be one of the more stable compositors for floating windows and offers compiz-like effects. You can however run all of the MATE components separately with any wlroots based compositor, or edit the mate-wayland-session scripts to use the chosen compositor.

The reason you cannot do this in GNOME is the fact that what replaces the panel and the window manager in X11 are the same process, and that under wayland these and the compositor are at least the same package (gnome-shell and its dependencies) if not also the same process(not sure if they are or not).

Compositor and "panel" in same process bypasses the usual issues in writing a shell or panel of having to talk to the WM (x11) or compositor (wayland) to get window state, position, and name. GNOME combined them long before wlroots ever existed, in fact before ever porting to wayland. First release of wayland was about two years after first release of gnome-shell, but I wonder if plans to port to wayland were the real reason for combining "panel" and WM in the same process? Combining separate processes like this tends to lower performance and mean that a delay in one is a delay in all.

@Emily511511
Copy link

For a full-featured DE with a choice of compositors, you can drop "major player" and replace GNOME with MATE

The reason why many people are relunctant to choose these DEs as a "universal solution for everyone" is that they often lack features. Starting with fractional scaling, the majority of them don't even have a slider to configure it, and they try to rely on painful hacks to do so (forcing font dpi without doing anything about icons, etc.).

Their teams are smaller, they lack features and it shows. And I won't even get into bugs or potential other problems.

These DEs are great if you treat them as the small projects they are. But if you are trying to get someone to blindly use them as a replacement for GNOME or KDE, you are kinda setting them up for disappointment.

One man building his own pyramid from scratch is extremely impressive, but it doesn't mean that it should be compared to a modern skyscraper built by thousands of people with very modern tech.

It's easy to forget that GNOME and KDE are very big projects, they wouldn't invest that many man hours if it were for zero results perceivable to the end-user.

@Espionage724
Copy link

Espionage724 commented Sep 14, 2024

The reason why many people are relunctant to choose these DEs as a "universal solution for everyone" is that they often lack features. Starting with fractional scaling, the majority of them don't even have a slider to configure it, and they try to rely on painful hacks to do so (forcing font dpi without doing anything about icons, etc.).

I feel like forgetting fractional scaling ever existed is the best solution; it only oddly-scales stuff inconsistently, with varying results Windows and Linux (seemingly not macOS though). 100%, 200%, or 300% if your screen is HiDPI-enough :p

I can see more comfortably at 125% but I deal with 25% less of that just to not question how a game is going to scale with that or if it's a perf hit, at least until I get a better screen to do 200% again. And every time I tried it on Linux (last Plasma 6) everything ended up noticeably fuzzy.

@trinitronx
Copy link

trinitronx commented Sep 14, 2024

@Espionage724:

every time I tried it on Linux (last Plasma 6) everything ended up noticeably fuzzy.

This has been an issue frequently cropping up on Linux since even before Wayland. Xorg with non-96 DPI displays & non-default subpixel hinting can cause fuzziness or blurriness. Often, this has more to do with fontconfig not being configured to match the physical characteristics of the display.

I'm curious if you tried to set subpixel rendering according to your monitor's subpixel layout? Depending on what distro + stack you're running, this could include both configuring the compositor and fontconfig.

It's a helpful thing to check whether fontconfig DPI and subpixel layout are set also to match the physical display. You can check this by snapping a close-up macro photo of the display when it's showing a white screen, and zooming in to see the subpixels. Having the wrong subpixel layout + DPI set was the culprit in my case for an HTPC using an older HDMI TV with low DPI as the display.

Here's my example for HDMI Vizio M601d-A3/A3R. This display has BGR (blue-green-red) subpixel layout, and 36 DPI:

Expand for example: ~/.config/fontconfig/conf.d/19-DisplayProperties.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<!-- Generated by Font Manager. Do NOT edit this file. -->
<fontconfig>
  <match target="font">
    <edit name="rgba" mode="assign" binding="strong">
      <int>2</int>
    </edit>
    <edit name="lcdfilter" mode="assign" binding="strong">
      <int>1</int>
    </edit>
    <edit name="scale" mode="assign" binding="strong">
      <double>1.0</double>
    </edit>
    <edit name="dpi" mode="assign" binding="strong">
      <double>36.0</double>
    </edit>
  </match>
</fontconfig>

The values for rgba setting can be found here under the "Configuration File Format -> <const> section.

[...SNIP...]

unknown         rgba            0
rgb             rgba            1
bgr             rgba            2
vrgb            rgba            3
vbgr            rgba            4
none            rgba            5

[...SNIP...]

Last thing is that lcdfilter can give different results based on the display & your personal preferences. This page has demos of lcdfilter values, and should work for your RGB subpixel layout display. The lcdfilter that works best for your display should have the least noticeable color banding. Smoother edges are more preferable for the font characters with curved edges. The idea behind this setting is that it works alongside subpixel layout to reduce color fringing and approximate smooth curves on the grid-based pixelated display.

Generally, starting out with 1:1 (or "100%") scale is best to ensure that things look crisp and clear. If not, then something's misconfigured (or defaults don't match to your physical hardware). Then, once everything looks good, try to see what happens with fractional (e.g. non-integer multiple) scaling.

So, in your compositor or window manager's System Settings, make sure to set scaling at first to 100% (if only temporarily). Maybe for HiDPI displays if things look extremely small at 100%, then try 200% or any integer multiples only to begin with. For Xorg, also match the screen & font DPI settings to match the display. Sometimes for Xorg/X11, setting DPI is easier said than done, but maybe this doc helps.

@Emily511511
Copy link

@Espionage724

Even on a standard 15 inches 1080p laptop screen which is not hi-dpi, not having fractional scaling stinks. 100% scaling is too small and 200% scaling is too big.

I don't even want to imagine how a real hi-dpi monitor would suck at 100% scaling.

Windows management of monitors or hi-dpi is not perfect, but in my experience, it's a lot better than Linux in most cases. Usually, if Windows struggles with something, the Linux world is in an even bigger trouble.

MacOS is "cheating", because they mainly have to worry about the screen sizes of Macbooks and iMacs. If something looks "off" on a non-Apple screen, people will be more lenient towards them. Whereas Windows and Linux pretty much have to cover all screen sizes and all kind of weird setups, while allowing customization.

But nowadays, how Linux deals with this stuff isn't the worst thing ever, if you are lucky enough. So, at least there is progress.

@zDEFz
Copy link

zDEFz commented Sep 14, 2024

@Emily511511

Even on a standard 15 inches 1080p laptop screen which is not hi-dpi, not having fractional scaling stinks. 100% scaling is too small and 200% scaling is too big.

I use two 1920x1080 screens, and the only Applications that are not having saveable zoom states are applications like https://github.com/cboxdoerfer/fsearch - only thing you can do here is GDK_SCALE=2 or ask maintainer to implement zoom in / zoom out.
For anything else, I just use ctrl+ or ctrl- and the setting usually sticks.

It's going into that direction, that applications themselves must be responsively sizable / scalable.

Here is the thing! You measure a max. zoom of 200% at 1280x1024 and it must pass for web-technologies under WCAG 2.X for being ADA compliant. And for that to start with, you do test in full-screen - using F11, and having zoom at 100%.
You must absolutely make sure that the application is >really< having that space usable.

If I change scaling of ALL applications, I am affecting the usable space. And that's the reason I absolutely do not want fractional scaling.
Only 100%. The Applications themselves need to have proper Accessibility implemented.

@Espionage724
Copy link

I'm curious if you tried to set subpixel rendering according to your monitor's subpixel layout? Depending on what distro + stack you're running, this could include both configuring the compositor and fontconfig.

I've tried messing with that several times over the years and didn't generally get anything I preferred or understood the config for, over just leaving it alone at 100% scaling.

On Xfce X11 I found disabling subpixel, hinting, and 96 DPI actually made stuff more sharp/clear than defaults or forcing any one of them, so now I'm even more convinced I don't really understand how fonts or its scaling works to be trying to play with it in-hopes of making it work for anything fractional :p

@krakeVizva
Copy link

vokoScreenNG 3.5.0 works for screencasting in Debian 12 Plasma KDE - without audio

@Sivecano
Copy link

at this point fractional scaling on wayland is simply superior to windows. (at least if you're using recent software, duh)
This is an experience that both I and others have unanimously had.
I've been using wayland with fractional scaling for months without issue now.
it's fine. it works. now xwayland stuff is now going to scale; so it'll either be blurry or at integer scale.

@Espionage724
Copy link

at this point fractional scaling on wayland is simply superior to windows. (at least if you're using recent software, duh) This is an experience that both I and others have unanimously had.

I'll test this I guess next Windows install :p but it wasn't for me Plasma 6 in April/May, unless it was something silly like the entire DE running through Xwayland.

But for me even if Wayland does fractional scaling better, I kind of like having a non-floaty mouse and 10-20+ FPS on Dota 2 more. And I guess it says nothing about all my games going through Xwayland anyway :p

it's fine. it works. now xwayland stuff is now going to scale; so it'll either be blurry or at integer scale.

Yeah that'd still have me at 100% if majority of the games I run through Xwayland are going to be blurry.

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