The discrete nVidia card can be disabled by several methods. The currently mentioned methods (acpi_call, bbswitch and vga_switcheroo) all require manual interaction to enable/disable the device which means that you need to write to a special file. The use of acpi_call is discouraged, bbswitch is a better hack for now but eventually vga_switcheroo should be the way to go.
The dGPU can be disabled using ACPI calls. These calls can be performed with help of a messenger, the kernel module acpi_call. This module was initially developed by Michal Kottman. This is the oldest known method. The file
/proc/acpi/call is used.
This kernel module has been created after months of experience with ACPI calls and supports "legacy" Optimus (laptop without a _DSM call needed before switching) and "new" Optimus. It's available here The file
/proc/acpi/bbswitch is used.
This method has been available for a longer time and was created by Dave Airlie. It's compiled with a kernel and needs support from drivers. If debugfs is mounted and a switcheroo client has been registered, the file
/sys/kernel/debug/vgaswitcheroo/switch is available for use.
nouveaudriver does not need to be unloaded
nouveauis supported, the proprietary
nvidiadriver (from nvidia.com) is not.