subsystem_reset(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’… subsystem_reset(3) β€” Arcan Lua API πŸŽ€

okay bestie, welcome to the subsystem_reset page β€” section 3 of the Arcan Lua API, no cap. it's a little one but it's iconic in its own way, so let's get into it ✨


🌸 NAME 🌸

subsystem_reset β€” reset/rebuild a specific subsystem 🧚

⭐ SYNOPSIS ⭐

nil
subsystem_reset( string:subsystem=video )
subsystem_reset( string:subsystem=video, int:card )
subsystem_reset( string:subsystem=video, int:card, int:swap )

like, yes, the first line really is just nil β€” that's the whole vibe 🌈

πŸ’– DESCRIPTION πŸ’–

so this function is here to help with debugging, and also for those specific little situations where a subsystem has hotpluggable devices that need special consideration. iykyk πŸ’…

the most common use-case? multi- GPU settings, and GPU settings where there's a difference between initialising the subsystem with a display connected and initialising it without one β€” literally two different worlds 😭

here's the tea on how it behaves:

  • if subsystem is set to video and no card is specified, or (the default) the card is set to -1, then all GPU contexts will be rebuilt πŸ”₯
  • if subsystem is set to video and no card is specif
🫢 real talk: that's exactly where the page cuts off in the source β€” the sentence just stops at "specif" and honestly, same. no extra details were invented here, we're keeping it 100% faithful to what's on the page πŸ™ˆ

πŸ¦‹ EXAMPLE πŸ¦‹

function subsystem_reset0()
      a = color_surface(64, 64, 255, 0, 0);
      show_image(a);
      subsystem_reset("video");
end

making a lil 64Γ—64 red surface, showing it, then resetting the whole video subsystem β€” main character energy fr fr πŸ‘‘

πŸ‘‘ SEE ALSO πŸ‘‘

system


πŸ’œ that's the whole page, bestie β€” short, sweet, and giving exactly what it needs to give. this one's from the Arcan Lua API, dated October 2026, and it's filed under subsystem_reset(3). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from