STRUCT VGA_SWITCHEROO_CLIENT(9)
π struct vga_switcheroo_client π
okay so bestie, welcome to the Kernel API Manual β yes this is the struct vga_switcheroo_client(9) page and no, it's not as scary as it sounds, i promise π«Ά
β¨ NAME β¨
struct vga_switcheroo_client β literally just a registered client, that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
struct vga_switcheroo_client {
struct pci_dev *pdev;
struct fb_info *fb_info;
enum vga_switcheroo_state pwr_state;
const struct vga_switcheroo_client_ops *ops;
enum vga_switcheroo_client_id id;
bool active;
bool driver_power_control;
struct list_head list;
struct pci_dev *vga_dev;
};
like, copy it exactly pls, every field matters π
π¦ Members π¦
okay so this is the part where we meet the whole squad, one member at a time π
pdevβ the client's pci device. that's its whole thing, no cap.fb_infoβ the framebuffer that the console gets remapped to when you switch. it's giving "where the screen actually goes" energy β¨pwr_stateβ the current power state, but ONLY if you're using manual power control. if you're on driver power control instead, you don't read this β you callvga_switcheroo_pwr_state, periodt.opsβ the client callbacks. the little hooks it calls home with πidβ the client identifier. lowkey the tricky one: figuring out the id requires the handler, so gpus start out withVGA_SWITCHEROO_UNKNOWN_IDand only get their true id later, insidevga_switcheroo_enable. character development fr fr πactiveβ whether the outputs are currently switched over to this client. y/n, main character or not πdriver_power_controlβ whether the power state is controlled by the driver's runtime pm. and listen: if this is true, writingONandOFFto the vga_switcheroo debugfs interface is a no-op, specifically so it doesn't interfere with runtime pm. don't @ me, that's just how it is πlistβ the client list. the group chat, basically.vga_devβ a pci device that indicates which GPU is bound to the current audio client. iykyk π₯
πΌ Description πΌ
so a registered client β and here's the tea β can be either a GPU or an audio device sitting on a GPU π
for audio clients, the fb_info and active members are bogus (read: don't trust them, they're not real for you π).
for GPU clients, the vga_dev member is the bogus one.
that's the whole trade-off, bestie. everyone's got exactly one fake field and that's iconic in its own way β
π SEE ALSO π
go read these next, they're all connected, no skips π§
Kernel file ./drivers/gpu/vga/vga_switcheroo.c Overview(9), struct vgasr_priv(9), vga_switcheroo_register_handler(9), vga_switcheroo_unregister_handler(9), vga_switcheroo_handler_flags(9), vga_switcheroo_register_client(9), vga_switcheroo_register_audio_client(9), vga_switcheroo_client_probe_defer(9), vga_switcheroo_get_client_state(9), vga_switcheroo_unregister_client(9), vga_switcheroo_client_fb_set(9), vga_switcheroo_lock_ddc(9), vga_switcheroo_unlock_ddc(9), Manual switching and manual power control(9), vga_switcheroo_process_delayed_switch(9), Driver power control(9), vga_switcheroo_init_domain_pm_ops(9)
okay and before you go, the receipts π§Ύ: this one came from ./drivers/gpu/vga, dated October 2026, and it's the struct vga_switcheroo_client(9) page from the Kernel API Manual. that's it, that's the page, mwah πβ¨ slay responsibly π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms