Switching from wayland to x11 in ubuntu 22.04

Sometimes certain programs just don’t like Wayland. I recently had the experience of installing Barrier, which is a free and open source piece of software that functions like a software KVM switch, and it does not like Wayland what so ever. I’ve switched multiple times on multiple installs, and I can never remember how to do it from time to time. So I’m going to show you (and remind myself) how to switch between Wayland and X11 from a terminal in about 5 minutes.

Open up a terminal and do the following:

sudo nano /etc/gdm3/custom.conf

Scroll down until you find this line:

#WaylandEnable=false

Uncomment that, save, and exit the file.

Now in order to make our changes take effect we can do:

systemctl restart gdm3

The screen will go blank for a minute, but not to worry, when it comes back you should be in X11, and that’s literally it!

BTW, in order to go back to Wayland you’d just comment that line out and restart gdm3 again, and you’re back where you started.

1 Like

Hi @Doron_Beit-Halahmi,

You spark my interest with this post. I went to /etc and could not find gdm3.
I read a little about Wayland and X11. Doing a search, I found out that Mint does not support Wayland.
But now at least I know what X11 and Wayland are.

PS: I just notice this post was for Ubuntu, but I still learn something.

2 Likes

And you just taught me something, having never used Mint before. I’m glad I mentioned this tutorial being for Ubuntu. lol

1 Like

That only works for systemd distros
Why not logout to the display manager screen and choose wayland there?

1 Like

that works too, although I’ve had it not work before for whatever reason…

Display managers are messy unreliable beasts… all of them.
The whole area needs a tidy up.

1 Like

I have to do this often enough, that I never thought to document the process :smiley:

Pop!_OS 22.04 defaults to X11 - so I don’t have to worry about that there… But I recently cutover my Ryzen Thinkpad to Ubuntu 23.04 (after a brief distrohop - hoping one could address my WiFi card issues - result : none of them resolved it - so I bought a new mini PCIe card off Amazon [which I kinda hate, as I have nothing but contempt for Bezos]).

I too need to avoid Wayland, because of Synergy (Barrier is / was a fork of the old OSS branch of Synergy KVM) - I NEED Synergy, with sometimes up to 5 PCs on my desk (2 x MacBooks, 1 x Pop! desktop and 1 x Ubuntu Thinkpad, plus sometimes Pop! on a Raspberry Pi4). Fortunately, my corporate controlled MacBook still let me install and run Synergy (tried that on their corp controlled Windows 10, and no go, and when I logged a ticket for the issue, the answer ware a rather curt, and abrupt “No!” - so I didn’t use it - and ended up giving it back - I AM NOT having multiple keyboards and mouses on my desk!).

Anyway - allegedly, Synergy 3 does have Wayland on their radar, (they actually stated publically that Synergy was on their radar in TWO THOUSAND and FOURTEEN!) - but there’s no Synergy 3 for Linux on arm64 - I tried it - and went back to Synergy 1.14.6-stable (which won’t install on MacOS less than Ventura, so I was running 1.14.6-experiemental until I upgraded both my MBPs to Ventura).

I was using this combo for while :

Synergy Server on MacOS, alongside, and in tandem with, Apple’s “Universal Control” - Universal Control is quite neat, but I think some piece of crap Corporate Spyware / Big Brother / Fascist control on the corporate MBP would stop Universal Control working (had to write a shell script for MacOS to kill it and restart it!), so I moved the Server back to my Pop!_OS machine, and now use that to control all my computers - which is a shame, because UC is rather nice (when it works, it’s way more seamless than Synergy - e.g. gestures on a MacOS touchpad, work, gestures DON’T work over Synergy).

Note : I need a “permanent” solution, as BOTH my main Linux machines run LUKS [if I reboot the Thinkpad I have to use its keyboard to unlock LUKS] - so I allow them to boot straight into the desktop (I still have to enter my keyring passwords - but once the user desktop is loaded, synergy kvm started, I can drive from Synergy server machine and unlock my keyring).

It’s a shame, 'cause I’d like to use gestures on Linux… Anyway - the touchpads on both MBPs are still reachable from my desk, so I can switch workspaces easily (e.g. I run Citrix and Remote Desktop to servers full screen on MacOS - fullscreen on MacOS creates another workspace).

1 Like

Is it bad that I seem to be using this forum as my own personal docuwiki? LOL

Not at all - I do this too :smiley:

2 Likes