|
| 1 | +--- |
| 2 | +title: PCI Express Device Serial Number Conflicts Cause Device Enumeration Errors in Windows |
| 3 | +description: Workaround for device enumeration issues caused by PCI Express devices that report duplicate serial numbers due to a hardware defect. |
| 4 | +keywords: |
| 5 | +- PCI Express |
| 6 | +- PCI duplicate serial number error |
| 7 | +- Device Serial Number Extended Capability |
| 8 | +ms.date: 04/24/2026 |
| 9 | +ms.topic: concept-article |
| 10 | +--- |
| 11 | + |
| 12 | +# PCI Express device serial number conflicts cause device enumeration errors in Windows |
| 13 | + |
| 14 | +This article provides a workaround for device enumeration problems caused by PCI Express devices that report duplicate serial numbers due to a hardware defect. |
| 15 | + |
| 16 | +## Applies to |
| 17 | + |
| 18 | +- Windows 10 |
| 19 | +- Windows 11 |
| 20 | +- Windows Server 2016 and later versions |
| 21 | + |
| 22 | +## Symptoms |
| 23 | + |
| 24 | +Consider the following scenario: |
| 25 | + |
| 26 | +- A computer has multiple PCI Express devices installed. |
| 27 | +- Two or more of these devices report the same PCI Express device serial number through the Device Serial Number Extended Capability. |
| 28 | + |
| 29 | +In this scenario, some devices don't start correctly, some devices are assigned the wrong driver, and some devices exhibit unexpected behavior. You might see one or more of the following problems: |
| 30 | + |
| 31 | +- Devices appear interchanged or misidentified in Device Manager. |
| 32 | +- A device fails to start with an error code in Device Manager. |
| 33 | +- Driver updates are applied to the wrong device. |
| 34 | +- Device-specific settings or configurations are applied inconsistently across reboots. |
| 35 | + |
| 36 | +## Cause |
| 37 | + |
| 38 | +PCI Express devices can optionally implement the **Device Serial Number Extended Capability** (as defined in the PCI Express specification). This capability provides a unique 64-bit serial number that Windows uses to consistently identify and track individual devices, even when you move them to different slots or when the system reboots. |
| 39 | + |
| 40 | +Windows relies on this serial number to maintain a stable association between a physical device and its software configuration (driver settings, device properties, and so on). |
| 41 | + |
| 42 | +Some hardware implementations contain a defect where multiple devices of the same model report an **identical serial number**. This defect violates the PCI Express specification, which requires that each device serial number be unique. When Windows encounters duplicate serial numbers, it can't reliably distinguish between the affected devices, which leads to the symptoms described earlier. |
| 43 | + |
| 44 | +## Workaround |
| 45 | + |
| 46 | +> [!IMPORTANT] |
| 47 | +> This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, see [How to back up and restore the registry in Windows](https://support.microsoft.com/help/322756). |
| 48 | +> [!WARNING] |
| 49 | +> Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft can't guarantee that these problems can be solved. Modify the registry at your own risk. |
| 50 | +
|
| 51 | +To work around this issue, disable PCI Express Device Serial Number support system-wide by setting the `PCI_SYS_HACK_DISABLE_EXPRESS_SERIAL_NUMBER_SUPPORT` hackflag. This change causes the Windows PCI driver (pci.sys) to ignore the Express Serial Number capability for all devices. |
| 52 | + |
| 53 | +When you set this hackflag, Windows no longer uses the PCI Express Device Serial Number to identify devices. Device identification falls back to other methods, such as bus location, which might reset device settings if you move devices to different slots. |
| 54 | + |
| 55 | +To apply this workaround: |
| 56 | + |
| 57 | +1. Select **Start**, type **regedit** in the search box, and then select **regedit** in the results list. |
| 58 | + |
| 59 | + If you're prompted for an administrator password or for confirmation, type the password, or select **Continue**. |
| 60 | + |
| 61 | +1. Locate the following registry subkey, and then select it: |
| 62 | + |
| 63 | + `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PnP\Pci` |
| 64 | + |
| 65 | +1. **If the `HackFlags` registry entry doesn't exist**, follow these steps: |
| 66 | + |
| 67 | + 1. On the **Edit** menu, point to **New**, and then select **DWORD (32-bit) Value**. |
| 68 | + 1. Type **HackFlags**, and then press ENTER. |
| 69 | + 1. Right-click **HackFlags**, and then select **Modify**. |
| 70 | + 1. In the **Value data** box, type **0x10000**, select **Hexadecimal** in the **Base** area, and then select **OK**. |
| 71 | + 1. Exit Registry Editor. |
| 72 | + |
| 73 | +1. **If the `HackFlags` registry entry already exists**, the value might contain other hackflags that are already in use. In this case, combine the new flag with the existing value using a bitwise OR operation, rather than replacing it. Follow these steps: |
| 74 | + |
| 75 | + 1. Right-click **HackFlags**, and then select **Modify**. |
| 76 | + 1. Select **Hexadecimal** in the **Base** area. |
| 77 | + 1. Note the current **Value data** (for example, `0x600`). |
| 78 | + 1. Calculate the new value by performing a bitwise OR of the existing value with `0x10000`. For example, if the current value is `0x600`, the new value is `0x10600`. |
| 79 | + 1. Type the new value in the **Value data** box, and then select **OK**. |
| 80 | + 1. Exit Registry Editor. |
| 81 | + |
| 82 | + > [!TIP] |
| 83 | + > You can use the Windows Calculator in **Programmer** mode to perform the bitwise OR. Select *HEX* format, enter the existing hex value, select **OR**, enter **10000**, and press **=** to get the combined result. |
| 84 | +
|
| 85 | +1. Restart the computer for the change to take effect. |
| 86 | + |
| 87 | +## How to verify the workaround is applied |
| 88 | + |
| 89 | +After restarting the computer, verify the hackflag is active by checking the registry value: |
| 90 | + |
| 91 | +1. Open Registry Editor and go to: |
| 92 | + |
| 93 | + `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PnP\Pci` |
| 94 | + |
| 95 | +1. Double-click **HackFlags** and confirm that the value, when viewed in hexadecimal, includes the `0x10000` bit. For example, a value of `0x10000`, `0x10200`, `0x10600`, or any value where bit 16 is set confirms the flag is active. |
| 96 | + |
| 97 | +## More information |
| 98 | + |
| 99 | +- The hackflag value `0x00010000` corresponds to `PCI_SYS_HACK_DISABLE_EXPRESS_SERIAL_NUMBER_SUPPORT` in the Windows PCI driver. |
| 100 | +- This setting affects all PCI Express devices. You can't apply it to individual devices. |
| 101 | +- Use this workaround only for systems that have hardware with a known duplicate serial number defect. Don't use it as a general-purpose configuration change. |
| 102 | + |
| 103 | +## Data collection |
| 104 | + |
| 105 | +If you need assistance from Microsoft support, collect the information by following the steps mentioned in [Gather information by using TSS for deployment-related issues](/troubleshoot/windows-client/windows-tss/collect-data-analyze-troubleshoot-windows-servicing-scenarios). |
0 commit comments