Queues a switch to integrated graphics to occur when the X server is next restarted. Sudo echo DIGD > /sys/kernel/debug/vgaswitcheroo/switch There are also a couple of options that are useful from inside an X-Windows session: Turns off the graphics card that is currently disconnected. Sudo echo OFF > /sys/kernel/debug/vgaswitcheroo/switch Sudo echo DIS > /sys/kernel/debug/vgaswitcheroo/switch Sudo echo IGD > /sys/kernel/debug/vgaswitcheroo/switchĬonnects integrated graphics with outputs. Turns on the GPU that is disconnected (not currently driving outputs), but does not switch outputs. Sudo echo ON > /sys/kernel/debug/vgaswitcheroo/switch
Typically, there will be two lines of output - one should indicate "Pwr" and the other should indicate "Off". Sudo cat /sys/kernel/debug/vgaswitcheroo/switchĪllows you to verify the current state of the hybrid graphics. Be prepared for a lockup (either immediately, or after a minute), the existence of this file does not mean that the machine is supported. Once you've ensured that vga_switcheroo is available, you can use these options to switch between GPUs. To test if vga_switcheroo is enabled, look for the switch file: sudo ls -l /sys/kernel/debug/vgaswitcheroo/switch Where XXX = can be: "radeon" if you have a AMD/ATI card (most likely option since Intel and NVIDIA cards in dual-GPU notebooks have better ways of dealing with hybrid graphics, like bumblebee) GRUB_CMDLINE_LINUX_DEFAULT="quiet splash XXX.modeset=1" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" This is a sample command line that opens the file with gedit text editor with root/admin privileges sudo gedit /etc/default/grub Open that file with a text editor with root/admin privileges. These settings are stored in grub's (the bootloader) own setting files in /etc/default/grub The vga_switcheroo mechanism will only be active when the kernel is booted with either the "modeset=1" kernel option, and/or the "nomodeset" option being absent. If there is CONFIG_VGA_SWITCHEROO=y then what we need is there and we can proceed. This is an example of the result, with kernel version 4.1 /boot/config-4.1.0-1-amd64:CONFIG_VGA_SWITCHEROO=y To check whether your kernel is compiled with the proper option you can examine the file config-2.6.nn-mm-generic in the /boot directory: sudo grep -i switcheroo /boot/config-*
Note that this method is not supported by all machines and only works if you are using the opensource driver (nouveau, radeon) and not the proprietary ones (nvidia, fglrx).
Vga_switcheroo is the kernel mechanism that allows you to switch between GPUs if your machine has a hardware mux.
The kernel shipped in Ubuntu 10.10 supports hybrid graphics by means of the vga_switcheroo flag. The integrated GPU is often embedded in the CPU, hence the name. Some laptops come with two graphics cards: one for use in applications that require a lot of computing power such as games, called the discrete GPU, and one that is less powerful, but conserves energy, called the integrated GPU.