Difference between revisions of "Switchable Graphics"

From ThinkWiki
Jump to: navigation, search
m (ThinkPad models which may have this feature: Sorry W520.)
(added info for latest ubuntu)
 
(9 intermediate revisions by 4 users not shown)
Line 8: Line 8:
 
* On Ubuntu 8.10 (Intrepid) BIOS setting has to be either on Internal or External, not Switchable.
 
* 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
 
* On Ubuntu 9.10 (Karmic) the Integrated Intel card works with both Integrated or Switchable set
 
+
* On Ubuntu 13.10 and above, see [http://www.junauza.com/2014/03/how-to-get-nvidia-optimus-working-on-ubuntu-linux.html | How to Get NVIDIA Optimus Working on Ubuntu Linux]
Lenovo has published a [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-70495 Switchable Graphics FAQ] you may want to review.
 
  
 
== Switchable Graphics and Docks ==
 
== Switchable Graphics and Docks ==
Line 23: Line 22:
 
After mounting that you can now access {{path|/usr/kernel/debug/vgaswitcheroo/switch}}.  
 
After mounting that you can now access {{path|/usr/kernel/debug/vgaswitcheroo/switch}}.  
  
To force it to use the internal graphics write: {{cmdroot|echo 'IGD' > /usr/kernel/debug/vgaswitcheroo/switch}}.
+
See which GPU is currently active (look for '+'), and which ones are powered (look for 'pwr'):  
 +
  {{cmdroot|cat /sys/kernel/debug/vgaswitcheroo/switch}}
  
To force it to use the discrete GPU: {{cmdroot|echo 'DES' > /usr/kernel/debug/vgaswitcheroo/switch}}.
+
To force it to use the internal graphics write:  
 +
  {{cmdroot|echo 'IGD' > /sys/kernel/debug/vgaswitcheroo/switch}}
  
Most importantly, to poweroff the currently unused GPU, run: {{cmdroot|echo 'OFF' > /usr/kernel/debug/vgaswitcheroo/switch}}.
+
To force it to use the discrete GPU:  
 +
  {{cmdroot|echo 'DES' > /sys/kernel/debug/vgaswitcheroo/switch}}
  
This should double your battery-life on ThinkPads T420 and ThinkPad W420, if you only use intel Xorg drivers.
+
Most importantly, to poweroff the currently unused GPU, run:
 +
  {{cmdroot|echo 'OFF' > /sys/kernel/debug/vgaswitcheroo/switch}}
 +
 
 +
This will greatly improve to your average battery-life on ThinkPads T420 if you only use intel Xorg drivers.
  
 
== Development status ==
 
== Development status ==
Line 45: Line 50:
  
 
{{cmd|C:\PROGRA~2\ThinkPad\UTILIT~1\PWMUIAux.exe /EnergySavingGpu |}}
 
{{cmd|C:\PROGRA~2\ThinkPad\UTILIT~1\PWMUIAux.exe /EnergySavingGpu |}}
 +
 +
A small utility has been developed to switch between the chipsets with the ThinkVantage button, using Windows SetupAPI to detect the current chipset. More information and download of source and binary available here: http://entropicassembly.com/thinkpadgraphics/
  
 
== ThinkPad models which may have this feature ==
 
== ThinkPad models which may have this feature ==
 
* {{R400}}
 
* {{R400}}
* {{T400}}, {{T500}}, {{T510i}}, {{T420}}, {{T420s}}, {{T520}}
+
* {{T400}}, {{T500}}, {{T510i}}, {{T420}}, {{T420s}}, {{T520}}, {{T430s}}
* {{W500}}, {{W520}}
+
* {{W500}}, {{W520}}, {{W530}}

Latest revision as of 23:17, 13 March 2014

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
  • On Ubuntu 13.10 and above, see | How to Get NVIDIA Optimus Working on Ubuntu Linux

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 if you only use intel Xorg drivers.

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

A small utility has been developed to switch between the chipsets with the ThinkVantage button, using Windows SetupAPI to detect the current chipset. More information and download of source and binary available here: http://entropicassembly.com/thinkpadgraphics/

ThinkPad models which may have this feature