Screen share shows just a black screen after the upgrade from Ubuntu 20.10 to 21.04. It was working fine until 20.10.
Tried in Google Chrome, Firefox, etc. all of them shows just the black screen. It is not related to the browser.
Any idea how to fix this?
14 Answers
An alternative solution, from:
- How to disable Wayland and enable Xorg display server on Ubuntu 18.04 Bionic Beaver Linux
- How to enable/disable wayland on Ubuntu 20.04 Desktop
sudoedit /etc/gdm3/custom.confUncomment the line
#WaylandEnable=falseand save the change. This will enable the Xorg display manager.
Then either
sudo systemctl restart gdm3Or just reboot the system.
This reportedly works on the following versions:
- 18.04
- 20.04
- 21.10
- 22.04 LTS
Looks like Ubuntu 21.04 defaults to Wayland - when I switch to Xorg, screenshare works fine.
If anyone wants to try this, these are the steps:
- In the login screen, click the setting icon
- Choose "Ubuntu On Xorg" instead of "Ubuntu"
- Now login
Screenshare should work now.
If you are using Chrome and prefer to use Wayland and do not want to switch back to Xorg, activate the following flag in the browser:
chrome://flags/#enable-webrtc-pipewire-capturerFrom the flag description:
1When enabled the WebRTC will use the PipeWire multimedia server for capturing the desktop content on the Wayland display server
This issue can be resolved by editing custom.conf file located /etc/gdm3/
You can use nano text editor to perform this task by running sudo nano /etc/gdm3/custom.conf on your terminal and remove comment on #WaylandEnable=false by deleting #.
Save the changes and reboot your computer.
1