Monitor powered by Nvidia GPU only shows wallpaper

I have a Dell R720 home lab running Ubuntu 22.04. It is equipped with the following GPUs:

$ nvidia-smi -L
GPU 0: Tesla P40 (UUID: GPU-ac45b921-3664-d911-5dd7-e5b8d49551c3)
GPU 1: Tesla P40 (UUID: GPU-11fdf0e4-2c22-162a-a65e-f594c9a908ae)
GPU 2: NVIDIA GeForce GT 710 (UUID: GPU-6fabed11-9de9-cd98-3220-658b45c1e7e8)

I want to use the two P40s as CUDA compute cards and have the GT 710 run the desktop environment, but I have trouble setting up Xorg and/or Gnome. In particular, the GT 710 only outputs a wallpaper on the monitor, but I cannot see anything else: no mouse pointer or login window, and it doesn’t respond to mouse movement or keystrokes. Like this:

enter image description here

How can I get a usable desktop environment?


The output of nvidia-smi

Tue Feb  6 17:32:33 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.223.02   Driver Version: 470.223.02   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla P40           On   | 00000000:04:00.0 Off |                  Off |
| N/A   28C    P8     9W / 250W |     22MiB / 24451MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  Tesla P40           On   | 00000000:42:00.0 Off |                  Off |
| N/A   29C    P8     9W / 250W |     38MiB / 24451MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   2  NVIDIA GeForce ...  On   | 00000000:44:00.0 N/A |                  N/A |
| 50%   31C    P8    N/A /  N/A |    424MiB /  2002MiB |     N/A      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A     97708      G   /usr/lib/xorg/Xorg                 22MiB |
|    1   N/A  N/A     97708      G   /usr/lib/xorg/Xorg                 38MiB |
+-----------------------------------------------------------------------------+

The content in /etc/X11/xorg.conf

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 470.223.02


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "AutoAddGPU" "off"
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"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Tesla P40"
    BusID          "PCI:4:0:0"
    Option         "Coolbits" "28"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Tesla P40"
    BusID          "PCI:66:0:0"
    Option         "Coolbits" "28"
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GT 710"
    BusID          "PCI:68:0:0"
    Option         "Coolbits" "28"
EndSection

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

I cannot paste the content in ~/.local/share/xorg/Xorg.0.log here because a post is limited to 30000 characters, but you can see it on Pastebin.

Asked By: nalzok

||

Remove the unnecessary and confusing inclusion of the non-graphical compute Tesla P40s in /etc/X11/xorg.conf:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 470.223.02
# Edited by https://askubuntu.com/questions/1502694


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "AutoAddGPU" "off"
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"
    Option         "DPMS"
EndSection

# Removed: 2 devices of Tesla P40 type

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GT 710"
    BusID          "PCI:68:0:0"
    Option         "Coolbits" "28"
EndSection

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

CUDA GPUs can work headlessly, so they do not need to be exposed to X11. Your compute workload will talk to the Teslas directly, and not need to go through X11 on modern Linux. By removing the Teslas from the Xorg config, we keep X11 focused on the GT 710 used for display, and leave less room for things to go wrong.

Answered By: Daniel T
Categories: Answers Tags: , , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.