USB4 eGPU (RTX 5060 Ti): after Xid 79, nvidia_uvm oopses on process exit and suspend, GPU cannot be recovered without reboot
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- c, linux
- Área
- backend, operating-systems
Línea de trabajo
Start with the UVM teardown and suspend paths shown in the traces: uvm_va_range_destroy through uvm_page_table_range_vec_clear_ptes_gpu, and uvm_suspend; the report also points to uvm_gpu.c and uvm_channel.c for existing fatal error handling. Check how those paths handle NV_ERR_GPU_IS_LOST, then reproduce a USB4 eGPU link drop while a CUDA process is running. Done means process exit and suspend avoid UVM oopses and the GPU can be reconnected without rebooting.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
NVIDIA Open GPU Kernel Modules Version
615.78.08 and 620.70.06 (both affected)
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
Fedora Linux 45 (Workstation Edition)
Kernel Release
7.3.3-300.fc45.x86_64 and 7.3.4-300.fc45.x86_64 (link drops and oopses), 7.2.15-300.fc45.x86_64 (link drops)
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
GeForce RTX 5060 Ti 16 GB (GIGABYTE AORUS RTX 5060 Ti AI BOX, external enclosure over USB4)
Describe the bug
Summary: during normal use, with no cable or power changes, the eGPU randomly falls off the bus (Xid 79). The drops are not time-dependent: they do not follow any interval and are not tied to how long the GPU has been in use. Once it happens, the GPU cannot be used again until the machine is rebooted. The driver never recovers:
nvidia_uvmoopses (page fault inuvm_hal_hopper_ce_memset_8) as soon as the CUDA process that was using the GPU exits.nvidiaandnvidia_uvmare left with references that are never released. They cannot be unloaded, so the GPU cannot be re-initialized.- Any later suspend attempt oopses again inside
uvm_suspend, and the laptop cannot suspend anymore. - Every drop therefore means losing the session and rebooting.
The drops become more likely when devices are connected to the other USB-C ports, either on the laptop or on the enclosure. This is consistent enough that I now avoid those ports while the eGPU is in use: monitor on HDMI, peripherals on USB-A only. The drops still happen with nothing on them, just less often.
There are two problems, and both make the eGPU unusable in practice:
- The link drops happen about four times more often with 620.70.06 than with 615.78.08 on the same hardware and setup (data in "More Info").
- After a drop there is no recovery path without a reboot, because UVM keeps touching the lost GPU and crashes instead of releasing it. Whatever causes the drops, the minimum expected behavior is being able to reconnect the GPU without rebooting the computer.
Setup
- Host: Lenovo ThinkPad P16s Gen 2 (AMD Ryzen 7040, Radeon 780M used for the desktop). BIOS R2FET72W (1.52).
- Enclosure: GIGABYTE AORUS RTX 5060 Ti AI BOX on the laptop's USB4 port. The PCIe link is limited to Gen3 via the kernel bandwidth controller, ASPM is disabled and runtime PM is off on the whole PCI path.
- The driver is loaded only for compute:
nvidiawithNVreg_DynamicPowerManagement=0x00, plusnvidia_uvm.nvidia_modesetandnvidia_drmare not loaded. Persistence mode is on, with clocks locked to P0 (-lgc,-lmc). - Workload: llama.cpp (
llama-server, CUDA 12 build). - Secure Boot is enabled (kernel lockdown: integrity). Modules are built by akmods and signed with an enrolled MOK.
- The enclosure is enrolled in bolt with
policy manual, so it is not re-authorized automatically after a link drop (see below for why).
Sequence (identical on 615.78.08 and 620.70.06)
- The USB4/PCIe link drops (pciehp
Link Down, Thunderbolt switch unplugged). The driver reports:NVRM: Xid (PCI:0000:06:00): 79, GPU has fallen off the bus. NVRM: Xid (PCI:0000:06:00): 154, GPU recovery action changed from 0x0 (None) to 0x2 (OS Reboot) NVRM: krcRcAndNotifyAllChannels_IMPL: RC all channels for critical error 79. NVRM: _issueRpcAndWait: rpcSendMessage failed with status 0x0000000f for fn 78 sequence 1707! NVRM: nvCheckOkFailedNoLog: Check failed: GPU lost from the bus [NV_ERR_GPU_IS_LOST] (0x0000000F) returned from nvdEngineDumpCallbackHelper(...) @ nv_debug_dump.c:273 - The CUDA process (
llama-server) exits, by itself or when killed. While its/dev/nvidia-uvmfile is being released, UVM tries to clear page table entries on the lost GPU via the copy engine and page-faults inuvm_hal_hopper_ce_memset_8. Full trace from 615.78.08 on 7.3.4 below. - After that,
nvidiastays at refcnt 28 andnvidia_uvmat refcnt 4, with kworkers in D state.rmmodis impossible, and so is any recovery short of a reboot. - If the system then tries to suspend,
nv_pm_notifier→nv_uvm_suspend→uvm_suspendtouches the lost GPU and oopses again, this time inuvm_hal_turing_disable_replayable_faults, insidepm_suspend. Suspend fails, and the oops killssystemd-sleepin the middle ofenter_state().
Oopses observed
| Date | Driver | Kernel | Crash site |
|---|---|---|---|
| Nov 13 09:56 | 620.70.06 | 7.3.3 | uvm_hal_hopper_ce_memset_8 (process exit) |
| Nov 13 12:15 | 620.70.06 | 7.3.3 | uvm_hal_turing_disable_replayable_faults (suspend) |
| Nov 13 21:31 | 620.70.06 | 7.3.3 | uvm_hal_hopper_ce_memset_8 (process exit) |
| Nov 17 10:09 | 615.78.08 | 7.3.3 | uvm_hal_hopper_ce_memset_8 (process exit) |
| Nov 17 22:01 | 615.78.08 | 7.3.4 | uvm_hal_hopper_ce_memset_8 (process exit) |
Oops on process exit (615.78.08, kernel 7.3.4)
BUG: unable to handle page fault for address: ffffce11a16cb94c
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
Oops: Oops: 0002 [#1] SMP NOPTI
CPU: 6 UID: 1000 PID: 22876 Comm: llama-server Tainted: G O 7.3.4-300.fc45.x86_64 #1 PREEMPT(lazy)
Tainted: [O]=OOT_MODULE
Hardware name: LENOVO 21K9CTO1WW/21K9CTO1WW, BIOS R2FET72W (1.52 ) 09/15/2026
RIP: 0010:uvm_hal_hopper_ce_memset_8+0xe/0x70 [nvidia_uvm]
Code: 12 c3 c3 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 48 8b 47 08 55 <c7> 00 c0 81 03 20 48 8b 47 08 48 89 e5 4c 8d 48 04 4c 89 4f 08 89
RSP: 0018:ffffce118e477750 EFLAGS: 00010206
RAX: ffffce11a16cb94c RBX: ffffce118e477838 RCX: 0000000000000000
RDX: 0000000000000014 RSI: 0000000000205160 RDI: ffffce118e4777e8
CR2: ffffce11a16cb94c
Call Trace:
<TASK>
uvm_pte_batch_clear_ptes+0x96/0xc0 [nvidia_uvm]
uvm_page_table_range_vec_clear_ptes_gpu+0x260/0x3f0 [nvidia_uvm]
uvm_va_range_destroy+0x2c6/0x8a0 [nvidia_uvm]
destroy_va_ranges.part.0+0x52/0x80 [nvidia_uvm]
uvm_user_channel_detach+0xc2/0xf0 [nvidia_uvm]
uvm_va_space_detach_all_user_channels+0xee/0x230 [nvidia_uvm]
uvm_va_space_mm_shutdown+0xc2/0x4a0 [nvidia_uvm]
uvm_va_space_mm_unregister+0x12/0x50 [nvidia_uvm]
uvm_release.isra.0+0x167/0x1c0 [nvidia_uvm]
uvm_release_entry.part.0.isra.0+0xf4/0x110 [nvidia_uvm]
uvm_release_entry+0x2c/0x40 [nvidia_uvm]
__fput+0xf6/0x2e0
task_work_run+0x66/0xa0
do_exit+0x1fe/0x440
do_group_exit+0x2d/0xc0
get_signal+0x7b0/0x840
arch_do_signal_or_restart+0x76/0x140
exit_to_user_mode_loop+0xe9/0x5c0
do_syscall_64+0x1d2/0x470
entry_SYSCALL_64_after_hwframe+0x76/0x7e
</TASK>
---[ end trace 0000000000000000 ]---
Oops when suspending after the GPU was lost (620.70.06, kernel 7.3.3)
BUG: unable to handle page fault for address: ffffd2eef8b81408
Oops: Oops: 0002 [#2] SMP NOPTI
CPU: 10 UID: 0 PID: 162295 Comm: systemd-sleep Tainted: G D O 7.3.3-300.fc45.x86_64 #1 PREEMPT(lazy)
RIP: 0010:uvm_hal_turing_disable_replayable_faults+0x16/0x30 [nvidia_uvm]
Call Trace:
uvm_parent_gpu_replayable_faults_isr_lock+0x4f/0x80 [nvidia_uvm]
uvm_gpu_replayable_buffer_flush+0x19/0x50 [nvidia_uvm]
uvm_suspend.isra.0+0xb0/0x1c0 [nvidia_uvm]
uvm_suspend_entry+0xae/0xd0 [nvidia_uvm]
nv_uvm_suspend+0x30/0x60 [nvidia]
nv_suspend_devices+0x1b5/0x4b0 [nvidia]
nv_set_system_power_state.part.0+0x72/0x1b0 [nvidia]
nv_pm_notifier+0x35/0xa0 [nvidia]
notifier_call_chain+0x70/0x110
blocking_notifier_call_chain_robust+0x73/0xf0
pm_notifier_call_chain_robust+0x1d/0x40
enter_state+0x9e/0x550
pm_suspend+0x4a/0xa0
state_store+0x2e/0x60
kernfs_fop_write_iter+0x178/0x200
vfs_write+0x281/0x570
ksys_write+0x7b/0x110
do_syscall_64+0xbe/0x470
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Analysis (from reading the 620.70.06 open sources, may be incomplete)
- On the RM side,
nv-pci.calready treats external GPUs specially: on removal it skips waiting forusage_countand frees the device on the last close. This only applies if the GPU is detected as external, and I have not confirmed that it is here: according to #979 / #984, TB4/TB5/USB4 bridges such as the Intel JHL9480 used in this enclosure are not on the approved list. - I could not find a matching path in UVM. It only stops work on a GPU for fatal ECC and channel errors (around
uvm_gpu.c:1418anduvm_channel.c:2125). A GPU that has fallen off the bus (NV_ERR_GPU_IS_LOST) does not seem to be marked as unusable. As a result, teardown on process exit (uvm_va_range_destroy→uvm_page_table_range_vec_clear_ptes_gpu) anduvm_suspendstill push copy-engine work or write registers on the dead GPU.
Without my workaround, a drop ends in a kernel panic. The enclosure is enrolled in bolt with policy manual, so after a drop it is not re-authorized automatically and the GPU does not come back on the bus. I set this up because, with the default policy auto, the enclosure was re-authorized ~1.5 s after the drop, the GPU re-enumerated, and nv_pci_probe → RmInitAdapter started on the new device while UVM still held the state of the lost one. An interrupt then hit UVM's stale replayable fault buffer and the machine panicked:
RIP: uvm_hal_turing_fault_buffer_entry_is_valid+0x33 [nvidia_uvm]
← nvidia_isr_msix [nvidia] (during nv_pci_probe → nv_start_device → rm_init_adapter → RmInitAdapter)
Kernel panic - not syncing: Fatal exception in interrupt
This happened three times (Oct 12–14, 615.71.09, kernel 7.2.9) before I switched to policy manual. So the absence of a hard lock in this report is only thanks to that workaround: without it, every drop took down the whole system.
Expected behavior
At a minimum, after a link drop it must be possible to reconnect the eGPU and use it again without rebooting the computer. An external GPU over USB4/Thunderbolt is a hot-pluggable device. Losing the link, even unexpectedly, should cost at most the CUDA processes that were running on it, not the whole session. Today every drop forces a full reboot.
Concretely:
- Once the CUDA processes have exited, it should be possible to unload
nvidia_uvmandnvidia(or have the driver release the device), reconnect the enclosure, and initialize the GPU again in the same boot. - For that to work, UVM must stop all GPU-side work for a GPU once RM reports
NV_ERR_GPU_IS_LOST/ Xid 79: no copy-engine pushes, no register writes. It should only free CPU-side state, so that processes exit cleanly and the module references are dropped. uvm_suspendshould skip lost GPUs instead of touching them, so the system can still suspend.
To Reproduce
- Use an RTX 50-series GPU in a USB4 enclosure for normal CUDA work, with
nvidia+nvidia_uvmloaded and a long-running CUDA process (llama-serverwith a model resident on the GPU). - Wait. At some point the link drops on its own. The drops are random and not time-dependent: they have happened minutes after loading the driver and also after more than a day of continuous use. They are more frequent with 620.70.06 than with 615.78.08. It happens during inference and also while the process is idle. Nothing is touched physically. Drops are more frequent when other devices are connected to USB-C ports on the laptop or on the enclosure.
- The driver logs Xid 79 and Xid 154 (OS Reboot). From this point the GPU is gone for the rest of the boot.
- When the CUDA process exits,
nvidia_uvmoopses inuvm_hal_hopper_ce_memset_8. The modules cannot be unloaded and the GPU cannot be brought back. - Suspending also fails, with an oops in
uvm_hal_turing_disable_replayable_faults. - The only way to use the GPU again is to reboot.
Bug Incidence
Sometimes
nvidia-bug-report.log.gz
Sent privately to [email protected]. The email subject and body reference this issue number and title. It was generated with --safe-mode after a reboot; the link drop (Xid 79 / Xid 154) is in the previous boot's journal included in it. Happy to resend it or to capture another one in the failed state before rebooting.
More Info
Note on the proprietary-driver checkbox: Checked because the form requires it. I cannot actually test this: the GPU is Blackwell (RTX 5060 Ti), which is only supported by the open kernel modules.
Bug incidence: Sometimes for the link drop (random, not time-dependent, and more frequent with 620.70.06; see below). Always for the lack of recovery: every one of the drops required a reboot, and the oops happened every time a CUDA process was running (5 out of 5 since Nov 13).
Link drops are much more frequent with 620.70.06 than with 615.78.08 on the same machine.
The drops are not periodic and do not depend on uptime: they have happened from a few minutes to more than a day after the driver was loaded. The counts below only compare how often they happened with each driver. They count only the time the driver was loaded and the system awake (from module load until unload, suspend, or Xid 79):
| Driver | GPU-active time | Xid 79 events |
|---|---|---|
| 620.70.06 | 45.6 h | 5 |
| 615.78.08 (Nov 7–17) | 120 h | 3 |
Same hardware, enclosure, cable, workload and driver configuration. I did not log which other USB-C ports were in use during each period. The kernel varied within these periods: 7.2.15 and 7.3.3 with 620.70.06, and 7.2.15, 7.3.3 and 7.3.4 with 615.78.08. The sample is small. Drops still happen with 615.78.08, so the driver is probably not the only trigger, but with 620.70.06 they were roughly four times more frequent.
Related
- #979: same hardware family (Blackwell eGPUs over TB/USB4), but a different failure. There it is a hard lock on the first CUDA use. Here it is a random link drop after hours of normal use, followed by UVM oopses, or a kernel panic on re-enumeration without the workaround above.
- #984 / #981: TB4/TB5/USB4 bridges, including the JHL9480 used in this enclosure, are not detected as external GPUs, so internal-GPU power management is applied. This could be related to the link drops, but I have not verified it.
- #985: proposed hot-unplug fix that adds
uvm_parent_gpu_is_accessible()guards to UVM (interrupt handler, teardown and memory paths). From its description, it seems to address the oopses and the panic reported here. - Discussion #1190: patch series for surprise removal, where I already reported this setup.
- Lenguaje dominante
- C
- Estrellas
- 17.7k
- Forks
- 2k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NVIDIA/open-gpu-kernel-modules
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
Los mantenedores suelen responder en 1 día
-
nvidia-drm: NULL dereference in nv_drm_create_sync_file() when sync_file_create() fails (kernel oops when fs.file-max is exhausted)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NVIDIA/open-gpu-kernel-modules#1601 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
NVIDIA/open-gpu-kernel-modules#1479 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
PlatformRequestHandler: missing !bInit guard on bSystemParamLimitUpdate causes NV_ERR_INVALID_DATA at bootPosiblemente ocupada @SammyTourani la tomó hace 69 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
NVIDIA/open-gpu-kernel-modules#1360 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NVIDIA/open-gpu-kernel-modules#1343 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de NVIDIA/open-gpu-kernel-modules
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Jstar269/nakagawa-recomp#3753 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
ly05010419/MacNativeGames#2474 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Life-Framework/Life-Framework#7017 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
gjrtimmer/jetson-nvmpi#170 ·