amdgpu_switcheroo_set_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_switcheroo_set_state β€” Kernel API Manual energy ✨

okay so bestie, welcome to the Kernel API Manual entry for amdgpu_switcheroo_set_state(9) β€” yes the section 9 is doing numbers, she's a kernel function, not one of your little userland commands πŸ’…


✨ NAME ✨

amdgpu_switcheroo_set_state β€” sets the switcheroo state πŸ¦‹

Like, that's literally her whole job description and she's not sorry about it.


🌸 SYNOPSIS 🌸

void amdgpu_switcheroo_set_state (struct pci_dev *pdev , enum
vga_switcheroo_state state );

No cap, that's the whole signature. She returns void and takes two things. Periodt.


πŸŽ€ ARGUMENTS πŸŽ€

  • pdev β€” the pci dev pointer, aka the little handle that says which device we're talking about 🫢
  • state β€” the vga_switcheroo state, i.e. the vibe we're setting it to ✨

πŸ’– DESCRIPTION πŸ’–

She's the callback for the switcheroo driver β€” iconic behavior honestly πŸ‘‘

What she does: she suspends or resumes the asics before or after the thing gets powered up using ACPI methods. The way that she's just sitting there, being a callback, waiting for switcheroo to call her up… main character energy fr fr πŸ”₯

So yeah: before/after power-up via ACPI β†’ she handles the suspend/resume of the asics. That's it. That's the whole gig. Lowkey elegant, highkey essential πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘

First up, the source file, because obviously:

Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c πŸ¦‹

And now the full squad β€” every single one of these, in order, no skipping, we don't do that here:

Seventy-three besties. Count them. I did. 🧚

ngl if you came here looking for the other amdgpu_switcheroo_* function, amdgpu_switcheroo_can_switch(9) is right up there in the list β€” she's the one who gets to say yes or no πŸ’…

🌈 sign-off 🌈

that's the page!! source dir lives at ./drivers/gpu/drm/amd/amdgpu, and the version stamp is dated October 2026 β€” so yeah, future-coded of her honestly ⭐ go forth and switcheroo, bestie, you ate πŸ’–πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from