[FEATURE] nvidia-open: carry NVIDIA PR #1525 (order-3 kzalloc in nv_drm_atomic_state_alloc invokes the OOM killer)
@ptr1337 is already working on this.
Since Nov 6, 2026.
Assessment
This issue has not been assessed yet.
Description
Pre-flight checklist
- I have searched existing issues/PRs and this has not been requested before.
- I have read the Contributing Guidelines.
Request type
- New patch / patchset inclusion
- Kernel config change (enable/disable option)
- New kernel variant
- Scheduler tuning / addition
- Compiler / LTO / PGO optimization
- Security hardening
- Driver or hardware enablement
- Other
Summary
Please carry NVIDIA/open-gpu-kernel-modules#1525 in linux-cachyos-nvidia-open (kernel-patches misc/nvidia/) and nvidia-open-dkms (CachyOS-PKGBUILDS nvidia/nvidia-utils/) until NVIDIA ships it. It allocates the atomic state in nv_drm_atomic_state_alloc() with kvzalloc/kvfree instead of kzalloc, so the allocation falls back to vmalloc when no order-3 block is free. 620.70.06, which CachyOS-PKGBUILDS already moved to, still has the same kzalloc path.
Replaces #1132, which I filed with the bug template.
Motivation / use case
nv_drm_atomic_state_alloc() allocates 16,744 bytes with kzalloc(GFP_KERNEL) (order 3), called from drm_mode_atomic_ioctl (Hyprland) or nv_drm_revoke_modeset_permission (Electron closing its DRM file). When no order-3 block can be found, the allocator invokes the OOM killer although file cache and swap remain, killing desktop processes including noctalia (shell), pipewire, wireplumber, xdg-desktop-portal, Electron apps and the browser. All 66 OOM-killer runs in my journal (6 boots, linux-cachyos 7.2.11 to 7.3.1-1) are this call; in 59 of them, as below, neither DMA32 nor Normal has a free block of 32 kB or larger. There is no on-demand trigger; it comes in bursts with Hyprland on the NVIDIA GPU.
Hyprland invoked oom-killer: gfp_mask=0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), order=3, oom_score_adj=0
…
out_of_memory+0x4ab/0x5f0
__alloc_pages_slowpath+0xeb6/0x1790
…
__kmalloc_noprof+0x27f/0x380
…
nv_drm_atomic_state_alloc+0x20/0x60 [nvidia_drm 63853839a1240a08ba38014d126a5909887d85b8]
drm_mode_atomic_ioctl+0x12a/0x740
…
Node 0 Normal free:66912kB boost:0kB min:59796kB low:74744kB high:89692kB … inactive_file:3470772kB …
…
Node 0 DMA32: 3134*4kB (UME) 3112*8kB (UME) 1508*16kB (UME) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 61560kB
Node 0 Normal: 4465*4kB (UME) 837*8kB (UME) 2297*16kB (UME) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 61308kB
…
Free swap = 26551780kB
Patch / upstream reference (if available)
Proposed fix: https://github.com/NVIDIA/open-gpu-kernel-modules/pull/1525 (open)
Upstream report: https://github.com/NVIDIA/open-gpu-kernel-modules/issues/1516 (stock Fedora 7.2.13, open)
Testing / benchmarks
Not built or run with the patch. It applies to the 615.78.08 and 620.70.06 sources without fuzz, and CachyOS's NVIDIA patches touch other files.
objdump -dr --disassemble=nv_drm_atomic_state_alloc on the shipped module shows mov $0x1,%edi, mov $0x4168,%esi and a call to nv_drm_calloc, which returns kzalloc(nmemb * size, GFP_KERNEL).
Additional context
CONFIG_CACHY=y sets vm.compaction_proactiveness and vm.watermark_boost_factor to 0 (upstream: 20 and 15000), disabling background compaction and watermark boosting; boosting exists "to increase the success rate of future high-order allocations such as SLUB allocations" (Documentation/admin-guide/sysctl/vm.rst). So CachyOS kernels may hit this more often; untested.
RTX 3070 Laptop with the MUX on dGPU (supergfxctl -g: AsusMuxDgpu), MemTotal 14.9 GiB, Hyprland 0.57.1, linux-cachyos 7.3.1-1. cachyos-bugreport.sh: https://paste.cachyos.org/p/fd8fccc.log
- Dominant language
- Shell
- Stars
- 4.9k
- Forks
- 190
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CachyOS/linux-cachyos
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
CachyOS/linux-cachyos#1196 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CachyOS/linux-cachyos#1091 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
CachyOS/linux-cachyos#961 · 1 comment ·
-
[FEATURE] Pre-signed hwmon / fan control modules (nct6687d, it87) for linux-cachyos-eacPossibly taken @ventureoo claimed this 1 day ago. Openenhancement
CachyOS/linux-cachyos#1206 · 3 assignees ·
-
[Feature Request] Add prebuilt signed linux-cachyos-eac-tuxedo-drivers modulePossibly taken @ventureoo claimed this 1 day ago. Openenhancement
CachyOS/linux-cachyos#1205 · 3 assignees ·
All issues in CachyOS/linux-cachyos
Similar issues
-
documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
aws/aws-networking-best-practices#256 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
fossi-foundation/globalfoundries-pdk-libs-gf180mcu_fd_pv#61 ·
-
openai-directory
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
smores56/homelab-platform#289 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
omacom/omarchy#21787 · 3 comments ·
Maintainers usually reply within 1 day