drm_atomic_..._disable_all(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_atomic_..._disable_all(9) β€” like, the Kernel API Manual page, bestie

okay so real talk, this is one of those pages from the Kernel API Manual and it's genuinely iconic once you get past the vibe of the name. it's giving "long name, simple job." let's go πŸŽ€


✨ NAME ✨

drm_atomic_helper_disable_all β€” turn off, like, all the currently active outputs. every single one. no survivors. πŸ’€


🌸 SYNOPSIS 🌸

int drm_atomic_helper_disable_all (struct drm_device *dev , struct
       drm_modeset_acquire_ctx *ctx );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the DRM device, aka the main character of this whole operation πŸ‘‘
  • ctx β€” the lock acquisition context. yes you need it. yes it matters. we'll get to why in a sec πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

so here's the tea: it loops through all connectors, finds the ones that aren't already turned off, and then turns them off. how? by setting their DPMS mode to OFF and deactivating the CRTC that they're connected to. two-step takedown, slay ✨

this is used, for example, in suspend/resume β€” to disable all currently active functions when suspending. lowkey its whole personality.

🫢 but if you just want to shut down everything at, like, driver unload? that's a different function, bestie. go look at drm_atomic_helper_shutdown instead.

no cap, important part: if the callers haven't already acquired all modeset locks, this might return -EDEADLK, and you must handle that by calling drm_modeset_backoff. do not ignore it, it's not a vibe, it's a bug waiting to happen 😭

see also: drm_atomic_helper_suspend, drm_atomic_helper_resume and drm_atomic_helper_shutdown β€” the friend group 🫢


⭐ RETURN ⭐

0 on success, or a negative error code on failure. that's it. that's the whole mood. πŸ’…


🌈 SEE ALSO 🌈

the whole extended universe, fr fr β€” it's giving lore drop:


and that's the page!! 🧚 source lives in ./drivers/gpu/drm, dated October 2026 β€” so like, future-core of it all ⭐ mwah, go disable some outputs responsibly, ily πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from