Skip to content

RTX 5080 via Thunderbolt 5 eGPU: Hard lock on CUDA operations (nvidia-smi works at idle) #979

Open

Description

@roger-pmta

NVIDIA Open GPU Kernel Modules Version

590.44.01 and 580.105.08, both from the NVIDIA's official CUDA rhel10 repo

Please confirm this issue does not happen with the proprietary driver (of the same version). This issue tracker is only for bugs specific to the open kernel driver.

  • I confirm that this does not happen with the proprietary driver package.

Operating System and Version

Rocky Linux 10.1 (Red Quartz)

Kernel Release

6.12.0-124.13.1.el10_1.x86_64 (PREEMPT_DYNAMIC)

Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.

  • I am running on a stable kernel release.

Hardware: GPU

NVIDIA GeForce RTX 5080

Describe the bug

RTX 5080 connected via Thunderbolt 5 eGPU enclosure (Sonnet Breakaway Box 850T5) initializes correctly and is visible to nvidia-smi at idle. Any CUDA operation causes immediate system hard-lock requiring power cycle. No kernel panic, no Xid error logged, no SysRq response.

This appears related to closed issue #900 (RTX 5090 via OCuLink), which showed identical symptoms: GPU functional at idle, crash under load, GSP firmware bootstrap errors. That issue was resolved by switching OCuLink docks, but dock alternatives for Thunderbolt 5 are extremely limited.

PCIe link negotiates correctly at 16GT/s x4 (PCIe 4.0 x4) - optimal for Thunderbolt 4 host controller bandwidth. BAR allocation succeeds with hotplug resource reservation parameters. Driver loads and initializes without error.

Minimal reproducer:

nvidia-smi                    # Works - GPU visible, ~2W idle
python3 -c "import torch; torch.zeros(1, device='cuda')"   # Hard lock

Hardware:

  • GPU: NVIDIA GeForce RTX 5080 (GB203)
  • eGPU Enclosure: Sonnet Breakaway Box 850T5 (Thunderbolt 5)
  • Host: Lenovo ThinkPad X1 Carbon Gen 11
  • Thunderbolt Controller: Intel Raptor Lake-P Thunderbolt 4 (host), USB4/TB5 (enclosure)
  • OS: Rocky Linux 10.1

Required kernel parameters: pcie_ports=native pcie_aspm=off pcie_port_pm=off pci=assign-busses,realloc

Without pcie_ports=native, GPU enters D3cold and driver fails with "Unable to change power state from D3cold to D0".

To Reproduce

  1. Connect RTX 5080 to Sonnet Breakaway Box 850T5 (Thunderbolt 5 eGPU enclosure)
  2. Connect enclosure to host via Thunderbolt cable
  3. Boot system with kernel parameters: pcie_ports=native pcie_aspm=off pcie_port_pm=off pci=assign-busses,realloc
  4. Confirm GPU detected: nvidia-smi (shows GPU at idle, ~2W, ~30°C)
  5. Run any CUDA operation: python3 -c "import torch; torch.zeros(1, device='cuda')"
  6. System hard-locks immediately. No kernel panic, no SysRq response. Power cycle required.

Bug Incidence

Always

nvidia-bug-report.log.gz

nvidia-bug-report.log.gz

More Info

Also reported at https://forums.developer.nvidia.com/t/590-release-feedback-discussion/353310/53, cross-posted to https://forums.developer.nvidia.com/t/580-release-feedback-discussion/341205/898, and and linux-bugs

