328 points · by nirv · 6y ago · 173 comments
[1] https://www.bountysource.com/issues/55506502-add-va-api-hard...
> (In reply to lilydjwg from comment #30)
>> I'm glad to here that, but what about support for Firefox on X11? Is it given up?
> Hardware decoding is platform independent so it generally works under X11 as it's implemented as Bug 1616185.
> For whole playback chain see Bug 1610199 what's needed to be done fox X11.
> I was closing this one as it refers to HW decode only, not the playback.
> The overall video playback is tracked at Bug 1210726.
If you are coming from i3 the move to sway is a no-brainer and works great (sway is wayland only). Firefox, thunderbird, Libreoffice all work great and look great, i.e. sharp when you need scaling for example. Sway is to thank for base work they did for other distros like a wayland clipboard protocol all the others are using.
Second comes Gnome. No issues. Gnome laid the gruntwork of porting gtk3 to wayland which works great.
Third maybe KDE. Still two years to come. KDE plasma is suffering from arguably better design decisions like client side decorations vs. Gnome serverside decorations but as many users use GTK based apps those GTK apps do not yet play nicely with the KDE design decisions. As such the brave KDE folks have to implement things themselves while those relying on GTK are done. QT is fine with wayland but not everything is QT.
That's all only true if you are not using NVidia hardware.
Personally, the one real gain I've read about previously is no tearing when watching videos or scrolling fast and security improvements. Also now these Firefox performance improvements. But that's about it.
Are there any other benefits that a normal user would see?
* Fractional scaling of monitor outputs
* Multi-touch gestures for e.g. switching desktops
* Security sand-boxing of apps
* Tear-free video
As the original link shows, though, the architecture has much better abstractions for software engineers to work with so developer quality-of-life is improved, too.Because X is deprecated. The question isn't Why switch to Wayland, but When. You have mentioned some benefits too.
Finally, my Ubuntu box has screen tearing all the time. I'm on good hardware with pretty standard 1080p monitors so I've been absolutely baffled that screen tearing is so frequent in standard desktop use.
I think Wayland is supposed to have better support for various DPI settings and mixed DPI settings.
About shorcuts, I also like having the GUI there to configure the keyboard layout (like set capslook as Escape) rather then edit xorg configs. Also it makes sense to have a section for Global shortcuts and a section for regular shortcuts. If you do not know what Global shortcuts are maybe you don't need them.
Probably GHOME users complain about Firefox's "about:config" because it has too many options and their brain can't fit that many options. The point is the distro gives you some defaults and if you are competent(you know to read and use google) you can change the distro defaults. if you are not competent you find the distro that looks cool and use it as the developers intended and adapt to it not it to you.
I don’t think it’s supposed to be an upgrade from the users perspective, just a new display driver. Maybe a few new native things like rotatable windows etc which if exist in X11 are probably emulated.
X11 by modern standards is a shitshow of dirty hacks, I spent the weekend researching ‘how can I not have notifications pop over my lock screen using openbox and any composite manager’ and it ended up in the top hard basket. Also repeat this story for screen tearing, DPI, acceleration, weird bugs, etc etc.
Wayland is maturing which is nice, but you really won’t notice many changes, but youll be much cleaner / less buggy in the long run.
It may work great, but it's not as well packaged by/for upstream as i3.
I recently started running wayland+gnome (rather than i3) on my Ubuntu 18.04 at work - because less bad support for fractional scaling looks a bit better on my two 24" with different dpi.
But there didn't appear to be a "no effort" way to install sway (yet). Especially not with automatic (security) patches.
I'm hopeful it'll be in 20.04?
I was thinking of waiting another year to jump as I'm having no issues with i3, what are the advantages?
Then there are the wayland advantages: very little screen tearing if any, no blanking the screen when connecting to a new display, better security properties.
There's disadvantages as well. There's no xdotool support, and if you want to use any sophisticated keybindings or remapping keys, you'll be forced to rely on Sway's configuration language to do that for you. On i3 I was able to bind ctrl_r to right click, but that is — as far as I know — not possible on sway without rewriting the libinput event stream, which is very painful.
Current downsides: worse support for screen recording/sharing (e.g. not supported in Skype), a bug in the compositor (e.g. GNOME Mutter) can bring your whole session down, not-as-good NVIDIA support (also depending on the compositor).
I have been using Wayland for two years or so an wouldn't want to go back. I do miss wide screen sharing support, because I am working remotely and Skype is the primary means of communication.
True for Gnome, no issue for KDE. Their arguably better design decisions led them to proceed slower though.
What if i want this as a feature? Does wayland allow this per app?
I know this is not how security works (a theoretical hole is often as bad as a practical one) but it's a bit like saying you should have antivirus software, to which I might say: where are the viruses?
permit setenv { HOME LC_ALL TERM XDG_RUNTIME_DIR WAYLAND_DISPLAY } greg as root
and I can just run 'doas wireshark'.
I hear other configurations have more issues.
1.:https://www.phoronix.com/scan.php?page=article&item=gnome-32...
In fact Weston since 2015 has had a clever delay algorithm that allows clients to hit the very next frame if they sync to presentation-time feedback:
https://ppaalanen.blogspot.com/2015/02/weston-repaint-schedu...
(And Sway has a configurable delay; since Sway is so simple to render, the recommended max_frame_time value is 1ms — i.e. the compositor has the very last millisecond before vblank to composite, and everything before that is for the apps.)
Not really fair to compare with non-vsync systems — tearing is completely unacceptable ;)
So, if you think about what the tearing is it makes sense, your getting a partially drawn frame because the application didn't provide the full frame in time for the vsync, waiting to display the update for and additional one or two frames simply to assure a complete frame can only slow things down.
I still don't understand why I need Wayland.
Core Xlib is entirely ignorant of vsync or anything relating to completed frames. It's an immediate mode rendering model in that everything you draw just gets thrown on-screen by the display server whenever.
Compositors were then bolted on w/redirect and damage extensions and basically randomly snapshot the client window contents before compositing a desktop frame, within that snapshot you can easily have tearing of half-drawn updates.
Further extensions and hacks have tried to fix this like Present and frame clocks from the gtk/gnome folks, but it's all opt-in by X clients and non-uniformly supported by compositing WMs or not at all in classical non-compositing WMs where the X server just draws things directly on-screen as the protocol requests arrive from clients.
On the other hand it turns out streaming video is super easy, entirely agnostic of the actual rendering stack in use, and not really that expensive in terms of bandwidth anymore.
regarding the video streaming: meh, i can do X forwarding out of the box with just ssh, mostly out of the box, no other software required.
This is kind of a joke answer but the real answer is: This depends on the compositor you're using. So Wayland may not be network transparent, but it's possible to implement equivalent functionality on another layer of the stack.
If you use Nvidia gpus don't bother.
- Apps which use toolkits like GTK and QT will “just work” since they did the porting grunt work.
- X11 apps can run unmodified using XWayland but this just runs an X.org server and directs the output.
But the literal answer is “no”. Wayland and X11 are incompatible and apps will need to port.
This results in some ugly behavior of WebEx for instance, which blocks video in its WebRTC calls, since it assumes that "CPU is too weak" to handle it. Cisco never fixed this issue.
https://mastransky.wordpress.com/2020/03/03/webgl-and-fgx-ac...
In order to run Firefox under Wayland, you have to be able to run Wayland session in your compositor (Clutter in case of Gnome). AFAIK, currently no compositor has working/stable Wayland support with NVidia proprietary drivers due to GBM/EGLStreams thing[1]. At the same time, open-source Nvidia driver Nouveau is in a terribly poor condition. Which, hopefully, may change soon[2][3]. Thus, if system is running off the Nvidia graphics card with proprietary drivers, there's no way to use Gnome Wayland session and Firefox 75 acceleration at the moment [corrected and specified]. Please correct me, if I'm wrong.
A separate case is where the system uses Intel/AMD graphics card and drivers, and NVidia is used for render offloading (Optimus/PRIME/Bumblebee). This may be a laptop with discrete GPU or Virtual Machine setup with GPU passthrough. Since I don't have such a setup, I can't check if it works with Firefox 75 [corrected]. But there're some discussions[4] on the matter and experimental works on implementing NVIDIA VDPAU-VAAPI wrapper[5].
[1] https://blogs.gnome.org/uraeus/2019/04/03/preparing-for-fedo...
[2] https://www.forbes.com/sites/jasonevangelho/2019/12/06/nvidi...
[3] https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-O...
[4] https://old.reddit.com/r/archlinux/comments/a94zzj/state_of_...
My previous machine had an NVIDIA GPU and despite all the great work, nouveau was almost unworkably buggy. The proprietary NVIDIA drivers did not work with Wayland at all. I bought an AMD card, Wayland worked with open source drivers and everything was butter-smooth.
I now use a NUC with an Intel GPU. Similarly to ADM GPUs, it works great with open source drivers.
I support AMD and Intel for their open-source efforts, but still hold hopes for GTC 2020 announces.
† AMD Radeon VII was super overpriced and unavailable in my area, and it still released nearly two years later.
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.
mpv and kodi have no trouble rendering hardware accelerated video on Linux under X11 though
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.