I've just installed Ubuntu 22.04(also 21.04). I used to install obs studio and Kazam to record my screen. In OBS-Studio if I select only window recording it records but the fullscreen option is not working recording only the cursor. Any solutions?
-
Say thanks to the brains of the gnome team clap clap clap, from one day to the other, screen recording apps and screenshoting apps stopped working. On a LTS Ubuntu version, fantastic. Because its true that nobody needs those apps on a daily basis to be able to work. Awesome jobs guys – Carlos Jul 25 '23 at 15:46
8 Answers
I found a solution.
Firstly you need to install the Xorg package
sudo apt-get update
sudo apt-get install xserver-xorg
In this file /etc/gdm3/custom.conf
(to access it for editing, you could run sudo nano /etc/gdm3/custom.conf), uncomment (remove the leading #) this line
WaylandEnable=false
save and exit.
Then run this command in the terminal
sudo systemctl restart gdm3
Happy Ubuntu :)
- 418
- 1
- 3
- 12
-
4This is dangerous if you don't already have xserver-xorg package. You will just get a black screen. Then you have to boot off a usb or with safe graphics, change the setting back and install that package. You should choose from the login which gives you the option of choosing Xorg or Wayland. Fiddling around with this file is a bad idea. – user3483642 Jun 30 '22 at 04:17
-
This gave me a black screen. I had to forcefully restart the computer. – Mehdi Charife Jun 18 '23 at 14:40
-
You can restore to old configuration state while entering on boot screen as root – Muhammadsiddiq Jun 23 '23 at 06:59
This may be because Ubuntu 21.04 uses Wayland by default, which restricts screen recording for "security".
In your login screen, you can switch to the "Ubuntu" session, which uses X.Org, and it should allow screen recording software to function properly.
Image source: OMG! Ubuntu!
- 25,210
- 17
- 90
- 185
-
So what is the the long-term solution to be with screen recording under Wayland? – ethan Dec 28 '22 at 19:26
-
To wait for Wayland developers to fix the issue (or if you can, write the code yourself and send a patch). – Archisman Panigrahi Dec 28 '22 at 19:28
-
I am using Ubuntu 21.10 with wayland just fine with a new screen recorder called Kooha (available on Flathub). It can record desktop and microphone audio to MP4 as well as Gif, and with selected area, monitor, or application window.
However, to get it to work I had to install the latest version of Pipewire Debian using the ppa, as the Pipewire version included with Ubuntu 21.04 was not compatible with Kooha:
sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
sudo apt-get update
sudo apt install pipewire
- 486
- 3
- 9
You don't have to change from Wayland to Xorg.
Remove existing OBS Studio using
sudo apt remove obs-studio
Then install using snap
sudo snap install obs-studio
The snap version supports screen recording for Wayland too.
- 193,181
- 53
- 473
- 722
- 41
- 3
-
the snap command gives me the error: ***error: cannot install "obs-studio": Post https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup api.snapcraft.io: no such host*** – Mehdi Charife Jun 18 '23 at 16:53
First, it uses Wayland. That means you need OBS studio 27 and higher, I recommend to use flatpak because it uses this by default, so it works just fine. Also, you can use Peek for screen recording. Apps like simple screen recorder are made for x11, not modern Wayland protocol
- 419
- 1
- 6
- 17
Although this is an old question, I've found a solution by using the PipeWire technology with Gnome DE (in my case 3.32) and Chrome (at present version 77).
Check this out: https://wiki.archlinux.org/index.php/PipeWire#WebRTC_screen_sharing
Just open chrome://flags/#enable-webrtc-pipewire-capturer set it as enabled and restart chrome. You'll be able to share your entire screen or any single window. & you might need to restart.
I hope it helps
- 51
- 2
-
It worked for me thank you. But it would be great to allow capturing all applications for example skype on Wayland mode instead of changing to Xorg. – Muhammadsiddiq Jun 22 '22 at 07:01
I have encountered a problem like this, but I solved it by simply using the keyboard shortcut of Ctrl+Shift+Alt+R. It works fine for me.
- 15,380
- 6
- 51
- 79
- 21
- 2
As already stated you'll need to use Pipewire to capture the screen under Wayland. There's an extension to obs to add a source for Pipewire screen recording, however I've never installed it on an vanilla OBS installation.
Martin Wimpress, the project leader for Ubuntu Mate, and previous maintainer of the OBS Snap, has created a distribution of OBS for Ubuntu called OBS Studio - Fully Loaded!, it does include the extension I mentioned previously and other bells and whistles. I do use it, and I can't recommend it enough.
Martin has yet another OBS distribution, a portable version of OBS, where he's also adding the extras that you can find on OBS Fully Loaded, it's OBS Studio Portable for Ubuntu, and while it does have some advantages like making it easer to have many independent installations of OBS that you can easily share with others, it does have some limitations that are mentioned on the readme file on the github repository. I have experimented with it, but haven't yet moved my work to it due to lack of time.
Any of these two distributions of OBS would work as you intended.
- 272
- 1
- 7