Ubuntu 20.04 shows a black screen when connecting through Teamviewer, but I still have ssh access. How can I get back the desktop?

9,254

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:

  1. Logoff from your Ubuntu account
  2. Click in the login screen on your login name
  3. An icon appears in the rigth bottom corner
  4. Click on it and select Ubuntu X.org and login to your account.
  5. 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)

Share:
9,254

Related videos on Youtube

user321627
Author by

user321627

Updated on September 18, 2022

Comments

  • user321627
    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
      Nicolas Formichella about 3 years
      What DE are you using? (KDE, Gnome...)
    • user321627
      user321627 about 3 years
      I was using Gnome, thanks
  • mahmood
    mahmood about 3 years
    It didn't work.
  • João Abrantes
    João Abrantes over 2 years
    How can I downgrade TeamViewer to version 15.14.3?
  • Seven
    Seven over 2 years
    Have 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
    th0r255 over 2 years
    uncommenting WaylandEnable=false in /etc/gdm3/custom.conf worked for me. I'm Running 21.04. Thanks Nicolas!
  • greendemiurge
    greendemiurge about 2 years
    Thank you! Didn't search for headless, so this was a real gift.