星辰
星辰
Published on 2023-02-20 / 19 Visits
0
0

在 Linux 上精确查看显卡型号

1 默认情况

在 Linux 上查看显卡型号可以使用 lspci 命令,但是默认情况下可能不会显示显卡具体型号,默认情况下显示可能如下所示:

[root@astralor ~]# lspci | grep -i nvidia
3d:00.0 3D controller: NVIDIA Corporation Device 20f3 (rev a1)
42:00.0 3D controller: NVIDIA Corporation Device 20f3 (rev a1)
61:00.0 3D controller: NVIDIA Corporation Device 20f3 (rev a1)
67:00.0 3D controller: NVIDIA Corporation Device 20f3 (rev a1)
ad:00.0 3D controller: NVIDIA Corporation Device 20f3 (rev a1)
b1:00.0 3D controller: NVIDIA Corporation Device 20f3 (rev a1)
d0:00.0 3D controller: NVIDIA Corporation Device 20f3 (rev a1)
d3:00.0 3D controller: NVIDIA Corporation Device 20f3 (rev a1)

2 查看具体型号

2.1 更新本地 pci id 信息

可以更新本地 pciids 信息,然后再使用 lspci 查看显卡信息,就可以看到具体型号:


[root@astralor ~]# update-pciids

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  301k  100  301k    0     0   125k      0  0:00:02  0:00:02 --:--:--  125k
Done.
[root@astralor ~]# lspci | grep -i nvidia
3d:00.0 3D controller: NVIDIA Corporation GA100 [A800-SXM4-80GB] (rev a1)
42:00.0 3D controller: NVIDIA Corporation GA100 [A800-SXM4-80GB] (rev a1)
61:00.0 3D controller: NVIDIA Corporation GA100 [A800-SXM4-80GB] (rev a1)
67:00.0 3D controller: NVIDIA Corporation GA100 [A800-SXM4-80GB] (rev a1)
ad:00.0 3D controller: NVIDIA Corporation GA100 [A800-SXM4-80GB] (rev a1)
b1:00.0 3D controller: NVIDIA Corporation GA100 [A800-SXM4-80GB] (rev a1)
d0:00.0 3D controller: NVIDIA Corporation GA100 [A800-SXM4-80GB] (rev a1)
d3:00.0 3D controller: NVIDIA Corporation GA100 [A800-SXM4-80GB] (rev a1)

2.2 在线查询型号 ID

访问下方网站,可以在线查询显卡型号信息(本文以英伟达显卡 vendor_id=10de 为例):

PCI devices

本文的上方获取的显卡 ID 为 20f3,在输入框中输入该 ID,搜索即可确认型号:

image.png

image.png


Comment