Switch between Wayland and X11

Thanks Pavlos,
actually it says x11~
So I'm not using Wayland, I'd like to try it. I see in login screen that I can choose different options, but no one of those works properly, the only option working is "MATE".

Interesting! I'm running 22.04 on Live USB. $XDG_SESSION_TYPE also shows x11.

I did not understand this to be a fact. Quite cool if true though. Could you point me to where you found this information so I can read up on it? Thanks!

Hi, @smurf (Luca DG).

You wrote:

I'm afraid that is definitely NOT true as @Wimpy (Martin Wimpress) himself wrote the following, on the 21st April 2022:

1 Like

Ok, I apologize, I red many threads surfing the net and may be I got confused.
Sorry.

1 Like

Yeah, it's confusing. It's been confusing for years.

Most likely what you read is that stock Ubuntu (the version with the GNOME desktop) has switched to Wayland in 22.04. What stock Ubuntu does is not necessarily indicative of what Ubuntu MATE does. Like @ricmarques said above (actually what @Wimpy said in the 22.04 release notes), the MATE session as it stands cannot run on Wayland without some semi-unofficial "patches". @wmww is the main developer who pushes MATE development regarding Wayland forward, and he's got a number of modified MATE programs that, when used in conjunction with most of the normal MATE applications (which individually support Wayland now), can be used to start a Wayland-based MATE session. I've never tried it myself, but I hear it mostly works. (Should you try it, beware. As with any "beta-quality" software, it's possible it'll crash upon you spontaneously.)

As for the stock Ubuntu side of things, that's confusing because Ubuntu has switched back-and-forth between X11 and Wayland several times since 2017 (if I recall correctly). The following timeline is according to my own (flawed) memory:

  • Ubuntu first deployed Wayland as an option when you log in, but not the default, in version 17.10.
  • In 18.04 the option was not even included by default.
  • In 18.10 the Wayland option was included again, and I think it was even the default.
  • But users complained that applications didn't always work right under Wayland, and the cursed Nvidia drivers were unavailable for Wayland (as if you'd actually want them anyway :grin:). So Ubuntu switched back to X11 by default but kept Wayland as an option for the 19.04 and 19.10 releases.
  • 20.04 didn't even have Wayland as an option.
  • I know for sure that 21.10 didn't have Wayland as even an option, because I was quality assurance testing Ubuntu MATE during that release cycle and I was trying to figure out why Ubuntu MATE's installer had so much trouble communicating with the screen reader. (I had to dig pretty deep to find the answer to that one -- I initially thought it was a difference between Ubuntu using Wayland and Ubuntu MATE using X11, but I figured out that both used X11.)

