This guide shows how you can identify PCI Driver Chipset Information on Linux. Often users troll different forums and blogs to find out they can identify which driver their PCI or USB device is using. This guide applies to all possible scenarios. After reading and following this guide you will be able to identify the followings:
Examples of PCI devices
- Communication controllers
- Network devices
- High Definition Audio Controller
- VGA or graphics cards
- Memory (RAM)
- Thermal Control Registers
- Ethernet devices
- DVD R/W devices
- Blueray devices
- CDROM devices
In short, any device drivers can be identified that is using plugged into a PCI slot.
This guide will work for any Linux distributions, namely –
- Linux Mint
- Debian GNU/Linux
- Mageia / Mandriva
- openSUSE / SUSE Linux Enterprise
- Arch Linux
- CentOS / Red Hat Enterprise Linux
- Slackware Linux
- Puppy Linux
- Kali Linux (my distro ;) )
As usual, I will start with basics first. next few paragraphs are slightly boring but if you really want to understand, you might as well read them, otherwise just skip to the technical bits. Table of contents above.
So let’s start with the basics .. what is a PCI device…
What is Peripheral Component Interconnect or PCI?
Conventional PCI, often shortened to PCI, is a local computer bus for attaching hardware devices in a computer. PCI is an initialism of Peripheral Component Interconnect and is part of the PCI Local Bus standard. The PCI bus supports the functions found on a processor bus but in a standardized format that is independent of any particular processor’s native bus. Devices connected to the PCI bus appear to a bus master to be connected directly to its own bus and are assigned addresses in the processor’s address space.It is a parallel bus, synchronous to a single bus clock.
Attached devices can take either the form of an integrated circuit fitted onto the motherboard itself (called a planar device in the PCI specification) or an expansion card that fits into a slot. The PCI Local Bus was first implemented in IBM PC compatibles, where it displaced the combination of several slow ISA slots and one fast VESA Local Bus slot as the bus configuration. It has subsequently been adopted for other computer types. Typical PCI cards used in PCs include: network cards, sound cards, modems, extra ports such as USB or serial, TV tuner cards and disk controllers. PCI video cards replaced ISA and VESA cards until growing bandwidth requirements outgrew the capabilities of PCI. The preferred interface for video cards then became AGP, itself a superset of conventional PCI, before giving way to PCI Express.
The first version of conventional PCI found in consumer desktop computers was a 32-bit bus using a 33 MHz bus clock and 5 V signalling, although the PCI 1.0 standard provided for a 64-bit variant as well. These have one locating notch in the card. Version 2.0 of the PCI standard introduced 3.3 V slots, physically distinguished by a flipped physical connector to preventing accidental insertion of 5 V cards. Universal cards, which can operate on either voltage, have two notches. Version 2.1 of the PCI standard introduced optional 66 MHz operation. A server-oriented variant of conventional PCI, called PCI-X (PCI Extended) operated at frequencies up to 133 MHz for PCI-X 1.0 and up to 533 MHz for PCI-X 2.0. An internal connector for laptop cards, called Mini PCI, was introduced in version 2.2 of the PCI specification. The PCI bus was also adopted for an external laptop connector standard—the CardBus. The first PCI specification was developed by Intel, but subsequent development of the standard became the responsibility of the PCI Special Interest Group (PCI-SIG).
Conventional PCI and PCI-X are sometimes called Parallel PCI in order to distinguish them technologically from their more recent successor PCI Express, which adopted a serial, lane-based architecture. Conventional PCI’s heyday in the desktop computer market was approximately the decade 1995-2005. PCI and PCI-X have become obsolete for most purposes, however, they are still common on modern desktops for the purposes of backwards compatibility and the low relative cost to produce. Many kinds of devices previously available on PCI expansion cards are now commonly integrated onto motherboards or available in universal serial bus and PCI Express versions. Source: Wikipedia
Question: How do I identify PCI driver for anything in Linux?
This is a million dollar question, just how often you see a similar post in forums and blogs with vague and unreliable answers? I will try my best to answer anything and everything in this post about all devices and their drivers in here. So, stay tuned as this is going to a long a** post.
Identify PCI Driver Chipset Information in Linux
lspci which is a standard command in all Linux distribution will show you the PCI devices on your system.
LS = List
PCI = Peripheral Component Interconnect devices
Step 1: List all PCI devices – Identify PCI driver
This will give you a sample output like the following:
root@kali:~# lspci (some output removed) 00:00.0 Host bridge: Intel Corporation Core Processor DMI (rev 11) 00:03.0 PCI bridge: Intel Corporation Core Processor PCI Express Root Port 1 (rev 11) 00:19.0 Ethernet controller: Intel Corporation 82578DM Gigabit Network Connection (rev 06) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a6) 00:1f.0 ISA bridge: Intel Corporation 5 Series Chipset LPC Interface Controller (rev 06) 00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06) 01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2) root@kali:~#
Now you can see the device names, types and some funky numbers at the front. (highlighted in bold-red).
Step 2: Get verbose output for selected device – Identify PCI driver
Let’s say we want to identify the driver used my Linux kernel for Ethernet controller (which is the wired port on my motherboard).
00:19.0 Ethernet controller: Intel Corporation 82578DM Gigabit Network Connection (rev 06)
Copy the number’s at the front i.e. 00:19.0 and use it with lspci command to find more info
root@kali:~# lspci -vv -s 00:19.0
This will give you an output like below:
root@kali:~# lspci -vv -s 00:19.0 00:19.0 Ethernet controller: Intel Corporation 82578DM Gigabit Network Connection (rev 06) Subsystem: Acer Incorporated [ALI] Device 8000 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin A routed to IRQ 46 Region 0: Memory at faec0000 (32-bit, non-prefetchable) [size=128K] Region 1: Memory at faefa000 (32-bit, non-prefetchable) [size=4K] Region 2: I/O ports at d000 [size=32] Capabilities: [c8] Power Management version 2 Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=1 PME- Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Address: 00000000fee0f00c Data: 4192 Capabilities: [e0] PCI Advanced Features AFCap: TP+ FLR+ AFCtrl: FLR- AFStatus: TP- Kernel driver in use: e1000e
So the Kernel is using a driver named e1000e.
Step 3: Get driver info for selected device – Identify PCI driver
Now to get the full details of the driver you issue the following command:
root@kali:~# modinfo e1000e
This will list everything and anything for that driver including the driver file.
root@kali:~# modinfo e1000e filename: /lib/modules/3.14-kali1-amd64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko version: 2.3.2-k license: GPL description: Intel(R) PRO/1000 Network Driver author: Intel Corporation, <firstname.lastname@example.org> srcversion: 875CF610ED4160DBA055BB2 alias: pci:v00008086d000015A3sv*sd*bc*sc*i* alias: pci:v00008086d000015A2sv*sd*bc*sc*i* alias: pci:v00008086d000015A1sv*sd*bc*sc*i* alias: pci:v00008086d0000105Esv*sd*bc*sc*i* depends: ptp intree: Y vermagic: 3.14-kali1-amd64 SMP mod_unload modversions parm: debug:Debug level (0=none,...,16=all) (int) parm: copybreak:Maximum size of packet that is copied to a new buffer on receive (uint) parm: TxIntDelay:Transmit Interrupt Delay (array of int) parm: TxAbsIntDelay:Transmit Absolute Interrupt Delay (array of int) parm: RxIntDelay:Receive Interrupt Delay (array of int) parm: RxAbsIntDelay:Receive Absolute Interrupt Delay (array of int) parm: InterruptThrottleRate:Interrupt Throttling Rate (array of int) parm: IntMode:Interrupt Mode (array of int) parm: SmartPowerDownEnable:Enable PHY smart power down (array of int) parm: KumeranLockLoss:Enable Kumeran lock loss workaround (array of int) parm: WriteProtectNVM:Write-protect NVM [WARNING: disabling this can lead to corrupted NVM] (array of int) parm: CrcStripping:Enable CRC Stripping, disable if your BMC needs the CRC (array of int)
So the driver file used for this particular Network Controller is:
So now you know the device name, details, driver used, vendor, publisher, dependencies, license and Author details for the selected PCI device.
Step 4: NVIDIA – Identify PCI driver dilemma
Interestingly, NVIDIA driver (I used Proprietary NVIDIA driver – NVIDIA Accelerated Linux Graphics Driver) and it seems I had some trouble getting the correct info. Here’s quick rundown:
root@kali:~# lspci | grep VGA* 01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
root@kali:~# lspci -vv -s 01:00.0 (some output removed) Kernel driver in use: nvidia
So naturally I thought, O’yeah, it’s using nvidia driver. So modinfo should just list the driver file.
So when I tried that, I got NADA
root@kali:~# modinfo nvidia ERROR: Module nvidia not found.
Bloody hell, this was annoying. Then I just pressed TAB key after the name nvidia and I had two options
- nvidia-current and
root@kali:~# modinfo nvidia- nvidia-current nvidia-uvm root@kali:~# modinfo nvidia-current filename: /lib/modules/3.14-kali1-amd64/nvidia/nvidia-current.ko alias: char-major-195-* version: 331.67 supported: external license: NVIDIA alias: pci:v000010DEd00000E00sv*sd*bc04sc80i00* alias: pci:v000010DEd00000AA3sv*sd*bc0Bsc40i00* alias: pci:v000010DEd*sv*sd*bc03sc02i00* alias: pci:v000010DEd*sv*sd*bc03sc00i00* depends: i2c-core vermagic: 3.14-kali1-amd64 SMP mod_unload modversions parm: NVreg_Mobile:int parm: NVreg_ResmanDebugLevel:int parm: NVreg_RmLogonRC:int parm: NVreg_ModifyDeviceFiles:int parm: NVreg_DeviceFileUID:int parm: NVreg_DeviceFileGID:int parm: NVreg_DeviceFileMode:int parm: NVreg_RemapLimit:int parm: NVreg_UpdateMemoryTypes:int parm: NVreg_InitializeSystemMemoryAllocations:int parm: NVreg_RMEdgeIntrCheck:int parm: NVreg_UsePageAttributeTable:int parm: NVreg_MapRegistersEarly:int parm: NVreg_RegisterForACPIEvents:int parm: NVreg_CheckPCIConfigSpace:int parm: NVreg_EnablePCIeGen3:int parm: NVreg_EnableMSI:int parm: NVreg_MemoryPoolSize:int parm: NVreg_RegistryDwords:charp parm: NVreg_RmMsg:charp parm: NVreg_AssignGpus:charp root@kali:~#
So looks like NVIDIA-Current is the driver that being used and it’s soft-linked to NVIDIA in MODINFO. Anyone would like to comment/enlighten on this discrepancy?
Step 5: More ways to Identify PCI driver details
Last but not the least, I saved the best three options for the last … this is a quicker way to identify PCI driver on Linux. (yeah, I know what you’re thinking .. what a jerk .. could’ve posted it first … but learning the hard way is better cause now you will NEVER forget this … EVER).. So anywho …
Step 5.1: Identify PCI driver using lspci -k command
Easy task .. just issue the following command that will list the name of the driver straightway…
root@kali:~# lspci -k
-k flag shows kernel drivers handling each device for all PCI devices.
root@kali:~# lspci -k (some outputs removed) 0000:00:19.0 Ethernet controller: Intel Corporation 82578DM Gigabit Network Connection (rev 06) Subsystem: Acer Incorporated [ALI] Device 8000 Kernel driver in use: e1000e 01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2) Kernel driver in use: nvidia 01:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1) Kernel driver in use: snd_hda_intel
In this way you can skip Step 1.2 all together (getting verbose output).
Step 5.2: Identify PCI driver using lshw command
lshw is another command that can be used to list hardware info.
ls = List
hw = Hardwares
First you need to install lshw in your Linux system. Easy job.. Install using the following command:
root@kali:~# apt-get install lshw
Now list all hardware and detailed info using the following command
and you see a gazillion things. Go through the output and you will find all the things you will ever need for a particular device. This can be quite painful to browse through. There’s a easier way to do that.. we can narrow down each things according to it’s class.
For VGA/Display related output, you can use -C Display with lshw command.
root@kali:~# lshw -C Display
For Audio/Multimedia related output, you can use -C Multimedia with lshw command.
root@kali:~# lshw -C Multimedia
For Network related output, you can use -C Network with lshw command.
root@kali:~# lshw -C Network
and finally last but not the least, lshw also got a GUI version (lshw-gtk). Install that if you don’t want to use command line tools.
Step 5.3: Identify PCI driver using lshw-gtk tool
root@kali:~# apt-get install lshw-gtk
Launch GTK+ front-end for lshw using the following command on terminal
root@kali:~# lshw-gtk &
Refresh the window and you will see everything as per order. Double-click to expand each section.
Note: For all three option, (1.5.1, 1.5.2 and 1.5.3) you need to use modinfo as the final step. For example my ACPI Processor is using the following driver:
root@kali:~# modinfo acpi_cpufreq filename: /lib/modules/3.14-kali1-amd64/kernel/drivers/cpufreq/acpi-cpufreq.ko alias: acpi license: GPL description: ACPI Processor P-States Driver author: Paul Diefenbaugh, Dominik Brodowski alias: x86cpu:vendor:*:family:*:model:*:feature:*00E8* alias: x86cpu:vendor:*:family:*:model:*:feature:*0016* alias: acpi*:ACPI0007:* alias: acpi*:LNXCPU:* depends: processor intree: Y vermagic: 3.14-kali1-amd64 SMP mod_unload modversions parm: acpi_pstate_strict:value 0 or non-zero. non-zero -> strict ACPI checks are performed during frequency changes. (uint) + Done lshw-gtk
I was planning to write a single Article on how to identify PCI and USB driver but it seems that would be very very long post. So I’ve decided to divide the post into Two parts,
Follow to the next post if you’re using a USB device and trying to identify USB driver used for it. Thanks for reading, please share.