My laptop is a normal, uninteresting machine with two standard, unmultiplexed GPUs and an ordinary Debian stretch installation. The secondary GPU (a Radeon) is usually powered down but I can activate and use it by (for example) DRI_PRIME=1 glxgears
. Mesa's source file src/loader/loader.c manages it.
Is DRI_PRIME
undocumented?
I wish to read the documentation but cannot find it. Oddly, it isn't here. Moreover, Google cannot locate it. If you know where the documentation is, would you tell?
Switching GPUs is a fairly important system function. One would think that the mechanism that does it would be thoroughly documented, but all I can find are a few oblique changelog entries and some online lore like this.
ADDITIONAL INFORMATION
You won't need Debian to answer my question. Any Linux should do.
In case a reader who wishes to start to learn about GPU switching stumbles in here, he can try sudo cat /sys/kernel/debug/vgaswitcheroo/switch
and then read html/newstyle/gpu/vga-switcheroo.html in the Linux kernel source. Also, man 8 lspci
. It took me two hours to figure out that much, so I mention it here to save the reader time.
Meanwhile, where is the proper documentation of Mesa environment variables like DRI_PRIME
, please?
DRI_PRIME=pci-0000_00_02_0
or similar which isn't mentioned on the FDO wiki...