nvidia-drm leaks drm_display_modes on every connector probe when drm.edid_firmware overrides a disconnected connector (kmalloc-128 grows ×4 per monitor wake)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- c, linux
- Ambito
- operating-systems
Direzione di ricerca
Start with __nv_drm_connector_detect_internal and trace its call to drm_edid_override_connector_update, then inspect how disconnected connectors manage probed_modes. The report includes a reproducer using drm.edid_firmware on an unplugged connector and a kmalloc-128 growth pattern to compare across wakes. Done means repeated connector probes no longer accumulate leaked modes while the override behavior matches the expected result described in the issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
NVIDIA Open GPU Kernel Modules Version
595.112.07
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
Debian GNU/Linux 13 (trixie)
Kernel Release
Linux monolith 6.12.115+deb13.1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.115-2 (2026-11-01) x86_64 GNU/Linux
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
GPU 0: NVIDIA GeForce RTX 5070 Ti (UUID: GPU-f985f4e1-b17a-69c2-5d0b-a2bc789558dc)
Describe the bug
With drm.edid_firmware=DP-2:edid/samsung-edid.bin on the kernel command line, and nothing plugged into DP-2 (the monitor is on HDMI-A-2 of the same card), every monitor wake from DPMS off leaks kmalloc-128 slab objects that are never freed. Each wake leaks four times as many as the previous one, so the machine (32 GB) eventually freezes after a day of normal screen blanking.
| Wake | kmalloc-128 objects added |
|---|---|
| 1 | +86,000 (≈11 MB) |
| 2 | +344,000 (≈44 MB) |
| 3 | +1,376,000 (≈176 MB) |
| 4 | +5,504,000 (≈700 MB) |
While the screen stays on, or stays off, the count is flat. nvidia-drm.modeset=Y, fbdev=Y, GNOME Shell 48.7 on Wayland.
perf record -e kmem:kmalloc --filter 'bytes_alloc == 128' -a -g across one wake: 88% of the 128-byte allocations are this chain, in gnome-shell's KMS thread:
__kmalloc_cache_noprof
drm_mode_duplicate
_drm_edid_connector_add_modes.part.0
drm_edid_connector_add_modes
drm_edid_override_connector_update
__nv_drm_connector_detect_internal
drm_helper_probe_detect
drm_helper_probe_single_connector_modes
drm_mode_getconnector
drm_ioctl_kernel
drm_ioctl
__x64_sys_ioctl
It looks as if __nv_drm_connector_detect_internal calls drm_edid_override_connector_update() for a connector that has an override but is disconnected. That adds the override's modes to connector->probed_modes, which is then never merged or pruned, because the connector is reported disconnected. We haven't confirmed why it grows ×4 rather than by a fixed amount.
To Reproduce
- Boot with
drm.edid_firmware=<a disconnected connector on the NVIDIA GPU>:edid/<any EDID>.bin(hereDP-2:edid/samsung-edid.bin, a 256-byte EDID in/lib/firmware/edid/), with the monitor on a different connector. - Log in to GNOME (Wayland).
- Watch
sudo grep kmalloc-128 /proc/slabinfo. - Turn the monitor off and on a few times, by letting it blank, or with:
gdbus call --session --dest org.gnome.Mutter.DisplayConfig --object-path /org/gnome/Mutter/DisplayConfig --method org.freedesktop.DBus.Properties.Set org.gnome.Mutter.DisplayConfig PowerSaveMode "<int32 3>", then the same with"<int32 0>". - Each wake adds four times as many objects as the last.
Bug Incidence
Always
nvidia-bug-report.log.gz
More Info
Not tested with the proprietary driver: the RTX 5070 Ti (Blackwell) is supported only by the open kernel modules. The leaking path is in nvidia-drm.
Expected: an override EDID on a disconnected connector either has no effect, or its modes are freed with each probe, as for a connected connector.
Workaround: remove the drm.edid_firmware override for the disconnected connector. (It was added while trying to get a monitor detected on DP-2 at boot. That never worked, so the monitor moved to HDMI.)
Issue doesn't match suggested duplicates from what I can see - this is a kernel memory leak issue.
- Lingua principale
- C
- Stelle
- 17.7k
- Fork
- 2k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/open-gpu-kernel-modules
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
I maintainer di solito rispondono entro 1 giorno
-
nvidia-drm: NULL dereference in nv_drm_create_sync_file() when sync_file_create() fails (kernel oops when fs.file-max is exhausted)Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NVIDIA/open-gpu-kernel-modules#1601 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
NVIDIA/open-gpu-kernel-modules#1479 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
PlatformRequestHandler: missing !bInit guard on bSystemParamLimitUpdate causes NV_ERR_INVALID_DATA at bootForse già presa @SammyTourani l’ha presa 69 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
NVIDIA/open-gpu-kernel-modules#1360 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NVIDIA/open-gpu-kernel-modules#1343 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NVIDIA/open-gpu-kernel-modules
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Jstar269/nakagawa-recomp#3753 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
ly05010419/MacNativeGames#2474 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Life-Framework/Life-Framework#7017 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
gjrtimmer/jetson-nvmpi#170 ·