10

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?

4 Answers4

6

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á

Cy.
  • 161
  • 1
    Thank you! Didn't search for headless, so this was a real gift. – greendemiurge Apr 11 '22 at 15:02
  • after installing the video dummy package the location of the config file was not created I do no know if it make a difference but i am running ubuntu 21.10 .... has anyone tried just creating the folder path and if so does it work? – chris May 23 '22 at 17:17
  • For those who successfully connect to the GUI of headless server BUT got a low resolution (1280x720 for me). You may refer to the config in this answer – chongkai Lu Mar 24 '23 at 06:57
  • Now I have the problem, that the screen stays black, even when I plug a monitor in. Is there a way to have this only as second priority? Seems to be related to this question: https://askubuntu.com/questions/1229168/video-dummy-the-fake-display-with-without-monitor-connected-at-the-same-time – Leon D Jul 24 '23 at 14:52
  • save the dummy display config into the 20-dummy.conf file instead of xorg.conf – Oleg Kokorin Aug 17 '23 at 09:33
  • it is better to set much higher HorizSync and VertRefresh: "HorizSync 30-200" "VertRefresh 50-1000" – Oleg Kokorin Mar 20 '24 at 08:45
  • it is better to add dedicated "/usr/share/X11/xorg.conf.d/20-dummy.conf" file instead of default xorg.conf – Oleg Kokorin Mar 20 '24 at 08:46
1

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)

Seven
  • 131
  • How can I downgrade TeamViewer to version 15.14.3? – João Abrantes Sep 02 '21 at 09:05
  • Have a look here: https://askubuntu.com/questions/138284/how-to-downgrade-a-package-via-apt-get or more brutal: deinstall with apt, get the .deb file from TeamViewer and install using this .deb file (sudo apt install ./teamview-xxx.deb) – Seven Sep 02 '21 at 13:05
1

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)

Nico V.
  • 11
0

The issue is that you're running Wayland, which doesn't allow for any screen recording and elevated GUI apps, for security.

You'll need to disable it, in order to make Teamviewer work

To do that :

sudo nano /etc/gdm3/custom.conf

then uncomment (remove #) the following line :

#WaylandEnable=false

This Ctrl + X, Y and Enter to exit the editor

Reboot and you'll be able to get Teamviewer to work