Nvidia 显卡在 ubuntu 22.04 中被识别为 3D 控制器

Nvidia 显卡在 ubuntu 22.04 中被识别为 3D 控制器

我最近通过 dist-upgrade 将我的机器从 20.4 升级到 22.04.01,我遇到的唯一问题是 Nvidia 显卡未使用,Ubuntu 将其识别为 3D 控制器而不是 VGA 控制器。驱动程序已安装,设置偶数prime-select nvidia,我删除了驱动程序并安装了它,我尝试通过 Wayland 使用 X11,但完全没有成功。

感谢您的帮助

>> lspci | egrep -i "vga|display|3d" 

00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 850M] (rev a2)
>> lshiw -c video 
 *-display                 
       description: 3D controller
       product: GM107M [GeForce GTX 850M]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a2
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:48 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff
  *-display
       description: VGA compatible controller
       product: 4th Gen Core Processor Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 06
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=2560,1080
       resources: irq:46 memory:f7400000-f77fffff memory:d0000000-dfffffff ioport:f000(size=64) memory:c0000-dffff
>> ubuntu-drivers devices
modalias : pci:v000010DEd00001391sv00001043sd000011CDbc03sc02i00
vendor   : NVIDIA Corporation
model    : GM107M [GeForce GTX 850M]
driver   : nvidia-driver-515 - distro non-free recommended
...

Nvidia 系统管理还显示 NVIDIA VGA 未被使用:

>> nvida-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.01    Driver Version: 515.65.01    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 |
| N/A   46C    P8    N/A /  N/A |      1MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      3485      G   /usr/bin/gnome-shell                1MiB |
+-----------------------------------------------------------------------------+

相关内容