STRUCT VC_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct vc_state(9) β€” the Kernel API Manual era

okay bestie, so we're in the Kernel API Manual today and the topic is struct vc_state(9) β€” which is literally just the state of a VC. that's it, that's the vibe.

✨ NAME ✨

struct vc_state β€” state of a VC. short, sweet, iconic, no notes πŸŽ€

🌸 SYNOPSIS 🌸

struct vc_state {
    unsigned int    x, y;
    unsigned char   color;
    unsigned char   Gx_charset[2];
    unsigned int    charset         : 1;
    enum vc_intensity intensity;
    bool italic;
    bool underline;
    bool blink;
    bool reverse;
 };

look at her. main character struct. copy her exactly, no cap 🫢


πŸ’– Members πŸ’–

here's the roster, and honestly everyone ate:

  • x β€” cursor's x-position πŸ“
  • y β€” cursor's y-position πŸ“ (yes, the partner-in-crime coordinate, we love a duo)
  • color β€” foreground & background colors 🎨
  • Gx_charset β€” what's G0/G1 slot set to (like GRAF_MAP, LAT1_MAP) πŸ”€
  • charset β€” what character set to use (0=G0 or 1=G1) 🧚
  • intensity β€” see enum vc_intensity for values ⭐
  • reverse β€” reversed foreground/background colors πŸ”„
ngl, the struct itself also carries italic, underline, and blink β€” they're right there in the synopsis, slaying in plain sight. the member writeups here just don't cover them, so don't come for me, I'm only repeating what the page says 😭

πŸ¦‹ Description πŸ¦‹

so why does this exist as its own whole struct instead of being glued into struct vc_data? because these members are defined separately from struct vc_data β€” we save & restore them at times. that's the whole reason. we stan a modular queen πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./include/linux/console_struct.h
  • struct vc_font(9)

lowkey a tiny page but every single detail is here, fr fr πŸ’…

and that's the tea β€” shipped from ./include/linux, dated October 2026, brought to you by the struct vc_state(9) girlies βœ¨πŸ’œ go read struct vc_font(9) next, iykyk πŸ¦‹

πŸ“¦ where this page comes from