Switchable Graphics

From ThinkWiki
Revision as of 14:55, 23 August 2012 by Carewolf (Talk | contribs) (Improving Battery-life with Optimus: Scale down estimate of battery life improvement to one including medium CPU and network use.)
Jump to: navigation, search

Select ThinkPads feature switchable graphics, where a low power consumption integrated GPU and high performance dedicated GPU is combined and you have the ability to switch between them, sacrificing either performance or battery life.

In Windows XP this switching requires a logout/login, while in Vista and Windows 7 there is support for runtime switching.

Under Linux, the switching so far had to be done by entering BIOS setup and changing between "Internal" (low power, integrated), "External" (high performance, discrete) or "Switchable" (OS selectable) options.

Depending on which Linux version you use, you could have the following effects

  • On Ubuntu 8.10 (Intrepid) BIOS setting has to be either on Internal or External, not Switchable.
  • On Ubuntu 9.10 (Karmic) the Integrated Intel card works with both Integrated or Switchable set

Switchable Graphics and Docks

ThinkPads with switchable graphics can only drive DVI or DisplayPort outputs on Docks by using the high-performance discrete graphics card, the integrated GPU is just not attached to the DVI or DisplayPort outputs (though VGA output through the dock is possible).

Improving Battery-life with Optimus

ThinkPads with NVidia Optimus graphics, have been well known to have significantly better battery-life in Windows than in Linux, even when Linux only uses the internal graphics. The reason is that the NVidia GPU is not automatically powered off when it is not used. So to get optimal battery-life in Linux on ThinkPad with Optimus, you need to switch it off manually (or by a script).

First you need to enable access to vga-switcheroo settings, for that you need to mount the debugfs. You can do that by adding the following line to /etc/fstab:

 none            /sys/kernel/debug debugfs defaults 0 0

After mounting that you can now access /usr/kernel/debug/vgaswitcheroo/switch.

See which GPU is currently active (look for '+'), and which ones are powered (look for 'pwr'):

 # cat /sys/kernel/debug/vgaswitcheroo/switch

To force it to use the internal graphics write:

 # echo 'IGD' > /sys/kernel/debug/vgaswitcheroo/switch

To force it to use the discrete GPU:

 # echo 'DES' > /sys/kernel/debug/vgaswitcheroo/switch

Most importantly, to poweroff the currently unused GPU, run:

 # echo 'OFF' > /sys/kernel/debug/vgaswitcheroo/switch

This will greatly improve to your average battery-life on ThinkPads T420 and ThinkPad W420 if you only use intel Xorg drivers. On average I see an improvement from 1½->2 hours, to 2½->3½ hours.

Development status

David Arlie has been working on switching between GPUs without having to reboot, and changing BIOS settings. An initial version of a new driver (vga_switcheroo) has been merged in the 2.6.34 kernel. This driver allows switching between graphics cards, but requires that the Xserver is restarted. Full seamless runtime switching support will require significant Xserver work.

http://www.phoronix.com/scan.php?page=news_item&px=ODAyMg

A script to switch between ATI discrete graphics with the fglrx driver and Intel integrated graphics with xorg driver through rebooting and selection in the bios is posted here. The user must reboot, but no further configuration is needed as the script detects the card used and copies the correct libraries and configuration file.

http://www.thinkwiki.org/wiki/Auto_detect_drivers_for_switchable_graphics

It has been discovered that on a W500 running Windows 7 64-bit that the switch can be invoked using one of the two following commands (depending on which chipset is currently in use)

C:\PROGRA~2\ThinkPad\UTILIT~1\PWMUIAux.exe /HighPerformanceGpu

C:\PROGRA~2\ThinkPad\UTILIT~1\PWMUIAux.exe /EnergySavingGpu

ThinkPad models which may have this feature