如何在Linux上检查显卡如何在Linux上检查显卡如何在Linux上检查显卡如何在Linux上检查显卡
  • 文章
  • 正则表达式
    • 工具
  • 登录
找到的结果: {phrase} (显示: {results_count} 共: {results_count_total})
显示: {results_count} 共: {results_count_total}

加载更多搜索结果...

搜索范围
模糊匹配
搜索标题
搜索内容
发表 admin at 2025年2月28日
类别
  • 未分类
标签

如何在Linux上检查显卡

Linux 和 Steam 等 Linux 原生游戏平台的日益普及正在将主流游戏带入 Linux。如果您是铁杆游戏玩家,您可能会非常关注系统上显卡的性能。你们中的许多人可能愿意花几百美元购买高端显卡,以享受最大的游戏体验。

在本教程中,我将描述如何查找有关 Linux 系统中使用的显卡和视频驱动程序的信息。

方法一:lspci

确定您拥有的显卡的第一种方法是使用 lspci,它是一个用于显示所有 PCI 设备的命令行工具。

在使用lspci之前,最好将 PCI ID 列表更新为最新版本,如下所示。


$ sudo update-pciids

然后使用以下命令显示视频卡的供应商/型号名称。


$ lspci | grep -E "VGA|3D"

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)

一旦识别出您的卡的 PCI 域(例如上例中的 00:02.0),您可以使用以下命令获取有关您的卡的更多详细信息。示例输出显示显卡具有 256MB 视频 RAM。


$ sudo lspci -v -s 00:02.0

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
  Subsystem: Dell Device 0569
 Flags: bus master, fast devsel, latency 0, IRQ 45
   Memory at b0000000 (64-bit, prefetchable) [size=256M]
  Memory at c0000000 (64-bit, non-prefetchable) [size=4M]
 I/O ports at 3000 [size=64]
 Expansion ROM at  [disabled]
    Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
  Capabilities: [d0] Power Management version 2
   Capabilities: [a4] PCI Advanced Features
    Kernel driver in use: i915
  Kernel modules: i915

方法二:lshw

在 Linux 上检测显卡的另一种方法是通过 lshw 命令。


$ sudo lshw -c video

  *-display               
       description: VGA compatible controller
       product: 3rd Gen Core processor Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: [email :00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:45 memory:c0000000-c03fffff memory:b0000000-bfffffff ioport:3000(size=64)

方法三:hardinfo

您还可以通过名为 hardinfo 的 GUI 程序获取有关显卡的信息。

要在 Ubuntu、Debian 或 Linux Mint 桌面上安装 hardinfo:


$ sudo apt-get install hardinfo

要在基于 RedHat 的系统上安装 hardinfo,请使用 yum 命令。请注意,在 CentOS 或 RHEL 上,您首先需要在运行 yum 之前启用 Repoforge 存储库。


$ sudo yum install hardinfo

安装 hardinfo 后,按如下方式启动它。


$ hardinfo

然后导航至设备 -> PCI 设备 -> VGA 兼容控制器 查看显卡信息。

查找 Linux 上使用的视频驱动程序

要识别所使用的视频驱动程序的名称,您可以使用上面描述的lshw命令。


$ sudo lshw -c video | grep configuration

       configuration: driver=i915 latency=0

视频驱动程序的名称显示在 driver= 中。然后您可以按如下方式检查视频驱动程序的详细信息。


$ modinfo i915

filename:       /lib/modules/3.5.0-18-generic/kernel/drivers/gpu/drm/i915/i915.ko
license:        GPL and additional rights
description:    Intel Graphics
author:         Tungsten Graphics, Inc.
license:        GPL and additional rights
. . . . .
©2015-2025 艾丽卡 support@alaica.com