MANUAL SWITCHING AND MANUAL POWER CONTROL(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ Manual switching and manual power control โœจ

okay so bestie, this is the Kernel API Manual, section 9, and it is literally all about Manual switching and manual power control. slay. ๐Ÿซถ

๐ŸŒธ the mode + the magic file ๐ŸŒธ

in this mode of use, the file /sys/kernel/debug/vgaswitcheroo/switch can be read to retrieve the current vga_switcheroo state, and commands can be written to it to change the state. โœจ

the file appears as soon as two GPU drivers and one handler have registered with vga_switcheroo. iconic.

๐ŸŽ€ commands it understands ๐ŸŽ€

  • OFF โ€” power off the device not in use. ๐Ÿ’ค
  • ON โ€” power on the device not in use. โšก
  • IGD โ€” switch to the integrated graphics device. power on the integrated GPU if necessary, power off the discrete GPU. prerequisite is that no user space processes (e.g. Xorg, alsactl) have opened device files of the GPUs or the audio client. if the switch fails, the user may invoke lsof(8) or fuser(1) on /dev/dri/ and /dev/snd/controlC1 to identify processes blocking the switch. ๐Ÿ”
  • DIS โ€” switch to the discrete graphics device. ๐ŸŽฎ
  • DIGD โ€” delayed switch to the integrated graphics device. this will perform the switch once the last user space process has closed the device files of the GPUs and the audio client. โณ
  • DDIS โ€” delayed switch to the discrete graphics device. โณ
  • MIGD โ€” mux-only switch to the integrated graphics device. does not remap console or change the power state of either gpu. if the integrated GPU is currently off, the screen will turn black. if it is on, the screen will show whatever happens to be in VRAM. either way, the user has to blindly enter the command to switch back. ๐Ÿ™ˆ๐Ÿ’€
  • MDIS โ€” mux-only switch to the discrete graphics device. ๐ŸŒ€

๐Ÿซถ little caveats ๐Ÿซถ

for GPUs whose power state is controlled by the driver's runtime pm, the ON and OFF commands are a no-op (see next section). ๐Ÿ’…

โš ๏ธ for muxless machines, the IGD/DIS, DIGD/DDIS and MIGD/MDIS commands should not be used. periodt.

๐ŸŒˆ SEE ALSO ๐ŸŒˆ


mwah ๐Ÿ’‹ this cutie page is sourced from ./drivers/gpu/vga and dated October 2026. go off, bestie. ๐ŸŒŸ

๐Ÿ“ฆ where this page comes from