I'd like to do OpenGL rendering from an application that talks to an X11 server. The application reads the value of the DISPLAY variable.

I have access to a CentOS 7 box that has a nice graphics card capable of doing 3D rendering, but I don't have a monitor plugged into it.

When I run xstart, to start the X11 server, I get the following error:

Fatal server error:
(EE) no screens found(EE)

How do I start an X11 server for rendering on a graphics card, without a physical display?

This box sits in a server room, so I can't plug a physical display into it.

Also, xvfb or software renderers are perhaps not useful for this task, because it does not handle instructions needed for rendering. I would need to use the graphics adapter.

Here are the graphics adapters available to me:

# lspci | egrep 'VGA|3D'
04:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1)
0a:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. G200eR2 (rev 01)

Here is my xorg.conf file:

# more /etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 375.20  (buildmeister@swio-display-x86-rhel47-06)  Tue Nov 15 17:49:44 PST 2016

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

Section "Files"
    FontPath        "/usr/share/fonts/default/Type1"

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

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

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"

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

I can post transcripts of any other useful logs. Thanks for any advice!


I've run into this problem before. Unfortunately, the best answer I've been able to come up with is a hardware solution: trick the graphics card into thinking a monitor is installed by plugging a VGA terminator into the VGA output. You can make one at home or buy one; googling for "VGA terminator" returns plenty of results for both.

Another option may be to run a VNC server on the headless system, but I'm not sure whether the graphics card can render to a VNC output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.