1lspci(8)                       The PCI Utilities                      lspci(8)
2
3
4

NAME

6       lspci - list all PCI devices
7

SYNOPSIS

9       lspci [options]
10

DESCRIPTION

12       lspci  is  a  utility for displaying information about PCI buses in the
13       system and devices connected to them.
14
15       By default, it shows a brief list of devices. Use the options described
16       below  to  request  either a more verbose output or output intended for
17       parsing by other programs.
18
19       If you are going to report bugs in PCI device drivers or in  lspci  it‐
20       self,  please  include  output  of  "lspci  -vvx" or even better "lspci
21       -vvxxx" (however, see below for possible caveats).
22
23       Some parts of the output, especially in the highly verbose  modes,  are
24       probably  intelligible only to experienced PCI hackers. For exact defi‐
25       nitions of the fields, please consult either the PCI specifications  or
26       the header.h and /usr/include/linux/pci.h include files.
27
28       Access  to  some  parts of the PCI configuration space is restricted to
29       root on many operating systems, so the features of lspci  available  to
30       normal  users  are limited. However, lspci tries its best to display as
31       much as available and mark all other information with  <access  denied>
32       text.
33
34

OPTIONS

36   Basic display modes
37       -m     Dump  PCI  device data in a backward-compatible machine readable
38              form.  See below for details.
39
40       -mm    Dump PCI device data in a machine readable form for easy parsing
41              by scripts.  See below for details.
42
43       -t     Show  a tree-like diagram containing all buses, bridges, devices
44              and connections between them.
45
46
47   Display options
48       -v     Be verbose and display detailed information about all devices.
49
50       -vv    Be very verbose and display more details.  This  level  includes
51              everything deemed useful.
52
53       -vvv   Be  even  more  verbose  and  display  everything we are able to
54              parse, even if it doesn't look interesting at all  (e.g.,  unde‐
55              fined memory regions).
56
57       -k     Show kernel drivers handling each device and also kernel modules
58              capable of handling it.  Turned on by default when -v  is  given
59              in  the  normal  mode of output.  (Currently works only on Linux
60              with kernel 2.6 or newer.)
61
62       -x     Show hexadecimal dump of the standard part of the  configuration
63              space (the first 64 bytes or 128 bytes for CardBus bridges).
64
65       -xxx   Show  hexadecimal  dump of the whole PCI configuration space. It
66              is available only to root as several PCI devices crash when  you
67              try to read some parts of the config space (this behavior proba‐
68              bly doesn't violate the PCI standard, but  it's  at  least  very
69              stupid).  However,  such  devices are rare, so you needn't worry
70              much.
71
72       -xxxx  Show hexadecimal dump of the extended (4096-byte) PCI configura‐
73              tion space available on PCI-X 2.0 and PCI Express buses.
74
75       -b     Bus-centric  view. Show all IRQ numbers and addresses as seen by
76              the cards on the PCI bus instead of as seen by the kernel.
77
78       -D     Always show PCI domain numbers.  By  default,  lspci  suppresses
79              them on machines which have only domain 0.
80
81       -P     Identify  PCI devices by path through each bridge, instead of by
82              bus number.
83
84       -PP    Identify PCI devices by path through each  bridge,  showing  the
85              bus number as well as the device number.
86
87
88   Options to control resolving ID's to names
89       -n     Show  PCI  vendor and device codes as numbers instead of looking
90              them up in the PCI ID list.
91
92       -nn    Show PCI vendor and device codes as both numbers and names.
93
94       -q     Use DNS to query the central PCI ID database if a device is  not
95              found  in the local pci.ids file. If the DNS query succeeds, the
96              result is cached in ~/.pciids-cache and it is recognized in sub‐
97              sequent  runs  even if -q is not given any more. Please use this
98              switch inside automated scripts only with caution to avoid over‐
99              loading the database servers.
100
101       -qq    Same as -q, but the local cache is reset.
102
103       -Q     Query the central database even for entries which are recognized
104              locally.  Use this if you suspect that the  displayed  entry  is
105              wrong.
106
107
108   Options for selection of devices
109       -s [[[[<domain>]:]<bus>]:][<device>][.[<func>]]
110              Show  only devices in the specified domain (in case your machine
111              has several host bridges, they can either  share  a  common  bus
112              number  space  or  each  of them can address a PCI domain of its
113              own; domains are numbered from 0 to ffff), bus (0 to ff), device
114              (0  to  1f) and function (0 to 7).  Each component of the device
115              address can be omitted or set to "*", both meaning "any  value".
116              All  numbers  are  hexadecimal.  E.g., "0:" means all devices on
117              bus 0, "0" means all functions of device 0 on any bus, "0.3" se‐
118              lects  third  function  of  device 0 on all buses and ".4" shows
119              only the fourth function of each device.
120
121       -d [<vendor>]:[<device>][:<class>[:<prog-if>]]
122              Show only devices with specified vendor, device, class  ID,  and
123              programming  interface.   The  ID's are given in hexadecimal and
124              may be omitted or given as "*", both meaning  "any  value".  The
125              class ID can contain "x" characters which stand for "any digit".
126
127
128   Other options
129       -i <file>
130              Use  <file>  as  the  PCI  ID  list  instead  of  /usr/share/hw‐
131              data/pci.ids.
132
133       -p <file>
134              Use <file> as the map of PCI ID's handled by kernel modules.  By
135              default,  lspci uses /lib/modules/kernel_version/modules.pcimap.
136              Applies only to Linux systems with recent enough module tools.
137
138       -M     Invoke bus mapping mode which performs a thorough  scan  of  all
139              PCI  devices, including those behind misconfigured bridges, etc.
140              This option gives meaningful results only with a direct hardware
141              access  mode,  which  usually  requires root privileges.  By de‐
142              fault, the bus mapper scans domain. You can use the -s option to
143              select a different domain.
144
145       --version
146              Shows lspci version. This option should be used stand-alone.
147
148
149   PCI access options
150       The  PCI  utilities  use  the  PCI  library to talk to PCI devices (see
151       pcilib(7) for details). You can use the following options to  influence
152       its behavior:
153
154       -A <method>
155              The  library  supports  a  variety  of methods to access the PCI
156              hardware.  By default, it uses the first  access  method  avail‐
157              able, but you can use this option to override this decision. See
158              -A help for a list of available methods and their descriptions.
159
160       -O <param>=<value>
161              The behavior of the library is controlled by several  named  pa‐
162              rameters.  This option allows one to set the value of any of the
163              parameters. Use -O help for a list of known parameters and their
164              default values.
165
166       -H1    Use  direct hardware access via Intel configuration mechanism 1.
167              (This is a shorthand for -A intel-conf1.)
168
169       -H2    Use direct hardware access via Intel configuration mechanism  2.
170              (This is a shorthand for -A intel-conf2.)
171
172       -F <file>
173              Instead of accessing real hardware, read the list of devices and
174              values of their configuration registers from the given file pro‐
175              duced  by  an  earlier run of lspci -x.  This is very useful for
176              analysis of user-supplied bug reports, because you  can  display
177              the  hardware configuration in any way you want without disturb‐
178              ing the user with requests for more dumps.
179
180       -G     Increase debug level of the library.
181
182

