I know there are other guides out there for the U36Jc but I thought I'd post this up to help those who really want to be on the bleeding edge running Ubuntu 11.04.
The guide applies to 64-bit versions but should also apply for 32-bit should you wish to run it.
ASUS U36Jc Setup Guide - Ubuntu 11.04 64-bit
* Reduce Hard Disk Power Cycling
If you are running the standard SSH/HDD then you will want to reduce the frequency of head parking so as to not prematurely wear out the drive. You can do this by running:
Code:
gksu gedit /etc/hdparm.conf
Adding in the following text...
<INSERT BELOW TEXT>
Code:
/dev/sda {
apm = 254
apm_battery = 254
}
* Enable Palm Detection & Horizontal Scrolling on Touchpad
You can enable two-finger scrolling on the touchpad by going to:
Code:
System > Preferences > Mouse > Touchpad > Scrolling > Two Finger Scrolling [check]
Additionally we can enable horizontal scrolling and palm detection by editing the following file:
Code:
gksu gedit /usr/share/X11/xorg.conf.d/50-synaptics.conf
Inserting in the following text before EndSection:
<INSERT BELOW TEXT>
Code:
Option "HorizTwoFingerScroll" "on"
Option "PalmDetect" "on"
* Disable NVidia GPU/NVidia Optimus
------------------------------------------------------------------------------------------------------------------------------------------------------------
Important Note: Under NO circumstances should you install the nvidia restricted drivers!
Due to the design of optimus, the NVidia card is unable to be utilised in Linux with the nVidia restricted drivers. People are currently working on enabling Optimus through the use of the open source nVidia drivers, see here for more details [Warning: Links below are very experimental, do not attempt if you are not an expert]:
http://linux-hybrid-graphics.blogspo...tops-with.html
https://github.com/awilliam/asus-switcheroo
The guide however does not mess with extremely-alpha software (as linked above) and instead will allow you to run only on the Intel GPU when using Ubuntu, thus saving power by having the NVidia GPU switched off.
If you are trying to disable Optimus on a laptop other than the U36Jc, please read this post:
http://ubuntuforums.org/showpost.php...51&postcount=5
------------------------------------------------------------------------------------------------------------------------------------------------------------
The ASUS U36Jc uses the NVidia Optimus system of switchable graphics. Unfortunately, because NVidia are absolute champions (and because of the hardware design of Optimus/way it functions), this system will likely never be officially supported by NVidia on Linux.
As a result, the NVidia GPU is constantly switched on - although due to the design of Optimus - it is not able to be used. This is bad for battery life since your laptop will be using another ~6W just idling.
So what we need to do is switch off the NVidia GPU so that we can reclaim our battery life whilst making use of the Intel GPU.
So let's get started... make a hidden directory in your home directory and change into it by entering:
Code:
mkdir ~/.optimus
cd ~/.optimus/
Next, let's install git so we can grab the acpi_call module that will let us switch the NVidia GPU off...
Code:
sudo apt-get install git
git clone http://github.com/mkottman/acpi_call.git
Once that's downloaded, let's change into the acpi call directory and make the module.
Now let's insert the module and copy it to the acpi folder for our kernel...
Code:
sudo insmod ./acpi_call.ko
Run this command and take note of the kernel version number...
Copy the module in and run depmod...
Code:
sudo cp acpi_call.ko /lib/modules/<UNAME -R VALUE>/kernel/drivers/acpi/
sudo depmod
Now let's edit /etc/modules so that it's loaded on startup...
Code:
gksu gedit /etc/modules
<INSERT BELOW TEXT>
Now that we've done all of that, let's make a "service" that can be started/stopped to turn the GPU on and off for us.
Code:
gksu gedit /etc/init.d/optimusoff
<INSERT BELOW TEXT>
Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides: optimusoff
# Required-Start: $local_fs $syslog
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Disables/Enables the NVidia graphics card
# within the NVidia Optimus system
#
# Modified for the U36Jc and Ubuntu 11.04
# using details from
#
# http://robbyx.net/blog/?p=190
### END INIT INFO
. /lib/lsb/init-functions
set -e
case "$1" in
start)
#
echo '\_SB.PCI0.PEG1.GFX0._OFF' > /proc/acpi/call
;;
stop)
echo '\_SB.PCI0.PEG1.GFX0._ON' > /proc/acpi/call
;;
*)
echo '\_SB.PCI0.PEG1.GFX0._OFF' > /proc/acpi/call
N=/etc/init.d/optimusoff
echo "Usage: $N {start|stop}\nBy default, 'start' is executed.\n" >&2
exit 1
;;
esac
exit 0
Now let's make it executable and run at startup.
Code:
sudo update-rc.d optimusoff defaults 98 02
sudo chmod a+x /etc/init.d/optimusoff
Now's a good time to make sure it works... let's check our current power consumption. Make sure the laptop is running on battery before testing this - otherwise your readings will not be correct.
Code:
grep rate /proc/acpi/battery/BAT0/state
You should get a value similar to this...
OK so now let's see if we can turn the NVidia GPU off and check how much power we're saving...
Code:
sudo service optimusoff start
Now let's check the power usage again...
Code:
grep rate /proc/acpi/battery/BAT0/state
You can see if it's working, the power usage has dropped dramatically, by around 54% in my case.
Now lets just make sure to blacklist the nouveau and nvidia modules since they will cause problems if enabled.
Code:
gksu gedit /etc/modprobe.d/blacklist-nvidia.conf
Now we need to insert this text...
<INSERT BELOW TEXT>
Code:
blacklist nouveau
blacklist nvidia
Now run this and we're all done for this section!
Code:
sudo update-initramfs -u
* Fix Suspend/Resume Issues
Let's fix some issues with the USB buses and also the NVidia/Intel GPUs when undertaking suspend/resume operations.
Code:
gksu gedit /etc/pm/sleep.d/20_custom-asus-u36jc
<INSERT BELOW TEXT>
Code:
#!/bin/sh
BUSES="0000:00:1a.0 0000:00:1d.0"
BUSES3="0000:07:00.0"
case "${1}" in
hibernate|suspend)
# Switch USB buses off
for bus in $BUSES; do
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind
done
# Switch USB 3.0 buses off
for bus in $BUSES3; do
echo -n $bus | tee /sys/bus/pci/drivers/xhci_hcd/unbind
done
# Switch optimus back on before going to sleep, avoids the "constant on"
# bug that occurs after 2 suspend/resume cycles (thanks kos888)
/etc/init.d/optimusoff stop
;;
resume|thaw)
# Switch USB buses back on
for bus in $BUSES; do
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind
done
# Switch USB 3.0 buses back on
for bus in $BUSES3; do
echo -n $bus | tee /sys/bus/pci/drivers/xhci_hcd/bind
done
# Switch optimus off before resuming, avoids unneccessary power draw
/etc/init.d/optimusoff start
;;
esac
Next just make it executable and we're done for this section.
Code:
sudo chmod +x /etc/pm/sleep.d/20_custom-asus-u36jc
* Fix USB3.0 Port (thanks to DeeKey)
To fix the USB 3.0 (Fresco Logic FL1000G) port, we need to update the parameters when launching Ubuntu via GRUB.
Code:
gksu gedit /etc/default/grub
Find the line:
Code:
GRUB_CMDLINE_LINUX_DEFAULT
and add the following within the quotation marks, being sure to separate it with a space from any other entries:
Now run...
and on the next reboot the USB 3.0 port should work.
* Fix Camera Issues
Let's add a PPA and some updated packages to fix the camera issues.
Code:
sudo add-apt-repository ppa:libv4l
sudo apt-get update && sudo apt-get install gtk-v4l libv4l-0
Next be sure to edit this file and add in the following text...
Code:
gksu gedit /etc/environment
<INSERT BELOW TEXT>
Code:
LIBV4LCONTROL_FLAGS=2
We can also run non-native GTK apps by preloading the updated module.
Code:
LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so <appname>
You can put this in a script, e.g. appname.sh and then use sh to run said script (e.g. sh appname.sh) from a desktop or applications menu link.
OK so that's it! Your U36Jc should be all set up and ready to use. Enjoy Ubuntu 11.04! Hopefully in time Optimus will be able to be used with some "hacking" or native support will be provided for it by providing asus-switcheroo by default in distributions.
References:
Special thanks/mention to the authors of the following resources who's efforts enabled me to make this guide and get everything working:
Sergio Fernández Marcos & Andrej Sokol: https://help.ubuntu.com/community/Asus_U36JC
Olivier Robert: http://robbyx.net/blog/?p=190
DeeKey: http://ubuntuforums.org/showpost.php...0&postcount=44
Bookmarks