SDL_HINT_KMSDRM_ATOMIC(3)
π SDL_HINT_KMSDRM_ATOMIC π
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is a hint. yes, a hint. sit with me.
β¨ NAME β¨
SDL_HINT_KMSDRM_ATOMIC β a variable that controls whether KMSDRM will use "atomic" functionality. that's it, that's the whole vibe.
π SYNOPSIS π
#include <SDL3/SDL_hints.h>
#define SDL_HINT_KMSDRM_ATOMIC "SDL_KMSDRM_ATOMIC"
like, that's the whole incantation. copy it, paste it, slay. π
πΈ DESCRIPTION πΈ
so here's the tea, bestie. the KMSDRM backend can use atomic commits β but only if both DRM_CLIENT_CAP_ATOMIC and DRM_CLIENT_CAP_UNIVERSAL_PLANES are supported by the system. both. not one. both. it's giving all-or-nothing, and honestly? iconic of it. π«Ά
as of SDL 3.4.0, it will favor this functionality β like, it's the default lewk now. but in case this doesn't work well on a given system or other surprises, this hint can be used to disable it. the chaos option, we love to see it.
β οΈ important caveat, no cap: this hint can not enable the functionality if it isn't available. you can turn the lights off, but you cannot turn them on if the switch literally does not exist. that's not a hint, that's a wish. π
the variable can be set to the following values:
- "0" β SDL will not use the KMSDRM
"atomic"functionality. (the "we tried, it was a mess, turn it off" era) - "1" β SDL will allow usage of the KMSDRM
"atomic"functionality. (default) β yes, this is the one it ships with, she's the main character. π
π¦ and listen: this hint should be set before SDL is initialized. before. like, set it early or don't bother. setting it after init is giving "texting back three days later". π
π AVAILABILITY π
this hint is available since SDL 3.4.0. β¨
and that's the whole page, bestie β go forth and atomically commit responsibly. π§
Simple Directmedia Layer Β· SDL 3.4.18 Β· SDL_HINT_KMSDRM_ATOMIC(3) β mwah, bye, drink water, read your docs. ππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms