<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8619231043438113473</id><updated>2012-01-21T03:52:36.969-08:00</updated><title type='text'>ASUSM51Ta &amp; Linux: Enjoy Hybrid Graphics with switcheroo</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://asusm51ta-with-linux.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8619231043438113473/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://asusm51ta-with-linux.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Roberto Martinez</name><uri>http://www.blogger.com/profile/06004648891096957994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-RtsCJ0YoWos/TdrUS_yszHI/AAAAAAAAAKQ/Mob2Y76tMXo/s220/rmartinez.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8619231043438113473.post-5326756149649952322</id><published>2010-11-07T10:31:00.000-08:00</published><updated>2010-11-10T17:30:59.861-08:00</updated><title type='text'></title><content type='html'>&lt;hr&gt;&lt;p&gt;&lt;b&gt;&lt;big&gt;[10/11/2010] Fedora 14 / Ubuntu 10.10 + vga_switcheroo + switch scripts&lt;/big&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;big&gt;(0) Install Fedora 14 / Ubuntu 10.10, install needed packages &amp; download icons&lt;/big&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="text-align: justify"&gt;&lt;b&gt;(0.1) Burn a CD or make a bootable USB with your fabourite distribution and install it on your laptop.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 48px; height: 48px;" src="http://lh3.ggpht.com/_Dw3SC8gD9Jk/S4fBc2QY_4I/AAAAAAAAAEE/PJ6LitzZGI0/s800/fedoraLogoMini.png" /&gt;&lt;a href="http://fedoraproject.org/get-fedora"&gt;Fedora 14&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 48px; height: 48px;" src="http://lh3.ggpht.com/_Dw3SC8gD9Jk/TI5fOYoTtTI/AAAAAAAAAJY/Iu_RNfvP8Jk/s800/ubuntu-logo48.png" /&gt;&lt;a href="http://www.ubuntu.com/desktop/get-ubuntu/download"&gt;Ubuntu 10.10&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;b&gt;(0.2) Install the following packages from the command line and download icons:&lt;/b&gt;&lt;/p&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 12px; height: 12px;" src="http://lh4.ggpht.com/_Dw3SC8gD9Jk/TNbQWyYuRBI/AAAAAAAAAJ0/P6klqreBeC8/s800/fedoraLogoMiniMini.png" /&gt;&lt;br /&gt;&lt;div style="overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;$ sudo yum update&lt;br /&gt;$ sudo yum install wget gxmessage libnotify-bin&lt;br /&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh4.ggpht.com/_Dw3SC8gD9Jk/S-MGVcEfaiI/AAAAAAAAAIA/Pguy_uSeqSk/s800/hardware_down.png&lt;br /&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh5.ggpht.com/_Dw3SC8gD9Jk/S-MGVSO0JbI/AAAAAAAAAIE/_mdAnW7UiCQ/s800/hardware_up.png&lt;br /&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh4.ggpht.com/_Dw3SC8gD9Jk/TNbQXzK6hrI/AAAAAAAAAJ8/YlqK46MusuE/s800/hardware.png&lt;br /&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh5.ggpht.com/_Dw3SC8gD9Jk/S41DjuMt_MI/AAAAAAAAAF4/5pQm2-dX6Sg/s800/switch_before_shutdown.png&lt;/div&gt;&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 12px; height: 12px;" src="http://lh3.ggpht.com/_Dw3SC8gD9Jk/TNbQXv-yg9I/AAAAAAAAAJ4/rOBoFHV4hvg/s800/ubuntuLogoMiniMini.png" /&gt;&lt;br /&gt;&lt;div style="overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;$ sudo apt-get update&lt;br /&gt;$ sudo apt-get install wget gxmessage libnotify-bin&lt;br /&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh4.ggpht.com/_Dw3SC8gD9Jk/S-MGVcEfaiI/AAAAAAAAAIA/Pguy_uSeqSk/s800/hardware_down.png&lt;br /&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh5.ggpht.com/_Dw3SC8gD9Jk/S-MGVSO0JbI/AAAAAAAAAIE/_mdAnW7UiCQ/s800/hardware_up.png&lt;br /&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh4.ggpht.com/_Dw3SC8gD9Jk/TNbQXzK6hrI/AAAAAAAAAJ8/YlqK46MusuE/s800/hardware.png&lt;br /&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh5.ggpht.com/_Dw3SC8gD9Jk/S41DjuMt_MI/AAAAAAAAAF4/5pQm2-dX6Sg/s800/switch_before_shutdown.png&lt;/div&gt;&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;&lt;big&gt;(1) Mount "none" partition on &lt;i&gt;fstab&lt;/i&gt; (just on Fedora, Ubuntu does it by default)&lt;/big&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 12px; height: 12px;" src="http://lh4.ggpht.com/_Dw3SC8gD9Jk/TNbQWyYuRBI/AAAAAAAAAJ0/P6klqreBeC8/s800/fedoraLogoMiniMini.png" /&gt;&lt;pre class="prettyprint"&gt;$ sudo gedit /etc/fstab&lt;/pre&gt;And add the following line:&lt;pre class="prettyprint"&gt;none                    /sys/kernel/debug debugfs defaults 0 0&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;&lt;big&gt;(2) Change &lt;i&gt;switch&lt;/i&gt; file permissions every time computer initiates&lt;/big&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 12px; height: 12px;" src="http://lh4.ggpht.com/_Dw3SC8gD9Jk/TNbQWyYuRBI/AAAAAAAAAJ0/P6klqreBeC8/s800/fedoraLogoMiniMini.png" /&gt;&lt;pre class="prettyprint"&gt;$ sudo gedit /etc/rc.d/rc.local&lt;/pre&gt;And add the following lines:&lt;/p&gt;&lt;pre class="prettyprint"&gt;chown "username" /sys/kernel/debug/vgaswitcheroo/switch # change "username" with your user name&lt;br /&gt;echo OFF &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 12px; height: 12px;" src="http://lh3.ggpht.com/_Dw3SC8gD9Jk/TNbQXv-yg9I/AAAAAAAAAJ4/rOBoFHV4hvg/s800/ubuntuLogoMiniMini.png" /&gt;&lt;pre class="prettyprint"&gt;$ sudo gedit /etc/rc.local&lt;/pre&gt;And add the following lines:&lt;/p&gt;&lt;pre class="prettyprint"&gt;chown "username" /sys/kernel/debug/vgaswitcheroo/switch # change "username" with your user name&lt;br /&gt;echo OFF &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;&lt;big&gt;(3) Reboot &amp; copy and run script to switch between graphic cards&lt;/big&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="text-align: justify"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 48px; height: 48px;" src="http://lh4.ggpht.com/_Dw3SC8gD9Jk/S4nIxZBts2I/AAAAAAAAAEo/1wDkx45n4XU/s800/executable.png" /&gt;&lt;b&gt;switch_between_cards.sh&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;div style="height: 350px;overflow:auto;overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;#!/bin/bash&lt;br /&gt;# "switch_between_cards.sh" script by RM, with useful changes from LoLL&lt;br /&gt;# version 20101107&lt;br /&gt;&lt;br /&gt;pci_integrated=$(lspci | grep VGA | sed -n '1p' | cut -f 1 -d " ")&lt;br /&gt;pci_discrete=$(lspci | grep VGA | sed -n '2p' | cut -f 1 -d " ")&lt;br /&gt;&lt;br /&gt;integrated=$(cat /sys/kernel/debug/vgaswitcheroo/switch | grep $pci_integrated | grep -o -P ':.:...:')&lt;br /&gt;discrete=$(cat /sys/kernel/debug/vgaswitcheroo/switch | grep $pci_discrete | grep -o -P ':.:...:')&lt;br /&gt;&lt;br /&gt;name_integrated=$(lspci | grep VGA | sed -n '1p' | sed -e "s/.* VGA compatible controller[ :]*//g" | sed -e "s/ Corporation//g" | sed -e "s/ Technologies Inc//g" | sed -e 's/\[[0-9]*\]: //g' | sed -e 's/\[[0-9:a-z]*\]//g' | sed -e 's/(rev [a-z0-9]*)//g' | sed -e "s/ Integrated Graphics Controller//g")&lt;br /&gt;&lt;br /&gt;name_discrete=$(lspci | grep VGA | sed -n '2p' | sed -e "s/.* VGA compatible controller[ :]*//g" | sed -e "s/ Corporation//g" | sed -e "s/ Technologies Inc//g" | sed -e 's/\[[0-9]*\]: //g' | sed -e 's/\[[0-9:a-z]*\]//g' | sed -e 's/(rev [a-z0-9]*)//g' | sed -e "s/ Integrated Graphics Controller//g")&lt;br /&gt;&lt;br /&gt;if [ "$integrated" = ":+:Pwr:" ]&lt;br /&gt;then&lt;br /&gt; integrated_condition="(*) - Power ON"&lt;br /&gt;elif [ "$integrated" = ": :Pwr:" ]&lt;br /&gt;then&lt;br /&gt; integrated_condition="( ) - Power ON"&lt;br /&gt;elif [ "$integrated" = ": :Off:" ]&lt;br /&gt;then&lt;br /&gt; integrated_condition="( ) - Power OFF"&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;if [ "$discrete" = ":+:Pwr:" ]&lt;br /&gt;then&lt;br /&gt; discrete_condition="(*) - Power ON"&lt;br /&gt;elif [ "$discrete" = ": :Pwr:" ]&lt;br /&gt;then&lt;br /&gt; discrete_condition="( ) - Power ON"&lt;br /&gt;elif [ "$discrete" = ": :Off:" ]&lt;br /&gt;then&lt;br /&gt; discrete_condition="( ) - Power OFF"&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;gxmessage -center \&lt;br /&gt;          -buttons "_Cancel":1,"switch to _Integrated":101,"switch to _Discrete":102 \&lt;br /&gt;          -wrap \&lt;br /&gt;          -title "Choose Hybrid Graphic Card" \&lt;br /&gt;"Choose Hybrid Graphic Card&lt;br /&gt;=================&lt;br /&gt;Integrated: $integrated_condition : $name_integrated&lt;br /&gt;Discrete: $discrete_condition : $name_discrete"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;whichCard=$?&lt;br /&gt;&lt;br /&gt;case "$whichCard" in&lt;br /&gt;&lt;br /&gt;1)&lt;br /&gt; echo "Exit"&lt;br /&gt;;;&lt;br /&gt;101)&lt;br /&gt; if [ "$integrated" == ":+:Pwr:" ] &amp;&amp; [ "$discrete" == ": :Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_down.png" "switching to $name_integrated"&lt;br /&gt;  echo OFF &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt; elif [ "$integrated" == ": :Pwr:" ] &amp;&amp; [ "$discrete" == ":+:Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_down.png" "switching to $name_integrated"&lt;br /&gt;  echo DIGD &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  if [ "$DESKTOP_SESSION" = "openbox" ]&lt;br /&gt;  then&lt;br /&gt;   killall -u "$USER"&lt;br /&gt;  elif [ "$DESKTOP_SESSION" = "gnome" ]&lt;br /&gt;  then&lt;br /&gt;   gnome-session-save --logout&lt;br /&gt;  fi&lt;br /&gt; elif [ "$integrated" == ": :Off:" ] &amp;&amp; [ "$discrete" == ":+:Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_down.png" "switching to $name_integrated"&lt;br /&gt;  echo ON &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  echo DIGD &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  if [ "$DESKTOP_SESSION" = "openbox" ]&lt;br /&gt;  then&lt;br /&gt;   killall -u "$USER"&lt;br /&gt;  elif [ "$DESKTOP_SESSION" = "gnome" ]&lt;br /&gt;  then&lt;br /&gt;   gnome-session-save --logout&lt;br /&gt;  fi&lt;br /&gt; elif [ "$integrated" == ":+:Pwr:" ] &amp;&amp; [ "$discrete" == ": :Off:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_down.png" "already switched to $name_integrated"  &lt;br /&gt; fi&lt;br /&gt;;;&lt;br /&gt;102)&lt;br /&gt; if [ "$integrated" == ":+:Pwr:" ] &amp;&amp; [ "$discrete" == ": :Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_up.png" "switching to $name_discrete"&lt;br /&gt;  echo DDIS &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  if [ "$DESKTOP_SESSION" = "openbox" ]&lt;br /&gt;  then&lt;br /&gt;   killall -u "$USER"&lt;br /&gt;  elif [ "$DESKTOP_SESSION" = "gnome" ]&lt;br /&gt;  then&lt;br /&gt;   gnome-session-save --logout&lt;br /&gt;  fi&lt;br /&gt; elif [ "$integrated" == ": :Pwr:" ] &amp;&amp; [ "$discrete" == ":+:Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_up.png" "switching to $name_discrete"&lt;br /&gt;  echo OFF &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt; elif [ "$integrated" == ":+:Pwr:" ] &amp;&amp; [ "$discrete" == ": :Off:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_up.png" "switching to $name_discrete"  &lt;br /&gt;  echo ON &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  echo DDIS &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  if [ "$DESKTOP_SESSION" = "openbox" ]&lt;br /&gt;  then&lt;br /&gt;   killall -u "$USER"&lt;br /&gt;  elif [ "$DESKTOP_SESSION" = "gnome" ]&lt;br /&gt;  then&lt;br /&gt;   gnome-session-save --logout&lt;br /&gt;  fi&lt;br /&gt; elif [ "$integrated" == ": :Off:" ] &amp;&amp; [ "$discrete" == ":+:Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_up.png" "already switched to $name_discrete"  &lt;br /&gt; fi&lt;br /&gt;;;&lt;br /&gt;esac&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;&lt;big&gt;(4) OPTIONAL: Script to turn off laptop&lt;/big&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="text-align: justify"&gt;This next script is used to turn off the computer. Because, in my case, if I turn off the computer without switching on both cards (specially when the integrated card is on and the discrete card is off), the fan runs at full speed when I turn it on again, stoping only after rebooting. Hence, to avoid this, this other launcher can be used to turn off the computer:&lt;/p&gt;&lt;p style="test-align: justify"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 48px; height: 48px;" src="http://lh4.ggpht.com/_Dw3SC8gD9Jk/S4nIxZBts2I/AAAAAAAAAEo/1wDkx45n4XU/s800/executable.png" /&gt;&lt;b&gt;switch_before_shutdown.sh&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;div style="height: 350px;overflow:auto;overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;if [ "$DESKTOP_SESSION" = "openbox" ]&lt;br /&gt;then&lt;br /&gt; gxmessage "Are you sure you want to shut down your computer?" -center -title "Take action" -font "Sans bold 10" -default "Cancel" -buttons "_Cancel":1,"L_ock screen":101,"_Log out":102,"_Reboot":103,"_Shut down":104&lt;br /&gt;&lt;br /&gt; case $? in&lt;br /&gt;&lt;br /&gt; 1)&lt;br /&gt;  echo "Exit";;&lt;br /&gt; 101)&lt;br /&gt;  xscreensaver-command -lock;;&lt;br /&gt; 102)&lt;br /&gt;  killall openbox;;&lt;br /&gt; 103)&lt;br /&gt;  echo ON &gt; /sys/kernel/debug/vgaswitcheroo/switch;&lt;br /&gt;  gnome-terminal -e 'sudo shutdown -r now';;&lt;br /&gt; 104)&lt;br /&gt;  echo ON &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  gnome-terminal -e 'sudo shutdown -h now';;&lt;br /&gt; esac&lt;br /&gt;&lt;br /&gt;elif [ "$DESKTOP_SESSION" = "gnome" ]&lt;br /&gt;then&lt;br /&gt;&lt;br /&gt; gxmessage "Are you sure you want to shut down your computer?" -center -title "Take action" -font "Sans bold 10" -default "Cancel" -buttons "_Cancel":1,"L_ock screen":101,"_Log out":102,"_Reboot":103,"_Shut down":104&lt;br /&gt;&lt;br /&gt; case $? in&lt;br /&gt;&lt;br /&gt; 1)&lt;br /&gt;  echo "Exit";;&lt;br /&gt; 101)&lt;br /&gt;  gnome-screensaver-command -l;;&lt;br /&gt; 102)&lt;br /&gt;  gnome-session-save --logout;;&lt;br /&gt; 103)&lt;br /&gt;  echo ON &gt; /sys/kernel/debug/vgaswitcheroo/switch;&lt;br /&gt;  gnome-terminal -e 'sudo shutdown -r now';;&lt;br /&gt; 104)&lt;br /&gt;  echo ON &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  gnome-terminal -e 'sudo shutdown -h now';;&lt;br /&gt; esac&lt;br /&gt;&lt;br /&gt;fi&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;I tested this HowTo on my laptop with Fedora 14 (x64) and Ubuntu 10.10 (x32). Please write me if you find any errors or have any sugestion to modify and improve this HowTo.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8619231043438113473-5326756149649952322?l=asusm51ta-with-linux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asusm51ta-with-linux.blogspot.com/feeds/5326756149649952322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asusm51ta-with-linux.blogspot.com/2010/11/07112010-fedora-14-ubuntu-10.html#comment-form' title='49 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8619231043438113473/posts/default/5326756149649952322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8619231043438113473/posts/default/5326756149649952322'/><link rel='alternate' type='text/html' href='http://asusm51ta-with-linux.blogspot.com/2010/11/07112010-fedora-14-ubuntu-10.html' title=''/><author><name>Roberto Martinez</name><uri>http://www.blogger.com/profile/06004648891096957994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-RtsCJ0YoWos/TdrUS_yszHI/AAAAAAAAAKQ/Mob2Y76tMXo/s220/rmartinez.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_Dw3SC8gD9Jk/S4fBc2QY_4I/AAAAAAAAAEE/PJ6LitzZGI0/s72-c/fedoraLogoMini.png' height='72' width='72'/><thr:total>49</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8619231043438113473.post-660716444769374032</id><published>2010-09-13T10:15:00.000-07:00</published><updated>2010-11-07T11:02:03.360-08:00</updated><title type='text'></title><content type='html'>&lt;hr&gt;&lt;p&gt;&lt;b&gt;&lt;big&gt;[05/11/2010] Fedora 14 / Ubuntu 10.10 already with vgaswitcheroo!!&lt;/big&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="text-align: justify"&gt;&lt;b&gt;&lt;big&gt;Good news!&lt;/big&gt;&lt;/b&gt;&lt;br /&gt;From now on, if you want to use the vgaswitcheroo module you just have to install (or test from a Live CD/USB) Fedora 14 or Ubuntu 10.10 (sure, other distributions may also do the trick) and go directly to point &lt;i&gt;"(2) Run the new kernel and test:"&lt;/i&gt; from previous post. That's all! I personally have installed in my laptop both Fedora and Ubuntu and they both work perfectly well although there are some differences in the scripts (when I have some time I'll make a specific HowTo for each of the new systems; in the meantime, please write me if you have any doubts). Good luck and I hope you enjoy your hybrid graphics on GNU/Linux!&lt;/p&gt;&lt;p style="text-align: justify"&gt;So just download Fedora 14 or Ubuntu 10.10 and try it for yourself:&lt;br /&gt;&lt;br /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 48px; height: 48px;" src="http://lh3.ggpht.com/_Dw3SC8gD9Jk/S4fBc2QY_4I/AAAAAAAAAEE/PJ6LitzZGI0/s800/fedoraLogoMini.png" /&gt;&lt;a href="http://fedoraproject.org/get-fedora"&gt;Fedora 14&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 48px; height: 48px;" src="http://lh3.ggpht.com/_Dw3SC8gD9Jk/TI5fOYoTtTI/AAAAAAAAAJY/Iu_RNfvP8Jk/s800/ubuntu-logo48.png" /&gt;&lt;a href="http://www.ubuntu.com/desktop/get-ubuntu/download"&gt;Ubuntu 10.10&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8619231043438113473-660716444769374032?l=asusm51ta-with-linux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asusm51ta-with-linux.blogspot.com/feeds/660716444769374032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asusm51ta-with-linux.blogspot.com/2010/09/13092010-fedora-14-alpha-ubuntu-10.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8619231043438113473/posts/default/660716444769374032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8619231043438113473/posts/default/660716444769374032'/><link rel='alternate' type='text/html' href='http://asusm51ta-with-linux.blogspot.com/2010/09/13092010-fedora-14-alpha-ubuntu-10.html' title=''/><author><name>Roberto Martinez</name><uri>http://www.blogger.com/profile/06004648891096957994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-RtsCJ0YoWos/TdrUS_yszHI/AAAAAAAAAKQ/Mob2Y76tMXo/s220/rmartinez.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_Dw3SC8gD9Jk/S4fBc2QY_4I/AAAAAAAAAEE/PJ6LitzZGI0/s72-c/fedoraLogoMini.png' height='72' width='72'/><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8619231043438113473.post-5205720243944558474</id><published>2010-05-07T04:08:00.000-07:00</published><updated>2010-11-07T11:00:40.584-08:00</updated><title type='text'></title><content type='html'>&lt;hr&gt;&lt;p&gt;&lt;b&gt;&lt;big&gt;[28/05/2010] Fedora 13 + kernel 2.6.34 + vga_switcheroo + switch scripts&lt;/big&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;b&gt;&lt;big&gt;(0.a) Downloads:&lt;/big&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.tar.bz2"&gt;kernel 2.6.34&lt;/a&gt;&lt;i&gt; and untar it to: &lt;/i&gt;~/linuxKernels/&lt;br /&gt;&lt;a href="http://people.freedesktop.org/%7Eagd5f/radeon_ucode/R600_rlc.bin"&gt;R600_rlc.bin&lt;/a&gt;&lt;i&gt; and copy it to: &lt;/i&gt;/lib/firmware/radeon/&lt;br /&gt;&lt;a href="http://people.freedesktop.org/%7Eagd5f/radeon_ucode/R700_rlc.bin"&gt;R700_rlc.bin&lt;/a&gt;&lt;i&gt; and copy it to &lt;/i&gt;/lib/firmware/radeon/&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;Or, if you prefer everything from command line:&lt;br /&gt;&lt;b&gt;&lt;big&gt;(0.b) Downloads:&lt;/big&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;$ su -c 'yum update'&lt;br /&gt;$ su -c 'yum install wget'&lt;br /&gt;$ mkdir ~/linuxKernels&lt;br /&gt;$ wget -P ~/linuxKernels/ http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.tar.bz2&lt;br /&gt;$ su -c 'wget -P /lib/firmware/radeon/ http://people.freedesktop.org/%7Eagd5f/radeon_ucode/R600_rlc.bin'&lt;br /&gt;$ su -c 'wget -P /lib/firmware/radeon/ http://people.freedesktop.org/%7Eagd5f/radeon_ucode/R700_rlc.bin'&lt;br /&gt;$ cd ~/linuxKernels/&lt;br /&gt;$ tar -xvjf linux-2.6.34.tar.bz2&lt;/div&gt;&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;b&gt;&lt;big&gt;(1) Compile kernel with CONFIG_VGA_SWITCHEROO:&lt;/big&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;$ su -c 'yum install patch qt3-devel gcc-c++ libXi-devel mkinitrd'&lt;i&gt; # install development tools + mkinitrd&lt;/i&gt;&lt;br /&gt;$ cd ~/linuxKernels/linux-2.6.34/&lt;br /&gt;$ make mrproper&lt;br /&gt;$ cp /boot/config-"kernel" .config&lt;i&gt; # in my case: "kernel" = 2.6.33.4-95.fc13.x86_64&lt;/i&gt;&lt;br /&gt;$ make xconfig&lt;i&gt; # select (-&gt; Device Drivers -&gt; Graphics support -&gt;) Laptop Hybrid Grapics - GPU switching support (VGA_SWITCHEROO)&lt;/i&gt;&lt;br /&gt;$ gedit Makefile # and change "EXTRAVERSION =" for "EXTRAVERSION = -vgaswitcheroo"&lt;br /&gt;$ make clean&lt;br /&gt;$ make -j4 bzImage&lt;i&gt; # the -j specifies the number of jobs (commands) to run simultaneously; put your number of CPUs x 2 &lt;/i&gt;&lt;br /&gt;$ make -j4 modules&lt;br /&gt;$ su -c 'make -j4 modules_install'&lt;br /&gt;$ su -c 'make -j4 install'&lt;/div&gt;&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;b&gt;&lt;big&gt;(2) Run the new kernel and test:&lt;/big&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;$ su&lt;br /&gt;$ mount -t debugfs none /sys/kernel/debug&lt;br /&gt;$ cd /sys/kernel/debug/vgaswitcheroo&lt;br /&gt;$ cat switch&lt;i&gt; # to see which card is active&lt;/i&gt;&lt;br /&gt;$ echo DDIS &gt; switch&lt;i&gt; # to go to discrete card (log off and then log in after this command)&lt;/i&gt;&lt;br /&gt;$ echo DIGD &gt; switch&lt;i&gt; # to go to integrated card (log off and then log in after this command)&lt;/i&gt;&lt;br /&gt;$ echo OFF &gt; switch&lt;i&gt; # to just power off the card you aren't using&lt;/i&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;b&gt;&lt;big&gt;(3) Switch &amp; logout scripts &amp; launchers&lt;/big&gt;&lt;/b&gt;&lt;br /&gt;First of all, to use these new scripts &amp; launchers you will need the following package:&lt;pre class="prettyprint"&gt;$ su -c 'yum install gxmessage'&lt;/pre&gt;&lt;p style="text-align: justify"&gt;Also, the &lt;i&gt;/etc/fstab&lt;/i&gt; should be changed so that it mounts automatically the &lt;i&gt;/sys/kernel/debug/vgaswitcheroo/&lt;/i&gt; so that we can use the &lt;i&gt;switch&lt;/i&gt; file inside it. So we must:&lt;pre class="prettyprint"&gt;$ su -c 'gedit /etc/fstab'&lt;/pre&gt;And add the following line:&lt;pre class="prettyprint"&gt;none                    /sys/kernel/debug debugfs defaults 0 0&lt;/pre&gt;And then, we must change &lt;i&gt;switch&lt;/i&gt; file permissions permanently every time the computer initiates:&lt;pre class="prettyprint"&gt;su -c 'gedit /etc/rc.d/rc.local'&lt;/pre&gt;And add the following line:&lt;div style="overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;chown "username" /sys/kernel/debug/vgaswitcheroo/switch # change "username" with your user name&lt;/div&gt;&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;Ok, so now we are ready to use the launchers and scripts. The first desktop launcher is used to switch between the graphic cards directly from your desktop, and the logout launcher is needed to turn off the computer (see below for details of why it is needed on my case). They work great on my laptop ASUS M51Ta. Each of the launchers calls a script that is detailled below. It would be a good idea to copy the scripts to &lt;i&gt;/home/"username"/bin/&lt;/i&gt; so that they are executable from any directory and copy the icons into &lt;i&gt;/home/"username"/.local/share/icons/&lt;/i&gt;:&lt;br /&gt;&lt;div style="overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh4.ggpht.com/_Dw3SC8gD9Jk/S-MGVcEfaiI/AAAAAAAAAIA/Pguy_uSeqSk/s800/hardware_down.png&lt;br /&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh5.ggpht.com/_Dw3SC8gD9Jk/S-MGVSO0JbI/AAAAAAAAAIE/_mdAnW7UiCQ/s800/hardware_up.png&lt;br /&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh6.ggpht.com/_Dw3SC8gD9Jk/S36ugEZX1PI/AAAAAAAAACs/UQUdr5cow90/s800/hardware.png&lt;br /&gt;$ wget -P /home/"$USER"/.local/share/icons/ http://lh5.ggpht.com/_Dw3SC8gD9Jk/S41DjuMt_MI/AAAAAAAAAF4/5pQm2-dX6Sg/s800/switch_before_shutdown.png&lt;/div&gt;&lt;/pre&gt;&lt;br /&gt;To switch between graphic cards the following launcher is used:&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 48px; height: 48px;" src="http://lh6.ggpht.com/_Dw3SC8gD9Jk/S36ugEZX1PI/AAAAAAAAACs/UQUdr5cow90/s800/hardware.png" /&gt;&lt;b&gt;switch_between_cards.desktop&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;[Desktop Entry]&lt;br /&gt;Version=1.0&lt;br /&gt;Encoding=UTF-8&lt;br /&gt;Name=switch between cards&lt;br /&gt;Exec=/"location of script"/switch_between_cards.sh&lt;/code&gt;&lt;i&gt; # change "location of script" with location of script described below&lt;/i&gt;&lt;br /&gt;&lt;code&gt;Type=Application&lt;br /&gt;Categories=Other;&lt;br /&gt;Icon=/"location"/hardware.png&lt;/code&gt;&lt;i&gt; # change "location" with the location of the icon&lt;/i&gt;&lt;code&gt;&lt;br /&gt;Terminal=false&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 48px; height: 48px;" src="http://lh4.ggpht.com/_Dw3SC8gD9Jk/S4nIxZBts2I/AAAAAAAAAEo/1wDkx45n4XU/s800/executable.png" /&gt;&lt;b&gt;switch_between_cards.sh&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;div style="height: 350px;overflow:auto;overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;#!/bin/bash&lt;br /&gt;# "switch_between_cards.sh" script by RM, with useful changes from LoLL&lt;br /&gt;# version 20100528&lt;br /&gt;&lt;br /&gt;pci_integrated=$(lspci | grep VGA | sed -n '1p' | cut -f 1 -d " ")&lt;br /&gt;pci_discrete=$(lspci | grep VGA | sed -n '2p' | cut -f 1 -d " ")&lt;br /&gt;&lt;br /&gt;integrated=$(cat /sys/kernel/debug/vgaswitcheroo/switch | grep $pci_integrated | grep -o -P ':.:...:')&lt;br /&gt;discrete=$(cat /sys/kernel/debug/vgaswitcheroo/switch | grep $pci_discrete | grep -o -P ':.:...:')&lt;br /&gt;&lt;br /&gt;name_integrated=$(lspci | grep VGA | sed -n '1p' | sed -e "s/.* VGA compatible controller[ :]*//g" | sed -e "s/ Corporation//g" | sed -e "s/ Technologies Inc//g" | sed -e 's/\[[0-9]*\]: //g' | sed -e 's/\[[0-9:a-z]*\]//g' | sed -e 's/(rev [a-z0-9]*)//g' | sed -e "s/ Integrated Graphics Controller//g")&lt;br /&gt;&lt;br /&gt;name_discrete=$(lspci | grep VGA | sed -n '2p' | sed -e "s/.* VGA compatible controller[ :]*//g" | sed -e "s/ Corporation//g" | sed -e "s/ Technologies Inc//g" | sed -e 's/\[[0-9]*\]: //g' | sed -e 's/\[[0-9:a-z]*\]//g' | sed -e 's/(rev [a-z0-9]*)//g' | sed -e "s/ Integrated Graphics Controller//g")&lt;br /&gt;&lt;br /&gt;if [ "$integrated" = ":+:Pwr:" ]&lt;br /&gt;then&lt;br /&gt; integrated_condition="(*) - Power ON"&lt;br /&gt;elif [ "$integrated" = ": :Pwr:" ]&lt;br /&gt;then&lt;br /&gt; integrated_condition="( ) - Power ON"&lt;br /&gt;elif [ "$integrated" = ": :Off:" ]&lt;br /&gt;then&lt;br /&gt; integrated_condition="( ) - Power OFF"&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;if [ "$discrete" = ":+:Pwr:" ]&lt;br /&gt;then&lt;br /&gt; discrete_condition="(*) - Power ON"&lt;br /&gt;elif [ "$discrete" = ": :Pwr:" ]&lt;br /&gt;then&lt;br /&gt; discrete_condition="( ) - Power ON"&lt;br /&gt;elif [ "$discrete" = ": :Off:" ]&lt;br /&gt;then&lt;br /&gt; discrete_condition="( ) - Power OFF"&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;gxmessage -center \&lt;br /&gt;          -buttons "_Cancel":1,"switch to _Integrated":101,"switch to _Discrete":102 \&lt;br /&gt;          -wrap \&lt;br /&gt;          -title "Choose Hybrid Graphic Card" \&lt;br /&gt;"Choose Hybrid Graphic Card&lt;br /&gt;=================&lt;br /&gt;Integrated: $integrated_condition : $name_integrated&lt;br /&gt;Discrete: $discrete_condition : $name_discrete"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;whichCard=$?&lt;br /&gt;&lt;br /&gt;case "$whichCard" in&lt;br /&gt;&lt;br /&gt;1)&lt;br /&gt; echo "Exit"&lt;br /&gt;;;&lt;br /&gt;101)&lt;br /&gt; if [ "$integrated" == ":+:Pwr:" ] &amp;&amp; [ "$discrete" == ": :Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_down.png" "switching to $name_integrated"&lt;br /&gt;  echo OFF &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt; elif [ "$integrated" == ": :Pwr:" ] &amp;&amp; [ "$discrete" == ":+:Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_down.png" "switching to $name_integrated"&lt;br /&gt;  echo DIGD &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  killall -u "$USER" # or gnome-session-save --logout &lt;br /&gt; elif [ "$integrated" == ": :Off:" ] &amp;&amp; [ "$discrete" == ":+:Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_down.png" "switching to $name_integrated"&lt;br /&gt;  echo ON &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  echo DIGD &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  killall -u "$USER" # or gnome-session-save --logout&lt;br /&gt; elif [ "$integrated" == ":+:Pwr:" ] &amp;&amp; [ "$discrete" == ": :Off:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_down.png" "already switched to $name_integrated"  &lt;br /&gt; fi&lt;br /&gt;;;&lt;br /&gt;102)&lt;br /&gt; if [ "$integrated" == ":+:Pwr:" ] &amp;&amp; [ "$discrete" == ": :Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_up.png" "switching to $name_discrete"&lt;br /&gt;  echo DDIS &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  killall -u "$USER" # or gnome-session-save --logout&lt;br /&gt; elif [ "$integrated" == ": :Pwr:" ] &amp;&amp; [ "$discrete" == ":+:Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_up.png" "switching to $name_discrete"&lt;br /&gt;  echo OFF &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt; elif [ "$integrated" == ":+:Pwr:" ] &amp;&amp; [ "$discrete" == ": :Off:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_up.png" "switching to $name_discrete"  &lt;br /&gt;  echo ON &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  echo DDIS &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt;  killall -u "$USER" # or gnome-session-save --logout&lt;br /&gt; elif [ "$integrated" == ": :Off:" ] &amp;&amp; [ "$discrete" == ":+:Pwr:" ]&lt;br /&gt; then&lt;br /&gt;  notify-send -t 5000 --icon="/home/$USER/.local/share/icons/hardware_up.png" "already switched to $name_discrete"  &lt;br /&gt; fi&lt;br /&gt;;;&lt;br /&gt;esac&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;In this way, you can switch between graphic cards with just a couple of clicks. In this snapshot you can see the script showing the two hybrid graphic cards. The "(*)" symbol represents which card is currently being used and the Power ON/OFF indicates their power state. Have in mind that a graphic card can be ON but not currently being used... which of course we want to avoid. If you are using GNOME as graphical interface (instead of Openbox, like me), change al the instances of &lt;i&gt;killall -u "$USER"&lt;/i&gt; by &lt;i&gt;gnome-session-save --logout&lt;/i&gt;.&lt;/p&gt;&lt;br /&gt;&lt;center&gt;&lt;img src="http://lh5.ggpht.com/_Dw3SC8gD9Jk/S-F8zMQX77I/AAAAAAAAAHY/tq1WY4c0lkQ/s800/2010-05-01_desktop_choose_GraphicCard01.png" width="800" height="500" /&gt;&lt;/center&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;So, if you want to switch to the discrete card (in this case the HD3650), you just click "switch to Discrete", and a message will appear: "switchig to (name of discrete card)". Then the system will log off, and after you log in again the cards have switched.&lt;/p&gt;&lt;br /&gt;&lt;center&gt;&lt;img src="http://lh5.ggpht.com/_Dw3SC8gD9Jk/S-F87loNdRI/AAAAAAAAAHk/xDrUPI93ejQ/s800/2010-05-01_desktop_switchingToHD3650.png" width="800" height="500" /&gt;&lt;/center&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;Therefore, after loging out and login in, if you run again the script, it tells you which card is running "(*)":&lt;/p&gt;&lt;br /&gt;&lt;center&gt;&lt;img src="http://lh5.ggpht.com/_Dw3SC8gD9Jk/S-F8zOxLTqI/AAAAAAAAAHc/aOu1S_C1xIA/s800/2010-05-01_desktop_choose_GraphicCard02.png" width="800" height="500" /&gt;&lt;/center&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;If you try to switch to the current card being used (in this case HD3650) a message will tell you "already switched to that card":&lt;/p&gt;&lt;br /&gt;&lt;center&gt;&lt;img src="http://lh3.ggpht.com/_Dw3SC8gD9Jk/S-F8y9ECDWI/AAAAAAAAAHU/WhnuduCXaLI/s800/2010-05-01_desktop_alreadySwitchedToHD3650.png" width="800" height="500" /&gt;&lt;/center&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;And, of course, you can come back to the integrated card (running the script, choosing "switch to Integrated", and going through a log out and log in process):&lt;/p&gt;&lt;br /&gt;&lt;center&gt;&lt;img src="http://lh6.ggpht.com/_Dw3SC8gD9Jk/S-F8zbsrIlI/AAAAAAAAAHg/rgGt6DJLsMc/s800/2010-05-01_desktop_switchingToHD3200.png" width="800" height="500" /&gt;&lt;/center&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;This next launcher is used to turn off the computer. Because, in my case, if I turn off the computer without switching on both cards (specially when the integrated card is on and the discrete card is off), the fan runs at full speed when I turn it on again, stoping only after rebooting. Hence, to avoid this, this other launcher can be used to turn off the computer:&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 48px; height: 48px;" src="http://lh5.ggpht.com/_Dw3SC8gD9Jk/S41DjuMt_MI/AAAAAAAAAF4/5pQm2-dX6Sg/s800/switch_before_shutdown.png" /&gt;&lt;b&gt;switch_before_shutdown.desktop&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;[Desktop Entry]&lt;br /&gt;Version=1.0&lt;br /&gt;Encoding=UTF-8&lt;br /&gt;Name=switch before shutdown&lt;br /&gt;Exec=/"location of script"/switch_before_shutdown.sh&lt;/code&gt;&lt;i&gt; # change "location of script" with the location of the script described below&lt;/i&gt;&lt;code&gt;&lt;br /&gt;Type=Application&lt;br /&gt;Categories=Other;&lt;br /&gt;Icon=/"location"/switch_before_shutdown.png&lt;/code&gt;&lt;i&gt; # change "location" with the location of the icon&lt;/i&gt;&lt;code&gt;&lt;br /&gt;Terminal=false&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; width: 48px; height: 48px;" src="http://lh4.ggpht.com/_Dw3SC8gD9Jk/S4nIxZBts2I/AAAAAAAAAEo/1wDkx45n4XU/s800/executable.png" /&gt;&lt;b&gt;switch_before_shutdown.sh&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;div style="height: 350px;overflow:auto;overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;gxmessage "Are you sure you want to shut down your computer?" -center -title "Take action" -font "Sans bold 10" -default "Cancel" -buttons "_Cancel":1,"L_ock screen":101,"_Log out":102,"_Reboot":103,"_Shut down":104&lt;br /&gt;&lt;br /&gt;case $? in&lt;br /&gt;&lt;br /&gt;1)&lt;br /&gt; echo "Exit";;&lt;br /&gt;&lt;br /&gt;101)&lt;br /&gt; xscreensaver-command -lock;;&lt;br /&gt;&lt;br /&gt;102)&lt;br /&gt; killall -u "$USER";;&lt;br /&gt;&lt;br /&gt;103)&lt;br /&gt; echo ON &gt; /sys/kernel/debug/vgaswitcheroo/switch;&lt;br /&gt; gnome-terminal -e 'sudo shutdown -r now';;&lt;br /&gt;&lt;br /&gt;104)&lt;br /&gt; echo ON &gt; /sys/kernel/debug/vgaswitcheroo/switch&lt;br /&gt; gnome-terminal -e 'sudo shutdown -h now';;&lt;br /&gt;&lt;br /&gt;esac&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;And finally, enjoy your hybrid graphics!!&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;By the way, if you like my desktop, I use OpenBox with &lt;a href="http://wiki.lxde.org/en/LXPanel"&gt;LXPanel&lt;/a&gt; and two &lt;a href="http://conky.sourceforge.net/"&gt;conkys&lt;/a&gt;, one for the panel bar with a summary of CPUs, memory, network and hard disk functioning; and another one with more details in the desktop. Here are the conky files:&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;b&gt;.conkyrc_bar&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;div style="height: 350px;overflow:auto;overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;alignment top_right&lt;br /&gt;background yes&lt;br /&gt;border_margin 0&lt;br /&gt;border_width 0&lt;br /&gt;default_color grey&lt;br /&gt;double_buffer yes&lt;br /&gt;draw_borders no&lt;br /&gt;draw_outline yes&lt;br /&gt;draw_shades no&lt;br /&gt;gap_x 290&lt;br /&gt;gap_y -5&lt;br /&gt;maximum_width 286&lt;br /&gt;minimum_size 286&lt;br /&gt;no_buffers yes&lt;br /&gt;own_window yes&lt;br /&gt;own_window_colour green&lt;br /&gt;own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager&lt;br /&gt;own_window_transparent yes&lt;br /&gt;own_window_type desktop&lt;br /&gt;stippled_borders 0&lt;br /&gt;total_run_times 0&lt;br /&gt;update_interval 1&lt;br /&gt;uppercase no&lt;br /&gt;use_spacer yes&lt;br /&gt;&lt;br /&gt;TEXT&lt;br /&gt;${cpugraph cpu1 18,29 0092e6 0092e6}${cpugraph cpu2 18,29 0092e6 0092e6} ${memgraph 18,29 00b35b 00b35b} ${downspeedgraph 18,29 fce94f fce94f}${upspeedgraph 18,29 c4a000 c4a000} ${diskiograph_read /dev/sda1 18,29 c65000 c65000}${diskiograph_write /dev/sda1 18,29 ff6700 ff6700} ${diskiograph_read /dev/sda5 18,29 c65000 c65000}${diskiograph_write /dev/sda5 18,29 ff6700 ff6700}$color&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify"&gt;&lt;b&gt;.conkyrc_full&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;div style="height: 350px;overflow:auto;overflow-y:auto;"&gt;&lt;pre class="prettyprint"&gt;alignment top_right&lt;br /&gt;background yes&lt;br /&gt;border_margin 0&lt;br /&gt;border_width 0&lt;br /&gt;default_color grey&lt;br /&gt;double_buffer yes&lt;br /&gt;draw_borders no&lt;br /&gt;draw_outline yes&lt;br /&gt;draw_shades no&lt;br /&gt;gap_x 0&lt;br /&gt;gap_y 0&lt;br /&gt;maximum_width 286&lt;br /&gt;minimum_size 286&lt;br /&gt;no_buffers yes&lt;br /&gt;override_utf8_locale yes&lt;br /&gt;own_window yes&lt;br /&gt;own_window_colour green&lt;br /&gt;own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager&lt;br /&gt;own_window_transparent yes&lt;br /&gt;own_window_type desktop&lt;br /&gt;stippled_borders 0&lt;br /&gt;total_run_times 0&lt;br /&gt;update_interval 1&lt;br /&gt;uppercase no&lt;br /&gt;use_spacer yes&lt;br /&gt;&lt;br /&gt;TEXT&lt;br /&gt;${battery_bar 10,20 BAT0} ${battery_percent BAT0}% ${iconv_start UTF-8 ISO_8859-1}[$desktop/$desktop_number] CPU: ${color green}${acpitemp}°C ${color}HDD: ${color green}${hddtemp /dev/sda 127.0.0.1 7634}°C $alignr$color${time %H:%M:%S}${iconv_stop}&lt;br /&gt;&lt;br /&gt;${color green}SYSTEM ${hr 2}$color&lt;br /&gt;$nodename $alignr$sysname $kernel $machine&lt;br /&gt;Uptime:$alignr$uptime&lt;br /&gt;&lt;br /&gt;${color green}CPU 0 ${hr 2}$color&lt;br /&gt;${freq 1}MHz $alignr Load: ${loadavg}&lt;br /&gt;${cpubar cpu1}&lt;br /&gt;${cpugraph cpu1 004973 0092e6}&lt;br /&gt;${color green}CPU 1 ${hr 2}$color&lt;br /&gt;${freq 2}MHz $alignr Load: ${loadavg}&lt;br /&gt;${cpubar cpu2}&lt;br /&gt;${cpugraph cpu2 004973 0092e6}&lt;br /&gt;&lt;br /&gt;${top pid 1} ${top name 1} ${top cpu 1}% CPU ${top mem 1}% MEM&lt;br /&gt;${top pid 2} ${top name 2} ${top cpu 2}% CPU ${top mem 2}% MEM&lt;br /&gt;${top pid 3} ${top name 3} ${top cpu 3}% CPU ${top mem 3}% MEM&lt;br /&gt;${top pid 4} ${top name 4} ${top cpu 4}% CPU ${top mem 4}% MEM&lt;br /&gt;${top pid 5} ${top name 5} ${top cpu 5}% CPU ${top mem 5}% MEM&lt;br /&gt;&lt;br /&gt;${top_mem pid 1} ${top_mem name 1} ${top_mem mem_res 1} MEM ${top_mem mem 1}% MEM&lt;br /&gt;${top_mem pid 2} ${top_mem name 2} ${top_mem mem_res 2} MEM ${top_mem mem 2}% MEM&lt;br /&gt;${top_mem pid 3} ${top_mem name 3} ${top_mem mem_res 3} MEM ${top_mem mem 3}% MEM&lt;br /&gt;${top_mem pid 4} ${top_mem name 4} ${top_mem mem_res 4} MEM ${top_mem mem 4}% MEM&lt;br /&gt;${top_mem pid 5} ${top_mem name 5} ${top_mem mem_res 5} MEM ${top_mem mem 5}% MEM&lt;br /&gt; Processes: $processes ${alignr}Running: $running_processes&lt;br /&gt;&lt;br /&gt;${color green}MEMORY / DISK ${hr 2}$color&lt;br /&gt;RAM: $mem/$memmax - $memperc%&lt;br /&gt;${membar 6}$color&lt;br /&gt;${memgraph 006333 00b35b}&lt;br /&gt;swap: ${swap}/${swapmax} - $swapperc% ${swapbar 6}$color&lt;br /&gt;sda1: ${fs_used /}/${fs_size /} - ${fs_used_perc /}% ${color green}${hr 1}$color&lt;br /&gt;${fs_bar 6 /}$color&lt;br /&gt;Read: ${diskio_read /dev/sda1} k/s ${alignr}Write: ${diskio_write /dev/sda1} k/s&lt;br /&gt;${diskiograph_read /dev/sda1 25,140 5e2600 c65000} ${diskiograph_write /dev/sda1 25,140 823500 ff6700}&lt;br /&gt;sda5: ${fs_used /home/"username"/CONTAINER/}/${fs_size /home/"username"/CONTAINER/} - ${fs_used_perc /home/"username"/CONTAINER}% ${color green}${hr 1}$color&lt;br /&gt;${fs_bar 6 /home/"username"/CONTAINER}$color&lt;br /&gt;Read: ${diskio_read /dev/sda5} k/s ${alignr}Write: ${diskio_write /dev/sda5} k/s&lt;br /&gt;${diskiograph_read /dev/sda5 25,140 5e2600 c65000} ${diskiograph_write /dev/sda5 25,140 823500 ff6700}&lt;br /&gt;&lt;br /&gt;${color green}NETWORK eth0 (${addr eth0}) ${hr 2}$color&lt;br /&gt;Down: $color${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s&lt;br /&gt;${downspeedgraph eth0 20,140 8c822c fce94f} ${upspeedgraph eth0 20,140 705b00 c4a000}$color&lt;br /&gt;Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0}&lt;br /&gt;&lt;br /&gt;${color green}NETWORK wlan0 (${addr wlan0}) ${hr 2}$color&lt;br /&gt;Down: $color${downspeed wlan0} k/s ${alignr}Up: ${upspeed wlan0} k/s&lt;br /&gt;${downspeedgraph wlan0 20,140 8c822c fce94f} ${upspeedgraph wlan0 20,140 705b00 c4a000}$color&lt;br /&gt;Total: ${totaldown wlan0} ${alignr}Total: ${totalup wlan0}&lt;br /&gt;Inbound: ${tcp_portmon 1 32767 count} Outbound: ${tcp_portmon 32768 61000 count}${alignr}Total: ${tcp_portmon 1 65535 count}&lt;br /&gt;&lt;br /&gt;${color green}${hr 2}$color&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8619231043438113473-5205720243944558474?l=asusm51ta-with-linux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://asusm51ta-with-linux.blogspot.com/feeds/5205720243944558474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asusm51ta-with-linux.blogspot.com/2010/05/07052010-fedora-13-beta-kernel-2.html#comment-form' title='49 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8619231043438113473/posts/default/5205720243944558474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8619231043438113473/posts/default/5205720243944558474'/><link rel='alternate' type='text/html' href='http://asusm51ta-with-linux.blogspot.com/2010/05/07052010-fedora-13-beta-kernel-2.html' title=''/><author><name>Roberto Martinez</name><uri>http://www.blogger.com/profile/06004648891096957994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-RtsCJ0YoWos/TdrUS_yszHI/AAAAAAAAAKQ/Mob2Y76tMXo/s220/rmartinez.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_Dw3SC8gD9Jk/S36ugEZX1PI/AAAAAAAAACs/UQUdr5cow90/s72-c/hardware.png' height='72' width='72'/><thr:total>49</thr:total></entry></feed>
