Reassessing Wayland
-
[email protected]replied to [email protected] last edited by
I finally got an "upgrade" going from a super slow 25 year old system to a kinda slow 10 year old system. Went with wayland to try it out and it works well enough so far.
The only thing I'm missing, and I haven't had a need since the upgrade is to be able to run remote X applications locally. Relied on a netbook with X client and had my desktop downstairs. Now my new laptop can run all I meed so no remote X tunnels over SSH.
-
[email protected]replied to [email protected] last edited by
For example, the recently publicized about mouse latency differences is true and something I've noticed but the difference doesn't particularly bother me. Something like that is just one of those inevitable consequences of the design of Wayland being so fundamentally different.
It would be interesting if someone explained the relationship between Wayland design and mouse latency
-
[email protected]replied to [email protected] last edited by
Have you explore hyprland, niri (scrollable, not dynamic, but it's sort of dynamic then) or sway (static tiling though, but offering tabbed layout and dynamic stacking/floating, plus hugely customizable)? Did you discard them because not close enough to bspwm? Just curious, not to judge your decision or anything like that.
Being an artix user, are you using logind (the official default), or just seatd, or the new logind alternative turnstile (not supported by all init systems, looks like only dinit which I use and openrc, tough void has it working with runit I believe)? I'm wondering what's really required on wayland. I like the approach of just seatd, but I don't know what one would lose and what are the wins, but if not seat alone then turnstile which actually require seatd. Also I would like to drop calling d-bus, but I'm not sure if that would prevent the compositor to work, but further if screen sharing with webrtc, electron apps like slack or teams-for-linux would stop working. I guess not using d-bus would not affect mako. But any ways, I'm curious of what you're using on your wayland experience. The official and default way is just logind plus d-bus plus polkit. For such sharing xdg-desktop-portal is required, which fundamentally seems to be plumbing of d-bus, but I'm not sure...
BTW, for blog post referenced, dudemanguy is also the mpv developer, so that requires quite a lot of effort (mpv specially on the support side of things, besides the developing effort, particularly to support wayland, and mpv does for some time now). I'm glad he's back writing,
-
[email protected]replied to [email protected] last edited by
It is kinda simple. X.org and older Wayland compositors use the legacy KMS API, while modern compositors use the atomic API.
The atomic API lets a compositor update everything for all planes in one go, this is a good thing because either all changes apply or none at all.
The legacy API only lets things be updated individually.Now why does atomic have more latency when it comes to mousing around? It's because in a single atomic commit all properties have to be set, including cursor X & Y positions. Once an atomic commit has been sent to the kernel, it is locked and can't be changed until the next monitor vblank. This means the cursor position is ever so slightly outdated. The legacy API does not have this limit, compositors can immediately move the cursor no problem, so less perceived latency.
There were proposed changes to address this years ago, but those seem to have fizzled out.
-
[email protected]replied to [email protected] last edited by
Thanks for the detailed answers. So we can say that Wayland sacrifices lower latency in exchange for higher accuracy.
According to this post Gnome allows you to change this behavior through an environment variable (
MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0
on Ubuntu 22.04). It should be a configurable option, considering the amount of people complaining about this mouse behavior.Oh and this is also why the cursor movement might visibly start stuttering during heavy GPU load. This is a problem that was solved back in the 80s but here we are…
Sad, but does this problem only affect Wayland or also Xorg?
-
[email protected]replied to [email protected] last edited by
Note that depending on compositor switching to the legacy API might not help due to how they are designed. And with legacy you'll also probably lose the fancy modern crap like HDR.
Sad, but does this problem only affect Wayland or also Xorg?
Wayland compositors only in my experience.
-
[email protected]replied to [email protected] last edited by
The only thing that's keeping me from Wayland full-time is the push to talk mess. I use Mumble to talk with friends. Under Wayland, to make it work you have to force mumble to run in the xwayland mode and even then, push to talk will only work when you're focused on xwayland windows. Want to look up something on web browser? Cool, now your push to talk button won't register. You have to click on any currently running xwayland application. As I need that push to talk on a regular basis, it's absolutely infuriating.
-
[email protected]replied to [email protected] last edited by
been a while since I used kde & wayland, but I remember there being something in the Plasma settings -
random redditor said "Go under "KDE Settings->Applications->Legacy X11 App Support" and click to allow keylogging for all keyboard keys", I think this was it. Had discord (running in xwayland) accepting my global hotkeys with no problems
-
[email protected]replied to [email protected] last edited by
Oh, you're right. They have that option and it works, thank you. Though now I wish they had a setting to allow only one specific key. I see it's either function keys/function+whatever you press while holding function key/everything. But then again, I only use 2 applications running in xwayland so it's fine.
-
[email protected]replied to [email protected] last edited by
To be honest, I switched to Wayland years ago precisely because of the better perceived input/cursor experience.
Change my mind, but having an average of half a frame input latency is much preferred when in return I gain that the cursor position on the screen actually aligns with all the other content displayed.
Plus, I'm very sensitive to tearing, so whenever it happens I get the impression that there was a huge rendering error.
Well and on the note that the cursor might visibly stutter, sure. But it's a bit misleading. A game pinning the GPU to 100 % and running on 5 FPS doesn't mean that your cursor will be rendered with 5 FPS. So far I've only noticed cursor lag/stutters in OOM situations, but neither under heavy GPU or CPU load.
-
[email protected]replied to [email protected] last edited by
This is such a major issue for streaming. It's why I had to stop using Gnome. Global hotkeys for OBS, Discord, etc are such a crucial part of it. It's actually shocking to me how Linux has moved on without global hotkeys and nobody seems to care.
The Plasma solution is sweet, but I'm sticking to X11 until Wayland actually functions for streaming.
-
[email protected]replied to [email protected] last edited by
I've actually forgot where exactly was the prolem, I remember some electron app in wayland mode was crashing/glitching - that might be because of my GPU though (3090 with open dkms latest drivers).
Also maybe Pycharm didn't look right? -
[email protected]replied to [email protected] last edited by
Is there a tiling Wayland compositor out there that supports applying custom shaders to windows (similar to picom)? This has been a known limitation for many years. And I brought it up myself with a couple of compositors' developers, and they told me that it would break direct scan-out, and I told them that I would be fine with that, and then discussions fizzled out.
I also tried an x11vnc alternative I don't remember the name of, and besides the generally buggy experience, it completely broke when power management kicked on the sever side (turning off the monitor IIRC). So that's another show stopper, although maybe not as relevant as custom shader support which I need for applying my custom color inversion shaders to specific windows, otherwise, my vision would go bad quickly.
So yeah, I will be sticking with my Awesome WM (+picom +x11vnc) setup for a while too.