Another exciting moment for fans of Wayland and the future of Linux, especially if you're an NVIDIA user, as the work to provide hardware accelerated rendering for NVIDIA GPUs was merged in for Xwayland. We've been following this work for a while, as an upcoming NVIDIA driver will have the code in for everything to be in place (likely NVIDIA 470).
To save you clicking around, this is what NVIDIA engineer Erik Kurzinger said about the patches:
These two patches are intended to accompany upcoming support in the proprietary NVIDIA driver for hardware accelerated GL and Vulkan rendering with Xwayland. They shouldn't interfere with the current swrast-based GL support, so once the driver-side changes are out the door things should just start working. I wanted to send these out for consideration first, though, in case anyone has any substantial concerns with the general approach. See the commit messages for further details on the implementation.
Performance should be roughly on-par with native X11 based on the benchmarking I've done. There's still an annoying extra copy required for presentation of windowed applications, but the impact doesn't appear to be significant, and full-screen applications won't have that issue (provided the compositor supports the required zwp_linux_dmabuf_v1 interface).
Since more distributions are moving over to Wayland from the old Xorg, this is a huge and important step. Even Ubuntu is targetting Wayland as the default for the upcoming Ubuntu 21.04 release. Still, it will be some time before all the major distributions have releases out with this new Xwayland support in for NVIDIA. It's possible we will see this land in the likes of Ubuntu 21.10, so more likely towards the end of this year.
You can see the Merge Request here.
Other interesting upcoming work includes another Merge Request that's not yet merged, which would enable the loading of alternative GBM backends.
This work plus the 470 driver fixing hybrid laptop things is pretty excitingAbsolutely, very big news that allows Wayland to really be a complete solution for nearly everyone now.
The wayland work also likely due to what I would assume the eventual inclusion in RH 9.x, or possibly a newer 8.x update.
Not that I am a huge Redhat fan, but they do seem to finance a huge majority of the Linux projects in some way.
Not that I am a huge Redhat fan, but they do seem to finance a huge majority of the Linux projects in some way.Red Hat makes about $ 4 billion a year. The next biggest AFAIK, SUSE, only makes about $ 450 million. If Red Hat weren't using their money to fund stuff, that would really suck.
This work plus the 470 driver fixing hybrid laptop things is pretty exciting
What is a hybrid laptop?
Is that what I have on my work laptop? Which is a Intel CPU and also a Intel GPU inside of it and a dedicated NVIDIA GPU?
Right now, on my work laptop, I am using the nouveau drivers because they perform better with KDE and with the nouveau drivers I can also set 2560x1440 as a resolution on my 4K laptop screen.
With the official drivers I cant change it from 3840x2160 on my laptop screen.
Pretty annoying since I don't want to use scaling ever since it never works properly 100% regarding how apps themselves scale.
Why XWayland and not Wayland? What's the difference? I want to use Wayland for the enhanced security as soon as possible.XWayland is for running X applications (so approximately all games, and legacy applications) on Wayland.
Wayland on Nvidia works approximately fine with some compositors (with the known Nvidia and Wayland issues) but XWayland on Nvidia wasn't hardware accelerated, which makes it not terribly useful. This work is to enable hardware acceleration for XWayland.
Oh, well I'll be (and yes that's what I meant). I'm not sure how recent the RHEL ones were, but pretty sure when I had checked before last year, it did not exist. kind of surprised that opensuse has one. I mean I could see SLES having it. Is SLES still a thing?I wonder how much of this is for Redhat. Sure most people don't think RHEL when they think of gaming. But consider NVIDIA just recently opened official repositories for RH (they don't have them for any other distribution) and specifically for Quadro use. The fixes to hybrid graphics could also be down to RH based workstations (think Thinkpad P-series) needing it.
The wayland work also likely due to what I would assume the eventual inclusion in RH 9.x, or possibly a newer 8.x update.
Not that I am a huge Redhat fan, but they do seem to finance a huge majority of the Linux projects in some way.
I am a little unsure what do you mean by "official repositories for Red Hat". Just a driver package repo or some other form of repository?
In case of the first: https://download.nvidia.com/opensuse/
The is at least for openSUSE a dedicated repo hosted on the nvidia servers since several years now.
My apologize if I may misunderstand here something. I am just curious what you mean :D
Oh, well I'll be (and yes that's what I meant). I'm not sure how recent the RHEL ones were, but pretty sure when I had checked before last year, it did not exist. kind of surprised that opensuse has one. I mean I could see SLES having it. Is SLES still a thing?I wonder how much of this is for Redhat. Sure most people don't think RHEL when they think of gaming. But consider NVIDIA just recently opened official repositories for RH (they don't have them for any other distribution) and specifically for Quadro use. The fixes to hybrid graphics could also be down to RH based workstations (think Thinkpad P-series) needing it.
The wayland work also likely due to what I would assume the eventual inclusion in RH 9.x, or possibly a newer 8.x update.
Not that I am a huge Redhat fan, but they do seem to finance a huge majority of the Linux projects in some way.
I am a little unsure what do you mean by "official repositories for Red Hat". Just a driver package repo or some other form of repository?
In case of the first: https://download.nvidia.com/opensuse/
The is at least for openSUSE a dedicated repo hosted on the nvidia servers since several years now.
My apologize if I may misunderstand here something. I am just curious what you mean :D
Yes it is :-) SLES 15 is the current version.
Nvidia has had an OpenSUSE repo for well over ten years. The only occasional problem is that some beta drivers do not appear in that repo.
Warning! Grumpy lecturing ahead:
Spoiler, click me
Yes X's old code is a possible attack vector, but I don't know of any attacks ever targeting the display server in all the time I've been using Linux. Most attacks/malware seem to be aimed at headless servers and tend to be tailor made to exploit out of date installations. Besides, Wayland could have its own security concerns to deal with.
I don't get the need to reinvent the wheel here.
The desktop user just needs to be careful not to run scripts without checking them for things that look out of place. They're typically pathetically obvious even to people like me who know next to nothing about scripting. Also, never symlink libraries or put old libraries in /usr/lib or other global directories, that can lead to some real haberdashery.
Also, if you can help it, don't run GUI programs as root (pkexec doesn't work correctly with every program) anyway. Wayland does seem to protect the user from this gotcha, from what I read; I'll give it that at least.
Is there any reason to use Wayland other than the perception of security for the end user? I can't get a straight answer. Does XWayland still have any noticeable overhead when gaming? I'll give it a try when the new NVIDIA driver goes stable.
All things considered, I'll give Wayland a fair shake. I'll probably post my experience in the forums. If you've read this far, thank you. It took me 30 minutes to type this with my one good hand, and I appreciate it.
Is there any reason to use Wayland other than the perception of security for the end user?
X is entirely and completely unmaintained. Its known flaws will never be fixed; flaws discovered in the future will never be fixed. The people that used to work on it don't want to any more, and only work on Wayland now. Xorg 1.21 hasn't been released because there's no one interested enough to do so. It's kicked the bucket, shuffled off its mortal coil, run down the curtain, and joined the choir invisible.
This . . . is an ex-X!Is there any reason to use Wayland other than the perception of security for the end user?
X is entirely and completely unmaintained. Its known flaws will never be fixed; flaws discovered in the future will never be fixed. The people that used to work on it don't want to any more, and only work on Wayland now. Xorg 1.21 hasn't been released because there's no one interested enough to do so. It's kicked the bucket, shuffled off its mortal coil, run down the curtain, and joined the choir invisible.
I'm really glad it's finally happening, but I wonder just how necessary the switch to Wayland actually is. Dedoimedo released a rather thoughtful article on the subject, and I tend to agree with him on several points.I just read that article; it strikes me as a bit of a strawman. It claims that the only reasons for developing Wayland were security and, I dunno, novelty or something. As I understand it, there actually are quite a few things that X is not good at doing or not capable of doing because it is so antiquated, which some people wanted done, and which Wayland was built to be able to do. So whether those things are in your use-case or not, they do exist and are part of the point of Wayland--characterizing it as an inadequate replacement whose only point is security, is fundamentally inaccurate. And really, considering that the people who do Wayland are also the people who used to do X, it seems to me fairly unlikely that they would have gone to the effort of starting a whole new thing just for hypothetical security.
Warning! Grumpy lecturing ahead:
Spoiler, click me
Yes X's old code is a possible attack vector, but I don't know of any attacks ever targeting the display server in all the time I've been using Linux. Most attacks/malware seem to be aimed at headless servers and tend to be tailor made to exploit out of date installations. Besides, Wayland could have its own security concerns to deal with.
I don't get the need to reinvent the wheel here.
The desktop user just needs to be careful not to run scripts without checking them for things that look out of place. They're typically pathetically obvious even to people like me who know next to nothing about scripting. Also, never symlink libraries or put old libraries in /usr/lib or other global directories, that can lead to some real haberdashery.
Also, if you can help it, don't run GUI programs as root (pkexec doesn't work correctly with every program) anyway. Wayland does seem to protect the user from this gotcha, from what I read; I'll give it that at least.
Is there any reason to use Wayland other than the perception of security for the end user? I can't get a straight answer. Does XWayland still have any noticeable overhead when gaming? I'll give it a try when the new NVIDIA driver goes stable.
All things considered, I'll give Wayland a fair shake. I'll probably post my experience in the forums. If you've read this far, thank you. It took me 30 minutes to type this with my one good hand, and I appreciate it.
Rather, in real life there seem to have been many efforts to give X upgrades and overhauls to deal with various issues, and the developers finally hit a wall where they didn't see any way forward except to start fresh. I'm not a techie, but on a non-techie level I've been following all this for many years, and it seems the problem is that how applications, graphics cards and their drivers and so on want to interact with screens has changed a lot since X was first written; the whole paradigm just doesn't apply any more and getting it to pretend gradually became kludge upon kludge upon kludge.
"X.parrot Server" occurred to me after I'd hit the Post button.This . . . is an ex-X!Is there any reason to use Wayland other than the perception of security for the end user?
X is entirely and completely unmaintained. Its known flaws will never be fixed; flaws discovered in the future will never be fixed. The people that used to work on it don't want to any more, and only work on Wayland now. Xorg 1.21 hasn't been released because there's no one interested enough to do so. It's kicked the bucket, shuffled off its mortal coil, run down the curtain, and joined the choir invisible.
Rather, in real life there seem to have been many efforts to give X upgrades and overhauls to deal with various issues, and the developers finally hit a wall where they didn't see any way forward except to start fresh. I'm not a techie, but on a non-techie level I've been following all this for many years, and it seems the problem is that how applications, graphics cards and their drivers and so on want to interact with screens has changed a lot since X was first written; the whole paradigm just doesn't apply any more and getting it to pretend gradually became kludge upon kludge upon kludge.Yep, pretty much.
X was state of the art in 1984. For comparison, the GPU as we understand it now was invented some 15 years later.
The biggest change is how multiple windows are combined - composited - to create something that's drawn on a screen. That's an extension for X rather than part of the main thing - support for bitmapped fonts and being able to draw dashed lines are part of the main thing - but it's where all the actual work is done. And the other parts of the functionality of X have changed, too: input handling is completely different now, and throwing bitmaps over the network is not really terribly efficient.
So Wayland makes the compositor the central part, uses more relevant input and output handing, and gets rid of the network stuff entirely.
There are aspects of Wayland's design, implementation, and history that, in my view, have hampered its adoption and desirability. But it's what we've got, since Mir didn't take off and X is no longer fit for purpose, so we have to make the best of it.
I swear I read at some point that they were planning on eventually replacing the networking / forwarding capabilities (they are extremely useful on occasion).Rather, in real life there seem to have been many efforts to give X upgrades and overhauls to deal with various issues, and the developers finally hit a wall where they didn't see any way forward except to start fresh. I'm not a techie, but on a non-techie level I've been following all this for many years, and it seems the problem is that how applications, graphics cards and their drivers and so on want to interact with screens has changed a lot since X was first written; the whole paradigm just doesn't apply any more and getting it to pretend gradually became kludge upon kludge upon kludge.Yep, pretty much.
X was state of the art in 1984. For comparison, the GPU as we understand it now was invented some 15 years later.
The biggest change is how multiple windows are combined - composited - to create something that's drawn on a screen. That's an extension for X rather than part of the main thing - support for bitmapped fonts and being able to draw dashed lines are part of the main thing - but it's where all the actual work is done. And the other parts of the functionality of X have changed, too: input handling is completely different now, and throwing bitmaps over the network is not really terribly efficient.
So Wayland makes the compositor the central part, uses more relevant input and output handing, and gets rid of the network stuff entirely.
There are aspects of Wayland's design, implementation, and history that, in my view, have hampered its adoption and desirability. But it's what we've got, since Mir didn't take off and X is no longer fit for purpose, so we have to make the best of it.
My understanding also is that Xorg is not 100% dead, it's just resting. They've nailed it to the perch, so to speak. Beautiful plumage.
They are maintaining it, there were some modules updated like a month or so ago. I'm a firm believer still that X was fine, and they just wanted something new to play with, so Wayland was born. I mean Xorg is an extremely stable / old code base, and who doesn't want to occasionally have something new to play with?
My test of whether or not I'm running Wayland now, as far too often I start finding random breakages, and random distributions default to Wayland now, I do an alt+F2 and 'r' in Gnome, and if it whines that I can't restart Gnome, I know I'm running in Wayland, as for some reason you can't reload Gnome in Wayland...
My understanding also is that Xorg is not 100% dead, it's just resting. They've nailed it to the perch, so to speak. Beautiful plumage.What changes there have been are to make XWayland work, which is being spun out into its own thing so that it will actually be released. Pining for the fjords.
They are maintaining it, there were some modules updated like a month or so ago.
I'm really glad it's finally happening, but I wonder just how necessary the switch to Wayland actually is. Dedoimedo released a rather thoughtful article on the subject, and I tend to agree with him on several points.
Warning! Grumpy lecturing ahead:
Spoiler, click me
Yes X's old code is a possible attack vector, but I don't know of any attacks ever targeting the display server in all the time I've been using Linux. Most attacks/malware seem to be aimed at headless servers and tend to be tailor made to exploit out of date installations. Besides, Wayland could have its own security concerns to deal with.
I don't get the need to reinvent the wheel here.
The desktop user just needs to be careful not to run scripts without checking them for things that look out of place. They're typically pathetically obvious even to people like me who know next to nothing about scripting. Also, never symlink libraries or put old libraries in /usr/lib or other global directories, that can lead to some real haberdashery.
Also, if you can help it, don't run GUI programs as root (pkexec doesn't work correctly with every program) anyway. Wayland does seem to protect the user from this gotcha, from what I read; I'll give it that at least.
Is there any reason to use Wayland other than the perception of security for the end user? I can't get a straight answer. Does XWayland still have any noticeable overhead when gaming? I'll give it a try when the new NVIDIA driver goes stable.
All things considered, I'll give Wayland a fair shake. I'll probably post my experience in the forums. If you've read this far, thank you. It took me 30 minutes to type this with my one good hand, and I appreciate it.
I agree with that article that the end-user experience is critical and that maybe we shouldn't deploy Wayland until it is 99.999% ready. But I disagree with the idea that Wayland exists due to re-writing things for the sake of re-writing things.
For me, the main bit is what Dedoimedo actually mentioned in their article - maintainability. Things that are not maintainable take huge amounts of extra effort to fix, improve and even keep working. So that is a perfectly good reason for redoing ancient software with outdated paradigms.
See more from me