Ubuntu/Linux 11.04, 11.10, 12.04, 12.10, 13.04 Over Heating Problem Solved For Better!

Nishant Arora 18/Jul/2013
Facebook
Twitter
LinkedIn
Reddit

Ubuntu and almost every flavor of linux has this bug and dunno why is it not being solved till now. Linux is unable to handle dual graphics properly and proprietary drivers for either ati or nvidia are just pieces of junk. Here is a solution I figured out almost after 3 releases of ubuntu (though now I have migrated to mint for stability, still it has the same bug) what was going wrong

To identify if this bug infects your system, goto terminal (alt+ctrl+t) and type:

sudo cat /sys/kernel/debug/vgaswitcheroo/switch

If the output looks something like this, you're infected by this bug:

0:DIS: :Pwr:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0

Just notice the "Pwr" in both the lines, which means your dual/hybrid graphics system has both the graphics cards switched on and is consuming all your battery juice and running just hotter, without any benefit.

The Workaround to this problem, is to permanently switch off the discrete graphics card forever. As this would barely affect your system because i doubt you would be doing any graphics intensive task on your favorite Linux. follow these steps:

Step 1: in terminal type:

sudo gedit /etc/rc.local

Step 2: in the editor window, add these two lines before exit 0:

echo IGD > /sys/kernel/debug/vgaswitcheroo/switch
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

So your rc.local would look something like:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo IGD > /sys/kernel/debug/vgaswitcheroo/switch
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
exit 0

Step 3: Reboot

Understanding what happened:
by issuing these commands in rc.local they will excute at boot. The first command will select your Integrated (IGD) graphics. The second command will switch off the discrete card. After this the first checking command (in the beginning of post) would output something like:

0:DIS: :Off:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0

You're problem is solved, and you're system is now just chilling.

Cheers!