So let’s talk about this Wayland thing
pointieststick.com
pointieststick.com
That kind of stuff basically all works fine on Windows, and yet a lot of core Linux desktop devs seem to have an ideological distaste for fractional scaling. Sway supports fractional scaling, but it's not recommended because "your display does not have fractional pixels". I realize that is literally true, but Windows and Mac support it and it looks good. Feels like Linux is full of this kind of stuff, and the result is the mess you see today. Sad part is that Windows is starting to degrade so bad that Linux is starting to look better just due to that. Hopefully Valve and friends can apply some competitive pressure on Windows, and in the process make Linux much nicer.
If you don't fit into their ideological commitments, you shouldn't expect to receive any support.
Sway's reasoning is completely wrong and ignorant.
The characters (glyphs) and other elements on this page (e.g., the reply button, the rounded corners of the TEXTAREA) are stored as mathematical descriptions of curves (cubic Bezier curves usually for the text). There is never anywhere where a framebuffer or grid of pixels is scaled up or down from one size to another to introduce blurriness into the final image. The Y logo in the top right corner of this page used to be an exception because a PNG file is a grid of pixels, but about 2 years ago the PNG was replaced with an SVG file, so now when you pinch-zoom this page in mobile Safari, everything always looks non-blurry.
Well, when an app is using the Wayland protocol (i.e., when XWayand is not in between the app and the display server), the same thing applies.
Actually, pinch-zoom is the wrong analogy. Both Firefox and Chrome have in their "hamburger menu" a line named "Zoom that has "+" and "-" buttons. If you use those buttons to change the scaling factor, most things reflow (adapt so that nothing "falls off" (is partially obscured by) the right edge of the viewport). Fractional UI scaling in Gnome (when XWayland is not in the picture) works like that more than it works like pinch-zoom in mobile Safari where nothing ever reflows.
Note that in order to be able to use (the "Displays" pane of) the Settings app in Gnome to change the scaling factor to a value other than 1 or 2 (i.e., to a fractional value) you have to say
gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"I know I'm missing something... but I also suspect it's the sort of something that's worth missing.
Desktop linux doesn't have this sway.
Which is a security hole along with being able to read keystrokes meant for any app, grabbing pixels that aren't yours, etc... the features people complained were missing from Wayland for the longest time were often security issues that X could never solve by design. But hey, fuck security I want to run Xeyes!
This means 99.9% of actual threats to your security remain the same.
If you want actual isolation you need to run something like qubes which ironically actuality uses X
Unfortunately most linux distros and users do not take security seriously unless it's in a server environment. Desktop linux is awfully far behind systems like MacOS.
This is a doomer mindset that ignores the advances the rest of the industry has been making. There is a big difference from malware having to find a 0day in order to cause harm to the user and malware developers being able to do exactly what they want without even a permission dialog box showing up.
I won’t debate whether that’s true (it probably is, given that “not compromising your data or credentials” is close to a tautology “if you don’t let your stuff get stolen, it won’t get stolen”), but focus on
> This means 99.9% of actual threats to your security remain the same.
I don’t see how that follows because we’re not living in “traditionally” anymore.
IMHO, if iOS and Android had run “traditional X Windows”, the number of successful over the air attacks would be way higher or nobody would use smartphones out of fear of getting hacked.
Honest question: why does this matter? If you end up with running malware as your user haven't you already "lost" in any of a wide variety of ways that Wayland does nothing against?
Or is it that Wayland is trying to bring the mobile security model to the desktop with partially untrusted apps?
The security benefits of wayland are useful when you're also using other things like namespaces/seccomp (with bubblewrap/flatpak), and pipewire which I believe has a similar access control mechanism.
>Or is it that Wayland is trying to bring the mobile security model to the desktop with partially untrusted apps?
I trust my programs, but they can have bugs when parsing untrusted content. (ffmpeg, browsers). Although I've never been hacked, I'd like my systems to have defenses against this (without going full mobile security mode and giving up functionality and user freedom, or running everything in inconvenient isolated boxes with VMs).
Also, I'm not sure if I'd trust proprietary games, so preventing them from doing naive things (I don't expect them to exploit kernel vulns) like snooping on files by using namespaces is nice.
But the Linux ecosystem builds up to things bit by bit. So in this case, Wayland is progress towards a goal where untrusted apps can be run and are limited in what they can do by design. It doesn't matter at the moment, but one day it'll be an important brick in a secure system.
That isn't a mobile security model. It's a good and more modern security model. Desktop operating systems are moving this way too but it's harder due to apps not originally being designed for it.
No. Your web browser does a pretty good job of not storing your login info (if you tell it not to) locally. Under X, malware can monitor everything you do and log your credentials. Under Wayland it can not. Simple as that.
Malware will still try to exploit bugs and CVEs to get access, but finding a hole in a wall is entirely different than not having a wall in the first place. Holes can be patched.
People run untrusted code on their machines every day. Most of it is in the browser (which has walls) and is written by advertisers that are not well scrutinized by the sites people visit. Then there is the whole trend of containers which put more walls around native apps.
So in your question, replace malware" with "untrusted code" and it becomes more realistic.
Anyway to echo beanjuiceII's point, number of times I've been pwned by an X keylogger: Zero.
(That you know of). Number of times I've been pwned by any technical vector (that I know of): zero. The fact it hasn't happened to you does not imply that defending against it is pointless. Early in my computing career I used the same weak password for everything. Never had an account takeover. That does not imply that using different secure passwords for each site is pointless.
The number of ways I might have been pwned and not known about it is basically infinite. Why should I prioritize replacing X11 over any other hypothetical threat for which I have no evidence that I'm at particular risk of? Nobody has photographed my house keys and made copies that I know of. Should I re-key all my locks just to be extra safe? I could replace my front door with an armored door too.. but a burglar would just come in through a window instead so what would be the point?
There's no point armoring your front door unless you also put bars on all your windows, and there's no point adopting wayland for security unless you fix all the other security problems with running malicious software on the GNU/Linux desktop too. And miss me with the QubesOS/flatpack/etc suggestions, my days of playing amateur sysadmin are over I just want to use my computer, not tinker with experimental desktop administration.
That's not true either. The malware would require privilege escalation to co-opt my browser. Even if you weren't wrong about that, I don't know why you complain about both weak security models AND a very big improvement in Linux security (Wayland).
Oh right, on X the malware could just wait for me to type in my password for something I wanted to do and grab it. then it could sudo just like me.
Does it? Sure it can't replace /usr/bin/firefox, but what's stopping the malware from writing a fake shortcut to ~/.local/share/applications/malwarefirefox.desktop and waiting until you click the fake shortcut? Or kill the running firefox and start the malware version? Or add some malware extension directly to ~/.mozilla/firefox/profiles? Or something else?
Or are you assuming the malware is running in a sandbox like AppArmor?
Ummm right. The point wasn't that Xeyes is a security threat. It's that Xeyes is only possible because X is insecure by design, which is what allows the eyes to literally monitor what you're doing. Mouse, keystroke, screen grab. Hey go ahead and do your online banking with X. Just remember the real malware is headless, not literally displaying eyes to let you know it's watching.
Clearly, something is missing here. Why not a permission system like browsers do? A little popup that asks "X is requesting access to your full screen" rather than this "convenience VS security" black and white view most people seem to take a stance at?
Discord capturing the screen is a valid use case, but it should be approved by the DE and it should be possible to block this request.
Currently the mainstream DEs just approve the request by default but in the future I can see a permissions dialog asking the user if they want to allow access to screen recording, and maybe a small icon in the top bar to show when recordings are happening.
This idea that screenshots require special OS-level privileges has been tested and, in practice, does not work. Literally nobody wants compositor-specific screenshot applications. It should have been addressed in the Wayland standards in the early drafts.
Fair enough unrestricted access to any pixel is a security problem. But banning all access to pixels other programs control was an unworkable position that, in hindsight, didn't work. Telling people that the process that merges all the pixels together needs special OS-level support for reporting on what the merged output look like is just not sane. Something went wrong in the design process.
IMHO the right answer might be a GUI toolkit (out of process) that has an API for system resources. Permission would be either granted by the user (a file dialog already indicates what files an app should have access to) or set at the application level at install time. The failure to develop solutions like this is why browsers have taken it on by themselves, because they are constantly running untrusted code.
https://gitlab.freedesktop.org/wayland/wayland-protocols
They're figuring out how to extend Wayland to something usable that supports screenshots. Anything that supports plain Wayland is going to be crippled by the protocol limitations, but anything implementing a selection of the extension protocols will be useful.
You can see the docs in pretty form here: https://wayland.app/protocols/
Only took 15 years. Pay special attention to the name of Drew DeVault who has been one of the major heros in the story. The Wayland devs apart from Drew do deserve serious kudos, moving away from X was never going to be easy. But copying pixels into a shared buffer as some sort of challenge is just hard to overlook.
Dude please. Wayland has been 100 percent usable FOR ME for years. Plain Wayland is not "crippled" for MY use case. It may be crippled for YOUR use case, and that's a legitimate concern, but don't broad brush Wayland as not usable and crippled in general. For many of us it's already where it needs to be. That said, I do hope those remaining things get sorted out soon.
The de-facto Wayland standard is not going to be the core protocol, in the same way that the core X protocol is woefully insufficient [0] for actually running a modern linux system. It needs extensions. The core protocol just isn't featureful enough - as has been clearly demonstrated by a decade lost in the woods not supporting basic desktop functionality. If a design goal was to delay adoption by 10-15 years while they think about things then I suppose it could be considered a success. Other systems have managed to move much faster than that without doing much harm.
The sticking point is that at least the core X protocol didn't need a decade of R&D for a screenshot extension [1]. I suppose people could claim with a straight face that screenshots and streaming are unforeseen use cases, but they would be excellent poker players. It was a design mistake not to explicitly address that up front. An honest one, made by very competent people, but nevertheless a mis-step.
[0] https://wiki.gnome.org/GraphicsRequirements
[1] I'll admit this is before my time - maybe it did? But the X protocol is a hot mess and Wayland is inching towards the point where it's release is closer to the birth of X windows than the present day.
Agreed. What's the missing feature? Screen sharing? Remote sessions? Overlapping displays (doesn't work in Android BTW)? We've had all of these for years.
Even fractional scaling on hiDPI monitors has been good enough for me to not care for at least 5 years.
It's like systemd; the people bitching either want to sound contrarian or actually know enough to roll their own down to the low level. At which point I must say; show me the code. Open a PR or give it a rest
My last-resolved reason not to switch: Popular compositors didn't support scaling for XWayland on par with how it works when X11 controls the screen right up until this year.
This meant that you either had to opt out of scaling in Wayland (horrible on high dpi displays) or accept super blurry XWayland windows.
Of course, it would be great if we didn't need XWayland but... That's not going to happen until more users have Wayland desktops and users like me weren't about to accept Wayland desktops while this type of problem existed.
[1] https://gitlab.freedesktop.org/wayland/wayland-protocols/-/m...
On top of that, in the wider PC system, hardware routinely launches without dev/test in the Linux world. Drivers often work for a whole chipset, so may often be running a specific device within that chipset that was never tested or seen by the developer of the driver at all, let alone in the hardware combination.
A sibling comment also mentioned hardware. There's certainly a lot less driver and hardware variance as well.
When it comes to chromeOS, I think they are switching to a wayland compositor, and it'll be a lot easier for them because there they control everything.
(And the Linux environment and the Android environment in ChromeOS are already using Wayland.)
I have been OOTL with the Wayland ecosystem for a few years. Does it provide a way for users to create and use input macros (similar to Autohotkey and xdotool) yet? That (in addition to remote desktop and screen casting) was one of the main blockers for me in daily-driving it.
However, the real root problem is that the number of people who really give one iota of damn about "desktop interaction semantics" is vanishingly small.
Developers who want Unix and want their display to "simply work" switch to Apple. Consequently, the only people left behind are the very fractious minority on Linux who care about a zillion different edge cases.
I really don't see a good way to fix things.
Personally hadn’t tried it until recently, though nothing against it. Had an extra laptop and wanted to try some new stuff so installed Fedora KDE on it.
Works quite well but unfortunately synergy/barrier doesn’t work and folks don’t seem to think it ever can. That’s a deal breaker for me at my desk. Will be going back to mint/cinnamon/X shortly, and leave fedora as a travel laptop.
Kinda disappointing after so many years… fifteen! and still second fiddle.
With Wayland, have you tried out waypipe yet?
I don't even especially like X11, I just don't want vsync forced on me.
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/m...
In cases where your game occasionally dips below 240hz enabling VRR will prevent additional latency without requiring you introduce tearing in the display pipeline.
I enjoyed the post, thanks. I suppose I'll wait then and re-evaluate when Wayland's 'immediate mode' is fixed and it is roughly comparable to X11 without a compositor. I go to great lengths to minimize my latency so this is really the only factor that matters to me.
It's like GIMP still using GTK 2, it has no idea of Wayland at all so there's not much Wayland can do beyond run it an an XWayland island. Unfortunately there is no easy universal fix to that kind of gap beyond updating apps.
Edit: a sibling comment linked to the project I was remembering - xwaylandbridge
Oh I remember now, I was using GIMP and I couldn't figure out why the color picker was not working, I think that I understand now what was the reason.
Better hope the compositor of the week you're using that hasn't yet been abandoned is based on wlroots so you have some chance of it working.
https://invent.kde.org/system/xwaylandvideobridge
I don't think there is any solution for PyAutoGUI at the moment. Likely would require a lot of changes to their code.
Maybe I missed it in the article, but what was this decision?
Seems enough to show why it's a contentious decision.
We are still not Wayland yet. And my setup is personally blocked by both Xs.
> Last updated: 31 October 2022
like ssh?
Wayland just doesn't work with modern NVidia cards. I just tried on a machine with an NVidia 3070. Current Ubuntu 22.04 LTS, updated. The installed NVidia driver is the "recommended driver", NVidia-driver-535 (proprietary, tested.) The system will run in Wayland mode, but the 3D graphics hardware isn't used. "glxgears" reports that it is using Mesa 23.0.4. Programs that use Vulkan won't even start.
Back to X.
"I wonder why that library is not installed by default with the NVIDIA driver..."
That's so Linux.
That's a glaring issue for many users these days.
I tried to shut off USB wake on MacOS tonight. Nope. Does not support, goodbye.
However, how do you convince Discord to update their bundle version of Electron?
Edit: I know that could kind of sound incendiary, but let's consider the facts. We're talking about a project that has been competing with a dead competitor for 15 years and is still struggling to get mainstream acceptance. There's something seriously dysfunctional going on.
Although the egl requirement has proven troublesome the times I've dipped my toes in, previously: if I have an NVIDIA or AMD GPU in my machine, I do expect to not get told it's unsupported.
That manifests in a bunch of different ways. Lots of desktop software is still using the likes of Gtk 2 and obviously won't get Wayland support without being ported first. Desktop Environments like XFCE and Cinnamon are, again, basically hobby projects and re-architecting them for Wayland is a big ask for non-professional maintainers. And then you have stuff like Zoom and other Electron apps that take their time adopting Wayland simply because Linux was always an afterthought to them anyway.
I'm personally hoping that, come ~2025, Arcan v1.0 is released, the WM crowd largely switches to Arcan-based systems, and Wayland becomes the new JACK (with X being the new ALSA, I guess?).
1) A lot of architectural decisions that made sense in 2008 are less optimal today.
Everything language-wise was C/C++ while today lots of different languages want to interface to your display system. The input system was completely hamstrung--things like gestures and multi-touch and things like that just weren't in anybody's brain yet. (Wayland started just after the first iPhone was introduced). And RT_PREEMPT still isn't a thing for Linux while both Windows and macOS underwent major surgery to allow real-time paths for things like audio and interaction.
2) Desktop composition semantics are not exactly easy to define.
Windows has certain definitions, but even it falls back to pure CPU software rendering in a lot of cases.
3) Weak support from graphics card companies
Windows relies on a LOT of driver hacks so everything goes through the compositor on really fast paths. That's a lot of work that nobody really has the bandwidth to do on Linux.
https://www.nvidia.com/download/driverResults.aspx/181159/en...
Do not forget the era where compositors were choosing not to support an open standard of the EGL_KHR_stream extension. Instead they preferred a proprietary solution using Mesa's GBM API.
[0]: https://github.com/swaywm/sway/issues/490#issuecomment-47174...
Having it work surely is better than those drawbacks. Things can be improved and iterated on over time.
Wayland adoption was damaged by this.
>and everyone in the Wayland space had been using the mesa library
They chose to make themselves compatible with a single graphics driver. GBM ended up having to be rearchitected so that Nvidia could create a backend for end.
Basically, the GNOME devs refuse to provide default window decorations (title bars, etc), forcing all Wayland app devs to draw their own title bars and "X" buttons for their windows. This is a bit silly since some desktop envs do provide default decorations, and 99% of the time you probably want your app to have native-looking title bars.
So now we have 1) ugly window decorations on some apps because that's "according to the Wayland spec", and 2) windows with no decorations at all, but only when running on GNOME. End result is ugly inconsistency that makes it very hard to compete with the likes of macOS and Windows on a visual level. And it's all due to a mixture of human stubbornness and arguably an architectural blunder on Wayland's part (but maybe mostly the former, to further your point...)