Gaming on Wayland
zamundaaa.github.io
zamundaaa.github.io
I have a 240Hz monitor, so gnome-shell passes data to xwayland and then to applications at ~220Hz (as seen in the event-freq from https://blogs.gnome.org/shell-dev/2021/12/08/an-eventful-ins...)
So, my expensivish 1kHz (or even 8kHz mice - as these exist) will pass mouse movements with 4ms+ delay and only <240 times per second.
Under Xorg, the xinput proto will pass data at the ~usb polling speed. For my 2kHz mouse, the tool (event-freq) shows ~1700 events / second.
By the way, this ~220Hz is the speed at which gnome-shell passes data to clients (via XWayland or directly). The libinput accepts and passes data at correct 2kHz - and it's only gnome-shell aggregates it under wayland - this can be seen e.g. in the evhz tool (direct /dev/input access) vs event-freq tool (gnome-shell in wayland session, and xinput in xorg session).
But really almost all the tech exists (aside from server side scaling, but this can be ignored for an initial implementation) and toolkits (or at least Qt and perhaps Gtk) should already support this as Windows scaling works in a similar way, it is largely getting a bunch of different projects to play nice together.
QT_DPI="192;128"
via envvars. But it only means that when moving window to another monitor the window will get suddenly re-scaled/re-sized, instead of being smoothly drawn using different scaling factor.
The window manager is at the best position to support something like this since it handles window placement. It is possible to have a separate program that can keep track of window placement and support the relevant events too (for window managers that wont support this) but it can be tricky to get it work smoothly.
The sudden scale/resize is something that can't really be avoided without support from the compositor (be it the window manager, a separate compositor or server-side composition), assuming there is one of course (this should work without a compositor too, you'd just wont get the scaled fallback unless the server-side scaling patch is also added to Xorg). Again, can be done and the tech is there, it just needs wiring all these things up.
"One app window, two monitors, two DPIs" https://kde.org/announcements/plasma/5/5.11.0/#wayland
I don't plan on getting one since i find even 1440p/27" too much for my taste (i only got it because it was the only high refresh rate monitor with a flat VA panel i could find available when i decided to get a new monitor) but if i ever have to get a hidpi monitor (e.g. someone finally released an OLED monitor but does the annoying thing and only makes it available in a single configuration that happens to be 4K because bigger numbers are better, all other concerns be damned), i'll try to go through everything to get it working on my PC (assuming noone else does it before).
I just mentioned GNOME because I actually really dislike it, and was forced to use it for good tablet support with wayland, they broke those plugins I used.
Also personally I think integer (if any) coordinate scaling, and fractional font-only scaling (or fractional blurry server-side scaling) is the only way to support fractional DPI scaling without breaking the fundamental assumption that integer-aligned pixel rectangles don't overlap or partially cover pixels. Qt's fractional coordinate scaling breaks much of current theming and app painting algorithms.
Gaming can crash the session so I doubt that is a worthy tradeoff.
My work laptop is 4k 13" while my second monitor is 1440p 27". I had to enable some gnome custom scaling flag to unlock fractional custom scaling (as you probably also had to do) - not because I want to run my laptop at e.g. 175%, but because setting the laptop scaling to 200% without fractional scaling turned on would mess up all scaling on the external display too (many elements also 200% etc).
So with fractional scaling on, laptop at 200% scaling and external monitor at default 100% everything does work mostly right... except for all the programs that didn't get the memo and seem to scale properly but show up all blurred. I know it's a big Electron issue (so affects Slack, Chrome and VSCode... my 3 most-used programs) - unsure if it's a problem with other stuff.
But all in all has been kind of annoying.
I know they are working on fixes from the Electron angle but last I checked none of it was very stable.
Your "This Linux tech is pretty shit isn't it" posturing you've shown all over this thread and other Linux posts is _insufferable_.
We don't need novelty accounts to repeat the same trite cynicisms everywhere, there's Reddit for that.
1). Xorg + gnome-flashback or Xorg + other non-compositing WM
or
2). Non-gnome compositor under wayland
As for 1). Xorg b/c it can provide pointer movements at ~native speed via xnput vs Gnome/Wayland 60-240Hz. And gnome-flashback b/c it's a non-compositing WM, so there's no frame buffering (unless you enable it in nvidia's panel, or via TearFree in amdgpu).
As for 2). Sway, I suppose, doesn't aggregate mouse movements, but looking at https://zamundaaa.github.io/wayland/2021/12/14/about-gaming-... the author used some hack to enable "immediate" "drawing" under KWin. I'm not sure what's the default behavior of e.g. Sway - does it buffer frames?
Some list of Wayland compositors: https://wiki.archlinux.org/title/Wayland#Compositors
Personal recommendation goes for sway, once you understand it, there is no going back!
On Gnome, you must use Mutter I guess.
That is FUD.
Screen tearing is subjective issue, personally i never cared for it and my biggest annoyance with Windows is that its forced compositor also adds vsync which forces input lag across the desktop. X allowing me to not use that garbage is a big plus. With a fast refresh rate monitor tearing is practically invisible anyway. Also X11 applications can avoid screen tearing, if some do not then this is a bug in the application.
Security bugs is overblown and Wayland security features are akin to keeping your computer turned off to get the best security. In practice if you do not trust an application you can isolate it, though it is really futile since applications can simply use other means than X to "spy" you. X already provide functionality for doing that but if you are really paranoid (why are you running untrusted applications in that case?) you can run a nested X... or even X under Wayland under X. Then once you notice the onionwrapped application launch your browser or any other application, you'll realize the futility of said onionwrapping but hey, until that moment you'll feel safe.
> end of its life
Xorg is an open source program, you can't "end of line" an open source program, it isn't Visual Basic 6 that died because Microsoft decided it should die. As long as someone wants to improve it, it will get improvements.
Also a new version was released just a few weeks ago with a new maintainer that offered to make new releases.
> being too complicated
Have you actually checked the source code? If you ignore the drivers and all the satellite libraries (like Xt, Xaw, etc) the X server itself isn't really that big or complicated.
> not well designed project
This is irrelevant, it does what it is supposed to do.
This exactly is the point. Wouldn’t it be nice to just use apps without extra steps? It would make Linux better for non-experts.
You can’t even isolate X applications without running other X.org because there is no permission control once the application has access into socket, and with socket it can see everything. And you can’t really rework that. Sometimes you need to rewrite whole thing.
Applications cannot normally spy on you unless you run everything in root. It is X.org which provides access for keystrokes and windows.
> Xorg is an open source program, you can't "end of line" an open source program, it isn't Visual Basic 6 that died because Microsoft decided it should die. As long as someone wants to improve it, it will get improvements.
Because the design is bad, it gets harder and harder to add new features. Fixing bug introduces two new ones. Complexity makes it hard to approach project and control everything. Red Hat has maintained it so many years with proper funding, otherwise who knows what would have happened.
non-experts won't use desktop linux regardless, give me back my power tools
I don't run untrusted apps, at the cost of crashing, and less overall functionality? Its cutting the nose to spite the face.
>You can’t even isolate X applications without running other X.org because there is no permission control once the application has access into socket, and with socket it can see everything. And you can’t really rework that. Sometimes you need to rewrite whole thing.
Not a real world scenario problem.
>Because the design is bad, it gets harder and harder to add new features. Fixing bug introduces two new ones. Complexity makes it hard to approach project and control everything. Red Hat has maintained it so many years with proper funding, otherwise who knows what would have happened.
Wayland design is... good? So it's taken over a decade to add a fraction of x.org features, and it still crashes? If it so simple and it still sucks, are you calling the programmers incompetent for not making the simple compositor functional?
The best practice is zero-trust; handle everything equally. You can't fully say by yourself which is really trustable, and if you are, then you are 0,01% of the actual population, and decision cannot be based on that.
> Not a real world scenario problem. Of course it is, it is the biggest attack surface for normal application.
What real cases have had this happen?
This type of thing is pretty common in old applications like this with a lot of hand-rolled networking code written in C.
Thank you for your expertise in the thread.
Linux is said to be safer in the public, but if x.org is that bad, is windows actually safer since it doesn't use x?
I think its useful to mitigate problems, without real world examples its hard to care about invisible hypotheticals, especially at the cost of lost functionality.
The attack vector for a trojan or ransomware can be a GUI system. It can be anything really, the malware just needs a way to get into the network and then it can cause more trouble and spread to more nodes.
Yes. If deployment is difficult and not applicable in real world settings it isn't really a threat, its like reading about the TouchID since the first iPhone 5S being tricked by copying fingerprints, or needing a bust of a person to trick FaceID. Do people still usually use it? Its a recipe, maybe even its cooked, but if nobody eats the poisoned food because it smells bad, I am not worried I might eat it.
>then significant money is at risk from security vulnerabilities then I'd usually expect security to win out.
In practice it sadly isn't true like the leaks of other people's data that constantly happens.
I think updating browsers is a good idea, I think sandboxing apps can be safer, using a VM for some functionality could be useful too (if you run XP and malware detects its a VM, it doesn't even infect it). Basically I see most security issues as paranoia when its academics publishing hypothetical attacks that have never been seen in the wild, if they made super ebola in a lab or anthrax, I am not too worried about breathing it in.
I would like it patched if the cost is worth it. Intel's was not, I disabled it, and religiously update my browser, my computer is faster, I have safety despite it never existing as an attack because it was easy to defeat.
That's not really comparable, these are trivial exploits that can probably be targeted with a 100-line program, or less.
>In practice it sadly isn't true like the leaks of other people's data that constantly happens.
I've known many security people who take their jobs very seriously. If they weren't doing their jobs, you'd see quite a lot more data breaches than you do now :)
I feel like it would be newsworthy if they were trivial, or we'd see more of them. Today there was a story on malware on Pinephone, a device almost nobody has that didn't cost any money to anyone. If they were trivial, it would be utilized more and we wouldn't need to care about the wayland issues as much since the alternative is worst.
I tried wayland just because of this thread, and I got 2 crashes within minutes.
Actually you can, the X server can run applications in an untrusted state where they cannot see other resources. It is not straightforward to setup though so running a nested X server is much simpler - at least until you realize that the same "untrusted" app has access to the rest of your system anyway.
> It is X.org which provides access for keystrokes and windows.
You can avoid that if you want but as others have mentioned you are way more likely to need that functionality for legitimate purposes.
X11 is 37 years old. Even taking at face value the rumors of its death, I'd say it was shockingly well designed if it's finally - maybe - starting to hit its limits.
BTW, gnome-shell supports so called compositor bypass for windows which request it (and games which I play request it via probably libSDL) - more on that here https://specifications.freedesktop.org/wm-spec/wm-spec-lates... - but I still wonder what kind of visual delay I'm getting with gnome-shell vs e.g. sway.
My understanding is that with _NET_WM_BYPASS_COMPOSITOR it should be the same (vs non-compositing window manager), but the devil is in the details.
I like gnome-flashback/metacity (non-compositing WM), but there are some strange quirks of it, which make me avoid using it on my 21:9 monitor.
4ms latency is basically nothing (Relatively. Yes, it should be zero). Games already add 10s of ms, modern monitors all add around 3ms-10ms for no reason at a bare minimum. And the latency of each pixel varies depending on the start and end luminance level of a pixel moreso than the [0,8] ms of a mouse at 125Hz being sampled at an arbitrary position in your game cycle (yes, even on many "240Hz" LCDs). Though, it's unclear to me if you get other undesired effects from resampling the output of already sampling the mouse.
1KHz+ mouse sampling's primary benefit is that panning is smooth (perhaps on a properly configured system with a CRT and non-bloated stack then the 8ms max latency becomes an issue). If using a 125Hz mouse polling rate, you circle around an object while keeping your crosshair it, it will be easy to see how wobbly this is. At 1KHz that mostly goes away. Higher mouse DPI on low sens additionally visibly adds to the smoothness.
I know a lot of people complain about Linux being much more complicated to use, but my experience for the last ten years is that Linux almost always works better than Windows and OSX for the basic 90% of things. But, Wayland has changed that for me entirely, now it feels like 50% does not work.
just don't forget to check if Wayland is up to your standard every year or so
And Zoom could, too, if they cared. (And by the way, I use Zoom in browser with Wayland when required by <obligation>, and it works fine.)
Once again, people miffed at Linux because closed source app developers are lazy and don't give two shits. (Which would be and often is a pain for plenty of other reasons than Wayland.)
I totally agree Zoom should fix it, but they haven't yet.
I tried to install xdg-desktop-portal with ` nix-env --install xdg-desktop-portal` but running xdg-desktop-portal does not find the binary. I'm just confused what this command does anyway.
https://github.com/flathub/us.zoom.Zoom/pull/182#issuecommen...
Apparently, there has been some recent activity via support channels. But I’d bet it’s probably not that difficult, just a matter of the team’s priorities to get to it. Then again, zoom isn’t very active or transparent in the OSS world, so it’s hard to say.
[0] https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1...
[0] https://github.com/Plagman/gamescope - it is a fork of Valve's wayland compositor which actually works under X11 inside a window and effectively creates a nested XWayland environment but also attempts to minimize latency... it doesn't eliminate it completely but outside of twitchy shooters it is ok
Of course since this is a DOS game i can simply run it with native DOSBox, but this is just a way to replicate the issue.
Since i've found workarounds for these issues i didn't bother much, but i might try and see why it crashes at some point.
Also FWIW i do not really consider "gaming on Linux" when i have to use a Windows VM. Besides Wine (well, Wine staging) nowadays works perfectly fine. And if i wanted to use Windows, i'd just be using Windows :-P.
Wayland messes that up, on top of frequent crashiness. Wayland does not solve any problem I have, but it does break most of the things that were working well.
>Wayland messes that up, on top of frequent crashiness. Wayland does not solve any problem I have, but it does break most of the things that were working well.
That's all I get from the thread, it works well as long as you don't do anything other than use the browser.
However the measurements at least are good (interestingly i was actually planning to do the exact same thing at some point using pretty much the same approach) and basically show what most people expect: X without a compositor (or with the compositor being disabled for fullscreen gaming, though note that not everyone may want to play games in fullscreen - e.g. i often play games in a window myself) and vsync disabled provides the best responsiveness.
Also one thing that should be made very clear is that these are about KWin/X11 and KWin/Wayland, not X11 and Wayland in general. For example last time i checked XFWM allows disabling vsync in the compositor, which would certainly affect the results here. Also it isn't made clear (and actually i don't know myself) if KWin disabled the compositor for fullscreen Wayland applications or not: i'd guess it doesn't because under X in my laptop where i use KDE i had to explicitly disable it even for fullscreen games (there is a shortcut key for that), so i'd expect the same behavior in Wayland too.
Ah, but then you have two problems.
When using Gnome + Xorg + proprietary Nvidia driver with multiple monitors, with different refresh rates (144 and 60), they do not limit both to 60. Each monitor has different refresh rate and it is clearly visible that 144hz monitor is running correctly.
And while Gnome is obviously running the compositor, I can turn off vsync for fullscreen game and remove fps limit and it does seem like it's not using vsync. Maybe I just don't notice it with my monitor and games anymore, but it certainly doesn't feel like I'm locked in and delayed with vsync.
I read that Nvidia is adding some Wayland and Xwayland support for their proprietary driver but I haven't tested it yet. I wonder if I'll notice any difference there.
I don't remember if GPU level sync with compositor sync off solves VRR with a compositor on X11 though or if it did but with side effects. Been a while since I've messed with it.
a) Both screens are receiving a 144Hz signal and your 60Hz screen just happens to accept this and drop the extra frames
b) It works as long as it can actually hit 144Hz. As soon as anything drops it will drop to 60 instead of whatever is appropriate for a 144Hz screen. (This comes from the article on how mutter finally split the frame clock on Wayland)
No shot. All 60Hz monitors created before the 120Hz+ era cannot handle a signal above 75Hz. The exception being the few that can go up to 85Hz. They cannot just drop every second frame at 120Hz; that would require timing faster than what they're capable of.
>[In VRR] Whenever an application is slower than the displays maximum refresh rate the display will wait for the next frame before it updates the pixels and thus you don’t see any stutter
Nothing so simple. VRR means your framerate fluctuates, which means you have stutter, by definition. Perhaps if you can bound it within a sufficiently small range that it wont be perceptible. If game framerates _did_ have predictably small variance, everyone would just generate the new frame right before VBI and have perfect (practically) latency free, no tear, no stutter, no motion blur (via BFI/CRT) rendering.
>Not all displays have this functionality (yet) because it’s difficult to make it work well: In many displays with different refresh rates the brightness changes a lot, so if the refresh rate jumps around you’ll see the display constantly flicker in brightness.
The brightness only changes if you are using Black Frame Insertion (on old monitors you can't use VRR at the same time as BFI; on newer ones this is supposedely fixed, i have no idea how or if it's valid). One big issue though is that VRR makes liquid crystal transitions even harder than it already is to happen fast and artifact-free.
These measurements are bad for various reasons. There's also the obvious question: how does Wayland actually change the framebuffer? Direct scanout is a term I've never heard that could mean many things... I guess you get control over scanout, so you could render during VBI and have zero latency in this part of the loop, in which case why even measure it.
>the one frame of added latency with compositing and game VSync does not apply to Wayland
I thought that on X with vsync disabled, a fullscreen game will write pixels directly to the framebuffer on the gpu without going through the x server / compositor, so there will be 0 frames of delay. Is this correct?
> application contents can be put directly on the screen with the display hardware (which is called “direct scanout”. You may have heard the X related term “unredirection” used for the same thing, too).
So on a machine running wayland, direct scanout would let a fullscreen game render directly to the framebuffer without any copying, compositing, color remapping, etc etc, just pure pixel data to the screen without any intermediate steps, right?
And how does this work exactly, like does the program that wants to render to the screen have to call some API function to explicitly opt-in to direct scanout? Because most games, even the ones designed to run on linux, are not aware of wayland.
Also I think something is up with the final measurements, on his 120hz monitor one frame of latency is about 8 ms, but the lowest he ever measured was 19ms so it seems like something is adding at least a frame of latency.
In a classic "fullscreen game" situation, whenever a back buffer is finished, the game would configure the GPU's CRTC (the hardware that generates the data stream that goes to the monitor) to read from this back buffer instead. This turns the back buffer into the current front buffer and releases the old front buffer to act as the next back buffer ("page flipping").
When this happens without any synchronization with the monitor, the buffer can be changed in the middle of the frame, causing the characteristic tearing. With VSync, the game delays the swap until the monitor is between frames.
With Wayland, the game swaps buffers with the compositor instead. Direct scanout means that the compositor will configure the CRTC to read from the game's front buffer. So this is really similar to the "classic" situation, except it involves a bit of inter-process communication.
Otherwise, the compositor has its own set of front and back buffer, and the game's front buffer is copied (composited) into the compositor's back buffer first. So we have another buffer swap that has to be done, and this is what causes the composition lag.
Whether direct scanout happens or not is transparent to the game, which does not need to care.
Wayland enforces VSync by default, though there's a protocol being designed (`zwp_tearing_control_unstable_v1`) so a game can request asynchronous flipping.
> but the lowest he ever measured was 19ms so it seems like something is adding at least a frame of latency.
Ignoring the fact that the measurements are completely bogus and nothing can be taken from them, the monitor itself will add lag, and the mouse/keyboard will add between 0 and 8ms lag per frame if it's a standard 125Hz polling rate configuration.
"The GPU sends some image to the display, beginning from the pixel on the top left and going through them line by line"
This isn't necessarily accurate. On many SoCs (like the entire ARM ecosystem), it's the DPU that sends the image to the display, not the GPU. They are different hardware blocks.
That DPU then also takes its input in the form of a list of buffers, not a single buffer, and does composition during scanout. Hardware overlays are very much alive & well, after all (hence their support in DRM/KMS, as well as Android's HWC HAL)
Which in this case isn't pedantry and is really important, since we're talking about compositors. It's really important for power, performance, and features (assuming DRM'd video is a feature you want, anyway) for the window compositor to be able to farm out to the hardware compositor for various things.
On something like an ARM SoC where this is all unified memory, I couldn't entirely remember where exactly PSR sat. In that case you could argue the transfer is an atomic switch to a different buffer, but I thought the PSR memory was still a different segment even in that case.
Now, I can anticipate a number of responses to this. Firstly, a lot of people will (correctly) point out that x11 isn't a very good window server, and doesn't account for things like compositing, security or proper window management. Fair enough, they're all valid complaints. Wayland's solution to the dog bite seems to be pulling the teeth off the dog though, and I don't really agree with a lot of the design philosophy that went into making it. It reminds me of the recent GNOME releases, where their solution to inconsistent user theming and poor extension support was just to remove both features altogether. The trap that a lot of modern Linux developers seem to fall into is fragmenting their userbase under the guise of "finally fixing" some pain point or bug, and cutting off the users who disagree with them instead of Doing One Thing, and Doing It Well. Everyone is big-picture these days, wanting to take giant leaps for the Linux desktop experience without really considering how extensible or feature-complete their program is, and slamming the "f*ck it, ship it" button before it's ready.
Admittedly, there's not an elegant solution to any of this. However, in this specific example, I think the best course of action would have been to just outright plagiarize Apple's Quartz. The development cycle for Wayland has been painful to say the least, and a lot of it came from wildly unnecessary breaking changes, vendor apprehension and arguments about ideology that really shouldn't have wasted our time in the first place. Now that it's "ready", there's a couple hundred asterisks following every feature, and the experience is generally shaky enough to keep me fearful of God and contented with x11, no matter how bad it is.
Edit: Quick shoutout to PipeWire while I'm here, for actually creating a crowd-pleasing solution where nobody had to be thrown under the bus. They were given a herculean task of unifying 4 different audio standards, and they shipped it when it was ready instead of letting it languish in development hell. The result was fantastic, and distro uptake was almost immediate. If more projects were like PW, we wouldn't be here having this conversation right now.
I have tried these as addons, and they basically suck, and its complex to change them, and for what benefit? Some smoother graphics? I am on Linux, that is the least important thing. Basically if it doesn't give me real world benefits, I am unlikely to want to switch, and if it gives me more issues and less features for things that matter and isn't a drop in replacement it might as well be a scooter to my car.
This really sums up this side of the argument for me (though it doesn't address the security features of Wayland). If I want to watch an ultra high definition movie, or play a game, rebooting to windows is a miniscule price. Almost all of my work is done on Linux, and I value it because everything can be made to work, usually with little effort. Wayland adds some severe overhead to that work.
For anyone who wants a functional desktop on any DE, x.org is the best, and cannot be replaced currently by wayland in features or software compatibility.
So you're saying let's not improve the Linux desktop because one can just reboot into Windows to do desktop things? What even is that argument?
I want to have a nice desktop on Linux, thank you very much.
- Cursor rapidly changing state for no discernible reason
- Missed inputs, particularly in xWayland
- Drawing issues, where portions of one window would appear and the rest would fail to draw entirely
- Electron apps were hit-or-miss out of the box, but I got most of them working
- Display flickering and seriously messed-up color correction in xWayland applications, rendering a handful of games and apps just completely unusable
It's been a few months since I've given it a run again, but I'm not exactly excited to spend a day figuring out how my display manager functions when x11 works well enough for my uses. Maybe once the KDE bugs get ironed out properly I'll give it another pass.
DPI scaling and full screen playback without screen tearing are pretty huge upgrades.
You might argue that it’s not worth overhauling everything for that, but it’s undeniably a huge quality difference and was one of the major reasons I moved to wayland. Having a 1080p screen and a 4K screen “just work” has been my reality for a few years now - to the point where I get surprised when people talk about it as if it’s an issue.
I do have screen sharing issues though. With basically everything.
Edit: I never had screen tearing on video.
Hot keys are handled by the compositor. Global ones especially. (Apps stealing keystrokes? Sounds like an anti feature)
Point stands. But I’d rather we work on improving things than just living with X11- it’s like continually adapting token ring networks instead of embracing star topology. It’s fundamentally difficult or impossible to fix.
The wayland authors (who are former X11 devs) talked about this extensively.
The downside is that once a command is bound it cannot be reused: so if I wanted to have OBS and simplescreenrecorder that both use “meta+S” to start recording then that’s not possible.
The biggest issue I have with wayland is that OBS and screen recording simply do not work, I’m not sure if there are effective workarounds but a consequence of one program not being allowed to spy on another program is that you can’t record the screen.
That is not true (at least in sway). You need the xdg-desktop-portal-wlr installed and running for it. Gnome and Plasma have similar desktop portal utilities, but I'm not sure they fully support the screen sharing wayland extension.
I use a widget that I can scroll my mouse to change the color, does it have it? It doesn't look like it does.
>Hot keys are handled by the compositor.
Yes I know, I don't like it, I have hotkeys setup in a way that I like, and I don't want to redo it all, I even tried.
>Global ones especially. (Apps stealing keystrokes? Sounds like an anti feature)
Framing app hotkeys as theft of my input is like saying that my window I am tying in is stealing my keystrokes. If you consider breaking userspace as an benefit, I am confused. It is an optional feature I turned on myself, and you call it keystroke theft, when it was ME that enabled it. Linus Torvald's one rule is that userspace should never be broken. This breaks userspace.
> It’s fundamentally difficult or impossible to fix.
Or its not broken.
>The wayland authors (who are former X11 devs) talked about this extensively.
They are still improving it like btrfs, but I would rather stick to something that just works, and so far it has more problems, anti features, needs configuration to be functional, and for what benefit? No battery benefits, no extra functionality in fact less features, breaks workflow, and smoother animations. I also forgot to mention it breaks some of my terminal emulators, every time I try it I have a horrible experience, it breaks things that matter to me, and still does for most people.
Even if its "good enough" it will take a long time for more application support, unless I hate myself and resign myself to no configuration GNOME.
Sounds like that right until the user tries to press Alt Tab on a full-screen VNC or VM client.
It is jarring to need to remember different keystrokes by the compositor if you use more than one computer, especially if they're not all linux. Why do you think its worth all this pain?
Every "feature" of wayland sounds like a regression. I hope someone makes x.org in rust
Which I could agree with you- I dislike change too, I fight systemd because I don’t see it benefiting me.
But this is a bit silly, you keep coming up with rotating surface level complaints but the main reason X11 was replaced was because it was architecturally broken not because they wanted to solve specific issues.
That there is no great community around wayland is because of naysayers like yourself. Things are easier to solve than they used to be but people are doing everything they can to avoid using wayland.
Things like nvidia forcing people to use X11 have caused distro maintainers to do double the work to maintain backwards compatibility; which means it hasn’t had as much love as X11 over the years either.
Normally I would take the stance of “what ever works” but you sound like you’ll do anything to justify not switching. Arguing about creature comforts or that your compositor has more control over your UX than some random program is an absolutely surface level argument when we’re talking about fundamental and required architecture changes for us to go forward with desktop Linux.
That you don’t understand how dire the situation was becoming is quite telling. It’s not worse, it just doesn’t have the community stuff behind it yet, and the reason is the mentality you have.
I would gladly hop in a better car, if the newer car has less features and is worst, I will not.
>That there is no great community around wayland is because of naysayers like yourself. Things are easier to solve than they used to be but people are doing everything they can to avoid using wayland.
Rust has plenty of naysayers, as does pipewire. People hate Apple stuff with a passion, but they are all good. Wayland works on GNOME, which is a fact. I even said if its "good enough" it will take a long time for more application support, unless I hate myself and resign myself to no configuration GNOME. The reason it has no community is because it sucks.
>Normally I would take the stance of “what ever works” but you sound like you’ll do anything to justify not switching. Arguing about creature comforts or that your compositor has more control over your UX than some random program is an absolutely surface level argument when we’re talking about fundamental and required architecture changes for us to go forward with desktop Linux.
You don't get to decide what the direction of desktop linux is, or what people want to do with their open source software. I could say that the dolphin is the stupidest animal in the world, and nobody would take me seriously. Wayland sucks, if tomorrow x.org didn't exist, I would not continue to use linux. There is no benefit for most users in this thread. I even said I used it on a touch device to get rotation working on my touch tablet, but you ignored that because I have a different preference than you. Every "feature" of wayland sounds like a regression if doublespeaking as regression in features is going forward.
>That you don’t understand how dire the situation was becoming is quite telling. It’s not worse, it just doesn’t have the community stuff behind it yet, and the reason is the mentality you have.
There is a new maintainer, I will continue to use the best tools for myself, which will not be wayland for any non touch computer. Wayland design is... good It's taken over a decade to add a fraction of x.org features, random plugins needed to make it imitate x11, and with less features it still crashes? If it such a required architeture change, why is it making everything worst? What does forward even mean, less features with more crashes? No thanks. If it was so great why does it still suck compared to the so called dire x.org?
>It’s not worse, it just doesn’t have the community stuff behind it yet, and the reason is the mentality you have.
Do you love broken userspace? That's great, choose a compositor that breaks your userspace? My mentality of having robust software is the opposite. Suprise! Nobody wants to use crappier software with less features despite the dire "problems" of x.org, they made a rational choice, which bothers you so much. Why does it matter what I run? You look down on everyone's problem as invalid, calls our mentality wrong, and can't even define what forward is, or why anyone cares, because nothing you say is a benefit matters. Don't be suprised if wayland never gets used or doesn't ever gain traction, other half baked projects like btrfs that are inferior to even older software are not going to be used over better alternatives.
You are dishonest about screen tearing being an issue, and calling my custom hotkeys "stealing keystrokes", saying its fundamentally broken when wayland breaks more things, and instead of the project acknowledging user needs, they ignore it and somehow wonder why nobody want to use it.
I'll end by saying wayland is fundamentally broken, it has less features, no gains to non graphics or productivity, no benefits and more drawbacks to most users, the wonderful future of the "forward thinking" design that strips useful features and ignores what people like about x.org is beneficial to everyone. No, it is inferior in every way except for gyroscope screen rotation and slightly smoother movements, something that is compartively worthless to the suite of useful x.org features.
The ecosystem around bicycles is much better than the ecosystem around trucks.
You are tasked with getting to and from work every day, in the beginning it's just you who travels, but over time you have more and more things to carry with you- shovels and such.
You buy a trailer.
You find that with your trailer it's more difficult to see what is coming up behind you, so you buy side mirrors.
You find that in the cold it's difficult to keep your hands warm, so you buy hand warmers, and lights on a dynamo.
Eventually your bike is quite heavy, you carry much and requires much more effort to operate.
But it has a lot of "features".
This is the sunk cost fallacy in action.
> Do you love broken userspace? That's great, choose a compositor that breaks your userspace? My mentality of having robust software is the opposite. Suprise!
My userspace is absolutely not broken. Arguably it's less broken than yours but you've patched around the issues or are blind to them.
Sway crashes for me less often than Xorg did; but I understand that Xorg and Wayland are not the same, and that took some getting used to, and indeed it was uncomfortable in the beginning.
You are passionately arguing from a place of absolute ignorance, I have used both. I have used both professionally. I have used both for years.
Yes, I replaced a lot of my normal programs.
Yes, Wayland has issues, many of which could have been addressed if people weren't conservative. Not that I begrudge them for it, I believe choice is good.
But, it's absolutely ignorant to claim that X11 has features. X11 does not have features, it has people willing to hack on it and an architecture that allows disgusting and ugly hacks to work.
You might like that, I absolutely despise it- because malicious software exists (and I use it), things like Zoom which if given the opportunity would love to run as root and capture all my keystrokes.
Things like Teams which on Android devices managed to block 911 calls.
Things like Chrome which is attempting to be my userland.
Ultimately, I trust my windowing system more than I trust random programs I may run to bind my hotkeys.
> I'll end by saying wayland is fundamentally broken.
Wayland is not "fundamentally broken" it's been working for me professionally for years. The "features" you cite so often are non-features "my cursor can change color!" which are not inherent in x.org at all.
Wayland "breaks" things that are designed to work exclusively with X11. Much like how graphics cards "break things" that are designed to work on a serial console.
I must conclude that you're a troll. Honestly.
Them the developers should do something about it, instead of calling a comparatively crippled compositor complete. If choice is good, respect everyone who says x.org is better, instead of trying to scare drums or use vague words like “progress”. Progress towards what? Lower Linux satisfaction?
If you think I’m a troll because I refuse to lie about how the useless wayland is actually good and don’t engage in an encho chamber of praise, you need to listen to complaints and respect opinions of others. Your analogy is of it being a truck instead of a bike, it’s hard to take you seriously unless you’re trolling, that is unless it’s a plastic toy truck. You bring up nonexistent threats like Android not calling 911, and demonstrate it’s being a no threat, and an irrelevant threat.
Don’t joyfully call everyone to switch from fine software and enjoy their new crippled and child proof space progress and applause the broken userspace for the sake of scaling, slightly smoother movements and colored cursors. Respect other people who don’t like the same thing you do instead of calling them wrong. You wouldn’t do this to a sexual preference, not Thor compositor.
That you can't steal keystrokes from other programs?
Screensharing? (which is an adoption issue for clients, not a "problem" with Wayland)
Your X11 programs (not hacks) already work as if they were X11 with Xwayland, but it has the same drawbacks as running it natively with X11. (with a small bonus that it's rootless... unlike X11 which is assuredly not rootless by default).
Do you honestly believe that wayland developers should reimplement all software that has leveraged and abused the X11 system? Seems asinine, what are your _real needs_ that Wayland isn't providing support for?
> Do you honestly believe that wayland developers should reimplement all software that has leveraged and abused the X11 system?
Most definitely not, but what they should do is just to _allow_ the continued existence of all the software which has leveraged X11 in their garden, if the garden is to have any kind of success. And not as 2nd grade citizens.
It might look like extensibility but it’s somewhat akin to your ISP having the ability to insert random HTML on a plaintext http stream.
Of course, this is “extensible”, but it’s potentially dangerous.
Your argument is that _your router_ is doing the same thing, adding HTML and JS elements to every web page to, idk, give you dark mode.
It doesn’t mean it’s a good idea.
Now, I can agree that it feels jarring to lose these things- but we should be looking to solve them the right ways.
And the problem with "it's potentially dangerous" is that you can use it as justification for removing any feature, so much that it doesn't really have any meaning left.
X11 definitely wasn’t designed for this. It’s a byproduct of its (poor) design and the fact you can directly interfere with the renderer.
It’s the same as the c64 not protecting memory addresses so you can poke memory to fuck with the video output, which people did, but the c64 is not a good computing platform in the modern age almost because of this.
You might be better served by actually looking how X11 works, with quirks and what it was originally designed for, I promise you that your hair will stand on end.
I should note: “potentially dangerous” is seriously downplaying a genuine problem linux had with keyloggers- it just wasn’t overly common because Linux is not a big enough platform for trojans to target, but it was known to be easy. Hugely easy.
You are confusing things. Where can you "interfere" with the renderer? What you can do is _replace_ the renderer. This is one extension point Wayland _forces_ on you, so what is your complain exactly?
Manipulating things around using the ways provided for things to be manipulated is not a quirk. The server allows other processes to render to windows they don't own because this is how you implement decorations and the like. The server allows you to read the contents of windows you don't own because this is how you implement screen grabbers and color pickers. The server allows any two processes connected to it to communicate in any way because that is how clipboards and things like that are implemented. This is all by design.
And that is the problem. If all of this was still possible with Wayland (WITHOUT having to patch the compositor), I'm certain there won't be as many complains.
But no; they tried to fix "security" (for some definition of security) at the same time and thus had to spend a decade to see any hint of adoption. And face a lot of resistance.
At least fetch the UNIX haters handbook if you want to see a minimally valid criticism to X...
> but it was known to be easy. Hugely easy.
Still is. Wayland or not. Therefore: Yes, I will downplay this issue.
You would need an even more radical design to make it not trivial on Linux (e.g. passing individual input device descriptors to the process owning the focused window or the like, and then make each process a different user or god knows). Basically: something like Qubes (which used to do it with X11). And then face all the "it's not working!" complains because you break even more things.
Yes. Linus Torvalds says never break userspace.
> Seems asinine,
You are disrespectful of anyone’s valid issues, you are hard to take seriously as more of a caricature.
>what are your _real needs_ that Wayland isn't providing support for?
I told you before several times, I’m not going to repeat myself again.
This was also a showstopper for me. Now, however, in Debian Sid `redshift -m wayland` works fine (although Gnome also has its own
> my global hotkeys,
They can be configured in your compositor. For those used to using i3, Sway makes this easy by being mostly compatible.
Pretty annoying to do this, too bad there's no easy import. A lot of effort for a lot of loss of functionality for smoother animations. Nice to know that redshift is updated thought!
I really like what the Wayland people are trying to achieve, I just don't agree with their methodology, and their results have spoken for themselves.
Tearing in full screen (video) playback was not an issue for decades, since X video extension and later OpenGL-based playback. Fullscreen video and 3D is easy, because it is one program that controls buffer flipping. It is windowed video/3D that always has tearing.
Either you're being hyperbolic about the length of time or this is simply untrue.
I have been using Wayland full time for 3 years, and 3 years ago the main driver of me switching was screen tearing.
I was heavily invested in the X11 ecosystem with highly customised fontconfig's, so this was quite painful for me at the time and I definitely tried to solve the screen tearing issue. Part of it was that Linux did not have hardware acceleration in browsers, which is where I spent most of my time (especially for video playback, such as YouTube).
So those extensions didn't help, and when you get used to the buttery smooth scrolling experience of MacOS and iOS it feels quite janky going back to linux- especially when you've invested so much into making it a more beautiful experience for yourself.
I am not hyperbolic, X11 has this Xv API, video players generally use it since early 2000s (as that was only reasonable way to even scale video to fullscreen with contemporary computers). Browsers - well, that is a different issue. I do not think Firefox uses it and have no idea about Chromium.
> Part of it was that Linux did not have hardware acceleration in browsers, which is where I spent most of my time (especially for video playback, such as YouTube).
Linux also have hardware decoding acceleration API (even multiple ones - historic XvMC, NVidia-specific VDPAU and current mainstream VA-API), their support in software is more spotty than basic Xv API (AFAIK MPlayer implemented VDPAU but not VA-API, MPV required for some time explicit option to use VA-API and i have no idea about VLC). Firefox got support just recently: https://ubuntuhandbook.org/index.php/2021/08/enable-hardware...
I would generally suggest to view web video such as YouTube in MPV video player using its youtube-dl integration. It is much better experience than playing video in Firefox.
I’m talking about more than video though. I’m talking about scrolling text. You can see visible lines when you have a large display and scroll a page.
Anyway. It doesn’t matter. You want to run X11 then that’s fine, but I’m quite happy with wayland and I’m happy to leave the weird configuration and cacophony of hacks behind.
Has the font rendering improved at all? My eyes can't handle some of the ugliness and my skill with code ends where the browser closes, so I've never tried to fix it.
If you use GNOME and wayland I never once felt I had an issue, but GNOME is more limiting for configuration than OSX.
> You can also recolor any part of a widget however you like
And they show an example of a gradient background and stuff like that.
And I mean, for most people, a theme is just coloring things how they like and setting the font and visual things. While full-blown stylesheets are very cool, and I think still “allowed,” you can’t really officially support that in a compatible way. You have to set an API so that everything can be consistent.
For example, it can currently be a huge pain to change the accent color on PopOS away from orange because you can’t just set a variable somewhere. It seems like the new system will improve that.
Either way, leaps and bounds ahead of macOS
Font rendering is fine by my eyes, but apparently it has gotten significantly worse on GNOME 40/GTK4[0]. On KDE it's quite nice these days though, so I guess you should just give it another whirl and see for yourself.
This is not true. It's caused by drawing out sync with the vblank cycle. It has nothing do with specific hardware. Older versions of X11 didn't even allow drawing to be synced to vblank (the start of the raster retrace).
If you have Intel or AMD graphics I think you will be happy with Wayland and Linux.
Nvidia had a politics problem for a long time that is being resolved but the resolution is still on the cutting edge so I would wait a while. XWindows is generally fine.
Dual-GPU laptops with an integrated as well as a discrete GPU seem to still be buggy. Best bet is probably to not use the discrete GPU or plan for the occasional driver update kerfluffle. AMD again is better here.
Yes and no. The Linux default are bad because people lack some common taste in font rendering. The default fonts on most distros are pretty awful. Here's my recipe for the best font rendering setup on Linux, which in my eyes is as close as macOS (tested on Fedora 35):
* Have a high DPI screen at 2x scaling
* With a custom fontconfig, force the default sans, serif and mono to the Google Noto fonts. DejaVu and Bitstream are ugly. Don't use them.
* Copy and install the ttf files from your closest C:\Windows\Fonts directory. Everyone on the internet uses Windows fonts. HN and Old Reddit use Verdana.
* And the best for last: disable font hinting. Modern distros default to slight hinting, which is still too much hinting and distorts the font. MacOS doesn't apply any hinting.
Some distributions look like Ubuntu look pretty good out of the box others look like garbage out of the box. Fedora used to be notoriously ugly out of the box in part because it was wary of implementing patent encumbered techniques. It's probably improved since. Notably firefox when rendering websites with some common on windows fonts in systems without many fonts installed may make some interesting and crappy choices insofar as substitution. If you install common MS fonts or tell firefox that websites aren't allowed to do their own thing you can avoid firefox raining on your font rendering parade.
If you want good looking fonts and don't like how it looks out of the box you mostly want to google good looking fonts in "foo" where foo is your distribution even though most advice is universal between distributions then consider installing some decent fonts.
For example in void linux following this gets good results.
https://blog.brunomiguel.net/geekices/how-to-get-good-font-r...
No wizardry involved just rote direction following.
For void the google-fronts-ttf provides an absolute ton of fonts in ubuntu ttf-mscorefonts-installer provides some common ms oriented fonts. Nerd fonts provides a lot of interesting fonts. https://www.nerdfonts.com/ which you can install manually or via a distro package if there is one for you. They provide many fonts patched with lots of additional symbols.
I also happen to think San Francisco from Apple looks nice. If you use the font patcher from nerd fonts you can have Apple font's on your Linux Desktop.
ET-Book is interesting
https://github.com/edwardtufte/et-book
This Emacser made a font out of her handwriting with instructions on how it was done so you too can type like you write for good or ill.
https://github.com/sachac/sachac-hand/
Personally I prefer the font rendering on Linux to Windows and have for many years.
As for font scaling, I just choose a big enough font or default zoom level in the browsers, VTE's and text editors I use, looks perfect.
And display scaling != font scaling. You don't fix scaling by making your fonts bigger, everything, including UI has to scale.
Your complaint is the opposite. You're complaining that Wayland is trying to do one thing & do it well instead of trying to be a kitchen sink.
X11 is the antithesis of Unix philosophy. It tries to do a hundred unrelated things (compositing, clipboard, drawing, input, etc...)
> Admittedly, there's not an elegant solution to any of this. However, in this specific example, I think the best course of action would have been to just outright plagiarize Apple's Quartz.
Or Windows' DWM. Or Android's SurfaceFlinger.
Android being Apache 2 would have been the more obvious one to take code/design from in this case, but desktop Linux seems to have a general disdain for anything coming from Android.
And it works. Do you avoid desktop environments since they do everything, emacs which might as well be an OS, or music players that can also rename music too? Is a messenger app something you will never use if you can call or send music or pictures on it? My file manager can rename files, show pictures, rename them, and even open compressed files. Why is the Unix philosophy relevant when most linux systems use systemd?
Do you even follow "Unix philosophy"? Installing a bunch of plugins to make wayland do 100 unrelated things is the same result.
That's what really turned me off Gnome 3, they basically threw away an entire ecosystem of third party apps.
MATE was able to pick of some of that, but especially when it comes to third party support, that level was never reached.
Well, curiously, X11 has no compositor, no definition of clipboard, and a drawing API that no one uses. It seems to me that precisely it is not trying to do any of these things, but rather providing the mechanism by which some other process (or processes) can do these things.
E.g. if tomorrow I want to implement a toolkit that wants to have 3 clipboards, I can; even without changing the server or the compositor process.
Not really, aside from input (which is also optional) all of what you mentioned are provided by separate applications, not X itself - these just work on top of X.
But in general the Unix philosophy isn't some sort of dogma and it never really was. It is more of a guideline and it can be ignored whenever that makes sense - e.g. the Linux kernel itself.
Also if there is any philosophy that X11 has is its "mechanism over policy" one, which is also why it has lasted for so long: it gives you the mechanism to do things but doesn't enforce any specific way to use these things and instead leaves things up to the clients. This is also why you can use a TON of different environments and UI approaches on the same X server, including stuff that the original X designers wouldn't even imagine.
it's a monument on how things should be done, without breaking anyone's workflow.
edit: I really want to use Wayland, it is so much better for so many things, it looks better, font rendering is better, scaling is better, but it introduces new bugs that really are a no-go in my day to day usage, for example sometimes copy&paste shortcuts don't work.
I'm sure it's the fact that I use KDE and support is not top notch, but I have no such problems on X.org.
I would really love to see Wayland succeed, but how long is it gonna take?
And then the small improvements started trickling in, such as absolute volume support in headsets. The stupid PA limitation of only being able to configure the 1st ALSA mixer element. And so on and so forth.
For me it was mainly this!
My Bluetooth headphones kept disconnecting randomly and the microphone never worked properly, no matter how many conf tweaks I tried.
I installed pipewire in anger, expecting nothing and it magically solved every issue.
Yes, my headphones are not expensive devices, but looks like that wasn't the problem, pulseaudio was!
I sent them some money out of happiness and now I am lobbying for it at work.
Wayland is also missing that one cool feature that makes people say: yes, I want that; I need that. And I KNOW I don't want Gnome 3.
Its new! That's good enough for a lot of adopters. Gamers (on linux lol) might care about graphics. Wayland is however feature rich in having more people see it as a less functional software and when I tried it, I appreciated x.org more and more.
Edit: Gnome and wayland give slow mouse movements and can crash if you move mouse too fast.
It has one killer and necessary feature. It's smooth. Have you tried resizing a window under X11 and doing it under Wayland? I have hated those half drawn rectangles caused by X and the app not being synchronized for DECADES. In 2021 I can have a GUI that's almost as smooth as Windows 7 was.
I feel the rift in the Linux world grows bigger between the conservatives (fuck systemd! X11 was alright!) and the progressives (can I have HDR, fractional scaling, and hardware video acceleration on YouTube, please?). I want my computer to be modern and slick and fluid, I'm vain like that.
Yes, Wayland is still a beta, but it's here to stay, like systemd, like flatpak, like pipewire. There was no status quo before, X11 was a beta and crappy in other ways. Not suited for modern hardware. Deal with it. The xorg repo is there for anybody that thinks they can do better than Wayland. The reason why xorg had to be abandoned is a Google search away.
I have fractional DPI scaling in x.org, I just don't use it since undocking keeps it on that on my small screen.
I use systemd, pipewire, x.org, and never follow unix philosophy with my desktop environment not because I am some sort of political standard you set arbitrarily, I just use stuff that just works, like most computer users.
> The reason why xorg had to be abandoned is a Google search away.
Its mostly because you can't make it more perfect, but they did!
https://www.gamingonlinux.com/2021/10/xorg-2110-sees-a-relea...
>After three years without a full release, X.Org 21.1.0 has finally landed with new features and a lot of bug fixes. While the next-generation for all Linux systems will eventually be Wayland, plenty still default to X.Org.
I really dislike how you turn linux into politics, announce it isn't suitable for modern hardware with zero reason, saying x11 (actually x.org was crappy as if the whole thread isn't talking about how much crappier wayland is) and deal with it. Leave your feelings at home.
Which 4?
Also, it's not fully ready for the pro-audio side at this point.