我在一台新电脑上安装了 Ubuntu 22.04,但无法让 GUI 模式运行。
- 看来显卡工作正常。我甚至通过在 GPU 上执行一系列矩阵乘法来确认 CUDA 的工作原理:
nvidia-smi
Wed Oct 19 08:23:13 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.76 Driver Version: 515.76 CUDA Version: 11.7 |
|-------------------------------+----------------------+----------------------+
| 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 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| 0% 29C P8 14W / 170W | 3176MiB / 12288MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 2169 C ...lia-1.8.2+0.x64/bin/julia 3173MiB |
+-----------------------------------------------------------------------------+
- 我尝试了 gdm3、lightdm 和 sddm。这三种方法都失败了:
systemctl status display-manager.service
● gdm.service - GNOME Display Manager
Loaded: loaded (/lib/systemd/system/gdm.service; static)
Active: active (running) since Wed 2022-10-19 08:16:37 CEST; 3min 4s ago
Process: 1303 ExecStartPre=/usr/share/gdm/generate-config (code=exited, status=0/SUCCESS)
Main PID: 1316 (gdm3)
Tasks: 3 (limit: 76064)
Memory: 5.2M
CPU: 2.179s
CGroup: /system.slice/gdm.service
└─1316 /usr/sbin/gdm3
Okt 19 08:16:51 janpc gdm3[1316]: Gdm: GdmDisplay: Session never registered, failing
Okt 19 08:16:51 janpc gdm3[1316]: Gdm: Child process -1951 was already dead.
Okt 19 08:16:51 janpc gdm-launch-environment][1993]: pam_unix(gdm-launch-environment:session): session opened for user gdm(uid=127) by (uid=0)
Okt 19 08:16:51 janpc gdm-launch-environment][1993]: pam_unix(gdm-launch-environment:session): session closed for user gdm
Okt 19 08:16:51 janpc gdm3[1316]: Gdm: GdmDisplay: Session never registered, failing
Okt 19 08:16:51 janpc gdm-launch-environment][1993]: GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Okt 19 08:16:51 janpc gdm3[1316]: Gdm: GdmLocalDisplayFactory: maximum number of X display failures reached: check X server log for errors
Okt 19 08:16:51 janpc gdm3[1316]: Gdm: Child process -2036 was already dead.
Okt 19 08:16:51 janpc gdm3[1316]: Gdm: GdmDisplay: Session never registered, failing
Okt 19 08:16:51 janpc gdm3[1316]: Gdm: Child process -2036 was already dead.
× lightdm.service - Light Display Manager
Loaded: loaded (/lib/systemd/system/lightdm.service; indirect; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-10-19 08:21:22 CEST; 22s ago
Docs: man:lightdm(1)
Process: 1550 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, status=0/SUCCESS)
Process: 1553 ExecStart=/usr/sbin/lightdm (code=exited, status=1/FAILURE)
Main PID: 1553 (code=exited, status=1/FAILURE)
CPU: 205ms
Okt 19 08:21:22 janpc systemd[1]: lightdm.service: Scheduled restart job, restart counter is at 5.
Okt 19 08:21:22 janpc systemd[1]: Stopped Light Display Manager.
Okt 19 08:21:22 janpc systemd[1]: lightdm.service: Start request repeated too quickly.
Okt 19 08:21:22 janpc systemd[1]: lightdm.service: Failed with result 'exit-code'.
Okt 19 08:21:22 janpc systemd[1]: Failed to start Light Display Manager.
systemctl status display-manager.service
● sddm.service - Simple Desktop Display Manager
Loaded: loaded (/lib/systemd/system/sddm.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-10-19 08:00:28 CEST; 13min ago
Docs: man:sddm(1)
man:sddm.conf(5)
Process: 1236 ExecStartPre=/bin/sh -c [ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/bin/sddm" ] (code=exited, status=0/SUCCESS)
Main PID: 1241 (sddm)
Tasks: 2 (limit: 76064)
Memory: 18.8M
CPU: 127ms
CGroup: /system.slice/sddm.service
└─1241 /usr/bin/sddm
Okt 19 08:00:28 janpc sddm[1241]: Initializing...
Okt 19 08:00:28 janpc sddm[1241]: Starting...
Okt 19 08:00:28 janpc sddm[1241]: Logind interface found
Okt 19 08:00:28 janpc sddm[1241]: Adding new display on vt 1 ...
Okt 19 08:00:28 janpc sddm[1241]: Loading theme configuration from ""
Okt 19 08:00:28 janpc sddm[1241]: Display server starting...
Okt 19 08:00:28 janpc sddm[1241]: Adding cookie to "/var/run/sddm/{3e773afd-3a04-444e-8e05-140658ba459a}"
Okt 19 08:00:28 janpc sddm[1241]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{3e773afd-3a04-444e-8e05-140658ba459a} -background none -noreset -displayfd 17 -seat seat0 vt1
Okt 19 08:00:28 janpc sddm[1241]: Failed to read display number from pipe
Okt 19 08:00:28 janpc sddm[1241]: Could not start Display server on vt 1
- 有任何想法吗?