我通过 ssh 连接到 Ubuntu 18.04,在那里我手动安装了 Cuda 11.1 和 nvidia-driver-455。从我的主机(macOS)我打开终端,启动 ssh 会话,然后运行ncu-ui
以打开 Nvidia Nsight Compute。该程序在我的主机上打开,但我无法单击它,终端显示以下错误:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
我得到以下信息。万一出现这种情况,问题似乎很普遍,与特定软件没有严格关系。我尝试了网上不同的解决方案,但都不起作用。
还有一些细节。
跑步LIBGL_DEBUG=verbose ncu-ui
:
libGL: MESA-LOADER: dlopen(/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so)
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/ubuntu/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/ubuntu/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
跑步sudo ldconfig -p | grep -i gl.so
:
libwayland-egl.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1
libwayland-egl.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libwayland-egl.so
libQt5OpenGL.so.5 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5
libQt5OpenGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so
libOpenGL.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libOpenGL.so.0
libOpenGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libOpenGL.so
libGL.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so.1
libGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so
libEGL.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libEGL.so.1
libEGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libEGL.so
跑步sudo find / -name libGL.so.1
:
/usr/lib/x86_64-linux-gnu/libGL.so.1
/opt/nvidia/nsight-systems/2020.3.4/host-linux-x64/Mesa/libGL.so.1
/var/lib/docker/overlay2/58a078699aab58f5c79a9ae10cc1e6535ddf6a8804da85cb53fb357e11aee1f4/merged/usr/lib/x86_64-linux-gnu/libGL.so.1
/var/lib/docker/overlay2/13ee7966eb1a1dec6fc73393791f85321aded603f5badb226ac2fa8f3d3de8e9/diff/usr/lib/x86_64-linux-gnu/libGL.so.1
跑步nvcc --version
:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Oct_12_20:09:46_PDT_2020
Cuda compilation tools, release 11.1, V11.1.105
Build cuda_11.1.TC455_06.29190527_0
跑步nvidia-smi
:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.45.01 Driver Version: 455.45.01 CUDA Version: 11.1 |
|-------------------------------+----------------------+----------------------+
| 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 T4 On | 00000000:00:1E.0 Off | 0 |
| N/A 44C P8 10W / 70W | 0MiB / 15109MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
我该如何解决?
注意:我需要保留完全相同的 nvidia 驱动程序和 cuda 版本
答案1
该问题可能与驱动程序无关,而与我的 Mac 上的 XQuartz 有关。
在我的 Mac 上运行此命令使得 XQuartz 窗口可点击:
defaults write org.x.x11 wm_click_through -bool true
来源:http://exoplanets.astro.yale.edu/tutorials/macos/mouse_clicks.php
另外,不确定这是否相关,但我安装了 gnome 和 vnc。因此,如果您遇到同样的问题,请尝试以下命令。我真的不认为您需要 vnc,但为了完整起见,因为我还没有尝试过,所以我将写下我在 Mac 上运行的所有命令:
sudo apt install -y xserver-xorg-core
sudo apt install -y tigervnc-standalone-server tigervnc-xorg-extension tigervnc-viewer
sudo apt install -y ubuntu-gnome-desktop