Skip to content

Niri idle screen-off HDMI hotplug storm OOMs the session #258

Description

@xdvi

Summary

On niri, idle power-off-monitors can drop HDMI HPD. The external display then reconnects in a loop, GPU GTT fills, and the OOM killer SIGKILLs niri (taking the whole session with it).

Reproduced on an AMD GPU with HDMI. The same class of bug can hit other GPUs if DPMS tears down the HDMI link the same way.

Steps to reproduce

  1. niri + iNiR, internal panel + HDMI on an AMD GPU.
  2. Leave the session idle until idle.screenOffTimeout fires.
  3. Watch journalctl for HDMI disconnecting connector / new connector repeating every few seconds.
  4. After enough cycles: kswapd0 invoked oom-killer and Out of memory: Killed process (niri).

Expected behavior

Screen-off blanks the displays without tearing down the HDMI link. Idle must not grow unreclaimable GPU memory.

Logs

niri: disconnecting connector: "HDMI-A-1"
niri: new connector: HDMI-A-1
inir: attempted to use dangling screen object
...
gpu_active:7106288kB gpu_reclaim:0kB
Free swap = 204kB
Out of memory: Killed process ... (niri) oom_score_adj:200

Dozens of HDMI disconnects in a few minutes after screen-off. iNiR RSS stayed in the hundreds of MB; the missing RAM was GPU GTT.

Environment

iNiR 2.29.1
Quickshell 0.3.1
niri 26.04
AMD GPU (iGPU, shared GTT)

Panel family

ii

Additional context

brightness sleepBegin already ignores hotplug for brightness objects (PR #193). That does not stop niri from connecting the output again, so the DRM buffers still leak. Screen-off should not call niri msg action power-off-monitors when that drops HDMI HPD.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions