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)
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- c, linux
- Domínio
- operating-systems
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- C
- Estrelas
- 17.7k
- Forks
- 2k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de NVIDIA/open-gpu-kernel-modules
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
Mantenedores costumam responder em até 1 dia
-
nvidia-drm: NULL dereference in nv_drm_create_sync_file() when sync_file_create() fails (kernel oops when fs.file-max is exhausted)Talvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
NVIDIA/open-gpu-kernel-modules#1601 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
NVIDIA/open-gpu-kernel-modules#1479 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
PlatformRequestHandler: missing !bInit guard on bSystemParamLimitUpdate causes NV_ERR_INVALID_DATA at bootTalvez já em andamento @SammyTourani assumiu há 69 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
NVIDIA/open-gpu-kernel-modules#1360 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
NVIDIA/open-gpu-kernel-modules#1343 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de NVIDIA/open-gpu-kernel-modules
Issues semelhantes
-
iOS: the "Edit controls" button never hides, even with a controller connected, and covers the gameAbertagame: 010065A014024000 ios
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
seedds/nxnative#3714 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
area/docdb kind/enhancement mvu-pg15-pg19 priority/low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
yugabyte/yugabyte-db#40355 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Jstar269/nakagawa-recomp#3753 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
ly05010419/MacNativeGames#2474 ·
Mantenedores costumam responder em até 1 dia