18
Question

Is there a general rule for whether inserting PCIe-connected hardware into (not removing from) a running motherboard (or merely powered, if relevant) can be dangerous to the hardware, especially the motherboard? I've seen a myriad question about removal, but not addition.

If there's no general rule, am I looking for a specific certification or named capability on the to-be-attached hardware and/or motherboard?

Rationale

I'm evaluating a bug with a PCIe NIC - a TP-LINK AXE5400 causing Windows 11 to BSoD if connected during OS installation from USB - which involves a significant amount of connection and disconnection. I tend to have UEFI Fast Boot disabled for good measure, and don't want to have to re-enable it and manually shutdown and reboot every time I want to evaluate it (dis/re-)connected.

(Lack of) Duplicates

  1. This is rather the opposite of Can I pull a card from the PCI-x bus without powering down?

    I accidentally forgot to unplug a server's power when pulling a card even though the system was powered down at the OS level.

    Unfortunately doing so seems to have corrupted the system's BIOS and the IPMI/BMC BIOS. It also seems to have fried the on-board video.

    This has occurred on a Supermicro motherboard which is why I tried re-flashing the main BIOS and IPMI BIOS. Reflashing the main BIOS went without problems and no errors are shown in any BIOS logs.

    I thought hotplug technology should have meant that I could physically pull a card while it is running. Searches of the internet seem to imply that.

    ...because I can imagine that the device tree would be significantly less problematically affected if an addition occurs, since it's not like removing a GPU during operation (which would cause all kinds of foreseeable problems).

  2. https://serverfault.com/search?q=insert+pcie+running+machine returned 0 results (at 2024-08-05).

4
  • 2
    Even the premier system boards that support hot-pluggable everything (power, fans, PCI) require both the system and the card being inserted to support hot plug capability which is typically advertised. There is two aspects to this, the management of power during insertion, and the hardware detection logic. The card needs to support PCIe. Even if it survived, it may not work correctly without a power cycle. electronics.stackexchange.com/questions/208767/…
    – Greg Askew
    Commented Aug 6 at 4:40
  • 3
    If it's consumer hardware, the answer is likely to be "no". If it's server hardware, the answer is "maybe". Powering down is always going to be the safest option.
    – Ian Kemp
    Commented Aug 6 at 9:50
  • @IanKemp ... and "powering down" is the general rule that the OP is asking for.
    – Wastrel
    Commented Aug 6 at 15:44
  • @Wastrel, indeed. I asked this partially because I've been asked to replace a component on a running machine before, and I'd rather show an answer here than ask someone to trust me. Commented Aug 6 at 20:20

2 Answers 2

18

It’s a definite maybe

PCI express theoretically supports hotplug (the common term for what you want to do).

For it to work correctly though, all of the following needs to be true:

  • The baseboard’s PCIe controllers must support it. Many, many systems do actually have hardware support for it, but this is often hidden by a lack of firmware support.
  • The system firmware must support it. Almost never the case on client systems targeted at consumer usage. May or may not be the case for actual server hardware, though it’s usually something you can confirm pretty easily with the manufacturer.
  • The OS, if running, must support it. Modern Windows Server versions have full support AFAICT. Linux usually supports it (support in the kernel is optional at build time but enabled by most distributions, no userspace components are required). FreeBSD has full support.
  • The card itself must support hotplug. This is usually advertised for most expansion cards that support it, and is generally very common in server-grade network or storage controllers (those are the big ones that often get hotplugged).

Assuming all those criteria are met, then yes, it’s safe as long as you’re taking care to avoid the usual hazards associated with mucking around inside the chassis of a computer while it’s running.

Do note however that negotiation of link parameters (link width, MPS, etc) for a hot-plugged card may not result in the exact same parameters you would see if you booted the system with the card installed, and peer to peer transfers to/from the card may not work until you reboot (this is often a side-effect of the link parameters).

2
  • 6
    Also note that "PCIe hotplug" being possible, doesn't mean that it is possible using the industry-standard card-edge connectors. There are industrial connectors designed for hotplug and which carry PCI or PCIe signals. For example CompactPCI Express.
    – Ben Voigt
    Commented Aug 6 at 16:16
  • 2
    There are also external PCIe connectors that are designed for hotplug in the consumer world. OCuLink is a direct PCIe x4 connection, and Thunderbolt and USB4 are essentially wrappers for PCIe-protocol traffic. Commented Aug 6 at 18:23
10

The term you want to search for is PCIe hot-add or hotplug. https://electronics.stackexchange.com/questions/208767/does-pcie-hotplug-actually-work-in-practice

Your specific question seems to be if it will damage the hardware, and I think the general answer is "no" because it's designed to allow this. Double check that your chipset supports it.

2
  • 8
    Not only the chipset needs to support hot-plugging, but also the OS and it needs to be enabled on the particular mainboard. I have yet to find consumer hardware that actually offers working PCIe hot-plug capabilites. Specialized server hardware is way more pricey.
    – Hermann
    Commented Aug 6 at 9:36
  • The OP didn't ask if it would work, just asked if it would be safe (not damage the hardware) and it seems the answer is "yes"
    – mfinni
    Commented Aug 7 at 15:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .