« Back to home

Dealing with Hybrid Graphics card system in Ubuntu, Fedora, other distros (Intel/Ati)

Posted on

UPDATE : Ubuntu now officially supports hybrid GPU Systems. View the steps to setup here

I've been trying to find some solution for avoiding over-heating and battery consumption with Hybrid Graphics system in Linux (Ati/Intel in my case) .
The only workable solution i could find is working the vgaswitcheroo.

VGASwitcheroo is a GPU switching script that can switch between a integrated and discrete gpu unit safely.

Implementing this makes the Discrete GPU (ATI) turn off and thus avoiding any extra heat or power/resource consumption

Although This does mean tha you wont be getting any Rendering from the Discrete unit, but fortunately you don't need the discrete card for running simple tasks. But to play games or applications that require high gpu resources and rendering you will need to turn the Gpu on.

So what i recommend is, to turn off the GPU at boot time and turn it on only when required.

(REMEMBER TO REPLACE "uj" with your user name)

Run VGAswitcheroo at boot in ubuntu(Linux Mint and other Ubuntu based distros!).

The script required to run everytime is

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

But if you login to a non-root user, you should set the permissions for this file. And also to run this at boot time, add the script to the rc.local file. All contents of rc.local are run at the startup. This is also the mentioned method at Ubuntu Wiki.

So edit the rc.local file as

sudo vi (or nano or gedit) /etc/rc.local

add the following script

sudo chmod -R 705 /sys/kernel/debug
sudo chown -R uj:uj /sys/kernel/debug/vgaswitcheroo
sudo echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

Reboot and you are done!

Run VGAswitcheroo at boot in Fedora (18,19).

 

Create a service and add it to SYSTEMD. This is the recommended method over the old rc.local file.

Open terminal and add the following commands as the root or SuperUser

cat > /etc/systemd/system/rg.service <<EOF  
[Unit]
Description=Turn off ATI graphics card

[Service]
Type=oneshot  
ExecStart=/bin/sh -c '/bin/echo OFF > /sys/kernel/debug/vgaswitcheroo/switch'

[Install]
WantedBy=multi-user.target  
EOF

Now enable the service to run at boot time using systemctl (to be executed as root)

systemctl enable rg.service

Now Reboot and you're done!

Now to enable the Discrete GPU everytime you need it, run the following command in both ubuntu and fedora in terminal as root or sudo!

sudo echo ON > /sys/kernel/debug/vgaswitcheroo/switch

To check the status of the Hybrid Graphics system use the following command.

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

This method has been tested by me on both ubuntu, Fedora 19, Manjaro, Arch linux. If you encounter any problem, do comment!

NOTE > IF YOU ARE INSTALLING ARCH LINUX YOU NEED TO IMPLEMENT THIS SOON AFTER INSTALLING THE DRIVERS WITHOUT A REBOOT OR INSTALLING A GUI OR DE/DWM AS MENTIONED IN THEIR HYBRID GRAPHICS WIKI. SEVERAL OTHER METHODS HAVE ALSO BEEN MENTIONED ON TH OFFICIAL ARCH WIKI https://wiki.archlinux.org/index.php/Hybrid_graphics

Comments