Did you activate power management as in the nvidia link above? I cannot test it because it doesn’t work on kepler cards. Btw., I can see whether the nvidia card is on from the power consumption.
The brute force hack is like in arch’s nividia-xrun:
Use an X session with only the integrated card, unload all nvidia kernel modules and
$ echo 1 > /sys/bus/pci/devices/0000\:08\:00.0/remove
(with your bus id).
When an application shall use the nvidia card
$ echo 1 > /sys/bus/pci/rescan
then load the drivers and open a second X session using the nvidia card. Don’t try to remove the device as long as the nvidia drivers are loaded, and don’t try to unload the nvidia drivers as long as the card is used!
I’ve put this into a script which is a server running as root which does this part and communicates via a FIFO. The missing bit so far is only flushing the fifo without blocking. If anyone knows how to do this cleanly with FIFOs or sockets in bash (e.g. using socat), please tell me.