RealVNC is not using NVIDIA GPU and driver

I have system with NVIDIA GPU and driver installed.  I started vnc using "vncserver-virtual :1" . In process list I see - /usr/lib/xorg/Xorg :1 -config vncserver-virtual-dummy.conf -auth /root/.Xauthority -pn

Looks like Xorg instance initiated by vnc server is not using default xorg.conf file which is configured for nvidia driver and GPU.  I can connect to VNC but I can't run apps like glxgears on GPU using VNC session. 

How I can configure realvnc for run on GPU. I'm using Ubuntu 20.04.4 LTS + GPU RTX8000 .



  • Official comment

    Hi Sandip,

    Thanks for your post. Virtual Mode sessions are rendered by the CPU and as such cannot leverage hardware acceleration at this time. If you need hardware acceleration, please try using Service Mode instead:

    sudo systemctl enable vncserver-x11-serviced --now

    and connect on port 5900. Note: you will need a connected monitor in most cases for the OS to render the desktop correctly.


    Jack N

    Comment actions Permalink
  • I'm running virtual machine. Physical display is not connected to vm.  I can start my own X server on GPU. But looks like vnc is not starting X server on GPU. Below is my xorg.conf file. 

    root@nves-virtual-machine:~# cat /etc/X11/xorg.conf
    # nvidia-xconfig: X configuration file generated by nvidia-xconfig
    # nvidia-xconfig:  version 470.103.01

    Section "ServerLayout"
        Identifier     "Default Layout"
        Screen         "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"

    Section "InputDevice"
        # generated from default
        Identifier     "Keyboard0"
        Driver         "kbd"

    Section "InputDevice"
        # generated from default
        Identifier     "Mouse0"
        Driver         "mouse"
        Option         "Protocol" "auto"
        Option         "Device" "/dev/psaux"
        Option         "Emulate3Buttons" "no"
        Option         "ZAxisMapping" "4 5"

    Section "Monitor"
        Identifier     "Monitor0"
        VendorName     "Unknown"
        ModelName      "Unknown"
        Option         "DPMS"

    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BusID          "PCI:2:1:0"

    Section "Screen"
        Identifier     "Screen0"
        Device         "Device0"
        Monitor        "Monitor0"
        DefaultDepth    24
        Option         "AllowEmptyInitialConfiguration" "True"
        SubSection     "Display"
            Depth       24


    Comment actions Permalink
  • Hi Sandip,

    You can try copying /etc/X11/xorg.conf to /etc/X11/vncserver-virtual-dummy.conf but this probably won't work, as the Nvidia driver will be expecting to run in the console session.

    As for Service Mode, you may be able to connect anyway depending on how the VM presents GPU/monitors. If you run into any display issues, the first thing to try is adding:


    to /root/.vnc/config.d/vncserver-x11

    and then restarting VNC Server



    Comment actions Permalink
  • Thanks for clue. I was referring this doc -

    I have copied my customer xorg.conf file to /etc/X11/vncserver-virtual-dummy.conf and started virtual vnc server as sudo/root user using command - "sudo vncserver-virtual" .  VNC started properly on NVIDIA GPU with NVIDIA driver. But VNC session is very sluggish.   


    user@sandip-19u:~$ sudo vncserver-virtual
    VNC(R) Server 6.10.1 (r47571) x64 (Jul 21 2022 17:20:14)
    Copyright (C) RealVNC Ltd.
    RealVNC and VNC are trademarks of RealVNC Ltd and are protected by trademark
    registrations and/or pending trademark applications in the European Union,
    United States of America and other jurisdictions.
    Protected by UK patent 2481870; US patent 8760366; EU patent 2652951.
    See for information on VNC.
    For third party acknowledgements see:
    OS: Ubuntu 20.04, Linux 5.4.0, amd64

    Xorg driver not found: Xorg void input driver
    You've set vncserver-virtual to use the system Xorg server. For more information
    on this alternative implementation, please see:

    Running applications in /etc/vnc/xstartup

    VNC Server catchphrase: "Oregano smart Neptune. Brush content mambo."
                 signature: 43-1b-a2-4d-e1-93-42-43

    Log file is /root/.vnc/sandip-19u:1.log
    New desktop is sandip-19u:1 (x.x.x.x:1)
    user@sandip-19u:~$ sudo ps -ef | grep -i vnc
    root       40485       1  0 22:51 ?        00:00:00 vncserver-virtual
    root       40487   40485  1 22:51 tty3     00:00:00 /usr/lib/xorg/Xorg :1 -config vncserver-virtual-dummy.conf -auth /root/.Xauthority -pn
    root       40490   40485  0 22:51 ?        00:00:00 /usr/bin/vncserver-x11-core -virtual -newinstance
    root       40499   40490  0 22:51 ?        00:00:00 /usr/bin/vncagent virtual 0
    root       40501   40485  0 22:51 ?        00:00:00 /usr/bin/dbus-daemon --session --nofork --address=unix:path=/tmp/.vnc-0/run/session-5b5afb84aad14b9c/bus --nopidfile --nosyslog
    root       40505   40485  0 22:51 ?        00:00:00 /bin/sh /etc/vnc/xstartup
    user       41087   29856  0 22:52 pts/1    00:00:00 grep --color=auto -i vnc


    Is it correct method ?  Why the customer xorg file name should be vncserver-virtual-dummy.conf  ?  

    Also I can only use root user for vnc session login.  Normal user not able to access VNC session started by sudo/root user.  How I can give permission to sudo users to access the vnc desktop started with command "sudo vncserver-virtual" ? 




    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post