23

I've just installed Ubuntu 22.04(also 21.04).

I tried to install Obs Studio and Kazam to record my entire screen. In OBS-Studio if I select only window recording it records the one tab but the fullscreen option does not record the full screen only the cursor logo is being recorded with the background completely black, the same situation with the Kazam recorder also.

Are there any solutions to fix this issue?

Sherzod
  • 564

8 Answers8

12

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 :)

Sherzod
  • 564
9

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.

enter image description here Image source: OMG! Ubuntu!

5

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.

NotTheDr01ds
  • 22,082
4

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.

muru
  • 207,228
3

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

3

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
2

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

0

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.