2

I created a GPU instance on Google Compute engine with NVIDIA Tesla K80 attached. I have installed GPU drivers and CUDA based on this guide.

nvidia-smi check - ok.

nvcc -V check - ok

Now I am trying to make sure I can run headless rendering with OpenGL.

I tried this:

sudo nvidia-xconfig -a --use-display-device=none

to configure xconfig.

Then:

export DISPLAY=:0

Finally,running glxgears:

glxinfo | grep OpenGL

I am getting this error:

No protocol specified Error: unable to open display :0

My xorg.conf file looks like this:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 390.30  (buildmeister@swio-display-x64-rhel04-14)  Wed Jan 31 22:46:17 PST 2018
Section "ServerFlags"
     Option "IgnoreABI" "True"
     Option "nolisten" "True"
     Option "AutoAddDevices" "False"
EndSection
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "nvidia" 0 0
EndSection
Section "Files"
EndSection
Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Tesla K80"
    BusID          "PCI:0:4:0"
EndSection
Section "Screen"
    Identifier     "nvidia"
    Device         "nvidia"
    Option         "UseDisplayDevice" "none"
EndSection

What is missing in my config?

My OS: Ubuntu 16.04

  • 1
    Your setup misses a running X server. – mviereck May 23 '18 at 20:51
  • 1
    Looking, closer, it seems to me you have an X server running, but authentication failed. You need to provide X cookie with XAUTHORITY or run xhost +SI:localuser:yourusername on X. How do you start X? – mviereck May 24 '18 at 20:02
  • Did you ever find a solution? – Alec Jacobson Jan 25 at 21:15

Your Answer

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

Browse other questions tagged or ask your own question.