vga_switcher...ister_client(9)
β¨ vga_switcheroo_register_client β¨
So bestie, this is a page from the Kernel API Manual β yes, the vga_switcheroo_register_client(9) one π
β and it's literally about signing your GPU up to the switcheroo club. Let's get into it π
πΈ NAME πΈ
vga_switcheroo_register_client β register vga client π«Ά
β SYNOPSIS β
int vga_switcheroo_register_client (struct pci_dev *pdev , const struct
vga_switcheroo_client_ops *ops , bool driver_power_control );
π ARGUMENTS π
pdevβ the client's pci device, i.e. the actual GPU you're introducing to the group chat π₯οΈopsβ the client callbacks, your GPU's whole personality frdriver_power_controlβ aboolthat says whether the power state is controlled by the driver's runtime pm β‘ lowkey important, ngl
π¦ DESCRIPTION π¦
Okay so here's the vibe: you're registering a vga client (a GPU) π And the way this works β if another GPU and a handler have already registered, then this call enables vga_switcheroo. Iconic.
Heads up though: the power state of the client is assumed to be ON at this point π₯ Don't come in here half-asleep.
And the prerequisite check? Beforehand, vga_switcheroo_client_probe_defer shall be called to make sure all the prerequisites are met β
like, do the reading before the exam bestie, no cap.
Not me reminding you again: call vga_switcheroo_client_probe_defer before this. The manpage literally says "shall". That's a demand, not a suggestion π
π RETURN π
0on success β slay β¨-ENOMEMon memory allocation error β the allocation said no ma'am π
π SEE ALSO π
- Kernel file
./drivers/gpu/vga/vga_switcheroo.cOverview(9) - struct
vga_switcheroo_client(9) - struct
vgasr_priv(9) vga_switcheroo_register_handler(9)vga_switcheroo_unregister_handler(9)vga_switcheroo_handler_flags(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 that's the whole page, you ate that ππ
This little gem lives in ./drivers/gpu/vga, it's dated October 2026, and the header on it says vga_switcher...ister_client(9) β go off, truncated title π mwah, bye bestie π§π
π¦ 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