It is completed! Switchable graphics are supported by the Linux kernel!
The usage is pretty simple. You have 2 graphics cards installed in the system. Thus, You need drivers for both of them. For the tm2-1090eg this means You need to make sure that both the
radeon
and the intel
module are loaded after You booted up Your laptop. If one of them does not appear in the output of lsmod
, there's something wrong or You blacklisted is. How to cope with that is not covered in this guide.Starting with some-kernel-version, there is a node in the sysfs, specifically in
/sys/kernel/debug/
, which is called vgaswitcheroo
. This neat little thing gives us the possibility to switch the graphics adapter at runtime and also to turn off the idle one.(As root) You can write different 3 values into the switch at
/sys/kernel/debug/vgaswitcheroo/switch
using:Code: |
---|
$ echo <value> > /sys/kernel/debug/vgaswitcheroo/switch |
- OFF - This one is simple. It turns off the video adapter which is currently unused. It is of high value, though. I noticed that upon turning off my ATI card, the battery lifetime actually increased by a factor of 5! Before using this, I could use my laptop for about an hour before the batteries went dry and now I am able to hack on it for around 5 hours without a break. At the end of this article I will present an upstart script to automatically turn off the ATI card on startup (I can't think of a reason to use the ATI card on Linux. According to other people, the drivers don't work well and there is no need for 3D acceleration at all.).
- DDIS - Switch to the discrete graphics card (the ATI one). This requires a restart of the X server to take effect and the whole switching is buggy on my system. Every one or two switches, the system completely crashes and I need to hard-reboot my laptop. However, it may work for some people and may work for everyone in the near future, so I included it here as well.
- DIGD - Switch to the integrated graphics card (the Intel one). The same restrictions and errors apply as for the previous value.
Code: |
---|
$ cat /sys/kernel/debug/vgaswitcheroo/switch |
ati-disable.conf
and place it in /etc/init
as root, of course). Code: |
---|
# ati-disable - Disable ATI graphics card # # Disable the dedicated ATI graphics card to save power. description "Disable ATI graphics card" author "Frederik Möllers" start on started gdm script if [ -w /sys/kernel/debug/vgaswitcheroo/switch ] then echo "OFF" > /sys/kernel/debug/vgaswitcheroo/switch fi end script |
cat
command from above.That's it! You're done!
Keine Kommentare:
Kommentar veröffentlichen