The state of Wayland vs X (esp. in regard to to the next LTS)

Since it seems that Ubuntu is going to stick with X for the upcoming 5 years, I think that this thread could be used to track the state of Wayland vs X.

*With GNOME 3.34 a big improvement DID already happen: You can start graphical apps with root privileges again. E.g. “sudo synaptic” and “sudo gedit” work again.

*Patches for Wayland fullscreen compositing bypass for games are on the way for GNOME 3.36, maybe even to some 3.34 point release: https://www.phoronix.com/scan.php?page=news_item&px=GNOME-PR-Pending-FS-Unredir

*Hans de Goede is finishing some patches to have a solid Xwayland resolution switching support. Especially WINE will benefit from that. That will be in 3.36 or even in some 3.34 point release.

*The GNOME VNC server Vino was deprecated and removed today upstream. Its replacement will be gnome-remote-desktop for both Wayland and X: https://gitlab.gnome.org/GNOME/gnome-build-meta/issues/92
Ubuntu doesn’t even ship Mutter with g-r-d support up to this day because the Security Team couldn’t find time to “MIR” that package yet.

*Firefox 69 is working flawlessly for me in Wayland mode. I expect that it will switch to automatic mode in Firefox 71or 72.

8 Likes
  • Fractional scaling makes XWayland clients blurry. And Chrome and hence everything Electron-based don’t support Wayland. Igalia has been working in a patch for a long time now but AFAICS there are many blockers open that don’t seem to be a priority for Chromium developers, so any ETA from some months to some years would be purely speculative. OTOH the TODO for XWayland fractional scaling was open at Gnome Gitlab some months ago but no touched at all during the last iteration, again doesn’t seem to be a priority. At least X11 supports fractional scaling using the xrandr hack. Maybe @3v1n0 could throw some light on this issue.
1 Like

I wonder if a Mutter version compiled against g-r-d could be uploaded to the GNOME3 staging PPA. To let those have remote functionality who prefer to use the Wayland session.

I find this strange that Ubuntu doesn’t support Wayland officially — Debian has with the release of the new Stable, recently. It’s the default.

1 Like

I’m thankful Ubuntu hasn’t. The only box I had debian Buster on (it’s now moved to bullseye) was unusable when used with Wayland, so I had to use Xorg anyway.

I have 18 boxes used in my ‘QA-testing’ [list], and Xorg gave a more satisfactory result for the boxes I test with. (I did ‘live’ testing of debian’s weekly non-free Buster ISO pre-release too). Myself I don’t care (I use LXQt & XFCE by choice) and will work around issues, but a first experience has to be considered to gain users - and Xorg currently wins in my opinion.

Hi,
I’ve been using it for about 6 months and it’s usable for what I do. My hardware is perhaps 2 years old too. Anyway, unless it’s used, what incentive do developers have to fix the bugs?
If Ubuntu would use it in it’s 6 month cycle builds, then perhaps we could have some forward progress - I’m not saying it’s ready for their LTS yet. But, unless it get used … again back to my original point.

1 Like
2 Likes

You got my “thumbs up” on that issue :wink:

On another note:

With all the upstream work for starting “X on demand”:

Did anybody notice a difference to GNOME 3.32?

killall Xwayland

still nukes my whole session.

Or is it still an experimental feature hidden behind a gsettings toggle? Can it be enabled?

https://blogs.gnome.org/uraeus/2019/09/23/fedora-workstation-31-whats-new/

This work has mostly landed, but it is hidden behind an experimental flag (gsettings set org.gnome.mutter experimental-features “[…,‘autostart-xwayland’]”) in Fedora 31 as we need to mature it a bit more before its ready for primetime.

It is indeed an experimental setting at the moment. But it doesn’t sound like I should try that out ATM. If somebody does, please report back your findings.

1 Like

The Mutter part of the Hans de Goede fixes for Wayland fullscreen games are in the master branch now: https://gitlab.gnome.org/GNOME/mutter/merge_requests/739#note_637607 Which is great. :hugs:

