![kuubuntu 23.10,glxinfo opengl render 不显示 nvidia](https://linux22.com/image/1197941/kuubuntu%2023.10%EF%BC%8Cglxinfo%20opengl%20render%20%E4%B8%8D%E6%98%BE%E7%A4%BA%20nvidia.png)
我有两张显卡,显示器连接到 nvidia 卡上的 HDMI。我注意到 UI 很慢,我怀疑这有关系吗?
我正在使用 wayland,lspci 显示使用了 nvidia 驱动程序。
(base) ➜ ~ echo $XDG_SESSION_TYPE
wayland
(base) ➜ ~ uname -a
Linux x11 6.5.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 7 01:35:40 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
(base) ➜ ~ lspci -knn | grep -EA2 'VGA|3D'
06:00.0 VGA compatible controller [0300]: ASPEED Technology, Inc. ASPEED Graphics Family [1a03:2000] (rev 30)
Subsystem: Super Micro Computer Inc ASPEED Graphics Family [15d9:0728]
Kernel driver in use: ast
--
81:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti Rev. A] [10de:1e07] (rev a1)
Subsystem: Shenzhen Colorful Yugong Technology and Development Co. TU102 [GeForce RTX 2080 Ti Rev. A] [7377:120b]
Kernel driver in use: nvidia
nvidia 驱动程序已安装。
(base) ➜ ~ nvidia-smi
Mon Oct 16 01:06:16 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.113.01 Driver Version: 535.113.01 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| 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 RTX 2080 Ti Off | 00000000:81:00.0 On | N/A |
| 0% 47C P8 22W / 250W | 54MiB / 11264MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 1548 G /usr/lib/xorg/Xorg 20MiB |
+---------------------------------------------------------------------------------------+
但是,glxinfo 显示 llvmpipe。
(base) ➜ ~ glxinfo | grep "OpenGL renderer"
OpenGL renderer string: llvmpipe (LLVM 15.0.7, 256 bits)
答案1
经过与 chatgpt 几轮沟通后,问题得到解决。
我需要创建一个/etc/X11/xorg.conf.d/10-nvidia.conf
包含内容的文件
Section "Device"
Identifier "Nvidia Card"
Driver "nvidia"
BusID "PCI:129:0:0" # Replace with your actual PCI BusID
EndSection
这里要注意的一点是 PCI 总线 ID 应该是十进制的,但 lspci 将显示十六进制数。例如,在我的主机上,lspci 输出为 81。hex(81) == dec(129)
81:00.0 VGA compatible controller: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti Rev. A] (rev a1)
最简单的方法可能就是使用生成的值nvidia-xconfig
。
我还是不太明白为什么nvidia-xconfig
不这么做。
答案2
通过安装“libnvidia-egl-wayland1”解决
sudo add-apt-repository ppa:mir-team/dev
sudo apt-get update
sudo apt-get install libnvidia-egl-wayland1
要恢复此更改,请使用以下命令:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:mir-team/dev
操作系统:Ubuntu 23.10 x86_64, Gnome 版本:45.1, 窗口系统:韦兰, 内核版本:内核:6.5.0-14-通用, 图形处理器: NVIDIA Quadro P3200 移动版
inxi -Gx |grep API
API: OpenGL v: 4.6.0 NVIDIA 535.129.03 renderer: Quadro P3200 with Max-Q