采用 Nvidia GPU 的显示器仅显示壁纸

采用 Nvidia GPU 的显示器仅显示壁纸

我有一台运行 Ubuntu 22.04 的 Dell R720 家庭实验室。它配备了以下 GPU:

$ 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)

我想使用两台 P40 作为 CUDA 计算卡,并让 GT 710 运行桌面环境,但我在设置 Xorg 和/或 Gnome 时遇到了麻烦。特别是,GT 710 仅在显示器上输出壁纸,但我看不到其他任何东西:没有鼠标指针或登录窗口,并且它不响应鼠标移动或击键。像这样:

在此处输入图片描述

如何获得可用的桌面环境?


输出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 |
+-----------------------------------------------------------------------------+

内容/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

~/.local/share/xorg/Xorg.0.log由于帖子限制为 30000 个字符,我无法在此处粘贴内容,但你可以看到它在 Pastebin 上

答案1

删除不必要且令人困惑的非图形计算 Tesla P40s /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 GPU 可以无头工作,因此它们不需要暴露给 X11。您的计算工作负载将直接与 Tesla 通信,而无需通过现代 Linux 上的 X11。通过从 Xorg 配置中删除 Tesla,我们让 X11 专注于用于显示的 GT 710,从而减少出错的可能性。

相关内容