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)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c, linux
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C
- Star
- 17.7k
- Fork
- 2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/open-gpu-kernel-modules
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
nvidia-drm: NULL dereference in nv_drm_create_sync_file() when sync_file_create() fails (kernel oops when fs.file-max is exhausted)Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NVIDIA/open-gpu-kernel-modules#1601 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
NVIDIA/open-gpu-kernel-modules#1479 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
PlatformRequestHandler: missing !bInit guard on bSystemParamLimitUpdate causes NV_ERR_INVALID_DATA at bootCó thể đã có người làm @SammyTourani đã nhận 69 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
NVIDIA/open-gpu-kernel-modules#1360 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NVIDIA/open-gpu-kernel-modules#1343 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NVIDIA/open-gpu-kernel-modules
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Jstar269/nakagawa-recomp#3753 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
ly05010419/MacNativeGames#2474 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Life-Framework/Life-Framework#7017 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
gjrtimmer/jetson-nvmpi#170 ·