Understanding PCIe Slots Configuration

nvmepci-express

The following command gives me infos about my PCIe slots :

# lspci -vv | grep -E 'PCI bridge|LnkCap:'
00:01.0 PCI bridge: Intel (...) PCIe Controller (x16) (...)
        LnkCap:    Port #2, Speed 8GT/s, Width x16 (...)
00:1b.0 PCI bridge: Intel (...)
        LnkCap:    Port #17, Speed 8GT/s, Width x4 (...)
00:1c.0 PCI bridge: Intel (...)
        LnkCap:    Port #1, Speed 8GT/s, Width x1 (...)
00:1c.2 PCI bridge: Intel (...)
        LnkCap:    Port #3, Speed 8GT/s, Width x1 (...)
00:1c.3 PCI bridge: Intel (...)
        LnkCap:    Port #4, Speed 8GT/s, Width x1 (...)
00:1c.4 PCI bridge: Intel (...)
        LnkCap:    Port #5, Speed 8GT/s, Width x4 (...)
00:1d.0 PCI bridge: Intel (...)
        LnkCap:    Port #9, Speed 8GT/s, Width x4 (...)
        LnkCap:    Port #0, Speed 8GT/s, Width x16 (...)
        LnkCap:    Port #0, Speed 8GT/s, Width x16 (...)
        LnkCap:    Port #0, Speed 16GT/s, Width x4 (...)
        LnkCap:    Port #0, Speed 2.5GT/s, Width x1 (...)

Laptop is a 2017 Asus ROG G752VSK. Specs states that is has two PCIe 3.0×4.

Why do I have so many slots in my output ? If I lookup Wikipedia, can I deduce that I have :

  • 1 x PCIe 3.0 x16 (Speed 8GT/s, Width x16)
  • 2 x PCIe 3.0 x4 (Speed 8GT/s, Width x4)
  • 3 x PCIe 3.0 x1 (Speed 8GT/s, Width x1)

And what about the last bridge, which seems to have 5 ports, among them one that looks like a PCIe 4.0 x4 (Speed 16GT/s, Width x4) ?

I can't make any sense of it. I was expecting lspci to show the 2 PCIe 3.0×4 that I can physically identify in my laptop. Why so many other PCIe ports ?

[ EDIT, at u1686_grawity's request ]

# lspci -tvnn
-[0000:00]-+-00.0  Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5910]
           +-01.0-[01]--+-00.0  NVIDIA Corporation GP104BM [GeForce GTX 1070 Mobile] [10de:1be1]
           |            \-00.1  NVIDIA Corporation GP104 High Definition Audio Controller [10de:10f0]
           +-14.0  Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller [8086:a12f]
           +-14.2  Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem [8086:a131]
           +-15.0  Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #0 [8086:a160]
           +-15.1  Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #1 [8086:a161]
           +-16.0  Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 [8086:a13a]
           +-17.0  Intel Corporation Q170/Q150/B150/H170/H110/Z170/CM236 Chipset SATA Controller [AHCI Mode] [8086:a102]
           +-1b.0-[02]----00.0  Sandisk Corp Device [15b7:5030]
           +-1c.0-[03]--
           +-1c.2-[04]----00.0  Intel Corporation Wireless 8260 [8086:24f3]
           +-1c.3-[05]----00.0  Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168]
           +-1c.4-[06-3e]--
           +-1d.0-[3f]----00.0  Micron/Crucial Technology Device [c0a9:540a]
           +-1f.0  Intel Corporation CM238 Chipset LPC/eSPI Controller [8086:a154]
           +-1f.2  Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller [8086:a121]
           +-1f.3  Intel Corporation CM238 HD Audio Controller [8086:a171]
           \-1f.4  Intel Corporation 100 Series/C230 Series Chipset Family SMBus [8086:a123]

[ EDIT 2 ]

Basically, what I am trying to do is to find out a way to confirm that the two NVMe/PCIe slots are indeed 3.0×4.

In fact I want to apply that technique to another laptop I have : official specs said it had one Gen4x4 and one Gen4x2, and when I contacted them to identify each one, they told me their website was outdated, and in fact my laptop had two Gen4x4. So I was looking for a way to confirm that

[ EDIT 3, following @Mokubai's answer and comments ]

My grep added a few unrelated lines. This one is better :

# lspci -vv | grep 'PCI bridge' -A40 | grep -E 'PCI bridge|LnkCap:'
00:01.0 PCI bridge: Intel (...) PCIe Controller (x16) (...)
        LnkCap:    Port #2, Speed 8GT/s, Width x16 (...)
00:1b.0 PCI bridge: Intel (...)
        LnkCap:    Port #17, Speed 8GT/s, Width x4 (...)
00:1c.0 PCI bridge: Intel (...)
        LnkCap:    Port #1, Speed 8GT/s, Width x1 (...)
00:1c.2 PCI bridge: Intel (...)
        LnkCap:    Port #3, Speed 8GT/s, Width x1 (...)
00:1c.3 PCI bridge: Intel (...)
        LnkCap:    Port #4, Speed 8GT/s, Width x1 (...)
00:1c.4 PCI bridge: Intel (...)
        LnkCap:    Port #5, Speed 8GT/s, Width x4 (...)
00:1d.0 PCI bridge: Intel (...)
        LnkCap:    Port #9, Speed 8GT/s, Width x4 (...)

Combined with lspci -tvnn's result, we can indeed come to the conclusion that the 2 NVMe slots are 1b.0 and 1d.0, e.g. Sandisk (WD in my case) and Micron/Crucial, both at Speed 8GT/s, Width x4, e.g. Gen3x4.

Best Answer

Slots and ports are different.

You apparently have multiple bridges which connect other devices in your system. At a guess there are PCIe ethernet, WiFi, SATA, NVMe, bluetooth and other devices connected to ports on various PCIe hubs.

PCIe is just a way to connect devices, those devices don't have to have a physical connector or slot, they can be connected directly to ports on a hub without having to use removable connectors.


trying to summarise comments

PCIe is used for a lot of things outside of just physical connectors. PCIe defines a method of encapsulating the PCI protocol inside a fast and efficient electrical interface. It is more than just the connectors you see and devices are often connected electrically without the use of the more obvious connectors.

Identifying devices from lspci is a bit hit and miss. It will (as far as I know) only show current link speed and not full capabilities, and grep can leave out important context. Many of your trailing lines could be related to other devices (which are showing link speed capabilities) but are not related to the device immediately above.

To use an educated guess I would suggest that your NVMe devices are

1b.0-[02]----00.0  Sandisk Corp Device [15b7:5030]

Note that Sandisk are a subsidiary of Western Digital and lspci may be using an internal "Vendor ID" list to match devices. I have a Western Digital NVMe SSD and it also reports a vendor ID of 15B7 in Windows. The other NVMe device is most likely

1d.0-[3f]----00.0  Micron/Crucial Technology Device [c0a9:540a]

The Speed 8GT/s, Width x4 denotes a PCIe 3.0 interface (8GT/s) at the width you are expecting.

With that as a starting point you should hopefully be able to identify ports in your second laptop.

Related Question