Ubuntu 20.04 shows a black screen when connecting through Teamviewer, but I still have ssh access. How can I get back the desktop?
Solution 1
If you have a headless machine (ie: no monitor plugged into it) you'll need to either install a "HDMI headless dummy connector" or you can install a Video Dummy Package:
sudo apt-get install xserver-xorg-video-dummy
Then add a configuration file for it:
sudo vi /usr/share/X11/xorg.conf.d/xorg.conf
and paste this (adjusting your desired resolution)
Section "Device"
Identifier "Configured Video Device"
Driver "dummy"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 31.5-48.5
VertRefresh 50-70
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1080"
EndSubSection
EndSection
Then reboot the machine and voilá
Solution 2
I installed TeamViewer 15.17.6 and had the same effect.
As I just upgraded from 16.04, the first thing to check was if I ran Wayland now. This is not the case, I'm still on X11, so it's not Wayland's fault.
The problem also vanished after I downgraded TeamViewer to version 15.14.3.
Seems to be a bug in TeamViewer itself.
Edit: Just to clearify: I had the black screen in TeamViewer's Window, so I could not see the remote system.
If you meant that your Ubuntu 20.04 is the remote system and this one shows a black screen as soon as a TeamViewer client connects, this could just be caused by the option "enable local black screen" (see https://community.teamviewer.com/English/kb/articles/50966-teamviewer-black-screen)
Solution 3
Had the same issue, but I found a simple solution.
Make sure to login with 'Ubuntu x.org'
To do that:
- Logoff from your Ubuntu account
- Click in the login screen on your login name
- An icon appears in the rigth bottom corner
- Click on it and select Ubuntu X.org and login to your account.
- In 'Users' make sure 'Automatic Login' is set to 'On'
Issue explaination: For security reasons Teamviewer (remote acces) is blocked on/with Wayland (that is implemented with the regular Ubuntu login)
Related videos on Youtube
user321627
Updated on September 18, 2022Comments
-
user321627 over 1 year
I have a Ubuntu 20.04 desktop and connecting to it remotely via Teamviewer shows only a black screen. I can type and it will show what I type but it registers nothing. I still have ssh access. How can I get back my login screen through teamviewer?
-
Nicolas Formichella about 3 yearsWhat DE are you using? (
KDE
,Gnome
...) -
user321627 about 3 yearsI was using Gnome, thanks
-
-
mahmood about 3 yearsIt didn't work.
-
João Abrantes over 2 yearsHow can I downgrade TeamViewer to version 15.14.3?
-
Seven over 2 yearsHave a look here: askubuntu.com/questions/138284/… or more brutal: deinstall with apt, get the *.deb file from TeamViewer and install using this *.deb file (sudo apt install ./teamview-xxx.deb)
-
th0r255 over 2 yearsuncommenting WaylandEnable=false in /etc/gdm3/custom.conf worked for me. I'm Running 21.04. Thanks Nicolas!
-
greendemiurge about 2 yearsThank you! Didn't search for headless, so this was a real gift.