My Lenovo BIOS has a switch to select the graphics hardware (Integrated vs Discrete) and also separately to enable/disable NVidia Optimus. Sadly a lot of laptops lack this sort of BIOS control.
If I enable Optimus I get ....
Code:
[root@crucibulum Desktop]# cat /sys/kernel/debug/vgaswitcheroo/switch
0:DIS: :Pwr:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0
Where the "IGD:+:" means that the Integrate Graphics Device is the current controller.
Sending the OFF command turns off the non-controlling device, so If I do
Code:
[root@crucibulum Desktop]# echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
[root@crucibulum Desktop]# cat /sys/kernel/debug/vgaswitcheroo/switch
0:DIS: :Off:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0
which powers off the Discrete Nvidia controller. But the OFF command powers off whichever device is not controlling.
So it's probably best to select the integrated graphics and then power off the 'other' like
echo IGD > /sys/kernel/debug/vgaswitcheroo/switch
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
and that needs to be executed before the X-session starts (or else restart an Xsession w/ ctrl+alt+bksp).
FWIW the curent driver commands thru the debugfs 'switch' pseudo file are:
OFF - power of the unused vid
ON - power on the nuused vid.
DIGD - delayed switch to intergrated graphcs (on the next xsession start)
DDIS - delayed switch to discrete Nvidia on next Xsession
IDG - immediate switch to integrated vid
DIS - immediate switch to discrete vid
MIGD - mux switch to integrated vid
MDIS - mux switch to discrete vid
The Mux switch options are new - and I haven't played with them.