Some of your applications are not well working in Ubuntu 21.04 and Ubuntu 21.10? Try to switch back Xorg session.
Wayland is a communication protocol that specifies the communication between a display server and its clients. It aims to replace the X Window System with a modern, secure simpler windowing system in Linux.
While Fedora defaults to Wayland for a long period of time, Ubuntu finally (first in Ubuntu 17.10) switched to Wayland as default session since Ubuntu 21.04. However, there are still many problems running with the display server.
Many multi-media apps, e.g, Kazam, SimpleScreenRecorder,
OBS-Studio, Shutter, and even xrandr, do not work in Wayland.
Before waiting the apps to update with Wayland support, switch back to Xorg could be a good idea. And here’s how to do the trick either from Login Screen, or by editing the configuration file.
How to Tell If I’m running on Wayland or Xorg:
There are a few ways to tell either Wayland or Xorg is running, while this single command may be the simplest.
Open terminal from your system application launcher.
When it opens, run command:
Switch Back to Xorg in Ubuntu from login screen:
Xorg session is still available. You can simply log-out the current session, choose your user in login screen, then click the bottom-right gear button and select “Ubuntu on Xorg” from pop-up menu.
Then type your password and hit Enter to login, and enjoy!
Force Xorg by editing the config file:
Though I don’t have the problem, some may not even see the toggle icon to select “Xorg” at the login screen. So here’s how to force Xorg by changing the configuration file.
1. Backup the config file:
The session selection (the gear icon) in login screen usually disappears due to mis-configuration. So it’s highly recommended to make a backup before getting start.
Press Ctrl+Alt+T on keyboard to open terminal, and run commands one by one to copy the two config files to backup:
sudo cp /etc/environment /etc/environment.back
sudo cp /etc/gdm3/custom.conf /etc/gdm3/custom.conf.back
If something goes wrong after following this tutorial, you may either go to recovery mode or press Ctrl+Alt+F3 to get into command console. After manually typing user and password to login, restore the two config file via commands:
sudo mv /etc/environment.back /etc/environment
sudo mv /etc/gdm3/custom.conf.back /etc/gdm3/custom.conf
And finally run
reboot command to restart your computer. Or press Ctrl+Alt+F2 to switch back.
2. Force Xorg:
Firstly open terminal either by pressing Ctrl+Alt+T on keyboard, or by searching from system app launcher.
When it opens, run command to edit the
sudo gedit /etc/gdm3/custom.conf
Next un-comment WaylandEnable=false by removing the # at the beginning, so it will look like:
Secondly, after saving the previous file, run command to force Xorg for Qt5 applications:
sudo gedit /etc/environment
When file opens, add line “QT_QPA_PLATFORM=xcb” and save it.
Finally restart your machine and login to check result.