On another note: Bug #1802533 “[MIR] pipewire” : Bugs : pipewire package : Ubuntu
That probably means another 10 years without pipewire and gnome remote desktop because “it is still developed” :roll_eyes:

1 Like

The Firefox Wayland support feels super snappy now. If you want to try that out, I recommend the following commands to set the Wayland env variable globally for your user (only recommended for GNOME- and Ubuntu-session users):

touch ~/.config/environment.d/60_firefox.conf
echo MOZ_ENABLE_WAYLAND=1 >>~/.config/environment.d/60_firefox.conf

LOG out and back in again to have an effect!!!

If you don’t set the the variable globally and just create a local .desktop file then links from e.g. Thunderbird or Polari won’t open because it tries to open an XWayland-Firefox instance in addtion to the Wayland one, which results in an error message.

If you want to disable the Wayland mode again, you have to delete the 60_firefox.conf file:

rm ~/.config/environment.d/60_firefox.conf

The adventurous can opt-in to using the GPU driven Webrender engine in addition to the Wayland support which has to be done from within Firefox itself → in about:config set gfx. webrender. all to True to enable it or to False to disable it.

2 Likes

I’ve found it easier to enable Wayland support by writing a wrapper script ~/bin/firefox that does

#!/bin/sh
export MOZ_ENABLE_WAYLAND=1
exec /usr/bin/firefox "$@"

This way I don’t need to log out to get the environment variables in my session updated so launching Firefox from a dock icon will see the updated variables.

More importantly, thought, Firefox 71 that was uploaded into Ubuntu a few days ago has a bug where using Wayland makes it crash if you try to open additional URLs via remote mode (e.g. by clicking on links in other programs): https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1855997

1 Like

But that doesn’t start other instances of Firefox in Wayland mode, doesn’t it?

Did you test opening links in Thunderbird (with Firefox already open in the background) ? Or from Polari? From my experience that would throw the error which I mentioned above. Setting the env globally is the workaround because I tried the script first and that caused the problems to me. At first glance the script looks like a working solution. Unless another app wants to open Firefox via a link.

I’m still on 19.04 as I haven’t got round to upgrading to 19.10 yet (really need to!!), is the bug with Yaru theming for snaps on Wayland fixed yet? I got round to changing the session I log into back to Ubuntu on Wayland (better if I can actually get round to reporting bugs on 19.10 as using Wayland and reporting bugs will help to improve it) and noticed that the snap theming reverted to Ambiance on some snaps where it was Yaru (LibreOffice, System Monitor)…

1 Like

@ads20000,

I don’t know if that bug is fixed or has even been reported to Ubuntu yet. This should be a reminder to everyone to please report bugs to Ubuntu and ensure they don’t just linger as discussions in online forums :slight_smile:

1 Like

Just for the record, I’ve been using Ubuntu 19.10 with Wayland (Intel :slight_smile: ) since it’s been released without any problem. With Nvidia it’s a different story…

@ricsipontaz, we know and expect there are problems with Wayland on Nvidia. That’s why it’s documented in the releases notes of 19.10. We recommend sticking to Xorg with the Nvidia driver.

I didn’t report because I thought snap theming (in general) was a very long-running known issue but have now reported as you requested, please mark yourself as affected if it affects you!! https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1857782

The bad news:
Two big Wayland improvements didn’t make it into Focal:
*Fullscreen undirect
*X on demand (by default)

The good news:
Fullscreen undirect was merged upstream for GNOME 3.38 now: https://www.phoronix.com/scan.php?page=news_item&px=Mutter-Unredirect-FS-Wayland I am not too sure if it can be backported to the 3.36 branch because it involves an API break but who knows. This fullscreen undirect will be more comprehensive than any X undirecting because it can bypass the display server completely. The client renders directly to the monitor pane of the GPU.

On the Firefox side the browser had to adapt to some Mutter changes and Firefox 74 hat a lot of problems. But Firefox 75 and 76 are buttery smooth again (at least on the Intel side of things).

See my post from December how to enable the Wayland mode for Firefox:

4 Likes

That works pretty well! Not only did that enable Firefox to use Wayland, but Thunderbird too!! That was a nice surprise!

2 Likes