gsp: don't advertise RTD3 GC6/GC8/GCOFF on external (eGPU) boards#1228
gsp: don't advertise RTD3 GC6/GC8/GCOFF on external (eGPU) boards#1228arc-uri-el wants to merge 1 commit into
Conversation
_kgspInitGpuProperties() sets PDB_PROP_GPU_RTD3_GC6/GC8/GCOFF_SUPPORTED directly from the GSP static config silicon capability, with no check for external (Thunderbolt/OCuLink) GPUs. GC6/GC8/GCOFF are host-platform- coordinated deep power-down states that require the host to power-gate the GPU's PCIe slot. An external GPU in an enclosure with its own PSU cannot be host-power-gated, so after the RTD3 idle timeout the GPU attempts a power-down it can never complete: the GSP firmware faults (rpcSendMessage failed / GPU_IN_FULLCHIP_RESET) and the GPU falls off the bus. Gate the three properties on !PDB_PROP_GPU_IS_EXTERNAL_GPU (already set by RmCheckForExternalGpu before this runs). Orthogonal to dynamic clock scaling, so external GPUs keep full dynamic idle clocking while no longer attempting the impossible deep power-down. Verified on an RTX 5090 (GB202) over Thunderbolt: eliminates the idle GSP crash while preserving dynamic P-state idle (~38 W), versus a ~85 W clock-lock workaround.
|
Hi @arc-uri-el, Thank you for your contribution. First, I would like to go over RTD3 in a bit more detail, specifically, about D3hot and D3cold, just to make the conversation easier for myself. RTD3 -> Runtime PCIe Device-state 3 (suspend) D3hot -> PCIe is on but device is put into lowest power state over PCIe
My understanding is that this is true for D3cold but not D3hot. I think the problem here is that we are disabling FBSR with the current change proposal (framebuffer self refresh) by disabling GPU GC6 entry, which is a bit unfortunate. References:
I think what likely needs to happen here is that the NVIDIA Linux driver actually needs to call This would ideally be done somewhere in src/nvidia/arch/nvalloc/unix/src/dynamic-power.c. Before this changeInternal GPU (if NVIDIA) on RTD3 capable laptop/systemCould enter D3hot -> Good NVIDIA eGPU on RTD3 capable laptop/systemCould enter D3hot -> Good After this changeInternal GPU (if NVIDIA) on RTD3 capable laptop/systemCould enter D3hot -> Good NVIDIA eGPU on RTD3 capable laptop/systemCannot enter D3hot -> Loses some power saving opportunity The ideal situationInternal GPU (if NVIDIA) on RTD3 capable laptop/systemCould enter D3hot -> Good NVIDIA eGPU on RTD3 capable laptop/systemCould enter D3hot -> Good |
|
@arc-uri-el looking at this a bit more on the kernel side, I would expect the eGPU enclosure to be handled more gracefully by the Linux kernel, https://elixir.bootlin.com/linux/v7.1.3/source/drivers/pci/pci.c#L2945 Do you mind sharing what eGPU enclosure you are using to reproduce the issue? |
|
Thank you for the detailed analysis. The enclosure is a Razer Core X V2 (Thunderbolt 5) with an Intel JHL9480 bridge. The full reproduction setup is:
Preserving D3hot and FBSR while preventing only D3cold would be preferable to the current proposal if it resolves the failure. We will implement an alternative patch following your suggestion, using We will collect the PCI power-state and link-state observations, GSP/kernel logs, idle power, and resume/load result, then report back here once we have the results. |
Summary
_kgspInitGpuProperties()advertises RTD3 GC6/GC8/GCOFF support for external (eGPU) boards straight from the GSP silicon capability, with noIS_EXTERNAL_GPUcheck. These are host-platform-coordinated deep power-down states (the host power-gates the GPU's PCIe slot), which is physically impossible for an external GPU in a Thunderbolt/OCuLink enclosure with its own PSU. After the RTD3 idle timeout the GPU attempts the power-down, the GSP firmware faults, and the GPU falls off the PCIe bus.Crash (RTX 5090 / GB202 over Thunderbolt, 610.43.02)
Occurs a few minutes after the desktop goes idle.
NVreg_DynamicPowerManagement=0does not help (it does not override this GSP-set property). The only prior workaround was pinning clocks to max (nvidia-smi -lgc/-lmc) to keep the GPU out of idle, at a large constant idle-power cost.Fix
Gate
PDB_PROP_GPU_RTD3_{GC6,GC8,GCOFF}_SUPPORTEDon!PDB_PROP_GPU_IS_EXTERNAL_GPU.IS_EXTERNAL_GPUis already set byRmCheckForExternalGpubefore_kgspInitGpuPropertiesruns. Orthogonal to dynamic clock scaling: external GPUs keep full dynamic idle clocking (verified P0<->P8, ~38 W idle) while no longer attempting the impossible deep power-down. Zero GSP crashes over a sustained idle test after the change.Relates to #979.
First-time contributor, happy to sign the CLA or adjust to your process.