A note about this tutorial. I have it currently working on my laptop, the HP Envy 14. It should work for the other Hp Envy series laptops with hybrid graphics. From what I've been reading if you are here looking for a fix for the NVidia Optimus chipset you are still out of luck. At least as of this posting [17 January 2011]. The instructions included here should work for other laptops with ati/intel combinations. It should also work with other laptops with ati/ati combinations. I maintain that should statement until proven otherwise. If you have such a setup and use these directions please leave me a comment so that others will also know that they have hope ;-).
Also, so far the main purpose of this graphics switching is to improve battery life. Turning off a GPU saves a great deal of power. I'm researching right now if there is a way to enable hardware acceleration on the discrete graphics card if it is manually switched. As of right now the answer I have is it is not. To the best of my knowledge if you install the ATI Catalyst closed source drivers you will not have a working video setup any longer. I've tried twice during experimentation and been let down. I'll post an update to this article if I find a way to make it work, or find somebody else who does.
For the sake of giving credit where its due I'll list the blogs and forums and such that I used to piece this info together:
Now that we have that out of the way, I highly recommend you piece your way through those links to follow along. Its important I suppose, something about teaching a man to fish.
This blog is following my experience with Ubuntu specifically, the information can be used in other distributions with a little know how. This is important in this case because even the Debian derived distributions like Ubuntu, opensuse or xandros have some basic system level differences. Most of the directions and blogs detailing the work needed to get this working seemed to be based on Fedora. The big difference here is that Ubuntu do
esn't use a /etc/rc.local file. So copying the directions line for line won't work up front. Don't despair, there isn't a lot of difference, and I'll walk through the instructions.
Also, in a short time I hope to roll all these instructions into a script to make it a very easy install for other Ubuntu users.
How to Enable Switchable Graphics (Hybrid Graphics) in Ubuntu
1) Download my version of the rc.local script:
Now set the script as an executable, in the terminal:
"chmod +x local"
2) Change the username portion of the local script to your username
3) Move the local file from your home folder to /etc/init.d/local:
"sudo mv ~/local /etc/init.d/local"
4) Update rc! Now we tell the system that we added a bootup script:
"sudo update-rc.d local defaults 80"
5) Setup scripts to enable easy switching of cards.
This code is taken from the Hybrid Graphics link above. It can be copied and pasted from there, for convenience I've made it available for download:
I recommend saving the file to your home directory. As thats where my guide assumes its going.
In your terminal issue this command:
"cd ~; chmod +x switch_between_cards.sh"
6) Now download the shutdown script:
We'll be using this script to circumvent a bug that causes the fan to run at high speed at all times after a reboot if the power is not on for both cards at boot time. Thanks to the hybrid graphics in linux blog in the links above for this script and the time and effort spent troubleshooting the issue.
7) In the terminal:
"cd ~; chmod +x shutdown.sh"
8) Now reboot.
Welcome back. You are just about done. Just need to make those handy scripts we downloaded a bit more accessible.
9) Right click on the top toolbar in some of its empty space and select "Add to panel"
10) Now select "Custom Application Launcher"
11) Now fill in the information below. Point the command portion directly at the script where-ever you happened to save it.
12) Now do the same for the shutdown script. Use the buttons to switch between graphics and shut down the machine.
Congrats. Now your battery life should be markedly improved.