0

I'm working on a Ubuntu 18.04 (headless) workstation that features two GPUs: an integrated one and a NVIDIA TitanX.

03:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. Integrated Matrox G200eW3 Graphics Controller (rev 04)
3b:00.0 VGA compatible controller: NVIDIA Corporation GP102 [TITAN Xp] (rev a1)

What I would like to achieve is to use the integrated GPU as main display that would display on a physical monitor when attached, and the NVIDIA GPUs to run CUDA jobs and (heavy) OpenGL tasks (for example Paraview pvserver) on a virtual display, if "virtual" is the right word.

CUDA is working correctly:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.50       Driver Version: 430.50       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  TITAN Xp            On   | 00000000:3B:00.0 Off |                  N/A |
| 32%   54C    P2   111W / 250W |   1462MiB / 12196MiB |     60%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0     20686      C   python                                       739MiB |
|    0     20704      C   python                                       719MiB |
+-----------------------------------------------------------------------------+

My current setup is this:

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

Section "Files"
EndSection

Section "ServerFlags"
    Option         "IndirectGLX" "on"
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"
EndSection

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

Section "ServerFlags"
    Option "IndirectGLX" "on"
EndSection

The problem with this is if I start the X server (startx),

root     40626  0.0  0.0  22624  1328 pts/1    S+   18:40   0:00 xinit /etc/X11/xinit/xinitrc -- /etc/X11/xinit/xserverrc :0 -auth /tmp/serverauth.PZEr2WCmMR
root     40627  4.2  0.0 1551516 60208 tty3    S<sl+ 18:40   0:02 /usr/lib/xorg/Xorg -nolisten tcp :0 -auth /tmp/serverauth.PZEr2WCmMR

I have only one display :0, and apparently all the OpenGL tasks are run by the software (i.e. mesa):

DISPLAY=:0 glxinfo | grep vendor

server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: VMware, Inc.

Now if I change the xorg.conf like this:

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:59:0:0"
    Option         "AllowEmptyInitialConfiguration"
EndSection

I have OpenGL running on the NVIDIA card:

 DISPLAY=:0 glxinfo | grep vendor

server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

Now, what I would like to achieve is keeping the Matrox adapter as the only GPU responsible to show the screen on a physical monitor, and, at will, for specific heavy OpenGL tasks, specify another virtual DISPLAY in order to get full performances.

$> DISPLAY=:0 glxinfo | grep vendor

server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: VMware, Inc.

$> DISPLAY=:1 glxinfo | grep vendor

server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

How should the xorg.conf file look like for this? Is this the better way of configuring this? Or I can do better exploiting libglvnd?

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.