Comparison of PM methods
Clone this wiki locally
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.
- If the ACPI calls are known, it can be applied on all machines
- You need to know the ACPI calls for the machine. There are databases for these calls, mainly http://hybrid-graphics-linux.tuxfamily.org/index.php?title=ACPI_calls and http://www.martin-juhl.dk/ironhide/, but these contains a lot misinformation and the mentioned calls may even cause instability
- Improper calls may lockup the machine or in the worst case lead to requiring a hard reset (power plugs off)
- The driver must be unloaded.
- This messenger does not check any conditions. If a driver was loaded and an attempt to disable the dGPU is performed, the machine will lock up shortly afterwards.
- The dGPU cannot be used after resume although it appears as enabled if it was not turned on before suspend (see the bottom of ACPI for Developers for the cause).
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.
- Automatically detects the necessary calls for Optimus laptop models, no need for finding ACPI calls on your own.
- Survives a suspend, i.e. the card stays off after suspend and still works
- Provides an extra measure to avoid lockups: the card cannot be disabled if a driver is loaded
- The driver needs to be unloaded (a warning is printed in the kernel log if you try to disable the card while a driver is loaded). Bumblebee takes care of unloading the driver.
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
- No extra modules needs to be loaded, vga_switcheroo is compiled in the kernel and nouveau already supports vga_switcheroo. A patch is necessary for newer Optimus models which is available. (see properly check for _DSM function support and Optimus support for vga_switcheroo; this patch has been accepted for kernel 3.3)
- Drivers must support this method. The opensource driver
nouveauis supported, the proprietary
nvidiadriver (from nvidia.com) is not.
- The card must be turned on before suspend (this is actually a bug, a patch is in progress)
- Kernel lockups may occur if the graphics card is being accessed while it's sleeping (issue 8 in Bumblebee)
- If the state has become corrupted, further ON/OFF calls may cause a soft kernel oops. This could occur on old nouveau versions without the Optimus support and suspend patch or if the nvidia proprietary driver is messing with nouveau.