Skip to content

Conversation

@roger-pmta
Copy link

@roger-pmta roger-pmta commented Dec 11, 2025

Thunderbolt 4/5 eGPU enclosures fail automatic external GPU detection
because they are not in the approved TB3 bridge list and do not report
the required slot capabilities (HotPlug+ and Surprise+).

Add RmForceExternalGpu registry key to bypass bridge detection and
unconditionally set PDB_PROP_GPU_IS_EXTERNAL_GPU, enabling proper eGPU
handling throughout the driver.

Usage:

Global (all GPUs):

  NVreg_RegistryDwords="RmForceExternalGpu=1"

Per-device (specific GPU only):

  NVreg_RegistryDwordsPerDevice="pci=DDDD:BB:DD.F;RmForceExternalGpu=1"

The per-device option allows targeting specific GPUs in multi-GPU systems.

@roger-pmta
Copy link
Author

Workaround for #979

@roger-pmta
Copy link
Author

Full write-up with 590 and TB5 posted at https://egpu.io/forums/builds/2023-14-lenovo-thinkpad-x1-carbon-gen-11-13th10cu-rtx-5080-32gbps-tb4-sonnet-breakaway-box-850-t5-linux-rocky-10-1/, will wait for a reply/update from NVIDIA.

@mtijanic
Copy link
Collaborator

Hi. Sorry, I'm not really familiar with eGPU details to know what kind of effects such a change can invoke, but I can make a couple of comments:

I'm actually surprised that this works. You've declared a top level module param, but are reading it as if it's an RM registry dword. The typical way to read top level params is to just declare them as extern vars and read them directly, like e.g. here.

The osReadRegistryDwords() function is meant for reading keys as defined in nvrm_registry.h, and those are supposed to be passed to the driver as option nvidia NVreg_RegistryDwords="foo=1;bar=0x3f".

However, the registry dword is IMO the better thing to use here, for two reasons:

  1. It can also be set per-GPU, by using NVreg_RegistryDwordsPerDevice and passing the PCI ID for which GPU to apply it to. See here for docs)
  2. The registry dwords interface is a lot more experimental/unstable and is more suitable for these WARs. I can see us merging something like that, because it implies a lot less support than the top level params.

To use this, revert your nv-reg.h changes, and add your key to nvrm_registry.h. See other keys defined there for examples.

Thunderbolt 4/5 eGPU enclosures fail automatic external GPU detection
because they are not in the approved TB3 bridge list and do not report
the required slot capabilities (HotPlug+ and Surprise+).

Add RmForceExternalGpu registry key to bypass bridge detection and
unconditionally set PDB_PROP_GPU_IS_EXTERNAL_GPU, enabling proper eGPU
handling throughout the driver.

Usage:
  Global (all GPUs):
    NVreg_RegistryDwords="RmForceExternalGpu=1"

  Per-device (specific GPU only):
    NVreg_RegistryDwordsPerDevice="pci=DDDD:BB:DD.F;RmForceExternalGpu=1"

The per-device option allows targeting specific GPUs in multi-GPU systems.
@roger-pmta
Copy link
Author

Thanks for the feedback @mtijanic! Updated the patch with your suggestions and confirmed working 🙌

@roger-pmta roger-pmta changed the title nvidia: add NVreg_ForceExternalGpu module parameter nvidia: add RmForceExternalGpu registry key Dec 11, 2025
@bdandy
Copy link

bdandy commented Dec 18, 2025

I'm curious why you decided to make this as registry dwords, not kernel module option so it would be visible in modinfo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants