nvidia_modeset unload hangs in nvRmVTSwitch in a headless passthrough VM, so GSP never shuts down and WPR2 stays up; next init fails (GB203, 615.71.09)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- c, linux, ubuntu
- Bereich
- devtools, operating-systems
Rechercherichtung
Start by tracing the nvidia_modeset VT switch path named in the report, especially nvRmVTSwitch and nvRmApiControl, then inspect how module unload and headless display handling interact. Reproduce with the listed rmmod or guest shutdown steps and capture the hang stack. Done means unload and shutdown complete in the headless passthrough setup and a subsequent guest start initializes GSP without the WPR2 error.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
NVIDIA Open GPU Kernel Modules Version
615.71.09 (Ubuntu packages nvidia-headless-no-dkms-615-server-open, linux-modules-nvidia-615-server-open-generic)
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
Ubuntu 24.04.5 LTS (guest VM; host FreeBSD 15.1 bhyve, GPU passthrough)
Kernel Release
6.8.0-147-generic (Ubuntu distribution kernel, not self-built)
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 RTX PRO 4000 Blackwell SFF Edition (10de:2c33, GB203GL)
Describe the bug
Platform: guest VM (Ubuntu 24.04.5, kernel 6.8.0-147-generic) on a FreeBSD 15.1 bhyve host, PCI passthrough of the GPU (00:06.0 in the guest) and its audio function, UEFI guest firmware, guest memory wired. No PCIe root port above the GPU in the guest. No display attached to the GPU; the guest's console is the hypervisor's virtual framebuffer.
In this headless VM, unloading nvidia_modeset hangs. That happens with an explicit rmmod, and implicitly during guest shutdown or reboot. The stack is in nvidia_modeset's VT switch:
nvRmApiControl+0x46/0x60 [nvidia_modeset]
? nvRmVTSwitch+0x2d/0x40 [nvidia_modeset]
As a result, the guest's reboot or shutdown never completes, and the driver never shuts GSP down, so WPR2 stays up. Once the VM is ended and started again, init fails until the host is power-cycled:
NVRM: GPU0 kgspSendInitRpcs_IMPL: GMCAPI_CMD_GSP_INIT failed: 0x65
NVRM: GPU0 _kgspBootGspRm: unexpected WPR2 already up, cannot proceed with booting GSP
NVRM: GPU0 _kgspBootGspRm: (the GPU is likely in a bad state and may need to be reset)
NVRM: GPU0 RmInitAdapter: Cannot initialize GSP firmware RM
NVRM: GPU 0000:00:06.0: RmInitAdapter failed! (0x62:0x40:2130)
Neither an FLR (the device advertises FLR) nor a PCIe link reset from the host clears it. At module load there is also a display-engine Xid: NVRM: Xid (PCI:0000:00:06): 56, pid=..., name=(udev-worker), CMDre 00000000 00000000 00000400 00000001 00000000
Workaround that works for us: never load the display modules in the guest.
# /etc/modprobe.d/nvidia-headless.conf
blacklist nvidia_drm
blacklist nvidia_modeset
install nvidia_drm /bin/false
install nvidia_modeset /bin/false
After update-initramfs -u, only nvidia and nvidia_uvm load. Guest reboot, guest poweroff and ACPI shutdown from the host then complete, and the GPU initializes again after every guest restart, with no host reset.
Expected: nvidia_modeset unload and guest shutdown should not block on the VT switch when the GPU drives no console or display, so GSP is torn down normally. Related: recovering a GPU whose WPR2 was left up, since FLR and link reset don't clear it (#1442). A guest reboot before the driver had ever loaded worked fine. Full write-up with logs: https://forums.freebsd.org/threads/nvidia-blackwell-passthrough-on-stock-15-1-fix-for-card-lost-after-guest-reboot-wpr2-already-up.104303/
To Reproduce
- Pass a Blackwell GPU through to a Linux guest with no display attached to it (the guest uses the hypervisor's framebuffer as its console).
- Install the open driver with defaults, so nvidia_drm and nvidia_modeset load at boot (via udev here).
- Check that
nvidia-smiworks. - Run
sudo systemctl stop nvidia-persistenced(returns), thensudo rmmod nvidia_uvm nvidia_drm nvidia_modeset nvidia(hangs). Alternatively,sudo reboothangs. - Force the VM off and start it again:
nvidia-smisays "No devices were found", and dmesg shows "unexpected WPR2 already up".
Bug Incidence
Always
nvidia-bug-report.log.gz
The report contains host identifiers, so I'd rather share it privately; happy to send it on request, or to capture one while reproducing the hang if a maintainer needs it. All relevant dmesg lines and steps are above and in the linked write-up.
More Info
No response
- Vorherrschende Sprache
- C
- Sterne
- 17.7k
- Forks
- 2k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NVIDIA/open-gpu-kernel-modules
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
Maintainer antworten meist innerhalb von 1 Tag
-
nvidia-drm: NULL dereference in nv_drm_create_sync_file() when sync_file_create() fails (kernel oops when fs.file-max is exhausted)Evtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
NVIDIA/open-gpu-kernel-modules#1601 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
NVIDIA/open-gpu-kernel-modules#1479 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
PlatformRequestHandler: missing !bInit guard on bSystemParamLimitUpdate causes NV_ERR_INVALID_DATA at bootEvtl. vergeben @SammyTourani hat das vor 69 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
NVIDIA/open-gpu-kernel-modules#1360 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
NVIDIA/open-gpu-kernel-modules#1343 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in NVIDIA/open-gpu-kernel-modules
Ähnliche Issues
-
iOS: the "Edit controls" button never hides, even with a controller connected, and covers the gameOffengame: 010065A014024000 ios
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
seedds/nxnative#3714 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
HTTP/3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
haskell/bytestring#730 · 1 Kommentar ·
-
bug ux/behavior
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
DeusData/codebase-memory-mcp#3191 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/docdb kind/enhancement mvu-pg15-pg19 priority/low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
yugabyte/yugabyte-db#40355 ·
Maintainer antworten meist innerhalb von 1 Tag