And, if you believe this article from gHacks (https://www.ghacks.net/2022/04/21/ubuntu-22-04-lts-with-gnome-42-and-wayland-as-the-default/), Wayland is the default on stock Ubuntu now, and it looks like it's the first LTS release to hold that achievement.

However, let me make this clear: Officially, without extra patches, the whole MATE desktop doesn't run on Wayland yet. I know that because I'm a member of the MATE development team. Sorry.

OK, enough of my diatribe for one post.

7 Likes

Please, I don't want to start a fire. I apologize again for my mistake.

1 Like

Not to worry, you didn't start the fire. This is a pain point that has existed for a while now and the developers are doing what they can to resolve it. That doesn't make people less frustrated or less eager for the upgrade when it becomes available.

3 Likes

Yeah, nobody starts fires around here. This is probably the most civilized community I've been a member in. All I wanted to do was clarify the Wayland / X11 issue further -- nothing else. Sorry it rubbed off wrong.

5 Likes

This is probably the most civilized community I've been a member in.

I definitively agree.

3 Likes

Hi, @smurf :slight_smile:

You wrote:

That's perfectly normal. No worries and you don't have anything to apologize for :slight_smile:

If my previous terse reply in this topic came off as if I was criticizing you in any way, please rest assured that was not the case and I apologize for not having made that clear in that reply of mine.

1 Like

Yes that's what I understand, that Wayland is not quite ready for MATE flavour of Ubuntu.

Does anyone know what the time line will be for Wayland on MATE? After 22.10?

Thanks

~S.O

I guess I need to be the killjoy reminding everyone that Wayland is not even remotely close to being functional for any non-toy/demo scenario, other than via XWayland.

The list of software that not only "doesn't currently", but "will never" work on Wayland is rather large, because of mistakes made 15+ years ago when Wayland was new. Among other things, this has led to a chicken and egg situation where nobody wants to waste time rewriting their code for Wayland when they gain nothing from doing so; and users can't have "full" Wayland desktops because nobody wants to port their code to it for no reason.

That "15+ years" isn't a typo - that's how long Wayland has been "nearly ready". (It's a bit like fusion power and flying cars... :P). Ubuntu's Mir project was started, completed, and abandoned in less than half that time, and was still about as successful as Wayland has been so far.

Some projects will eventually move to "Wayland native" versions, simply because bored developers like to play with New Toys. MATE will doubtless be one of those projects someday, but even if that were to happen tomorrow, it would still be years at best before all the software you wanted to run was also migrated - so you'll be running some form of X for a very, very long time yet.

There's nothing wrong with looking forward to the day Wayland might be usable, but there's also no reason at all to get excited over it. Even if/when it does happen, the best you can hope for is that - from your perspective as a user - nothing seems to have changed at all. :slight_smile:

1 Like

It's easy to say that but time still marches on and while things never quite move as fast as we want them to things do eventually change. I remember when Canonical decided we were going to ditch ALSA for PulseAudio and forced the change on everyone things were a mess and there was HOWTO after HOWTO on how to revert to ALSA or to fix PulseAudio or switch from both to OpenSound, etc etc. And yet here we are today most of us with a working PulseAudio setup, about to replace it with PipeWire... The more things change...

But seriously, I am mostly happy with X11. I can do pretty much everything I care about using it and have been getting decent performance with it for my purposes. The one thing that I care about Wayland for is getting the ability to run Android apps and games on my system transparently and not needing to have or show the entire Android system in a window.

AnBox is basically dead at this point--what there is is either broken and out of date to the point of worthlessness. The image you're supposed to use is worthless because it has major audio and video codec errors that the developer simply ignores. WayDroid is the heralded successor that is in active development and which apparently functions well but that does not actually run well on X11...there is apparently a way to work around this with Weston but then you're stuck emulating an entire screen and displaying everything in a window instead of transparently.

So there actually are use cases for this beyond just being a 'toy' and it gets frustrating when people simply pretend there aren't. I understand there are good, practical reasons why we do not yet have Mate on Wayland, but please don't pretend there is no use for it or that no one wants it. We do have use for it and we do want it.

(edited to remove some poor phrasing and jackassery. My apologies to bornagainpenguin).

The problem is that for every new piece of Wayland-only software, there are multiple pieces of X-only software that will no longer work properly, much of which is no longer actively in development because it was finished years ago and the authors have moved on.
You've found one of the former that's important to you, but there's a lot of weight on the other side of the scale - anyone who depends on working RandR support for VMs, or screen capture, or remoting, to name just three. That affects a much larger group of people (VM use alone greatly outnumbers bare-metal Linux installs last time I looked) so it's not as simple as just "MATE moves to Wayland, and everybody's happy", even if you dismiss the enormous amount of work involved in doing that - and the fact that it's a moving target on top of that because Wayland still isn't finished.

(ed: XWayland is covered in a later post).

Wayland is now one of the longest-running jokes in the entire history of software development. It's badly designed, the implementation has been a farce, and the project has been mismanaged to a staggering extent. All three of those things are still ongoing, and if you expect any of them to change after 15 years I've got an Einstein quote for you. :frowning:
That long history includes a lot of unethical and dishonest behavior on the part of the two corporations pushing Wayland, and a lot of hostility and arrogance from some members of the project towards the Linux community as a whole; and especially, any developers who don't work for one of those corporations.

All Wayland does, and all it has ever done, is stake out a claim to get in the way of any number of better options. If it had shipped on time, the current discussion would be about replacing it with Arcan or something similar - much like your PulseAudio example with PipeWire now superceding it.

Since Wayland still isn't even at the Beta stage though in reality, paying attention to it now only doubles down on the harm it's already done, because you're asking people to waste their time rewriting code for it just to either have to do so again in a few more years, or be contributing to entrenching a pile of mediocrity for another 15 years because nobody wants to have to deal with an invasive rewrite a second time.
Neither of those outcomes is at all desirable to most developers, or at all beneficial to most users. We're going to end up there, obviously, since two very large corporations are dead set on it, but that doesn't make it any less of a bad result. By the time it dies the death it deserves, Wayland will have wasted millions of hours of irreplaceable developer and user time, for no reason and to no benefit.

That's why I'm opposed to it - and your complaint with AnBox -> WayDroid is exactly that scenario playing out..

2 Likes

You may have one or two valid points in your rant, but please tone it down a bit.
@bornagainpenguin doesn't deserve abuse or a condescending stance just for his opinion.
Also , he has several valid points too.

Listen to what Daniel Stone, one of the developers of X11, has to say about X11 vs Wayland

6 Likes

Very interesting. I had no idea X was so complex.

It's entirely possible I misjudged your post and completely misunderstood it. I don't pretend to have a perfect understanding of anything. I'm just happy when my computer which ever one I am using looks and behaves the way I want it to and is capable of doing what I ask of it.

Lately I've wanted to run Android applications transparently on Linux. I remember when Canonical first announced they were working on it. I understood it wouldn't be something we'd see right away so I resolved to be patient about it. That was almost a decade ago. Eventually I found AnBox but as I said it's basically been bitrotting for the past several years. Then word came of a fork that was being actively developed and required Wayland to work.

Was I disappointed? Sure, but as far as I can tell it needs Wayland in order to display just the application and not the whole system. Is that absolutely true? How would I know? I'm not a programmer. I don't know of anything else that is trying to tackle the problem of making it work on Linux though. Meanwhile (and I hate to use Microsoft as a comparison for anything) Windows 11 seems to have support for doing this. ChromeOS has support for doing this. Why don't I just bugger off and use either of those then? Because I like the Mate desktop too much to give it up.

I'm sorry if I spoiled your rant against Wayland's existence. I do have what I consider a valid use case though and I dislike that being summarily rejected as being just a 'toy' so I took it harder than perhaps I should have. I wasn't trying to stomp on your toes though, just pointing out that there have been changes like this before and that while they can be messy as hell and take a while to make happen, they do eventually take place. I was basically reaffirming the desire I have to see my ability to run Android apps transparently on Linux using my preferred desktop while saying also that I am willing to be as patient as it takes. Hell I've been waiting almost ten years, what's a few more years?

If you have proof that Wayland isn't actually necessary, I'm all ears. If you know a way to do this without waiting on Waydroid, again I'm all ears. But please don't just dismiss anyone waiting patiently as someone who just wants to play with a toy. I'm just one person with a particular desire to do something that seems to require Wayland. I'm sure there are other people with their own reasons to use it. I suspect as rollout continues to happen there will be other uses that neither of us can think of right now.

Incidentally despite how far off topic we seem to have drifted, you mentioned that Wayland is stealing time away from better options. Would you care to mention some of those so we can see what they are?

EDIT: Since the thread has been locked for new replies over the weekend when I was busy I was not able to reply. Arcan is exactly the name that came to me when you mentioned alternatives, and I was wondering if it or some other system being worked on was what you were thinking of. Thanks, for the reply and I'm glad to see that despite your frustration over the way things have been going with Wayland that we did not in fact step on each others toes and were able to have a discussion.

1 Like

I've just re-read that post, and I don't see any ranting in it. Some unpleasant truths, certainly, but nothing emotional, rude, or personal - unless you want to count the part that's explicitly spelt out as "the needs of the many" vs "the needs of the few" as personal in some way, but that would be quite a stretch.

@bornagainpenguin doesn't deserve abuse

Obviously. Please point out where you think the abuse is so that I can rephrase or remove it.

Also , he has several valid points too.

Yes, he does. I'm not blaming him for this mess: he's a casualty of it, not the cause.

Listen to what Daniel Stone, one of the developers of X11, has to say about X11 vs Wayland

Thanks, but I've been aware of Wayland for around a decade at this point. I'm very familiar with not just the stated goals but also what's happened with it over the years, and even why some of those things happened when and how they did.
I'm sure you noticed, but the video you linked is from early 2013, nearly 10 years ago. 10 years later, Wayland is not only still unusable for an awful lot of cases, but has only just recently started work on HDR, which is hardly "new technology" that just appeared days ago and took everyone by surprise. I don't think an appeal to authority helps there, as it still presents quite a paradox: either the "authority" was somehow unaware of a topic that had been discussed at length since the mid-90s, in which case they are far from authoritative; or they were aware of it but unwilling or unable to deal with it for 14 years, in which case you can take your pick of any number of options, but none of them are particularly encouraging or flattering.

It's very hard to defend a project like this taking 15 years in the first place, but even that aspect isn't really my main issue with it: there are large chunks of functionality in X that people depend on, which the Wayland team is explicitly opposed to, and their position is "f**k those users".

That attitude is why this saga is still ongoing and shows no signs of ever ending well. It's also putting developers (which is my trade) in the impossible position of having to either burn resources that they don't have supporting two backends, or being harassed over "Wayland support". Developers of DEs are especially bearing the brunt of this, because Wayland goes out of its way to maximize the development costs for everyone that isn't Red Hat.

I find the victims of this cynical behavior much more sympathetic than the people who instigated it. You're free to feel differently.

1 Like

It's also entirely possible I wrote it poorly, since I tend to not have time for forums etc until late in the evening. :confused:
Still, let's at least get the first piece out of the way first:

XWayland is "the thing that makes most X programs work on Wayland". Think of it like WINE, if you're familiar with that. That's what the "you'll be running some form of X for a very, very long time yet" part means: the majority of X-based software will simply never be rewritten for Wayland, so without that Wayland would cause even more damage to "the Linux desktop" than it already has.

How would I know? I'm not a programmer.

Yeah, that's fair - and you shouldn't have to be.

Windows 11 seems to have support for doing this. ChromeOS has support for doing this.

That's much too long a topic for me to cover tonight, but, maybe this will help clarify:
On one hand, you have "Continue development of AnBox". On the other, you have "Continue development of AnBox, AND rewrite a chunk of it to use Wayland instead of X". Programmer or not, I'm pretty sure you're not going to have a hard time figuring out which of those involves more work.

I do have what I consider a valid use case though and I dislike that being summarily rejected as being just a 'toy' so I took it harder than perhaps I should have.

Ah, no - and this, I suspect, is the point of confusion. While I'm obviously at fault for not being clear enough in my reply, I want to point out that the "toy" aspect predates your post. I was talking about the handful of examples used to showcase Wayland in the same way that Compiz's "wobbly windows" etc was used to showcase how "cool" a Linux desktop could be a decade ago.

Was I disappointed? Sure

I'll bet. It's almost as if Canonical's desktop ambitions had left them over-extended, and when those were brought up short there was enormous collateral damage that hurt the FOSS community as a whole...

Of course, it would be crazy to even suggest that those efforts were deliberately sabotaged by Intel, of all people - a company that's famously never abused its wealth and position - to defend their still-floundering Wayland project against a competing system that had come out of nowhere and was already shipping: unlike Wayland, despite the head start. I mean, that's conspiracy theory-level stuff, you know?
(Obviously this wasn't the death knell for Mir, but it certainly sent a clear message).

I wasn't trying to stomp on your toes though

I never imagined you were.

I am willing to be as patient as it takes. Hell I've been waiting almost ten years, what's a few more years?

Very much the attitude that anything Wayland-dependent needs to have. :stuck_out_tongue:

If you have proof that Wayland isn't actually necessary, I'm all ears.

Sorry, no. This part is clearly my fault: I was discussing the history that led to the problem you now have, i.e. Wayland in general; not your problem itself.
AFAIK, you're pretty much screwed w.r.t. Waydroid, for reasons that I think I've at least mostly covered already. It's not that there's anything within Wayland inherently needed for Forked-Anbox to work, it's that because Waydroid depends on it you can't have it on anything but Wayland. I really don't have the energy to go into the details of that part, but it wouldn't help you anyway, unless you had a giant pile of cash to throw at the problem.

But please don't just dismiss anyone waiting patiently as someone who just wants to play with a toy.

That wasn't really the intent, but yeah, I did not phrase that well, sorry. As I said at the time, there are significant negative consequences to adopting Wayland, and for you to get what you want a much larger group will have to suffer those consequences. The responsibility for that lies entirely with the Wayland developers: not you, not me, not the MATE team, and not Canonical.

If you felt dismissed by what I wrote, I'd like you to imagine what your response would be to the outright "Yeah, we literally could not care less that you have to rewrite all your code, or that you're dependent on a piece of X11 functionality that we're getting rid of" attitude of the Wayland team.
It's even worse for those trapped between a rock and the hard place in this fight, who have to make the impossible choice I already covered: either give up months of your own time to rewrite for Wayland, screwing over a lot of your existing users along the way; or deal with at best constant questions along the lines of "Why no Wayland version yet?", and more commonly, outright hostility and abuse. (Which, to be very clear, nobody is accusing you of - but you, and this community in general, are very much the minority).

Incidentally despite how far off topic we seem to have drifted, you mentioned that Wayland is stealing time away from better options. Would you care to mention some of those so we can see what they are?

Arcan is (IMO, at least) the most interesting one: but it's a passion project, not something with a billion-dollar corporation behind it. Despite that, it's come further in 5 years (with a much smaller team) than Wayland has in 15, and from a technology standpoint it's practically science fiction by comparison.

Most of what I was getting at though is that Wayland is inherently stealing time from thousands of other projects - one of which is MATE - by requiring massive rewrites just to coexist with it. That time could be spent on bugfixes that would benefit every MATE user, which is a group that all of us are in. It could also be spent adding new features, or improving performance, or on any number of - to borrow a phrase - "other uses that neither of us can think of right now".

Even if Wayland's incompatibility had been "accidental" or "unavoidable", it would still have been harmful. That it was a deliberate choice which explicitly benefited two companies that were already enormously wealthy and influential, at the expense of their smaller competitors, was cynical in the extreme. That it also placed even more of a burden on independent developers, who are already giving up their time to do unpaid work that they share with everyone, was beyond callous; and has had a significant cost to you even if you're solely a beneficiary of that work, let alone what it's cost the developers themselves in time and lost opportunity.

Like I said, I'm aware this is just tilting at windmills. Nothing I can do or say is going to change that, nor is it going to help you with your Waydroid problem. "Can be messy as hell and take a while", though not inaccurate, massively downplays the real cost and enormous negative impact of this fiasco. If someone had actively set out to sabotage desktop Linux, they still wouldn't have been able to do this much harm over this much time - and it's still nowhere near over yet.

2 Likes