Linux Ubuntu查看正在使用的显卡:运行命令 lspci

您所在的位置:网站首页 ubuntu显卡怎么看 Linux Ubuntu查看正在使用的显卡:运行命令 lspci

Linux Ubuntu查看正在使用的显卡:运行命令 lspci

2024-06-28 20:04| 来源: 网络整理| 查看: 265

在这里插入图片描述

查看显卡

在Pop!_OS中,可以通过以下命令来查看当前正在使用的显卡:

lspci -nnk | grep -i vga -A3 | grep 'in use'

这个命令会列出所有的VGA设备,并显示当前正在使用的设备。输出的结果可能类似于:

Kernel driver in use: nvidia

这表示当前正在使用的是NVIDIA显卡驱动程序。如果输出为空,则表示当前系统没有启用任何显卡驱动程序。

另外,如果你使用的是双显卡笔记本电脑,还可以通过以下命令来查看当前正在使用的显卡:

sudo lshw -c display

这个命令会列出所有的显卡设备,并显示当前正在使用的设备。输出的结果可能类似于:

*-display description: VGA compatible controller product: NVIDIA Corporation vendor: NVIDIA Corporation physical id: 0 bus info: pci@0000:01:00.0 version: a1 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress vga_controller bus_master cap_list rom configuration: driver=nvidia latency=0 resources: irq:143 memory:dc000000-dcffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff ioport:3000(size=128) memory:dd000000-dd07ffff *-display description: VGA compatible controller product: Intel Corporation vendor: Intel Corporation physical id: 2 bus info: pci@0000:00:02.0 version: 00 width: 64 bits clock: 33MHz capabilities: pciexpress msi pm vga_controller bus_master cap_list rom configuration: driver=i915 latency=0 resources: irq:142 memory:db000000-dbffffff memory:70000000-7fffffff ioport:4000(size=64) memory:c0000-dffff

这个输出结果显示了两个显卡设备,其中一个是NVIDIA显卡,另一个是Intel显卡,同时还显示了当前正在使用的设备及其驱动程序。

结果说明

如果在运行命令 lspci -nnk | grep -i vga -A3 | grep 'in use' 后出现了两个结果,比如:

Kernel driver in use: i915 Kernel driver in use: nvidia

那么说明你的系统中有两个显卡设备,一个是Intel集成显卡(i915),另一个是NVIDIA独立显卡(nvidia),并且它们都在使用中。

在这种情况下,系统可能会自动根据需要切换显卡,比如在需要进行图形加速的任务时切换到独立显卡,而在不需要图形加速的任务时切换到集成显卡,以达到节能和性能平衡的目的。

如果你想进一步了解系统中的显卡设备情况,可以执行命令 lspci -nnk | grep -i vga -A3,这个命令会列出所有的显卡设备的详细信息,包括设备名称、厂商、型号、驱动程序等,并且还会显示当前使用的设备。根据这些信息,你可以进一步了解你的系统中的显卡设备情况,以及它们的状态和驱动程序信息。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3