Activity

  1. added
    bug
    on Dec 4, 2025
  2. roger-pmta commented on Dec 11, 2025

    @roger-pmta
    Author

    NVIDIA RTX 5080 eGPU on Linux - Working Configuration

    Hardware:

    • Laptop: Lenovo ThinkPad X1 Carbon Gen 11 (Thunderbolt 4)
    • eGPU Enclosure: Sonnet Breakaway Box 850T5 (Thunderbolt 5, JHL9480)
    • GPU: NVIDIA GeForce RTX 5080 (Blackwell, GB203)
    • Device ID: 10de:2c02
    • OS: Rocky Linux 10.1, Kernel 6.12.0-124.16.1.el10_1.x86_64

    BIOS Settings:

    • Thunderbolt 4: Enabled
    • PCIe Tunneling: Enabled
    • Kernel DMA Protection: Enabled (can stay enabled)

    Kernel Parameters (add via grubby):

    sudo grubby --update-kernel=ALL --args="pci=assign-busses,hpbussize=0x10,hpmmiosize=64M,hpmmioprefsize=384M,realloc pcie_port_pm=off pcie_aspm.policy=performance intel_iommu=off thunderbolt.clx=0"
    

    Parameters explained:

    pci=assign-busses      - Kernel reassigns PCI bus numbers (helps Thunderbolt)
    hpbussize=0x10         - Reserve 16 bus numbers per hotplug bridge
    hpmmiosize=64M         - Reserve 64MB non-prefetchable MMIO per hotplug bridge (for BAR0)
    hpmmioprefsize=384M    - Reserve 384MB prefetchable MMIO per hotplug bridge (for BAR1+BAR3)
    realloc                - Force PCI resource reallocation for hotplug
    pcie_port_pm=off       - Disable PCIe port power management (prevents D3cold freeze on cold boot)
    pcie_aspm.policy=performance - Minimize ASPM power state transitions
    intel_iommu=off        - Disable IOMMU (reduces DMA latency for eGPU)
    thunderbolt.clx=0      - Disable Thunderbolt low-power states on high-speed lanes
    

    Also blacklist nouveau in initramfs:

    rd.driver.blacklist=nouveau rd.driver.blacklist=nova-core
    

    Driver: Patched 590.44.01 Open (NVreg_ForceExternalGpu module parameter)

    The stock NVIDIA driver does not recognize Thunderbolt 4/5 bridges as valid
    eGPU enclosures. Without proper eGPU detection, power management code runs
    that can cause PCIe link instability.

    Required patch hacks around this by adding a NVreg_ForceExternalGpu module
    parameter (long-term fix will likely require fixes in the GSP firmware)

    • kernel-open/nvidia/nv-reg.h: Define ForceExternalGpu parameter
    • src/nvidia/arch/nvalloc/unix/src/osinit.c: Check parameter and force eGPU mode
    • See attached patch

    When NVreg_ForceExternalGpu=1, the driver bypasses automatic Thunderbolt
    bridge detection and treats the GPU as external, which:

    • Sets PDB_PROP_GPU_IS_EXTERNAL_GPU property
    • Skips Platform Request Handler power management
    • Works with any Thunderbolt enclosure (TB3, TB4, TB5, future)

    Setup

    Step 1: Add CUDA repository

    sudo dnf config-manager --add-repo <https://developer.download.nvidia.com/compute/cuda/repos/rhel10/x86_64/cuda-rhel10.repo>
    sudo dnf config-manager --set-enabled cuda-rhel10-x86_64
    

    Step 2: Install packages

    sudo dnf install kmod-nvidia-open-dkms nvidia-driver-cuda nvidia-gpu-firmware
    
    Installed packages:
      kmod-nvidia-open-dkms-590.44.01-1.el10.noarch
      nvidia-driver-cuda-590.44.01-1.el10.x86_64
      nvidia-driver-cuda-libs-590.44.01-1.el10.x86_64
      nvidia-gpu-firmware-20251008-15.8.el10_0.noarch
      nvidia-kmod-common-590.44.01-1.el10.noarch
      nvidia-modprobe-590.44.01-1.el10.x86_64
      nvidia-persistenced-590.44.01-1.el10.x86_64
      libnvidia-cfg-590.44.01-1.el10.x86_64
      libnvidia-gpucomp-590.44.01-1.el10.x86_64
      libnvidia-ml-590.44.01-1.el10.x86_64
    

    Step 3: Build and install patched driver

    Note: the official NVIDIA repo installs modules to
    /lib/modules/$(uname -r)/extra which supersedes the default install location
    of /lib/modules/$(uname -r)/kernel/drivers/video.

    cd /path/to/open-gpu-kernel-modules
    git apply 0001-nvidia-add-NVreg_ForceExternalGpu-module-parameter.patch
    make -j$(nproc) DEBUG=1 modules
    sudo make modules_install
    

    Step 4: Configure nvidia module options

    Create /etc/modprobe.d/nvidia.conf:

    # Blacklist display modules for compute-only
    blacklist nvidia_drm
    blacklist nvidia_modeset
    
    # Override system softdep - only load nvidia-uvm, skip drm/modeset (compute-only)
    softdep nvidia post: nvidia-uvm
    
    # Disable Resizable BAR (resize fails with small bridge windows)
    options nvidia NVreg_EnableResizableBar=0
    
    # Disable dynamic power management (prevents D3cold issues over Thunderbolt)
    options nvidia NVreg_DynamicPowerManagement=0
    
    # Force eGPU mode (bypasses Thunderbolt bridge detection for TB4/TB5 enclosures)
    options nvidia NVreg_ForceExternalGpu=1
    
    # Lock clocks after driver loads (prevents ASPM-triggered link degradation)
    install nvidia /usr/local/bin/nvidia-egpu-setup.sh $CMDLINE_OPTS
    

    Step 5: Enable nvidia-persistenced

    sudo systemctl enable nvidia-persistenced
    

    Step 5a: Set up automatic clock locking (prevents PCIe link degradation)

    The PCIe link degrades from Gen4 to Gen1 due to ASPM common clock
    reconfiguration during power state transitions. Locking GPU clocks prevents this
    by keeping the GPU active.

    Create /usr/local/bin/nvidia-egpu-setup.sh:

    #!/bin/bash
    # Clock locking wrapper for nvidia module load
    
    logger -t nvidia-egpu "Install directive triggered"
    
    # Load the actual nvidia module first
    /sbin/modprobe --ignore-install nvidia "$@"
    ret=$?
    
    if [ $ret -ne 0 ]; then
        logger -t nvidia-egpu "modprobe failed with $ret"
        exit $ret
    fi
    
    logger -t nvidia-egpu "Module loaded, waiting for nvidia-smi..."
    
    # Wait for nvidia-smi to respond
    for i in {1..60}; do
        if nvidia-smi --query-gpu=name --format=csv,noheader &>/dev/null; then
            logger -t nvidia-egpu "nvidia-smi responding after ${i}s"
            break
        fi
        sleep 1
    done
    
    if ! nvidia-smi --query-gpu=name --format=csv,noheader &>/dev/null; then
        logger -t nvidia-egpu "Timeout - nvidia-smi not responding"
        exit 0  # Don't fail module load
    fi
    
    sleep 2
    
    logger -t nvidia-egpu "Locking clocks..."
    nvidia-smi -pm 1
    nvidia-smi -lgc 3090,3090
    nvidia-smi -lmc 15001,15001
    nvidia-smi -pl 390
    logger -t nvidia-egpu "Complete"
    

    Then mark it as executable

    sudo chmod +x /usr/local/bin/nvidia-egpu-setup.sh
    

    The install directive intercepts modprobe nvidia, runs the script which loads
    the module synchronously, then locks clocks. This avoids backgrounding issues
    where scripts get killed before completion.

    Logs go to syslog (journalctl -t nvidia-egpu).

    Step 6: Enroll Thunderbolt device for auto-authorization

    sudo boltctl enroll <UUID>  # Get UUID from: sudo boltctl list
    

    The enrolled device, in my case:

    UUID: e4ec8780-0079-3b72-ffff-ffffffffffff
    Policy: auto
    

    Step 7: Reboot with eGPU connected

    Verification:

    nvidia-smi
    sudo lspci -vvs 14:00.0 | grep LnkSta  # Should show 16GT/s
    lsmod | grep nvidia  # Should NOT show nvidia_modeset or nvidia_drm
    dmesg | grep -i "external.*gpu"  # Should show eGPU detected
    

    Current Status

    • nvidia-smi: Working
    • nvidia-persistenced: Enabled
    • BAR1: 256MB (ReBAR disabled due to bridge window constraints)
    • Thunderbolt: Auto-authorized via boltctl enrollment
    • PCIe Link: Gen4 (16GT/s) x4 - maintained via clock locking
    • Bandwidth: ~4 GiB/s (Host↔Device)
    • Compute: ~40 TFLOP/s, confirmed with gpu-burn

    Technical Details

    Why Automatic eGPU Detection Fails (without NVreg_ForceExternalGpu):

    The NVIDIA driver's RmCheckForExternalGpu() function checks if a GPU is
    connected via a Thunderbolt eGPU enclosure by:

    1. Looking for Intel vendor ID (0x8086) on upstream bridge
    2. Querying closed-source approved TB3 bridge list
    3. Checking for HotPlug+ AND Surprise+ slot capabilities

    Thunderbolt 4/5 bridges fail because:

    • They're not in the closed-source TB3 approved bridge list
    • TB4/TB5 bridges may report HotPlug- Surprise+ (OR)

    Without eGPU detection, PDB_PROP_GPU_IS_EXTERNAL_GPU is not set, causing the
    Platform Request Handler to run power management code intended for internal
    GPUs.

    Why These Settings:

    1. pcie_port_pm=off: Prevents Thunderbolt bridges from entering D3cold,
      which causes "Unable to change power state from D3cold to D0" errors
      and system freeze on cold boot.

    2. hpmmiosize=64M, hpmmioprefsize=384M: Sized for actual BAR needs:

      • BAR0: 64MB non-prefetchable
      • BAR1: 256MB prefetchable
      • BAR3: 32MB prefetchable

      Larger values starve other bridges since 4 bridges share ~49GB. I believe this
      only applies to hotplug devices.

    3. NVreg_EnableResizableBar=0: ReBAR resize fails with ENOENT because
      the bridge prefetchable window is too small after allocation.

    4. NVreg_DynamicPowerManagement=0: Prevents GPU from entering low power
      states that cause link issues over Thunderbolt.

    5. NVreg_ForceExternalGpu=1: Forces eGPU mode, bypassing automatic
      Thunderbolt bridge detection. Required for TB4/TB5 enclosures. See patch.

    6. softdep nvidia post: nvidia-uvm: Overrides system default that loads
      nvidia-drm (which pulls in nvidia_modeset). Only nvidia and
      nvidia-uvm are needed for compute.

    PCIe Link Speed Issue (Gen4 → Gen1 degradation):

    Without clock locking, the kernel's ASPM code detects "inconsistent common
    clock configuration" during device enumeration and triggers a link retrain.
    The JHL9480 Thunderbolt 5 controller retrains at Gen1 instead of Gen4.

    The message in dmesg is:

    pcieport 0000:00:07.2: ASPM: current common clock configuration is inconsistent, reconfiguring
    

    This happens in drivers/pci/pcie/aspm.c:pcie_aspm_configure_common_clock()
    which calls pcie_retrain_link(). No kernel parameter exists to disable this.

    Workaround: Lock GPU clocks to maximum immediately after driver bind. This keeps
    the GPU in an active power state, preventing the ASPM reconfiguration from
    triggering link speed degradation.


    Last tested: 2025-12-10

  3. jakubtrzcinski commented on Jan 31, 2026

    @jakubtrzcinski

    I had a similar issue running an RTX 5060 Ti via Thunderbolt 3 (Titan Ridge DD 2018 enclosure). Constant Xid 154 crashes
    under CUDA load

    My workaround was lowering the GPU clocks and power limit:

      nvidia-smi -pm 1                                                                                                                                        
      nvidia-smi -lgc 1000,1000                                                                                                                               
      nvidia-smi -pl 150                                                                                                                                      

    Before this change GPU was running for like 3 minutes and crashing,
    not ideal for gaming, but for my use case (running RT-DETR object detection inference) it didn't noticeably affect performance.

  4. LeeTeng2001 commented on Feb 4, 2026

    @LeeTeng2001

    Same issue with gigabyte aorus 5060ti aibox with proxmox linux / macbook 2019 linux

  5. mihau81 commented on Mar 12, 2026

    @mihau81

    RTX 5090 eGPU via Thunderbolt 4 — Hard Lock on Any GPU Write Operation

    Hardware

    Component Details
    Host Intel NUC 15 Pro+ (Arrow Lake, Core Ultra 9 288V)
    RAM 96GB DDR5
    OS Proxmox VE 9.1.5 (Debian Bookworm), bare metal
    Kernel 6.17.9-1-pve (PREEMPT)
    eGPU Enclosure GIGABYTE AORUS GeForce RTX 5090 AI BOX
    GPU NVIDIA GeForce RTX 5090 (GB202, 32GB GDDR7)
    Thunderbolt TB4 (Intel Gen14 controller, JHL9480)
    iGPU Intel Arc (Arrow Lake, i915)

    Driver Versions Tested

    • 590.48.01 open kernel modules (patched with PR nvidia: add RmForceExternalGpu registry key #984) — results below
    • 590.48.01 open kernel modules (without patch) — same crash behavior
    • 580.142 closed kernel modules — same crash behavior
    • 570.133.07 — failed to compile on kernel 6.17

    Kernel Parameters

    intel_iommu=on iommu=pt i915.enable_guc=3
    pci=hpbussize=0x10,hpmmiosize=64M,hpmmioprefsize=384M,realloc
    pcie_port_pm=off pcie_aspm.policy=performance thunderbolt.clx=0

    Modprobe Configuration

    blacklist nvidia_drm
    blacklist nvidia_modeset
    softdep nvidia post: nvidia-uvm

    options nvidia NVreg_EnableResizableBar=0
    options nvidia NVreg_DynamicPowerManagement=0
    options nvidia NVreg_RegistryDwords="RmForceExternalGpu=1"

    What Works

    • Thunderbolt authorization: ✅
    • PCI enumeration (lspci): ✅ 04:00.0 VGA compatible controller: NVIDIA Corporation GB202 [GeForce RTX 5090] (rev a1)
    • Driver load (open kernel modules): ✅
    • nvidia-smi read-only query: ✅

    +-----------------------------------------------------------------------------------------+
    | NVIDIA-SMI 590.48.01 Driver Version: 590.48.01 CUDA Version: 13.1 |
    +-----------------------------------------+------------------------+----------------------+
    | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
    | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
    |=========================================+========================+======================|
    | 0 NVIDIA GeForce RTX 5090 Off | 00000000:04:00.0 Off | N/A |
    | 30% 56C P0 77W / 575W | 0MiB / 32607MiB | 0% Default |
    +-----------------------------------------+------------------------+----------------------+

    What Crashes (Instant Hard Lock)

    Every command that writes to the GPU causes an immediate system hard lock. No kernel panic, no Xid error, no SysRq response. Requires physical power cycle.

    Command Result
    nvidia-smi -pm 1 💀 Instant hard lock
    nvidia-smi -pl 460 💀 Instant hard lock
    nvidia-smi -lgc 2407,2407 💀 Instant hard lock
    CUDA workload 💀 Instant hard lock

    The crash is 100% reproducible. Read-only queries (nvidia-smi, nvidia-smi --query-gpu=...) work indefinitely. Any write operation kills the system instantly.

    PR #984 Results

    I compiled 590.48.01 open kernel modules from source with the RmForceExternalGpu patch applied. The patch successfully fixes eGPU detection — the driver loads cleanly and recognizes the GPU without manual PCI
    remove/rescan workarounds.

    However, the hard lock on write operations persists identically with and without the patch. This confirms:

    1. PR nvidia: add RmForceExternalGpu registry key #984 solves the detection problem — it should be merged
    2. The write/crash problem is separate — likely in the power management or PCIe link renegotiation layer, not in eGPU detection

    dmesg (Successful Load)

    nvidia: module verification failed: signature and/or required key missing - tainting kernel
    nvidia-nvlink: Nvlink Core is being initialized, major device number 508
    nvidia 0000:04:00.0: enabling device (0000 -> 0003)
    NVRM: loading NVIDIA UNIX Open Kernel Module for x86_64 590.48.01 Release Build

    No errors in dmesg before the hard lock. The lock leaves no trace in logs (no Xid, no kernel oops).

    Key Observations

    1. TB4 vs TB5: @roger-pmta reports a working RTX 5080 setup on TB5 with clock locking. My RTX 5090 on TB4 crashes on any write, including the same clock locking commands. This may indicate TB4 has stricter power state
      transitions that trigger the bug.

    2. Read vs Write: The clear boundary between working reads and crashing writes suggests the issue is triggered by GPU state transitions (P-state changes, power rail adjustments) that require PCIe link renegotiation
      through the Thunderbolt bridge.

    3. Not driver-version specific: Tested across 580.142 (closed), 590.48.01 (open, unpatched), and 590.48.01 (open, PR nvidia: add RmForceExternalGpu registry key #984 patched) — identical crash behavior on all three.

    Environment Notes

    • Proxmox VE (bare metal hypervisor, no desktop environment)
    • No display connected to eGPU
    • Intel Arc iGPU active simultaneously (i915)
    • ZFS root filesystem
  6. rvn2p commented on Mar 17, 2026

    @rvn2p

    Same behavior with a Lenovo E14 Gen 5 (intel) and a Aorus RTX 5090 AI BOX connected via TB4 on Debian Trixie and sid

    Best result with 590.48.01 (plus #984) and a few tweaks from https://egpu.io/forums/postid/1118819/

    Depending on Kernel boot parameters, driver versions and moonphase i have varying degrees of functionality:

    • Direct freeze of the system when connecting the gpu
    • one-time access via nvidia-smi and subsequent freeze when trying to access the card again
    • full repeated use of nvidia-smi including powermizer, clocks and readouut
    • one-time execution of a cuda workload for 3 hours (non-repeatable and only acquired once and never again within four system re-installs tweaking and four driver versions and two driver patches)

    The card itself seems to be working from the hardware side (had it running for 24h hours in furmark when booting windows 11)

  7. fanfanmgz commented on Apr 1, 2026

    @fanfanmgz

    Additional data point: RTX 5060 Ti eGPU via Thunderbolt 4 — same hard-lock on CUDA

    Hardware

    • Host: ASUS ROG Strix G18 G814JIR (Intel Core i9-14900HX)
    • Internal GPU: NVIDIA RTX 4070 Laptop GPU (8 GB, Ada, compute 8.9) — works perfectly
    • eGPU: Gigabyte AORUS RTX 5060 Ti AI BOX (16 GB, Blackwell GB206, compute 12.0)
    • Connection: Thunderbolt 4 / USB4 (40 Gb/s, PCIe Gen4 x4 tunneled)
    • RAM: 32 GB DDR5-5600

    Software

    • OS: Fedora 43 Workstation
    • Kernels tested: 6.18.13-200.fc43, 6.19.7-200.fc43, 6.19.10-200.fc43
    • Drivers tested: 580.126.18 and 595.58.03 (open kernel modules, .run installer with --dkms)

    Symptom — identical to #979

    nvidia-smi works perfectly at idle. Both GPUs visible. cuInit(), cuDeviceGet(), cuDeviceGetName(), cuDeviceTotalMem() all return correct results on the eGPU.

    cuCtxCreate_v2() triggers a full system hard-lock within 2-5 seconds. No kernel panic, no SysRq response, hard power cycle required. Sometimes cuCtxCreate returns 0 (success) and cuMemAlloc also returns 0, but the system freezes on process exit (context destroy / cleanup).

    Minimal reproducer

    bash
    CUDA_VISIBLE_DEVICES=1 timeout 15 python3 -c "
    import ctypes, time
    libcuda = ctypes.CDLL('libcuda.so.1')
    libcuda.cuInit(0)
    dev = ctypes.c_int()
    libcuda.cuDeviceGet(ctypes.byref(dev), 0)
    ctx = ctypes.c_void_p()
    rc = libcuda.cuCtxCreate_v2(ctypes.byref(ctx), 0, dev)
    print(f'cuCtxCreate: {rc}', flush=True)
    if rc == 0:
        devptr = ctypes.c_uint64()
        rc = libcuda.cuMemAlloc_v2(ctypes.byref(devptr), 1024*1024)
        print(f'cuMemAlloc: {rc}', flush=True)
    time.sleep(30)
    " ; echo "exit: $?"

    BAR status (without pci=realloc)

    Region 0: Memory at 6c000000 (32-bit, non-prefetchable) [size=64M]
    Region 1: Memory at 6240000000 (64-bit, prefetchable) [size=256M]
    BAR 1: current size: 256MB, supported: 16GB
    VF BAR 2: can't assign; no space
    VF BAR 4: can't assign; no space

    Exhaustive list of workarounds tested — NONE resolve the hard-lock

    Configuration | Result -- | -- iommu=off | cuCtxCreate: 999 (no freeze, but no compute) iommu=pt | Hard-lock IOMMU default (kernel default) | Hard-lock pci=realloc,hpmmioprefsize=16G,hpmmiosize=128M | Hard-lock No pci= args at all | Hard-lock NVreg_EnableGpuFirmware=0 (GSP off) | Parameter ignored + hard-lock NVreg_EnableHMM=0 | Hard-lock NVreg_DynamicPowerManagement=0x00 | Hard-lock NVreg_RegistryDwordsPerDevice="pci=0000:07:00.0;RmForceExternalGpu=1" | Hard-lock pcie_ports=native pcie_aspm=off pcie_port_pm=off | Hard-lock thunderbolt.clx=0 | Hard-lock udev: d3cold_allowed=0 + power/control=on | Hard-lock All above combined | Hard-lock 3 different kernels (6.18.13, 6.19.7, 6.19.10) | Hard-lock on all Driver 580.126.18 | Hard-lock Driver 595.58.03 | Hard-lock Power cycle of eGPU enclosure | Hard-lock Proprietary kernel modules (akmod-nvidia) | NVRM: requires use of the NVIDIA open kernel modules — Blackwell refused

    Key observations

    1. Read-only operations work: nvidia-smi, cuInit, cuDeviceGet, cuDeviceGetName, cuDeviceTotalMem — all stable indefinitely
    2. Write operations crash: cuCtxCreate_v2 (DMA mapping setup) triggers the lock
    3. Process exit crashes even on "success": On one occasion (driver 595, first install), cuCtxCreate: 0 + cuMemAlloc: 0 succeeded, but the system froze on process termination (context destroy)
    4. Internal GPU unaffected: RTX 4070 Laptop GPU on the same system works perfectly with CUDA
    5. Screen corruption on some freezes: Sometimes the freeze shows color artifacts (not just black screen), suggesting PCIe bus-level corruption

    Conclusion

    This is a blocking issue for all Blackwell eGPU users on Linux. The AORUS RTX 5060 Ti AI BOX is a product explicitly marketed for AI workloads, yet CUDA compute is impossible on Linux. The same hardware works under Windows 11 25H2.

    nvidia-bug-report.log.gz

  8. gerpervaz commented on Apr 7, 2026

    @gerpervaz

    Confirming a very similar pattern on Windows + USB4 (not TB5) + RTX 5080

    I am experiencing a closely matching pattern to the one described here: the RTX 5080 is stable at idle and under light/moderate CUDA load, but crashes under heavier sustained CUDA load.

    I am reporting this because my setup differs significantly from the original report (Windows instead of Linux, USB4 instead of TB5, different dock), yet the failure mode looks very similar. That suggests a possible common issue in the driver / firmware layer rather than something limited to one OS or enclosure.

    Hardware

    • Host: Beelink SER9 Pro
    • CPU: AMD Ryzen AI 9 HX 370
    • eGPU dock: EXP GDC TH3P4G3 (85W) (Thunderbolt 4 / USB4)
    • GPU: ASUS Prime GeForce RTX 5080 OC Edition 16GB
    • PSU: Corsair SF1000
    • Connection: USB4 40 Gbps
    • OS: Windows 11
    • Driver: 595.79
    • CUDA: 13.2
    • BIOS: SER9T305 (latest available for this board revision, updated during this investigation)

    What works

    • nvidia-smi reports the GPU correctly at idle (Status OK, 16303 MiB VRAM visible)
    • GPU remains stable at idle for extended periods
    • deviceQuery from CUDA samples: PASS
    • Small PyTorch tensor operations on GPU: stable
    • ~4 GB VRAM allocation + write: stable
    • 4096x4096 float16 matrix multiplication sustained for 60 seconds: stable

    What crashes

    • Heavier sustained CUDA stress with high VRAM pressure: hard crash
    • LLM inference in both LM Studio and Ollama with models loaded to GPU (~12+ GB VRAM): hard crash
    • The crash is not application-specific; I reproduced it with PyTorch, LM Studio, and Ollama independently

    Crash signature on Windows

    • Bugcheck 0x00000119 (VIDEO_SCHEDULER_INTERNAL_ERROR)
    • Bugcheck 0x00000116 (VIDEO_TDR_FAILURE)
    • LiveKernelEvent 141 and 193
    • In earlier tests before BIOS update: nvlddmkm Event ID 14/153
    • In earlier tests before BIOS update: WHEA-Logger Event ID 16/17 pointing to PCI Express Root Port / Upstream Switch Port
    • GPU may enter PnP error states such as CM_PROB_HELD_FOR_EJECT (47), CM_PROB_PHANTOM, or Present = False
    • Recovery is not graceful; usually requires power-cycling the eGPU dock, and sometimes a forced host shutdown

    Approximate stability boundary

    Load level Test Result
    Idle nvidia-smi, deviceQuery Stable
    Low ~4 GB VRAM allocation + write Stable
    Medium 4096x4096 matmul for 60s Stable
    High heavier sustained mixed CUDA + VRAM pressure Crash

    This suggests the issue appears once sustained PCIe traffic and VRAM pressure cross a certain threshold.

    BIOS update impact

    Updating the host BIOS from SER9T301 to SER9T305 improved low-level link stability. The GPU now enumerates more reliably as Status OK on boot and survives idle + moderate load more consistently. However, the hard crash under high sustained CUDA load still persists, which suggests the root cause is above basic ACPI / PCIe enumeration.

    Why this seems relevant

    My setup differs from the original report in several important ways:

    • Windows vs Linux
    • USB4 vs TB5
    • TH3P4G3 vs another enclosure

    Despite that, the overall behavior is very similar: RTX 5080 works at idle, survives lighter CUDA work, then hard-locks under sustained heavier CUDA load in an external tunneled-PCIe setup.

    That cross-platform similarity makes me suspect a broader driver or GSP firmware issue affecting Blackwell GPUs in tunneled-PCIe configurations.

  9. bilikaz commented on Apr 17, 2026

    @bilikaz

    Managed to get similar box running without issues.

    Data point for narrowing this down: similar setup (RTX 5080 + Razer Core X V2 over TB5, Dell Latitude 5540, Ubuntu 24.04, kernel 6.17, 590.48.01-open) working stably under sustained CUDA load — 4275 iterations of 8000×8000 matmul over 120s (~36 TFLOPs, no hard-lock, no throttling).

    Two config differences from this issue that I suspect are load-bearing:

    • pci=realloc=off instead of pci=assign-busses,realloc. Counterintuitive — HPE advisory a00151736en_us documents that on Ubuntu + NVIDIA, pci=realloc can remove BIOS-assigned BARs without reassigning them. Switching to =off was what got probe to succeed here.
    • NVreg_DynamicPowerManagement=0x00 via modprobe — prevents D3cold entry, which over TB presents as "fallen off the bus."

    Also: BIOS pre-boot TB modules enabled so BARs are allocated at POST, and cold-boot-only (no hot-plug).

    Full recipe: https://forums.developer.nvidia.com/t/working-configuration-rtx-5080-razer-core-x-v2-thunderbolt-5-on-ubuntu-24-04-kernel-6-17-driver-590-48-01-open/366919

    Haven't done ablation testing, and the enclosure/laptop differs from the original report (Razer Core X V2 vs Sonnet 850T5), so hardware might be the real variable. But the pci=realloc and power-management deltas seem worth testing given they target exactly the class of failure described.

  10. fanfanmgz commented on Apr 20, 2026

    @fanfanmgz

    @bilikaz Thanks for this data point. I tested your full configuration on my
    setup (ASUS ROG Strix G18 G814JIR, i9-14900HX, TB4, Gigabyte AORUS RTX 5060 Ti
    AI BOX, driver 595.58.03 open):

    • pci=realloc=off: confirmed improvement — BAR0 is correctly allocated by BIOS
      (no more "BAR0 is 0M @ 0x0"), driver initializes on eGPU, nvidia-smi sees
      both GPUs, no GSP heartbeat timeout
    • NVreg_DynamicPowerManagement=0x00: applied
    • All other params from your recipe applied (pcie_aspm=off, pcie_ports=native,
      pcie_port_pm=off, thunderbolt.clx=0, thunderbolt.host_reset=0, iommu=pt)

    However: cuCtxCreate still returns 999, and system freezes shortly after.

    The critical difference is the BIOS. My ASUS ROG BIOS (v322, latest) does NOT
    expose "Thunderbolt PCIe pre-boot modules" — this option doesn't exist on ASUS
    gaming laptops. Cold boot with eGPU connected freezes before login. Only
    hot-plug works for detection, but then CUDA fails with 999.

    This confirms your suspicion that "hardware might be the real variable" —
    specifically, the BIOS pre-boot TB enumeration appears to be the key
    differentiator. Without it, the GPU BARs are allocated but seemingly not in a
    state the driver can use for DMA/compute.

    Affected BIOS: ASUS ROG (no TB pre-boot option)
    Working BIOS: Dell Latitude (TB pre-boot modules enabled)

  11. bilikaz commented on Apr 22, 2026

    @bilikaz

    Do you disable video rendering by os on card? I have disable with few scripts using card just for AI. If i connect HDMI it always crashes hard in 5-10s. Due to signal instability. Buy for AI i was sniping containers with load of 12-13gb and load 97% no issues even running for several hours.

  12. fanfanmgz commented on Apr 24, 2026

    @fanfanmgz

    Windows baseline rules out hardware — reinforces BIOS pre-boot TB hypothesis

    Quick follow-up on my earlier report. Reimaged the same hardware (ASUS ROG
    Strix G18 G814JIR + AORUS RTX 5060 Ti AI BOX TB4) with Windows 11 25H2 to rule
    out hardware defect before investing more time on Linux.

    Windows result: fully stable under sustained CUDA load (driver 595.79
    Studio, CUDA 13.2, AORUS TB firmware F1.1 latest). Multi-hour LLM inference
    workloads complete cleanly — no Xid, no TDR, no link degradation. Baseline
    established at ~87 tok/s on a 13 GB MoE model (GPT-OSS 20B MXFP4) on the
    5060 Ti alone, stable.

    Point being: the exact hardware that hard-locks on cuCtxCreate_v2 under
    Linux runs arbitrary sustained compute on Windows indefinitely. Hardware
    defect and firmware are excluded.

    Implication for the Linux hard-lock

    Combined with @bilikaz's working Ubuntu/Dell Latitude config (which
    explicitly relies on "BIOS pre-boot TB modules enabled so BARs are allocated
    at POST"), and my failed attempt to replicate his config on ASUS (which
    lacks the pre-boot TB option), the evidence converges on:

    The Linux hard-lock on Blackwell eGPUs via TB4/TB5 appears correlated with
    hosts that cannot enumerate TB devices at POST
    — specifically consumer/
    gaming BIOSes (ASUS ROG, MSI gaming, Lenovo Legion) vs business BIOSes
    (Dell Latitude, HPE) which expose "Thunderbolt PCIe pre-boot modules" as
    a UEFI toggle.

    When BARs are allocated at POST:

    • BIOS completes full PCIe enumeration including TB-tunneled devices
    • BAR1 sizing happens under firmware control with stable power state
    • Driver inherits a working memory map

    When BARs are allocated at hot-plug (ASUS ROG case):

    • Kernel handles enumeration via pci=realloc or equivalent
    • Memory map passes read-only checks (nvidia-smi works)
    • But cuCtxCreate_v2 (which triggers DMA mapping through the TB bridge)
      fails catastrophically

    Consistent with this: on my Linux attempts, lspci -vv always showed the
    5060 Ti with BAR1 capped at 256 MB (vs 16 GB supported), and "VF BAR 2:
    can't assign; no space". Even with pci=realloc,hpbussize=0x10, hpmmiosize=64M,hpmmioprefsize=384M, the runtime allocation never achieved
    what BIOS pre-boot enumeration achieves in @bilikaz's working config.

    Request for data points

    If anyone has additional working/failing configs, could you confirm:

    1. Working config: does your host BIOS expose a "Thunderbolt PCIe
      pre-boot modules"
      or "TB Pre-Boot ACPI" option? Is it enabled?
    2. Failing config: is your BIOS from a consumer/gaming OEM line
      (ASUS ROG/TUF, MSI gaming, Lenovo Legion, Acer Predator, HP Omen),
      and does it lack any TB pre-boot toggle?

    Correlating this across more data points would help confirm whether this
    is primarily a BIOS-level enumeration limitation on consumer laptop
    lines rather than purely a driver/GSP issue.

    Happy to test any candidate kernel patches or driver parameters on this setup if someone wants a reproducible test subject.

  13. rvn2p commented on Apr 29, 2026

    @rvn2p

    I followed @bilikaz recipe (https://forums.developer.nvidia.com/t/working-configuration-rtx-5080-razer-core-x-v2-thunderbolt-5-on-ubuntu-24-04-kernel-6-17-driver-590-48-01-open/366919) with my setup:

    Lenovo E14 Gen 5 intel (updated to system firmware 0.1.39)
    AORUS RTX 5090 AI BOX
    Debian sid 6.19.14+deb14-amd64
    Nvidia open Driver 595.71.05

    i can access nvidia-smi read only and can set clock values and persistence mode but one i start a proper cuda workload the system freezes instantly.

    It seems like without having the right thunderbolt config settings in uefi this workaround will not work for me =(

  14. jciolek commented on May 1, 2026

    @jciolek

    Additional data point: AORUS RTX 5090 AI BOX via Thunderbolt/USB4 — one success, otherwise Xid 79 under CUDA/Blender/ollama load

    I am adding another data point for the Blackwell eGPU instability described in this issue. My setup is a GIGABYTE AORUS RTX 5090 AI BOX connected over Thunderbolt/USB4 to a Dell XPS 17 9720 Linux laptop. The GPU enumerates, nvidia-smi works, and read-only queries are stable. CUDA/Blender/ollama load reproducibly causes the external GPU to fall off the PCIe bus with Xid 79.

    The interesting part is that I had one successful boot where this same setup worked for several hours: I rendered multiple Blender scenes and loaded several Ollama models on the RTX 5090. The next comparable boot, with materially the same kernel/cmdline/driver/eGPU path, failed almost immediately under Blender. So this is not always a deterministic "never works" failure; there appears to be a rare lucky initialization state.

    Hardware

    Component Details
    Host Dell XPS 17 9720
    dGPU NVIDIA GeForce RTX 3060 Laptop GPU
    iGPU Intel Iris Xe / Alder Lake-P
    eGPU enclosure GIGABYTE AORUS RTX 5090 AI BOX
    External GPU NVIDIA GeForce RTX 5090 / GB202, 32 GB
    Connection USB4 / Thunderbolt, reported by boltctl as 40 Gb/s RX + 40 Gb/s TX, 2 lanes × 20 Gb/s
    Thunderbolt bridge in enclosure Intel JHL9480 / Barlow Ridge, device IDs observed as 8086:5786
    Laptop TB controller path Intel Thunderbolt 4 / Maple Ridge bridges, device IDs observed as 8086:1136, 8086:1137, 8086:1138
    Dell firmware Latest available Dell firmware at time of testing
    AORUS firmware No newer firmware found
    Cable Tried more than one Thunderbolt cable; issue persists

    I am intentionally omitting GPU UUIDs, host name, user name, home paths, and Thunderbolt UUIDs.

    Software

    Component Details
    OS Manjaro Linux, KDE/Wayland
    Primary kernel used for controlled tests 6.18.18-1-MANJARO
    Other kernels tried 6.19.x series, including a later 6.19 build
    NVIDIA driver / open kernel module 590.48.01
    CUDA workload used for reproduction Blender Cycles CUDA render, BMW demo scene
    Other workload that worked during the one good session Ollama model loading/inference on the RTX 5090

    Current successful enumeration example:

    GPU 0: NVIDIA GeForce RTX 3060 Laptop GPU, PCI 00000000:01:00.0
    GPU 1: NVIDIA GeForce RTX 5090, PCI 00000000:73:00.0
    Driver Version: 590.48.01
    RTX 5090 idle state: P8, ~575 W default power limit, PCIe Gen1 x4 as reported by nvidia-smi
    

    Kernel also reports the 5090 link as limited:

    pci 0000:73:00.0: 8.000 Gb/s available PCIe bandwidth,
    limited by 2.5 GT/s PCIe x4 link at 0000:6f:01.0
    (capable of 504.112 Gb/s with 32.0 GT/s PCIe x16 link)
    

    Kernel parameters tested

    The one known-good boot and at least one failed boot both used the minimal cmdline:

    security=apparmor udev.log_priority=3 ibt=off iommu=pt
    

    I also tested variants involving:

    pci=realloc
    pci=assign-busses
    pcie_port_pm=off
    pcie_aspm=off
    thunderbolt.clx=0
    hpmmioprefsize=64G
    hpmmioprefsize=4G
    hpmmioprefsize=2G
    

    The hpmmioprefsize changes affected resource-window noise, but did not provide a stable fix. 64G was clearly too large. 2G and 4G still allowed failures. The currently most useful comparison remains the minimal cmdline above, because I had both success and failure with materially the same visible pre-load state.

    What works

    • The AORUS box is authorized by Thunderbolt/USB4.
    • The RTX 5090 enumerates on PCIe.
    • nvidia binds to both the internal RTX 3060 and external RTX 5090.
    • nvidia-smi read-only queries work.
    • Persistence mode and clock/power commands can be applied without immediately crashing the machine in at least some boots.
    • One boot worked for several hours with Blender renders and Ollama models on the RTX 5090.

    What crashes

    Blender Cycles CUDA rendering on the RTX 5090 causes the external GPU to disappear from the PCIe bus.

    Recent controlled reproduction:

    Blender started
    BMW demo scene loaded
    Rendering started:
    NVRM: Xid (PCI:0000:73:00): 79, GPU has fallen off the bus.
    NVRM: GPU 0000:73:00.0: GPU has fallen off the bus.
    NVRM: nvGpuOpsReportFatalError: uvm encountered global fatal error 0x60, requiring os reboot to recover.
    NVRM: Xid (PCI:0000:01:00): 154, GPU recovery action changed from 0x0 (None) to 0x2 (Node Reboot Required)
    NVRM: Xid (PCI:0000:73:00): 154, GPU recovery action changed from 0x0 (None) to 0x2 (Node Reboot Required)
    

    Blender then reports secondary CUDA errors:

    cycles | ERROR Failed to retain CUDA context (Unknown error)
    cycles | ERROR Invalid context in cuStreamCreate(...)
    cycles | ERROR Launch failed ...
    

    Those Blender CUDA errors appear to be consequences of the GPU already being lost, not the primary failure.

    After the NVIDIA failure, USB/TB-side fallout can appear, for example:

    r8152 ... NETDEV WATCHDOG: transmit queue 0 timed out
    

    This happens after the Xid 79 / bus loss and looks like collateral damage from the Thunderbolt/USB4 path getting wedged.

    Reproducer

    1. Cold boot laptop with the AORUS box attached and powered.

    2. Confirm the 5090 is visible:

      nvidia-smi
    3. Start Blender and render the BMW demo scene using CUDA on the RTX 5090.

    4. Within seconds the external RTX 5090 usually hits Xid 79 and disappears from the bus.

    In some attempts the whole machine hard-locked before logs were flushed. In others, the machine is usable for a minute or so, before it hard-locks. When the machine hard-locks, it does not respond to magic sysrq.

    Workarounds / mitigations tried

    Power and clock limiting

    I tried persistence mode, minimum power limit, and graphics clock locks:

    nvidia-smi -i 1 -pm 1
    nvidia-smi -i 1 -pl 400
    nvidia-smi -i 1 -lgc 1000,1000
    nvidia-smi -i 1 -lgc 1500,1500
    nvidia-smi -i 1 -lgc 2000,2000

    Notes:

    • The RTX 5090 reports a minimum power limit of 400 W, so lower limits such as 300 W are not accepted/effective.
    • 1000 MHz initially allowed multiple Blender passes after a cold boot.
    • 1500 MHz also allowed some passes initially.
    • On subsequent boots, Blender renders still caused a crashe/falling off the bus even at the conservative 1000 MHz lock.
    • Therefore clock limiting is not a reliable workaround on this setup.

    Kernel parameters

    I tested PCI resource allocation and power-management related parameters, including pci=realloc, assign-busses, pcie_port_pm=off, pcie_aspm=off, thunderbolt.clx=0, and several hpmmioprefsize values. None provided a reliable fix.

    Cable / firmware

    • Tried another Thunderbolt cable and port, various combinations.
    • Tried with and without laptop charger connected (the enclosure doubles as a power supply, but is reported by my laptop as not providing enough power).
    • Dell firmware is current.
    • No newer AORUS firmware found.

    Successful "unicorn" boot

    The most notable observation is one long successful boot:

    • Same general hardware.

    • Same 6.18.18-1-MANJARO kernel.

    • Same minimal cmdline:

      security=apparmor udev.log_priority=3 ibt=off iommu=pt
      
    • Same external GPU PCI path in the logs.

    • Same recurring UCSI/typec errors.

    • Same general PCI resource warning pattern.

    • Same Gen1 x4 reported eGPU link limitation.

    • Blender rendered successfully.

    • Ollama loaded and used models on the 5090.

    • No Xid 79 occurred during that session.

    The following failed workload boot looked materially the same before load, but Blender triggered Xid 79 almost immediately.

    This suggests there is hidden state not captured by ordinary logs: possibly NVIDIA/GSP initialization state, Thunderbolt/USB4 tunnel state, retimer/link training state, runtime PM/LTR state, or enclosure warm/cold state.

    Recurring boot-time warnings seen in both good and bad boots

    These are present often enough that they are suspicious, but they are not sufficient to distinguish good from bad boots:

    sysfs: cannot create duplicate filename '/devices/platform/USBC000:00/typec/port0/port0.0/partner'
    typec-thunderbolt port0-partner.1: failed to create symlinks
    typec-thunderbolt port0-partner.1: probe with driver typec-thunderbolt failed with error -17
    ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-5)
    

    NVIDIA also reports external-GPU / PCI hierarchy related messages such as:

    NVRM: GPU1 objClInitPcieChipset: *** Unable to get PCI port handles
    NVRM: GPU1 kbifInitLtr_GB202: LTR is disabled in the hierarchy
    

    Again, these appear in boots where the card can enumerate and sometimes run, so they are not by themselves a complete explanation.

    Assessment

    This looks like the same class of issue reported by others here:

    • Blackwell eGPU over Thunderbolt/USB4.
    • nvidia-smi works at idle.
    • Read-only access is stable.
    • CUDA/Blender load causes the GPU to disappear from PCIe.
    • NVIDIA reports Xid 79, then UVM fatal 0x60, then Xid 154 requiring reboot.

    My best guess is a cross-layer issue in the NVIDIA Blackwell/GSP external-GPU path interacting with Thunderbolt/USB4 PCIe tunneling. Thunderbolt/USB4 is clearly part of the failure mechanism because the GPU falls off the bus, but the trigger is NVIDIA CUDA/render load and the failure signature is in NVRM/GSP/UVM.

    The one successful boot makes this especially interesting: the visible Linux PCI/TB/NVIDIA state before workload was effectively the same as in failed boots, which points to hidden initialization/link/firmware state rather than a simple missing kernel parameter.

    Additional notes

    • The internal RTX 3060 is not the primary failing device. It receives Xid 154 after the external 5090 is lost, apparently as part of NVIDIA's global recovery state.
    • The eGPU has no display attached.
    • I am not attaching nvidia-bug-report.sh output here because previous attempts to run heavy NVIDIA diagnostics after GPU loss caused a hard lockup every time.
  15. 26 remaining items

  16. djanice1980 commented on Aug 11, 2026

    @djanice1980

    Independent confirmation on different hardware — AMD host, different enclosure vendor, native USB4 rather than TB5→TB4, and a cold-boot path with no hotplug event. Same root cause.

    Setup

      |   -- | -- Host | ASUS ROG Flow Z13 GZ302EA — AMD Strix Halo (Ryzen AI Max), native USB4 host routers, not Intel Thunderbolt Enclosure | Razer Core X V2 (Intel JHL9480 Barlow Ridge, 8086:5786) GPU | RTX 5070 Ti (GB203, 10de:2c05) OS | CachyOS, kernel 7.1.8 Driver | 610.57.04 open

    Why detection fails here

    The upstream bridge directly above the GPU:

    $ lspci -nn -s 12:00.0
    12:00.0 PCI bridge [0604]: Intel Corporation JHL9480 Thunderbolt 5 80/120G Bridge
            [Barlow Ridge Hub 80G 2023] [8086:5786] (rev 85)
    

    $ sudo lspci -vv -s 12:00.0 | grep -E 'SltCap|LnkCap:'
    LnkCap: Port #0, Speed 16GT/s, Width x4, ASPM L1, Exit Latency L1 <4us
    SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise+

    Both gates in RmCheckForExternalGpu() miss:

    1. bTb3Bridge — vendor is Intel so the branch is entered, but the RM control requires approvedBusType == NV2080_CTRL_INTERNAL_EGPU_BUS_TYPE_TB3. A TB5 controller cannot match a TB3-only approved list.
    2. bSlotHotPlugSupport — requires CL_PCIE_SLOT_CAP_HOTPLUG_CAPABLE && CL_PCIE_SLOT_CAP_HOTPLUG_SURPRISE. The JHL9480 reports HotPlug- with Surprise+, so the AND fails.

    With both NV_FALSE, iseGPUBridge stays false, PDB_PROP_GPU_IS_EXTERNAL_GPU is never set, and internal-GPU power management runs against a device behind a PCIe tunnel.

    Topology for reference:

    +-01.2-[11-43]----00.0-[12-43]--+-00.0-[13]--+-00.0  NVIDIA GB203 [RTX 5070 Ti]
                                    |            \-00.1  NVIDIA GB203 HD Audio

    Symptoms before patching

    Reproducible across many boots on this hardware:

    pcieport 0000:00:01.2: pciehp: Slot(0-1): Link Down
    pcieport 0000:00:01.2: pciehp: Slot(0-1): Card not present
    [drm] [nvidia-drm] No NVIDIA GPUs found

    — roughly one second after NVRM: loading NVIDIA UNIX Open Kernel Module. The link was healthy and fully enumerated before the module loaded.

    snd_hda_intel 0000:63:00.1: Unable to change power state from D3cold to D0, device inaccessible

    After this, setpci -s <gpu> VENDOR_ID returns ffff for both functions. Recovery required removing the upstream bridge and rescanning. A bare /sys/bus/pci/rescan re-adds the device without resizing the parent bridge windows and produces NVRM: BAR0 is 0M @ 0x0.

    NVRM: GPU0 _kgspIsHeartbeatTimedOut: Heartbeat timed out, ... diff 29085 timeout 5200
    NVRM: GPU0 _kgspRpcRecvPoll: GSP RM heartbeat timed out
    NVRM: Xid (PCI:0000:63:00): 56, CMDre ...
    NVRM: Xid (PCI:0000:63:00): 8, pid=..., name=kwin_wayland, channel 0x0000000b
    NVRM: Xid (PCI:0000:63:00): 79, GPU has fallen off the bus.

    Visible display corruption accompanied the Xid 56 events. GPU recovered on its own afterward rather than hard-locking, so this platform produces a survivable version of the failure reported in #981 — with actual Xid codes, which may be more diagnostically useful than a silent lock.

    Not a hardware fault: Windows was stress-tested on identical hardware for one hour with zero artifacts and zero instability. This eliminates the card, enclosure, cable, PSU capacity, and thermals.

    After patching

    Applied the equivalent of the patch from #981 — an early return in RmCheckForExternalGpu() gated on a registry key, placed after the local declarations:

    c
        NvU32 forceExternal = 0;
        if ((osReadRegistryDword(NULL, "RmForceExternalGpu", &forceExternal) == NV_OK) && forceExternal)
        {
            NV_PRINTF(LEVEL_ERROR, "RmForceExternalGpu set: treating GPU as external (eGPU)\n");
            return NV_TRUE;
        }

    Enabled via options nvidia NVreg_RegistryDwords="RmForceExternalGpu=1".

    [    5.970939] NVRM: loading NVIDIA UNIX Open Kernel Module for x86_64  610.57.04
    [   11.097748] NVRM: GPU0 RmCheckForExternalGpu: RmForceExternalGpu set: treating GPU as external (eGPU)

    Results:

    • Clean cold boot with the enclosure attached — no manual rescan, no replug
    • dmesg | grep -ciE 'xid|heartbeat|RmInitAdapter' → 0
    • 50 consecutive nvidia-smi -q invocations with no Xid and no lock (this is the pattern reported as hard-locking in the eGPU.io thread)
    • Sustained load: PCIe Gen4 x4, 100% utilization, 300.12 W, stable
    • Idle power dropped from 21 W / 47 °C to 10 W / 42 °C — consistent with the correct power management path finally being selected

    One transient Link Down still appears at ~7 s during init, before the driver attaches at ~11 s. It self-recovers and the GPU comes up normally, so it is no longer fatal, but it suggests something in the early attach sequence still perturbs the link.

    What this adds to the diagnosis

    The theory circulating on eGPU.io attributes the failure to hotplug timing — enclosure PSU negotiation on power-up, and TB5→TB4 controller link settling before the driver loads.

    My case fails on a cold boot where the link has been up since POST, on an AMD host with no TB5→TB4 generation crossing, with a different enclosure vendor. So enclosure power sequencing and controller-generation mismatch are not necessary conditions.

    The common factor across #900 (RTX 5090 / OCuLink), #981 (RTX 5080 / Sonnet TB5), and this report is narrower: Blackwell — where GSP is mandatory — behind an external PCIe link, misclassified as an internal GPU.

    Suggested direction

    • Extend approvedBusType beyond NV2080_CTRL_INTERNAL_EGPU_BUS_TYPE_TB3 to cover TB4, TB5, and USB4
    • Reconsider the HOTPLUG_CAPABLE && HOTPLUG_SURPRISE requirement — TB4/TB5 downstream ports legitimately report HotPlug- with Surprise+, so Surprise+ alone may be the right signal when the upstream bridge is a USB4/TB PCIe tunnel adapter
    • Consider shipping a supported module parameter for enclosures not on the approved list, so users are not required to patch and self-build the driver

    The approved-bridge list itself lives in closed components, so external contributors cannot fix the underlying data — which is why a supported override would help in the interim.

    Platform note for AMD hosts

    pcie_aspm=off (recommended in #981 for the Intel platform) is harmful on AMD Strix Halo. It breaks the ACPI _OSC negotiation:

    acpi PNP0A08:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI]

    The OS never takes PCIe ownership, and MSI-X allocation then fails:

    NVRM: GPU 0000:03:00.0: Failed to enable MSI-X.
    NVRM: osInitNvMapping: *** Cannot attach gpu
    NVRM: GPU 0000:03:00.0: RmInitAdapter failed! (0x22:0x56:894)

    pcie_aspm.policy=performance avoids this while still minimizing ASPM transitions. Full working cmdline here:

    pcie_port_pm=off pcie_aspm.policy=performance thunderbolt.clx=0
    pci=assign-busses,hpbussize=0x10,hpmmiosize=64M,hpmmioprefsize=384M,realloc

    Happy to test patches or supply additional logs. nvidia-bug-report.log.gz attached.

    nvidia-bug-report.log.gz

  17. kreggencor-crypto commented on Aug 24, 2026

    @kreggencor-crypto

    Another RTX 5060 Ti datapoint — and an attempt to narrow where the failure happens, plus a method for capturing evidence through a hard lock.

    Same failure class as @guoxh's RTX 5060 Ti report above, on a different host. What I can add is a boundary: the lock-up tracks driver attach, not any particular CUDA call — and a way to prove that when the machine dies without logging anything.

    Environment

    Host CORSAIR AI WORKSTATION 300 — AMD Ryzen AI Max+ 395 "Strix Halo", Radeon 8060S iGPU drives the display
    BIOS Sixunited AXB35-02, AMI 3.07
    GPU ASUS RTX 5060 Ti 16 GB, Blackwell GB206, 10de:2d04
    Driver 580.173.02, open kernel modules; NVreg_EnableGpuFirmware=0 set (does not help)
    Kernel 7.0.0-28-generic, cmdline iommu=pt pci=realloc
    Enclosure Minisforum DEG2 / TBGAA (USB4), Intel Barlow Ridge 8086:5786 ×5 bridges
    Topology host root port 00:01.1 2.5 GT/s x1 → dock upstream 01:00.0 → dock downstream 02:00.0 16 GT/s x4 → GPU 03:00.0

    Signature matches the thread exactly: no kernel panic, no Xid, no journal entry, no SysRq. Power cycle only.

    Capturing evidence when the host dies mid-command

    Nothing survives a hard lock unless you force it to disk first. Each step writes START plus the command text and calls fsync() before running it, then OK + fsync() after. A lock-up therefore leaves a START with no matching OK, naming the exact command, and it survives the power cut:

    13:04:29.473  START 7  lspci -vv full config space read
    13:04:29.519  OK    7  rc=0                                    <- survived
    13:06:17.601  START 8  nvidia-smi -L
    13:06:19.440  OK    8  rc=0                                    <- survived
    13:08:20.709  START 9  nvidia-smi --query-gpu=...,pcie.link.gen.current,pcie.link.width.current
                           <- no OK. Host dead.
    

    journalctl --list-boots puts the end of that boot at 13:08:20 — the same second. The lock is immediate, not a timeout. The command ran inside a systemd scope with MemoryMax=512M/TasksMax=64 and a 25 s SIGKILL timeout; the breaker never fired, which rules out memory exhaustion or a userspace hang and puts the fault below userspace.

    Offering this mainly because several reports in this thread say "no logs" — this method gets you a log.

    Attach is the boundary, not the command

    Boot Driver attach Boot ended Survived after attach What ran in between
    −3 12:51:37 12:51:53 16 s nothing — auto-probe on hotplug
    −2 13:06:19 13:08:20 2 min nvidia-smi -L (ok), then the link query (fatal)
    −1 13:44:53 13:44:53 same second link query through a caching shim, returned rc=0 without touching hardware
    −4 never attached — no crash GPU never connected

    Every boot in which the driver attached ended in a lock-up. The one where it never attached never crashed. Time-to-death varied from seconds to minutes and tracked whatever the host did next, not any single command.

    I was wrong first time round, and the correction is the useful part. I initially blamed the NVML PCIe-link query and built an LD_PRELOAD shim that serves those nine nvmlDeviceGet*Pcie* calls from a sysfs cache. Interception verified, hardware never touched, call returned rc=0 — and the host locked up in the same second anyway (boot −1). So the query is a trigger, not the cause, and no userspace workaround can fix this: attach-time bus-interface setup happens inside the kernel module, and merely opening the device triggers attach.

    The last driver line before every death:

    NVRM: kbifInitLtr_GB202: LTR is disabled in the hierarchy
    

    Stated conservatively — that is also simply the last line the driver emits during attach, and boot −2 ran two more minutes afterwards, so it is not instantly fatal on its own.

    AtomicOps — the specific thing I would ask someone with driver visibility to check

    From the shipped source for this exact driver, nvidia/os-pci.c calls:

    pci_enable_atomic_ops_to_root(handle, PCI_EXP_DEVCAP2_ATOMIC_COMP32);   /* and COMP64, COMP128 */

    The kernel helper walks every bridge between device and root port and fails unless each one advertises AtomicOp routing. Thunderbolt/USB4 switch hierarchies commonly do not. Measured on this host's root port:

    AtomicOpsCap: Routing+ 32bit+ 64bit+ 128bitCAS-
    AtomicOpsCtl: ReqEn- EgressBlck-
    

    So the root port supports routing plus 32/64-bit completion but not 128-bit CAS — while the driver requests all three sizes. The driver's own comment anticipates a GPU lacking the capability:

    /* GPUs that don't support Requester Atomics have its
     * PCI_EXP_DEVCTL2_ATOMIC_REQ always set to 0 even after SW enables it. */

    That is not the same condition as the intervening bridges lacking it, which is exactly the eGPU case.

    Still unmeasured, and the single most useful next measurement — the dock's own bridges only exist on the bus while it is connected, so this needs a live session:

    sudo lspci -s 01:00.0 -vv | grep -i AtomicOp     # dock upstream
    sudo lspci -s 02:00.0 -vv | grep -i AtomicOp     # dock downstream, the GPU's parent

    If either lacks Routing+, the enable path fails partway along a hierarchy the driver has already begun configuring. If anyone else in this thread can run that on their dock, it would either confirm or kill the hypothesis quickly.

    Also seen here, with ReBAR enabled, on every connect:

    pci 0000:03:00.0: VF BAR 2 [mem size 0x10000000 64bit pref]: can't assign; no space
    pci 0000:03:00.0: VF BAR 4 [mem size 0x02000000 64bit pref]: can't assign; no space
    pci 0000:02:03.0: bridge window [mem size 0xaa0000000 64bit pref]: failed to assign
    

    Disabling ReBAR clears those and raises the dock-side link 2.5 → 16 GT/s. It does not fix the lock-up.

    A contrast that may help separate two bugs

    The same card and the same host on a direct OCuLink cable — no tunnel, no bridges — has a different and now-fixed failure: Xid 13 under sustained load and a GSP wedge under concurrent load, both eliminated by the kernel parameter pcie_ports=native (details and telemetry in #1247).

    That parameter does not help here. Which suggests these are two distinct defects that get conflated because both present as "Blackwell eGPU dies under load":

    • OCuLink / direct PCIe → PCIe port-service ownership; fixable from the kernel cmdline today.
    • Thunderbolt / USB4 tunnel → attach-time capability negotiation across bridges that cannot provide what the driver requests; not reachable from userspace or the cmdline — it needs a driver-side option to skip or soften the capabilities a tunnel cannot satisfy.

    If that split is right, this thread will not be fixed by any kernel parameter, and the reported TB4-fails / TB5-sometimes-works pattern is about what the intervening bridges advertise.

    Asks

    1. Audit attach-time capability negotiation over a tunnelled hierarchy — LTR first, then AtomicOps, ATS/PRI/PASID, MSI-X, Relaxed Ordering, FLR.
    2. A supported knob to skip the capabilities a tunnel cannot provide. There is currently none; NVreg_EnableGpuFirmware=0 is already set here and does not help. I did not invent an NVreg_RegistryDwords key because guessing one would be noise.
    3. NVML PCIe-link queries should not be able to lock a host. The identical values are in sysfs (current_link_speed, current_link_width) and reading them there is completely safe on the same machine.

    Full write-up — the boot table, the shim, the source-level capability audit and the raw captures: https://kreggencor-crypto.github.io/egpu-strixhalo-oculink/ (§15 is the Thunderbolt investigation).

    Happy to run tests on this hardware — including the bridge AtomicOps measurement above, or anything that would confirm or rule out the attach-negotiation hypothesis.

  18. pitkz commented on Aug 24, 2026

    @pitkz

    @NisharnSP
    Please stop claiming wrong stuff with your AI reply!

    A working RTX 5090 + this same Aorus AI Box + ThinkPad on Ubuntu 24.04 (egpu.io) that is stable specifically because it caps the link at Gen3.

    This is me, and EXACTLY the post one prior to your reply... And its NOT sure if its the Gen3 limitation. You got to ask this @apnex

    Same for @dmfrey & @kreggencor-crypto (& @guoxh 1st post).
    Reposting the same text made by some AI with too narrow context while ignoring the actual suggested solutions will not lead to anything... Start with the actual solution thats already available. Start reading - yourself - not some AI. #979 (comment)

  19. elvetemedve commented on Sep 5, 2026

    @elvetemedve

    GIGABYTE AORUS RTX 5060 Ti AI BOX (vendor: 8086, product: 5786, TB5 enclosure)

    I'm experiencing the hang on the same hardware family as a lot of this thread on a Lenovo ThinkPad P16s (Meteor Lake, TB4/USB4 host).

    Same symptom as reported here and in the closed PR #981: GSP init (kgspInitRm) blocks forever, which then hangs every other process that touches /dev/nvidia* (no Xid, no AER event, no oops, just a permanent D state). Across ~16 boot/hotplug attempts before any mitigation, this succeeded exactly once, and even that one success hard-froze the machine on the very next GPU operation (PRIME offload render by nvidia-offload command).

    I also found a workaround with no driver patch or rebuild required. It's a community tool, blackwell-egpu-manager, and the mechanism is entirely in userspace (udev rule and setpci command).

    Verified under sustained load (not just idle nvidia-smi run), zero hangs since:

    • 20 consecutive back-to-back CUDA (saxpy) runs clean
    • vkcube continuous rendering
    • sustained HDMI display output (1080p and 4K)

    One more data point I can confirm that NVreg_DynamicPowerManagement=0x00 was set throughout all of this testing, on both the hanging and working configurations. djanice1980/eGPU-Blackwell-Stability independently identified that same option as their primary stability fix.

    I hope this info helps somewhat.

    Environment

    • OS: NixOS 26.11
    • open kernel modules 610.57.04
    • kernels 6.18.46 and 7.1.10
    • kernel params:
      • pci=realloc
      • pcie_aspm.policy=performance
      • pcie_port_pm=off
    • modprobe options:
      • nvidia NVreg_DynamicPowerManagement=0x00
  20. djanice1980 commented on Sep 5, 2026

    @djanice1980

    One more data point I can confirm that NVreg_DynamicPowerManagement=0x00 was set throughout all of this testing, on both the hanging and working configurations.

    Your init hang (kgspInitRm never returning) and my failure (GSP dying after a good init: Xid 154 / 32 / 56 / 79) look like different classes, and DPM=0 only ever addressed the second one on my AMD Strix Halo host. I've never seen the init hang here, so I can't say DPM=0 helps yours.

    Since you already had aspm=performance and pcie_port_pm=off before the manager, the difference must be in what Mode 3 adds: deferred attach (udev remove, rescan later), the setpci ASPM/L1SS clear on the bridges, or the retrain. Did you try it without pcie_port_pm=off? Damian's README claims no kernel flags are needed and that would isolate one variable.

  21. elvetemedve commented on Sep 7, 2026

    @elvetemedve

    Since you already had aspm=performance and pcie_port_pm=off before the manager, the difference must be in what Mode 3 adds: deferred attach (udev remove, rescan later), the setpci ASPM/L1SS clear on the bridges, or the retrain. Did you try it without pcie_port_pm=off? Damian's README claims no kernel flags are needed and that would isolate one variable.

    Good point. I was so happy that I managed to get it working, so completely forgot to verify if all 3 kernel params are required. Tested dropping both pcie_aspm.policy=performance and pcie_port_pm=off. The workaround still functions properly. However pci=realloc is still required, because without that the driver never loads (I see this error in kernel log like: "bridge window [mem size 0x24100000 64bit pref]: can't assign; no space").

  22. efenex commented on Sep 11, 2026

    @efenex

    Edit 2026-09-15: the conclusions I originally drew here were wrong, see my follow-up below for what works on this hardware.

    Same symptom on Intel Barlow Ridge TB5 + Arrow Lake-HX.

    Host Minisforum MS-02 Ultra, Intel Core Ultra 5 235HX (Arrow Lake-HX)
    TB controllers discrete Intel JHL9580 (front) and the SoC's integrated TBT (rear)
    Enclosure GIGABYTE AORUS RTX 5090 AI BOX (JHL9480 hub)
    GPU RTX 5090 (GB202, 10de:2b85)
    OS CachyOS, BIOS 1.03 and 1.04

    nvidia-smi works at idle. With the driver loaded at boot, the first device allocation hard-locks the host:

    import torch
    torch.cuda.init()                                             # succeeds
    torch.empty(16 * 1024**2, dtype=torch.uint8, device="cuda")   # host dies

    Sometimes a silent lock, sometimes an MCE panic. A PCI hot-remove of the TB downstream port with the driver bound also killed the host.

    The enclosure is fine: on a Lenovo Legion 7 16IRX9 (TB4) under Windows 11 with driver 591.86, 18 GB of allocations plus 180 s of sustained H2D (472 GB at 2.6 GB/s, Gen4 x4, BAR1 256 MB) ran clean.

    On Linux I tried kernels 7.2.3 / 7.2.4 / 6.18.48, drivers 590.48.01 / 610.57.04 (615.71.09 oopsed at module load), iommu off, HMM off, runtime PM pinned on, BAR1 256 MB and 32 GB, TB host_reset 0/1 and clx=0, compute-only, and a display on the GPU. All still locked, but none of those runs capped the bridge link before loading nvidia, which turned out to be the missing piece.

  23. efenex commented on Sep 15, 2026

    @efenex

    Update from the MS-02 Ultra + AORUS RTX 5090 AI BOX:

    I was wrong to assume that kernel and driver were ruled out. None of my tests used what was already posted here: cap the bridge above the GPU at Gen3 with hardware autonomous speed disable, retrain, and only then load nvidia. With that in place it works.

    Thanks @apnex for the patched driver and the detailed write-up, @jciolek and @lokmantsui for the slimmed-down setup and the Ubuntu fork, @pitkz for confirming it on the same box and for pointing people at the actual solution, and @bom-singiali for host_reset=false in #974.

    Extra thanks to @pitkz for the thumbs down on my original comment and the nudge to stop relying on AI reading (skimming) this thread.

    What I've tested (Ubuntu 26.04, kernel 7.0.0-31, front TB5 port):

    • open driver 595.71.05 with apnex's patch set
    • nvidia and nouveau blacklisted, then a script does the bridge cap (Gen3 + bit 5), retrain, modprobe nvidia and nvidia_uvm, nvidia-smi -pm 1
    • kernel params: thunderbolt.host_reset=false thunderbolt.clx=0 pcie_aspm.policy=performance pcie_port_pm=off pci=resource_alignment=35@<bridge> module_blacklist=thunderbolt
    • IOMMU left on

    8 boots so far (warm reboots and a cold start), all passed: repeated CUDA context + allocations, 387 GB of verified H2D/D2H at about 3 GB/s, 2 minutes of FP16 matmul at 575 W, and a 24 GiB allocation. No Xid, no AER, no lockups. Haven't run a real workload for hours yet or tried stock 610.43.02.

    Two things that might save someone time:

    • With host_reset=false, the Linux thunderbolt driver fails to probe the MS-02's JHL9580 (error -110). On 7.0 that sometimes left udev workers oopsing during boot and the machine hanging. module_blacklist=thunderbolt fixed it, the PCIe tunnel is set up by firmware anyway.
    • If you remove Ubuntu's nvidia packages, nouveau is no longer blacklisted and grabs the card before the bridge cap runs.

    Next steps are getting it working on CachyOS with more recent driver/kernel - but at least now I know this thing can actually work.

  24. efenex commented on Sep 15, 2026

    @efenex

    Follow-up to my update above: it also works with the stock driver, no patches.

    Same box and front TB5 port, open driver 610.57.04 unpatched, same bridge cap and late load, same kernel params plus nouveau in module_blacklist and intel_iommu=on. Only apnex's patches and NVreg_TbEgpuRecoverEnable are gone.

    • Ubuntu 26.04, kernel 7.0.0-31: 6 boots (5 of them scripted reboots), one soak
    • CachyOS, kernel 7.2.3: 4 boots, one soak, and loading at boot from a systemd unit

    Soak results match the patched driver: 387 GB of verified H2D/D2H at about 3 GB/s, 23k FP16 matmuls in 2 minutes at 575 W, a 24 GiB allocation. No Xid, no AER, no lockups.

    The CachyOS machine is the same install, kernel and 610.57.04 that hard-locked on the first allocation in my first comment. So on this hardware the bridge cap is what mattered, not the driver patches. I haven't tried stock without the cap, so I can't say whether the kernel params alone would be enough.

    For Arch/CachyOS: the kms mkinitcpio hook puts nouveau in the initramfs, so rebuild it after blacklisting, or add nouveau to module_blacklist on the kernel command line like I did.

  25. neighborlyjim commented on Sep 18, 2026

    @neighborlyjim

    Related diagnostic question: early NVIDIA probe failure, before CUDA/GSP initialization, rather than the original workload-triggered failure.

    ASUS ProArt Z890-CREATOR WIFI (BIOS 3305), internal RTX 5090 driving the desktop, external RTX 3090 Ti (10de:2203 / audio 10de:1aef) in an AOOSTAR EG02 over TB5. The same machine/dock/GPU works in Windows. Linux Mint 22.3, kernel 7.0.0-30-generic, NVIDIA 595.84 open.

    Five staged cold-boot comparisons all reached the same immediate NVIDIA probe error:

    1. Early VFIO isolation with idle D3 disabled; immediate Intel 8086:5786 parent capped to Gen3 + HASD and retrained.
    2. Same, with the Linux Thunderbolt module blacklisted and verified absent.
    3. Same, additionally setting GPU-endpoint HASD.
    4. Same as Enable resizable BAR support #3, explicitly clearing remaining ASPM L0s/L1 control bits on the affected bridges and verifying retention after VFIO unbind.
    5. No VFIO at all: before udev, per-device driver_override=none left both external functions unbound; VFIO never loaded. Same firmware-only tunnel and Gen3/endpoint-HASD baseline as Enable resizable BAR support #3. The first NVIDIA bind still failed. No VFIO unbind occurred. Unused audio was runtime-suspended and not configuration-probed.

    Common boot parameters included thunderbolt.host_reset=0, pci=realloc=on,hpiosize=0, pcie_aspm=off and pcie_port_pm=off. The internal 5090 remained on NVIDIA throughout.

    Measured immediately before attachment: parent Link Control 2=0x0063; Link Status=0x3043 (Gen3 x4, training clear); endpoint Link Control 2=0x0024 in tests 3–5; GPU PMCSR=0x0008 (D0). Configuration identity remained readable.

    A separate pre-cap/pre-bind capture found BAR0=0xb0000000, matching its cached 16 MiB allocation. All five ancestor bridges had memory forwarding enabled, bus ranges including the GPU, and programmed non-prefetchable windows containing the complete BAR0 range. This is configuration evidence, not proof of working MMIO. Initial ASPM bits were L1-enabled at three bridges and the endpoint despite pcie_aspm=off; after cap/HASD setup the endpoint/audio bits were already zero. Test #4 cleared the remaining bridge bits. We did not modify L1SS registers.

    Each bind reported:

    nvidia: enabling device (0000 -> 0003)
    NVRM: (PCI ID: 10de:2203) installed in this system has
    NVRM: fallen off the bus and is not responding to commands.
    nvidia: probe with driver nvidia failed with error -1
    

    Remote netconsole captured the events. These staged tests left the host responsive; earlier broad probes/hotplug had hard-locked it. No bind retry, NVML or CUDA call followed a failed probe.

    The matching 595.84 source places this text in rm_is_supported_device() when PMC_BOOT_0 and PMC_BOOT_42 both read all ones. The probe ordering puts that before private RM state/BAR resizing/GSP initialization. That is source-based inference; we have not independently mapped BAR0.

    Is this early identification failure known on Barlow Ridge/Ampere? What minimal capture best distinguishes a firmware/USB4 MMIO-routing problem from GPU-side readiness, and should it be directed to NVIDIA or Linux PCI/Thunderbolt maintainers? Is there a relevant fix for this stage?

    No same-version proprietary-driver comparison has been performed because the internal Blackwell GPU requires the open module. This report does not establish an open-module-specific bug or claim identity with the original CUDA failure.

  26. deacix commented on Sep 19, 2026

    @deacix

    Data point from a different stack on the same enclosure, offered because it independently supports the "it's the Gen4 retrain, not Gen4 itself" conclusion above.

    Setup: Mac mini (M4 Pro, macOS 27), two GIGABYTE AORUS RTX 5090 AI BOX (Intel bridge 8086:5786, Thunderbolt link at 40 Gb/s), GB202 10de:2b85. Not the Linux kernel module: tinygrad's userspace NVIDIA path over its TinyGPU DriverKit extension, which boots GSP-RM itself and lets us set RM registry keys per boot. Workload: sustained PRP squarings (4M-point NTT, ~245 µs/iteration, continuous for hours) — compute-bound, little PCIe traffic once launch data sits in VRAM.

    What we saw (2026-09-18/19):

    1. With no RMPcieLinkSpeed key (RM's default link handling on this path), a 5090 that had enumerated at Gen4 x4 at cold plug ran ~8 h of checked PRP at Gen4 x4 with zero link errors in the kernel log. The link never moved during that time. So Gen4 x4 operation over the tunnel is fine on this box — consistent with the finding here that the retrain is what drops the card.
    2. RMPcieLinkSpeed = 0x800002AA (gens 2–6 disabled, locked at load — the guard we ship for Ada cards behind Intel bridges, see 3) drops the link to Gen1 x4, and that setting is sticky: after a hot reset (SBR) and a fresh GSP boot without the key, the link stayed at Gen1. Only a fundamental reset (a host restart that keeps the TB link down long enough, or a power cycle of the enclosure) re-enumerated at Gen4. Matches PCIe sticky link-speed state — worth knowing if you script setpci targets: a leftover Gen1/Gen3 target survives resets you might expect to clear it.
    3. An Ada card (RTX 4080 SUPER) behind an Intel TB5 dock (Mac Studio) did reproduce the failure shape here: after GSP_INIT_DONE the first ~1 KB of host writes into VRAM made RM ask for a faster gen, the retrain never completed, and the Apple root port logged a link timeout and disabled the port ~100 ms later. The registry pin above plus PCIEPowerControl = 0x3 (ASPM off) is what makes that card usable — at Gen1.
    4. For a compute-bound workload the link gen made no measurable throughput difference (Gen1 vs Gen4, same ~245 µs/iteration once launch data lived in VRAM). So the Gen3 cap several of you use costs nothing for compute-heavy CUDA work — only PCIe-transfer-heavy jobs pay for it.

    Write-up with the measurements and the exact registry table: https://github.com/deacix/tinygpu/blob/main/docs/two-cards-link-and-launch-path-2026-09.md

  27. Mindbreaker81 commented on Nov 9, 2026

    @Mindbreaker81

    Data point: RTX 5090 + Razer Core X V2 on an AMD USB4 host — 595.99.02-open fails, 580.178.04-open is stable

    Adding a version-specific data point. On the same hardware, same kernel and same cable, 595.99.02-open fails reproducibly (3/3 boots) and 580.178.04-open works under sustained CUDA load. No patches, no extra kernel parameters, no RmForceExternalGpu.

    Setup

    Host Minisforum mini PC, AMD Ryzen 7 PRO 8845HS (Phoenix / Hawk Point), AMD USB4 "Pink Sardine" NHI, 40 Gb/s link (2 × 20 Gb/s)
    Enclosure Razer Core X V2 (Intel JHL9480 Barlow Ridge, TB5), authorized via boltctl
    GPU GIGABYTE RTX 5090 (GB202, 10de:2b85, subsystem 1458:416e). PSU 1200 W. Same GPU and enclosure work fine on a Windows laptop
    OS Ubuntu 26.04.1, kernel 7.0.0-43-generic, Secure Boot disabled
    Driver nvidia-driver-595-open 595.99.02 (Ubuntu's ubuntu-drivers recommended choice) vs nvidia-driver-580-open 580.178.04, both Ubuntu archive packages (DKMS)
    PCI BAR0 64M, BAR1 256M (ReBAR supports up to 32G but not resized), BAR3 32M, all assigned. No AER errors, no IOMMU faults

    595.99.02-open, default settings

    nvidia-smi works at idle. The first CUDA use (Ollama / llama-server) gives a GSP heartbeat timeout, then kbusSendSysmembarSingle_GH100 timeout, then a memory-subsystem error, then Xid 175. The GPU ends up "GPU requires reset" and CUDA reports no CUDA-capable device is detected. Shutdown then hangs and needs a hard power-off.

    [  181.738048] NVRM: GPU0 _kgspIsHeartbeatTimedOut: Heartbeat timed out, ... diff 6001 timeout 5200
    [  185.738217] NVRM: GPU0 kbusSendSysmembarSingle_GH100: - timeout error waiting for startToken = 0x1a0 cnt=803844
    [  185.738248] NVRM: GPU0 kgmmuCheckMemSubsysError_IMPL: Memory Subsystem Error detected. kbusSendSysmembarSingle failed.
    [  185.738272] NVRM: GPU0 _kgspCheckIfMemsysError: Unexpected error when checking for memory subsystem error: 0x72
    [  185.738299] NVRM: GPU0 _kgspLogRpcTimeout: ********************************* GSP Timeout **********************************
    NVRM: Xid (PCI:0000:66:00): 175, pid=..., name=llama-server, Timeout after 10s of waiting for RPC response from GPU0 GSP! Expected function 76 (GSP_RM_CONTROL) sequence 4624 (0x20800a9a 0x8).
    NVRM: GPU0 vaspaceapiConstruct_IMPL: Could not construct VA space. Status 62
    

    595.99.02-open, NVreg_DynamicPowerManagement=0x00 + runtime PM on / d3cold_allowed=0 on GPU, TB bridges and root port

    This makes it worse. It fails during boot with no workload, right after the module loads. The 0xbadf2100 read at 0x110094 is the same value quoted in #981:

    [    6.111043] NVRM: loading NVIDIA UNIX Open Kernel Module for x86_64  595.99.02  Release Build
    [    6.649021] NVRM: GPU0 gpuHandleSanityCheckRegReadError_GH100: Possible bad register read: addr: 0x110094,  regvalue: 0xbadf2100,  error code: Unknown SYS_PRI_ERROR_CODE
    [   29.530042] NVRM: GPU0 _kgspIsHeartbeatTimedOut: Heartbeat timed out, ... diff 6002 timeout 5200
    [   33.530161] NVRM: GPU0 kbusSendSysmembarSingle_GH100: - timeout error waiting for startToken = 0x194 cnt=1220392
    [   33.530182] NVRM: GPU0 kgmmuCheckMemSubsysError_IMPL: Memory Subsystem Error detected. kbusSendSysmembarSingle failed.
    [   33.530283] NVRM: GPU0 _issueRpcAndWait: rpcRecvPoll failed with status 0x00000040 for fn 76 sequence 4438!
    

    The same happened again with a different USB4 cable, so the cable is ruled out.

    580.178.04-open, default settings (stock DynamicPowerManagement=3)

    The load is clean. The only notable line is NVRM: kbifInitLtr_GB202: LTR is disabled in the hierarchy. Ollama runs qwen3.8:27b (Q4, 20.6 GB VRAM) at 100% GPU:

    • ~101 tok/s generation, 1254 tokens in one run
    • ~598 W draw, 57 °C
    • 0 Xid across the whole run, and the GPU stays usable afterwards
    • Survives reboots, with clean shutdowns

    So on this AMD USB4 host the regression looks branch-specific (580 → 595), not a generic link-quality problem. That seems worth separating from the TB-detection and timeout theories discussed above. Note that the GMKtec K8 Plus (AMD Pink Sardine) report above failed on 580.126.18, so 580.178.04 may contain a relevant fix too.

    Happy to collect an nvidia-bug-report.log.gz on 595.99.02 or test a patched or newer branch if NVIDIA wants it.

  28. NisharnSP commented on Nov 18, 2026

    @NisharnSP

    @pitkz

    Please stop claiming wrong stuff with your AI reply!

    I credited the available solution in my reply, and specifically mentioned that my change was a workaround with the same root fix, just less invasive. Maybe you could ask AI to help you read and understand posts before commenting yourself :)

    The rest of the post, which you ignored, was first-hand testing on my own machine, setup, and then a fine-tuning run.

    ...stable specifically because it caps the link at Gen3.

    This was my understanding at the time, and while overstated, follows wording from egpu.io: "PCIe link speed limited to Gen3 for stability".

    Keep shadowboxing AI I'm sure you'll win eventually

  29. inwestygator commented on Nov 22, 2026

    @inwestygator

    Data point: RTX 3090 (Ampere) + Razer Core X V2 (JHL9480) on a Framework Laptop 13 Pro: stable with GSP firmware off

    Framework Laptop 13 Pro (Intel Core Ultra Series 3, BIOS 03.04), Razer Core X V2 (8086:5786, USB4 40 Gb/s, PCIe 4.0 x4 to the GPU), RTX 3090 (10de:2204), Arch Linux (Omarchy), kernel 7.2.15-1-omarchy.

    Xid 79 at state changes: during the driver's start (_kgspBootGspRm: unexpected WPR2 already up), at the first Vulkan use after idle, and when a workload exits.

    What I tried so far:

    • open 615.78.08, GSP on: Xid 79 in 19 of 20 boots
    • proprietary 580.178.04, GSP on: Xid 79 (reproduced again with vulkaninfo on the third run)
    • proprietary 580.178.04, NVreg_EnableGpuFirmware=0: no Xid; driver start, a full load started and stopped, repeated vulkaninfo all pass

    So on this Ampere card the GSP path is the trigger, with either driver. This differs from @Mindbreaker81's report above (Core X V2, 580.178.04-open stable): here 580.178.04 failed as long as GSP was on. GSP off isn't available on Blackwell, and it costs idle power here (the card stays in P0, about 105 W).

    Full report with nvidia-bug-report.log.gz (GSP on, after the failure): https://forums.developer.nvidia.com/t/gsp-firmware-triggering-xid-79-on-usb4-thunderbolt-egpu/389811

    UPDATE:
    Follow-up: the link-speed lock fixes it on this Ampere card too, with GSP on, at full 16 GT/s, with the open 615.78.08 as well

    Same setup as my comment above (RTX 3090, Razer Core X V2 / JHL9480, Framework Laptop 13 Pro / Panther Lake, proprietary 580.178.04), now with GSP firmware on and the lock from kernel bug 221319 comment 58 applied before the driver loads:

    setpci -s 03:00.0 CAP_EXP+30.w=0024:002f   # bridge port: LnkCtl2 target 16 GT/s + HW Autonomous Speed Disable
    setpci -s 04:00.0 CAP_EXP+30.w=0024:002f   # GPU: the same
    setpci -s 03:00.0 CAP_EXP+10.w=0020:0020   # retrain
    # check current_link_speed is 16 GT/s, then load nvidia
    
    • 8 vulkaninfo runs with 20 s of idle between them: no Xid (unlocked, GSP on, it failed within one to three runs)
    • 13 runs of a compute workload started and stopped (a model loaded on the GPU, a request, the process exiting), most with 30 s of idle after: no Xid (unlocked, GSP on, stopping a workload was one of the triggers).
    • link stayed at 16 GT/s, the card idles in P8 at about 7 W

    Then the same with the open driver 615.78.08 (which failed in 19 of 20 boots unlocked, often already while loading): the driver loaded cleanly, 8 vulkaninfo runs with 20 s idle and 4 workloads started and stopped with 30 s idle, no Xid, link at 16 GT/s, idle in P8.

    So GSP off only helped because the card then never changes its link speed; the speed change is the trigger. It seems no need for the Gen3 cap here: the lock alone at 16 GT/s is enough.

  30. mjbrn commented on Nov 29, 2026

    @mjbrn

    Another data point, with a workaround that keeps Gen4.

    Setup: RTX 5060 Ti (GB206, 10de:2d04) in a TB5 dock (Intel JHL9480, downstream port 8086:5786), AMD Strix Halo host over USB4 40G. Driver 620.73.04 (open). Kernel 7.4-rc2 and 7.0 behave the same.

    Without intervention, the link trains at 16 GT/s before the driver loads. During init the driver sets the dock port's Target Link Speed to 2.5 GT/s and leaves autonomous speed changes enabled (nvidia-smi shows "Host Max: 1"). The first cuDevicePrimaryCtxRetain then freezes the host within ~5 s. Nothing reaches the logs, and there is no lockup panic or AER.

    We pinned Link Control 2 before modprobe nvidia (setpci CAP_EXP+30.w=XXXX:002f), retrained, ran one context check per boot, and got:

    Pin Result
    none freeze
    dock port 8 GT/s, with or without HASD pass (the driver later switches between 2.5/5/8 GT/s without trouble)
    dock port 2.5 GT/s, no HASD pass
    dock port 16 GT/s + HASD, card free (target 32 GT/s) freeze, first context returns 999
    dock port and card 16 GT/s + HASD pass, fixed 16 GT/s

    With both ends pinned at 16 GT/s + HASD, 256 MiB pinned copies run at 3.87 GB/s H2D and 3.92 GB/s D2H, against 3.07 / 3.38 at Gen3. That covers 15 context checks over two restarts and a cold power cycle, with 0 correctable AER errors. Our reading is that a speed change on that link while it runs at 16 GT/s stalls the platform. That explains why pinning only the downstream port at Gen4 doesn't help but pinning the card side too does.

    The recipe: set CAP_EXP+30.w=0024:002f on the GPU and on its parent bridge, set CAP_EXP+10.w=0020:0020 on the bridge, wait for LnkTr- plus 2 s, modprobe nvidia, then set LnkCtl2 on both again.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions