Skip to content

Latest commit

 

History

History
104 lines (79 loc) · 2.83 KB

ubuntu-18.04-configure-headless-3d-gpu-acceleration-using-nvidia-gpu.md

File metadata and controls

104 lines (79 loc) · 2.83 KB

Ubuntu-18.04 - Configure headless 3D GPU acceleration using an NVIDIA GPU

Overview

This document describes how to configure headless 3D GPU acceleration using an NVIDIA GPU.

Procedure

Step 01.00: Configure headless 3D GPU acceleration.

Step 01.01: Configure headless 3D GPU acceleration using an NVIDIA GPU.

In order to configure headless 3D GPU acceleration, you'll have to use VirtualGL with TurboVNC.

VirtualGL works fine with headless NVIDIA GPUs (Tesla), but there are a few additional steps that need to be performed in order to run a headless 3D X server on these GPUs.

These steps should be performed after installing the NVIDIA proprietary driver, but before configuring VirtualGL.

Run nvidia-xconfig --query-gpu-info to obtain the bus ID of the GPU. Example:

Number of GPUs: 1

GPU #0:
  Name      : Tesla V100-PCIE-16GB
  UUID      : GPU-1620f7d6-0bfa-a63b-5f1c-dbbf045e79de
  PCI BusID : PCI:1@48:0:0

  Number of Display Devices: 0

Create an appropriate xorg.conf file for headless operation:

sudo nvidia-xconfig -a --allow-empty-initial-configuration --use-display-device=None \
--virtual=1920x1200 --busid PCI:1@48:0:0

Replace {busid} with the bus ID you obtained in Step 1. Leave out --use-display-device=None if the GPU is headless, i.e. if it has no display outputs.

This will generate the following /etc/X11/xorg.conf file:

cat xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 418.67


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

Section "Files"
EndSection

Section "InputDevice"

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

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

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

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Tesla V100-PCIE-16GB"
    BusID          "PCI:1@48:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "UseDisplayDevice" "None"
    SubSection     "Display"
        Virtual     1920 1200
        Depth       24
    EndSubSection
EndSection