SDL_HINT_KMSDRM_ATOMIC(3)

πŸ“¦
version 3.4.18 Β· 5 versions
, in fedora 43, fedora 44

πŸ’– 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