Home / Alt manpages / pci.ids(5)

  • pci.ids(5)
  • File format
  • linux

Read and Safely Inspect the pci.ids PCI Identifier Database

You will use the pci.ids database to explain the numbers in lspci output, inspect a real vendor or device record, and recognise the file's hierarchy before considering an update. The examples match pciutils 3.10.0, installed here as package version 1:3.10.0-2build1. Allow about fifteen minutes. You need a shell and the pciutils package; the inspection steps are unprivileged.

pci.ids is a lookup list, not a hardware configuration file. PCI hardware reports numeric identifiers, while the PCI utilities use this text database to turn them into names. Changing a name changes the display text, not the device, driver or kernel configuration.

1. Confirm the database and the utility

The installed list is normally at /usr/share/misc/pci.ids. Check the package and file before interpreting any result:

$ dpkg-query -W -f='${Package} ${Version}\n' pciutils
pciutils 1:3.10.0-2build1
$ command -v lspci
/usr/bin/lspci
$ ls -l /usr/share/misc/pci.ids
-rw-r--r-- 1 root root ... /usr/share/misc/pci.ids

The size, owner and timestamp will differ between machines. The useful checks are that the package is installed, lspci resolves, and the list exists. On another distribution, use its package query command, but keep the file path from the installed pci.ids(5) documentation in mind.

Checkpoint

If the file is absent, stop here and repair or reinstall the package through your normal package manager. Do not create a replacement in /usr/share/misc just to make a later command appear to work.

2. Compare numeric IDs with their readable form

Ask lspci for both the names and the numeric IDs:

$ lspci -nn | head -n 3
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:591f] (rev 05)
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 630 [8086:5912] (rev 04)
00:14.0 USB controller [0c03]: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller [8086:a12f] (rev 31)

Your hardware will produce different lines. In a record such as [8086:5912], 8086 is the vendor ID and 5912 is the device ID. The bracketed 0300 is the class and subclass pair shown by lspci. The database supplies the names; it does not discover or alter those numbers.

Do not treat the first matching text in a copied log as proof that the current machine has that device. Re-run lspci -nn on the machine you are investigating, then use the exact hexadecimal values from that output.

3. Find the vendor and device records

Read-only searches are the simplest way to connect the output to the file. Use fixed strings and tabs so a device line is not confused with a vendor line:

$ grep -n '^8086 ' /usr/share/misc/pci.ids
27868:8086  Intel Corporation
$ grep -n $'^\t5912 ' /usr/share/misc/pci.ids
35156:	5912  HD Graphics 630

The file uses four hexadecimal digits, lower-case or upper-case as supplied by the database, followed by one or more spaces. Vendor lines begin at column one. A device line begins with one TAB and belongs to the preceding vendor. Names extend to the end of the line, so do not split a name on spaces when writing a parser.

A search can return more than one line because the same device number can appear under different vendors. Keep the vendor context, and match the pair from lspci, not the device number alone.

4. Read subsystems without losing the hierarchy

A subsystem identifies the assembly containing a device, such as an add-in card around an Ethernet controller. Its record has two TAB characters, then a subsystem vendor ID and subsystem ID:

$ sed -n '27860,27875p' /usr/share/misc/pci.ids
...
8086  Intel Corporation
	0001  82371AB/EB/MB PIIX4 ISA
	...
		1028 00b4  OptiPlex GX1
...

The exact nearby entries vary with the database version, so the ellipses above are only a visual cue, not text to paste. The meaningful shape is vendor, then a one-TAB device, then a two-TAB subsystem. A subsystem line's first four-digit value must name a vendor listed elsewhere. The second four-digit value is the subsystem ID, and the remainder is its name.

Subsystem meaning is device-dependent. It is not safe to infer that a subsystem ID has the same meaning for every device, even when the digits look familiar.

5. Interpret class and programming-interface records

Class data is separate from vendor and device data. A class starts with C, one space and a two-digit hexadecimal class ID. Its subclass has one TAB; its programming interface has two:

$ sed -n '37940,37948p' /usr/share/misc/pci.ids
C 03  Display controller
	00  VGA compatible controller
		00  VGA controller
	01  XGA controller

For the earlier 0300 example, 03 selects the display-controller class and 00 selects its VGA-compatible subclass. A programming interface is an additional two-digit value when that subclass defines one. This hierarchy explains why a class lookup is not written as a vendor device record and why indentation is significant.

The file can also contain device-independent subsystem groups beginning with S. Those groups use an already listed subsystem vendor and then one-TAB subsystem entries. Do not assume every useful record is under a particular device.

6. Validate a local copy before proposing a change

Keep the package-managed file untouched while experimenting. Copy it to a temporary path, inspect the copy, and remove the copy when finished:

$ workdir=$(mktemp -d)
$ cp -- /usr/share/misc/pci.ids "$workdir/pci.ids"
$ grep -n '^8086 ' "$workdir/pci.ids"
27868:8086  Intel Corporation
$ rm -- "$workdir/pci.ids"
$ rmdir -- "$workdir"

That final cleanup is safe for this newly created temporary directory, but never substitute a broad path for $workdir. If you need to propose a missing ID, preserve the surrounding vendor and device context and follow the documented indentation exactly. Review the result as data first; a typo can make a name disappear or associate a subsystem with the wrong parent.

Warning

Do not edit /usr/share/misc/pci.ids in place as a casual fix. It is package-managed data and a later package update can replace local edits. If the list is missing an identifier, the manpage directs contributors to the PCI ID database at pci-ids.ucw.cz. Updating the installed list with update-pciids is a system change: review the command and your distribution's package policy first, and use elevated privileges only when your installation requires them.

7. Recheck after an update

Once your package manager or approved update process has changed the list, repeat the same read-only checks. Compare the file version header, then verify the exact device or class record:

$ sed -n '1,8p' /usr/share/misc/pci.ids
$ grep -n '^8086 ' /usr/share/misc/pci.ids
$ lspci -nn | grep -F '[8086:5912]'

A newer list can improve a displayed name without changing lspci's numeric IDs. If the name is still absent, check that you searched the file used by the installed utilities and that the vendor and device values were copied in the correct order. Use lspci -q when an online database query is appropriate, as documented by pci.ids(5); treat network results as a separate source from the local, reproducible file.

Done means

  • The installed pciutils version and /usr/share/misc/pci.ids path are known.
  • An lspci -nn line has been matched using its vendor and device pair, not a device number alone.
  • Vendor, device, subsystem and class records have been distinguished by their leading text and TAB indentation.
  • Any proposed edit was tested in a temporary copy and the package-managed file was left alone.
  • After an approved update, the file header, exact record and lspci output were checked again.