How to Fix Black Screen when Record Ubuntu Screen using OBS Studio

Hello everyone, welcome to Manjaro.site, a place where we learn almost anything about computing. I just installed the latest version of Ubuntu 21.04 on my PC. And then I tried to record my screen using OBS Studio. I was expecting a nice and smooth setup. But unfortunately, I had a major issue. OBS Studio only shows a black screen on my screen capture source (XSHM). OBS Studio is an open-source software for recording and streaming. It is a popular software amongs streamer and podcaster. We can use this program to record or stream video from different sources simultaneously.

As you can see, my OBS screen only shows a black screen. I think this issue also found on the other Ubuntu versions such as Ubuntu 20.04 and Ubuntu 20.10. But don’t worry, there is an easy fix on this.

How to Fix Black Screen when Record Ubuntu Screen using OBS Studio

This black screen issue is related to the Wayland window server used in Ubuntu 21.04. Ubuntu 21.04 use the Wayland as the default window server. OBS Studio seems still have some issues with Wayland. So we will need to login using Xorg instead of Wayland. There are two ways to do this.

  1. Disable Wayland login
  2. Login using Xorg

Option 1. Disable Wayland Login

We need to edit the custom.conf file located under /etc/gdm3. I use nano to edit this file.

sudo nano /etc/gdm3/custom.conf

Uncomment the following line

#WaylandEnable=false

So now, it should looks like this

WaylandEnable=false

Now close and save the file. Reboot Ubuntu. Now you should be able to record your screen without issue anymore.

Option 2. Login using Xorg

If you don’t want to edit the custom.conf file, you can choose to use Xorg. From the Ubuntu login screen, you will see a button on the bottom right of the GDM login screen. Click it and choose use Xorg. By loggin in to Ubuntu using Xorg, OBS studio will work normally. No black screen issue.

I hope this article is useful for you who have issue with the black screen while using OBS on Ubuntu. Thanks for reading and see you next time.

Be the first to comment

Leave a Reply