This is a strange opinion to express in general, but really strange on this news. Linux hasn't had hardware video acceleration in a browser for over a decade when Windows and macOS did have it, precisely because it was too hard to support this use case within the restrictions of X11. The buffer sharing trickery, combined with having to render web pages and a browser around it, was just too hard to solve for years (within the limited attention X11 based desktops get in general).
Linux finally has a graphics stack on which this isn't as much of a problem, and it's received enough adoption that Firefox is now making changes for it. And on that news you decide to comment that Wayland is a tech demo? This news should tell you it's completely the opposite! Wayland seems to be finally delivering.
Parent is kinda right. Wayland was supposed to be this great next-gen display protocol for Linux, finally doing away with the cruft of X and thereby making development faster and easier while bringing modern features and yadda yadda. Instead it has taken 10 years to kinda-sorta catch up to X and is still behind its equivalents on Win/Mac.
Wayland has a lot of problems, but they're adoption problems.
1) Wayland isn't a replacement for all of X.org. It's a replacement for much of X11, the protocol. "Wayland is just a protocol" - there's no wayland binary on your computer like there is an xorg binary. All the problems/limitations people commonly perceive with Wayland are actually problems/limitations within Wayland implementations like Mutter (Gnome) or KWin (KDE) and lacking application support. There's really not that much that "Wayland" as a project could deliver as it's just a protocol [1]!
2) Replacing something like your entire graphics stack requires a widespread, coordinated effort to unify the various Linux distro's under it. That widespread coordinated effort is not actually possible in the (by "design") extremely fragmented Linux market. The only approach is to slowly let Wayland implementations evolve, and there we have it.
Hot take: Wayland will not fully replace X11 the coming 10 years. There is no fundamental solution to the two problems above. Many popular desktops (Xfce, Cinnamon) have no plan to support Wayland at all. Some don't even want to. In the future, there will be choices for graphics stacks on Linux leading to further fragmentation.
[1]: The projects that should deliver here are: Gnome, KDE, other open source desktops. Although I think using Gnome with Wayland is superior in many ways to X11, it still has certain quite major shortcomings. It's also application toolkits: Qt and Gtk work luckily, but Electron is waiting for some Chrome renovations before supporting Wayland, and then there's stuff like Wine and Java where the refactor/reward balance simply doesn't favor them. And sometimes applications have to be updated to stop relying on using hardcoded X11 stuff, and use agnostic Gtk/Qt/Freedesktop functionality.
There's a lot of history with X11 that we have to move away from, and the incentives and coordination only allow for slow movement.
> All the problems/limitations people commonly perceive with Wayland are actually problems/limitations within Wayland implementations like Mutter (Gnome) or KWin (KDE) and lacking application support. There's really not that much that "Wayland" as a project could deliver as it's just a protocol
In practice if all/most implementations are buggy, I think it's fair to lump them all together and say that Wayland (as used by the software actually running on my machine) has problems. You know the meme about how whenever someone tries Desktop Linux and has trouble, someone pops up and says "just use this other distro, with this particular set of software and this exact configuration, and it'll just work!"? Wayland feels like that. Sure, if I want to go all in on GNOME (on Fedora), it'll probably work. Sure, if I use Sway with the right set of compatible programs it'll work. But... I could also just stay on X where all my programs work now with no tinkering, where I can drop in any screenshot program, any clipboard manager, any screen sharing program, any keyboard configuration/emulation tool (I'm really fond of xdotool), and it will work.
> In practice if all/most implementations are buggy, I think it's fair to lump them all together and say that Wayland.
Fair enough. I think it's a bit unfair to label the collective failure of the Linux community/ecosystem to actually make change happen as "Wayland has problems". But it's true that in 2020 you will still lose use cases when using anything Wayland based.
Wayland will never replace the X11 based workflows you describe though, because it isn't X11. Although X11 has a lot of fundamental problems, flexibility isn't one. And some flexibility you will have to give up moving to any Wayland based desktop.
Thanks for clarifying more of what Wayland is. I was really hoping for a better remote desktop solution on Linux and had high hopes Wayland would deliver on that. My understanding is it doesn't, but is that something a compliant implementation could add as extended functionality? Or is that all wishful thinking?
Sometimes I boot my Linux native installation as a raw disk VM in Windows 10 with VMware Workstation and then use Windows's remote desktop. That is surprisingly more responsive and a better overall experience than either VNC, X2Go, or X11 forwarding can deliver. I'd love to see something on par for Linux desktops.
This is possible, but it requires application support. As a user it is therefore extremely painful and limited still. Standards and libraries for this have only recently become available, and only the first applications are adapting towards it. The nice thing is that these new standards and libraries should support both X11 and Wayland equally as I understand it.
Why is this taking so long on the """Wayland desktop"""? Screen sharing/remote desktop is a problem that Wayland as a protocol does not try to solve (this problem is also not solved by the display protocols on any other platform for the record). And because of that, it requires central coordination in the Linux world to standardize solve. And central coordination in the Linux world always turns out to be a total mess.
Which is yet another case of fix the problems with the existing stack rather than creating a new one.
Yah, you don't get to be a hero, and product arch, etc for making X work better. I have yet to see a convincing argument that X couldn't have been made more secure by bolting on another opt-in extension. Then once in place, like GL ES, you start deprecating all the features used by basically no-one.
One of the big issues is there is a heap of legacy cruft in the existing X Stack which makes trying to fix/enhance X difficult. From what I understand the way it is written not easy to cleanly depreciate certain features like you've suggested.
So I can totally see the appeal for a clean break from having to maintain strict backwards compatibility with a stack that has its roots in the 1980's.
> Wayland has a lot of problems, but they're adoption problems.
No they are deep philosophical problems. The lack of necessary protocols that allow a unified implementation for things like screen sharing, hotkey daemons, window managers, xdotools or clipboard managers are the problem.
As long as there is no standardized way to do essential tasks that are typical for a desktop use case Wayland will eternally cause problems.
You're not describing a philosophical problem of "what's possible", as all of these things are perfectly possible on a desktop with Wayland and broader Freedesktop standards, and many have working examples currently. Wayland being as small as it is, is not supposed to be a restriction on features of your entire desktop.
But there's no standard interopability with a standard X11 socket anymore. There's interopability with KWin and Mutter and wlroots and a bunch of other things through FreeDesktop standards (Wayland being among them).
You might consider it a philosophical problem that Wayland is not trying to solve all the problems that X11 tried to solve. You might attach a lot of philosophical value to that architecture. But Windows, macOS, ChromeOS and Android seem to be doing extremely well on an architecture that is a lot less like X11 and a lot more like Wayland.
All these security arguments are pure figments of your imagination. They are not based in reality at all.
Wayland is trying to do less than X11. The things you mention are not solved at the display protocol level on any platform but X11. Your security strawman never comes in to play.
Yeah, it's not like anyone needs that functionality to do work or anything. In fact, why not just refuse to boot the computer in the first place? That'll stop a lot of security problems.
Wayland has been the default on Fedora since Fedora 25, released in 2016. I think replacing X.org in 8 years is pretty impressive, given that many desktop environments and too some extend toolkits have been tightly coupled to X11 in the past.
> Linux hasn't had hardware video acceleration for over a decade when Windows and macOS did have it, precisely because it was too hard to support this use case within the restrictions of X11.
mpv and kodi have no trouble rendering hardware accelerated video on Linux under X11 though
They are a much simpler use-case. They just need to present video. Web browsers need to composite the video within arbitrary documents which may e.g. have elements that overlap the video (opaque or transparent) or may arbitrarily transform the video (CSS applies to videos just like any other element).
> Web browsers need to composite the video within arbitrary documents which may e.g. have elements that overlap the video (opaque or transparent) or may arbitrarily transform the video (CSS applies to videos just like any other element).
Did Compiz on X11 not have hardware acceleration? The wobbly windows and other effects on my old Atom powered Acer Aspire One were buttery smooth. If that dinky processor was pulling that off without help from the GPU, that's really impressive.
You're talking about something else. Hardware acceleration of 3D graphics is something completely different from utilizing the specific video decoding hardware in your GPU to decode web videos without hitting your CPU. Firefox has had generic GPU hardware acceleration on Linux for a while (albeit more buggy than on Windows/Mac), but this is about hardware video decoding.
The way I understand it: Dedicated video players can build around hardware acceleration. They display a video and UI they control. Web browsers have to show other people's UIs, which can be dynamically resized, overlaid and otherwise modified.
This makes it really hard to implement in current browser architectures without resorting to a solution that causes you to e.g. have to copy video frames from GPU memory to main memory, causing performance drops and stutter. With Wayland, it's "easier" to actually access the GPU's video frames directly (like on Windows and macOS), enabling this implementation.
Compiz/beryl exists since 2006 which is 14 years ago. And this was really impressive working software, not just a demo. So impressve in fact, that it made many people switch to Linux. Windows Vista with a truly 3D accelerated desktop came after that.
Also this "news" does not tell that Wayland is finally delivering. It tells us that the Wayland implementation of Firefox has reached feature party to X11 for very specific subsystems.
You're completely misunderstanding what this is about. Hardware video acceleration is not about rendering 3D graphics.
This is about being able to play web videos without causing you to lose CPU performance and battery life. This has not really been supported on Linux or X11, whereas it has been supported on Windows and Mac by almost all browsers for over a decade.
The fact that this will be officially supported by a major browser vendor on Wayland first should tell you something.
> This is about being able to play web videos without causing you to lose CPU performance and battery life. This has not really been supported on Linux or X11
This is simply not true. I've regularly used hardware accelerated video on linux+X11 for over a decade. There are multiple ways for video playback to be accelerated, including hardware-specific video acceleration libraries like VDPAU and VAAPI, and hardware-agnostic acceleration using OpenGL (GLX). All of these options accelerate generic video playback steps like colorspace conversion, scaling. Most of these methods also provide direct hardware decoding of specific video codecs (h.264, mpeg1/2, vc1, wmv3).
Also, just like Wayland, hardware accelerated compositing (2D, not 3D!) of windows has been possible with X11 for more than a decade. Even my ancient window manager (Enlightenment DR16!) can manage X11's compositing.
Wayland was never required for any of these features.
Did you notice I said "web videos"? I'm talking about web browsers. I'm aware that mpv and vlc and others can use video acceleration okay, but they don't have complicated browser UI problems to solve.
Yes, I did notice that. There is nothing preventing a web browser from using the same methods and libraries.
> they don't have complicated browser UI problems
While not as complex, they do have a UI that overlays the video. However, the complexity of the UI doesn't affect video acceleration. Using libvdpau as an example, the X11 client provides[1] a separate child window[2]:
>> VDPAU expects to own the entire drawable [...] it is recommended that applications create a dedicated window for the presentation queue target, as a child (grand-child, ...) of their top-level application window.
The video playback happens in its own sandbox. Other non-video part of the UI should use their own child windows, isolated and independent of the video playback. The UI's child windows can be as complex as necessary, including overlaying the video[1]:
>> Applications may also create child-windows of the presentation queue target, which will cover any presented video in the normal fashion. VDPAU implementations will not manipulate such child windows in any fashion.
The child windows can even be alpha blended[3] with the video or other UI layers.
Reading back video data (to implement features like CanvasRenderingContext2D.getImageData()) is easy: read the video window like you would read any X11 Drawable.
What, exactly, was the "complicated UI problem" that supposedly wasn't possible to implement in X11?
If it is all so straightforward, what is your explanation for no web browser on Linux officially support video acceleration? Not Firefox, not Chrome, not Gnome Web, not Falkon, nothing. Despite video players just doing it. Just possibly, could it mean that it's actually not that straightforward in a browser?
By the way, if you would read the actual base of the story here, you would know why it took Firefox's Wayland refactoring to actually pull this off [1].
All video players on X11 have VDPAU support since ages. This is a Firefox specific problem which could be solved more easy on X11.
> The fact that this will be officially supported by a major browser vendor on Wayland first should tell you something.
It just tells me that Mozilla/Firefox really doesn't care about Linux because it took them 14 years since VDPAU works reliably on Linux to implement it.
Gnome Web, Midori, Falkon and Konqueror are browsers that only run on the "free" desktop, and don't support VAAPI/VDPAU either. Google built an entire OS based on Gentoo, and the desktop Linux build of Chrome doesn't support video acceleration either.
I think you should reconsider how easy it is to smoothly get an accelerated video buffer from a specific GPU component into an already heavily GPU optimized and dynamic web page. Web browsers have a lot more complicated graphics rendering problems to solve than VLC does.
I use Wayland with GNOME all day every day and it works fine. There are still minor issues versus legacy X, but it's certainly more than a "tech-demo".
I use Sway but what I do is use Google Hangouts in Chromium (Xwayland) instead of Firefox (Wayland) when I want to screen share. I heard Zoom doesn't work yet though.
I don't need VNC or RDP, so I don't know. I know that sharing other windows or my whole desktop in Google Hangouts doesn't work, but I rarely need that. I figure I'll log back in with an X session if I need that.
Sway is a pretty popular project, and gaining momentum. I also use sway for all of my machines (including workstation and personal laptop) and am quite happy with it.