MACHINE READABLE OUTPUT

184       If you intend to process the output of lspci automatically, please  use
185       one of the machine-readable output formats (-m, -vm, -vmm) described in
186       this section. All other formats are likely to change  between  versions
187       of lspci.
188
189
190       All  numbers  are always printed in hexadecimal. If you want to process
191       numeric ID's instead of names, please add the -n switch.
192
193
194   Simple format (-m)
195       In the simple format, each device is described on a single line,  which
196       is  formatted  as  parameters  suitable  for passing to a shell script,
197       i.e., values separated by whitespaces, quoted and escaped if necessary.
198       Some  of the arguments are positional: slot, class, vendor name, device
199       name, subsystem vendor name and subsystem name (the last two are  empty
200       if  the  device  has no subsystem); the remaining arguments are option-
201       like:
202
203
204       -rrev  Revision number.
205
206
207       -pprogif
208              Programming interface.
209
210
211       The relative order of positional arguments and  options  is  undefined.
212       New  options can be added in future versions, but they will always have
213       a single argument not separated from the option by any spaces, so  they
214       can be easily ignored if not recognized.
215
216
217   Verbose format (-vmm)
218       The  verbose  output is a sequence of records separated by blank lines.
219       Each record describes a single device by a sequence of lines, each line
220       containing  a single `tag: value' pair. The tag and the value are sepa‐
221       rated by a single tab character.  Neither the  records  nor  the  lines
222       within a record are in any particular order.  Tags are case-sensitive.
223
224
225       The following tags are defined:
226
227
228       Slot   The  name of the slot where the device resides ([domain:]bus:de‐
229              vice.function).  This tag is always the first in a record.
230
231
232       Class  Name of the class.
233
234
235       Vendor Name of the vendor.
236
237
238       Device Name of the device.
239
240
241       SVendor
242              Name of the subsystem vendor (optional).
243
244
245       SDevice
246              Name of the subsystem (optional).
247
248
249       PhySlot
250              The physical slot where  the  device  resides  (optional,  Linux
251              only).
252
253
254       Rev    Revision number (optional).
255
256
257       ProgIf Programming interface (optional).
258
259
260       Driver Kernel  driver  currently  handling  the device (optional, Linux
261              only).
262
263
264       Module Kernel module reporting that it is capable of handling  the  de‐
265              vice  (optional,  Linux  only). Multiple lines with this tag can
266              occur.
267
268
269       NUMANode
270              NUMA node this device is connected to (optional, Linux only).
271
272
273       IOMMUGroup
274              IOMMU group that this device is part of (optional, Linux only).
275
276
277       New tags can be added in future versions, so you should silently ignore
278       any tags you don't recognize.
279
280
281   Backward-compatible verbose format (-vm)
282       In  this mode, lspci tries to be perfectly compatible with its old ver‐
283       sions.  It's almost the same as the regular verbose format, but the De‐
284       vice  tag  is  used for both the slot and the device name, so it occurs
285       twice in a single record. Please avoid using this  format  in  any  new
286       code.
287
288

FILES

290       /usr/share/hwdata/pci.ids
291              A list of all known PCI ID's (vendors, devices, classes and sub‐
292              classes). Maintained at https://pci-ids.ucw.cz/, use the update-
293              pciids utility to download the most recent version.
294
295       /usr/share/hwdata/pci.ids.gz
296              If  lspci is compiled with support for compression, this file is
297              tried before pci.ids.
298
299       ~/.pciids-cache
300              All ID's found in the DNS query mode are cached in this file.
301
302

BUGS

304       Sometimes, lspci is not able to decode the configuration registers com‐
305       pletely.  This usually happens when not enough documentation was avail‐
306       able to the authors.  In such cases, it at least prints the <?> mark to
307       signal that there is potentially something more to say. If you know the
308       details, patches will be of course welcome.
309
310       Access to the extended configuration space is currently supported  only
311       by the linux_sysfs back-end.
312
313

SEE ALSO

315       setpci(8), pci.ids(5), update-pciids(8), pcilib(7)
316
317

AUTHOR

319       The PCI Utilities are maintained by Martin Mares <mj@ucw.cz>.
320
321
322
323pciutils-3.9.0                 20 November 2022                       lspci(8)
Impressum