Display issues when connecting to VNC Server running on Linux

Follow

In some circumstances, your Linux remote computer will not display correctly in VNC Viewer. The commonly reported issues are:

  • a black or blank screen
  • application windows are white
  • slow refresh of images

The issue is most commonly seen when connecting to a computer with no monitors attached (headless), or a monitor using HDMI/DisplayPort is connected but powered off.

It appears that in the above situations, Linux does not correctly report graphical updates to be captured by VNC Server. At this time, there are some known workarounds you can try below:

  1. Upgrade VNC Server to version 6.5.0, as this version contains some changes to try and automatically recover from a blank screen
  2. If you are running VNC Server on Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, CentOS/RHEL 8, or later, edit /etc/gdm3/custom.conf (Ubuntu) or /etc/gdm/custom.conf (CentOS/RHEL) and uncomment WaylandEnable=false, then reboot the VNC Server computer.
  3. Change your Power settings on the Linux computer to never turn off the monitors/displays
  4. Check that Linux is not set to a "Battery Saver" power mode
  5. Connect an EDID emulator to the VNC Server computer. An example EDID emulator can be seen here
    Note: RealVNC have not tested this particular emulator and it is only provided as an example
  6. Change the VNC Server CaptureMethod parameter:
    • On the remote Linux computer, open the VNC Server dialog.
    • Select Options from the hamburger menu.
    • On the Expert tab, filter the list for CaptureMethod, and set the value to 1
    • Restart VNC Server

      This can also be specified using a configuration file: /root/.vnc/config.d/vncserver-x11
  7. Install the X11 dummy driver, by running:
    • Ubuntu
      sudo apt update
      sudo apt install xserver-xorg-video-dummy
      sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak # this file may not exist so if there is an error, it can be ignored
      sudo cp /etc/X11/vncserver-virtual-dummy.conf /etc/X11/xorg.conf
    • RHEL / CentOS
      sudo yum install xorg-x11-drv-dummy
      sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak # this file may not exist so if there is an error, it can be ignored
      sudo cp /etc/X11/vncserver-virtual-dummy.conf /etc/X11/xorg.conf
    • Reboot the machine, and you should now be able to connect as expected.
    • Note: Following these steps will result in any connected monitors displaying a blank screen. If you need to use a monitor, run sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.dummy and reboot
    • Note 2: This method is using the X11 dummy driver, so some graphical features may not be available. If you want your own driver to work, you will have to research what changes are needed and make your own xorg.conf
Was this article helpful?
0 out of 2 found this helpful

Comments

0 comments

Please sign in to leave a comment.