在 CentOS 中,可以使用以下方法来查看显卡信息:
1、使用 lspci
命令
lscpi
命令可以列出所有连接到主板上的 PCI 设备。您可以通过此命令来查看系统中安装的显卡类型和型号。
lspci | grep VGA
这会输出已安装的显卡信息,例如:
02:00.0 VGA compatible controller: NVIDIA Corporation Device 2482 (rev a1)
05:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 30)
83:00.0 VGA compatible controller: NVIDIA Corporation Device 2482 (rev a1)
2、使用 lshw
命令
lshw
命令可以显示系统硬件的详细信息,包括显卡型号和供应商等。请确保已经安装了 lshw
工具。
lshw -numeric -C display
#### 这会输出显卡详细信息,其中[10DE:2482]为PCI信息,可以根据此编号查询显卡型号:
*-display
description: VGA compatible controller
product: NVIDIA Corporation [10DE:2482]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:02:00.0
logical name: /dev/fb0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom fb
configuration: depth=32 driver=nvidia latency=0 mode=1920x1080 visual=truecolor xres=1920 yres=1080
resources: iomemory:383f0-383ef iomemory:383f0-383ef irq:26 memory:d1000000-d1ffffff memory:383fe0000000-383fefffffff memory:383ff0000000-383ff1ffffff ioport:6000(size=128) memory:d2000000-d207ffff
3、使用 nvidia-smi
命令
如果您安装了 NVIDIA 显卡和驱动程序,则可以使用 nvidia-smi
命令来查看显卡的状态、温度、内存使用等信息。
nvidia-smi
这会输出当前 NVIDIA 显卡的详细信息。
4、查询显卡型号
登录以下地址查看,如下: http://pci-ids.ucw.cz/mods/PC/10de?action=help?help=pci
以上可得知具体显卡型号为: GA104 [GeForce RTX 3070Ti ]
5、下载官方显卡驱动
前往显卡驱动 ,根据自己的系统和显卡下载对应的显卡驱动,下载下来是一个.run文件
6、安装驱动
如果有安装旧的驱动程序,请先卸载:
sudo /usr/bin/nvidia-uninstall
sudo chmod a+x NVIDIA-Linux-x86_64-525.116.04.run
sudo ./NVIDIA-Linux-x86_64-525.116.04.run -no-x-check -no-nouveau-check -no-opengl-files