These settings are tested for Ubuntu Lucid, it's possible that some scripts doesn't work with Ubuntu Maverick.
I will write a new post for Maverick when I'll have time to upgrade!!
I will keep this post updated with all new tips and kernel upgrades!!
Here there are Asus UL30 tips for kernel, vga, backlight, power saving, touchpad, bluetooth and to run Linux on SSD (Solid State Disk). Most of these tips are also valid for other notebooks with > 2GB ram.
KERNEL and VGA
*************
Install 2.6.35 kernel and new mesa and drm libraries, wich improves Intel VGA performance, there are 2 repositories for that:
Code:
sudo add-apt-repository ppa:guido-iodice/guiodiclucid
then
Code:
sudo add-apt-repository ppa:guido-iodice/best-intel
then
Code:
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y install linux linux-generic linux-headers-generic linux-image linux-image-generic
With latest kernel all screen flickerings are gone, backlight works perfectly on UL30A (with below tip), backlight notification works too!!
The guiodiclucid repository will also update some apps to maverick dev ones, ie calculator, brasero, ubuntu-software-center, volume indicator applet...
*******
BACKLIGHT
*********
It works on Asus UL30A, I've no solution for UL30VT:
Code:
sudo gedit /etc/default/grub
look at line 9, change to this:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
save and close, then:
*******
POWER SAVING
*************
Code:
sudo apt-get install ethtool
This will install a tool we need.
*******
Code:
sudo gedit /etc/rc.local
add this BEFORE "exit 0":
Code:
rfkill block bluetooth
ethtool -s eth0 wol d
iwconfig wlan0 power timeout 500ms
echo 1 > /sys/module/snd_hda_intel/parameters/power_save
echo 0 > /proc/sys/vm/swappiness
echo 60000 > /proc/sys/vm/dirty_expire_centisecs
echo 60000 > /proc/sys/vm/dirty_writeback_centisecs
echo 60 > /proc/sys/vm/dirty_background_ratio
echo 95 > /proc/sys/vm/dirty_ratio
echo 50 > /proc/sys/vm/vfs_cache_pressure
save and close.
This will turn off bluetooth at startup, disable wake on lan, enable wireless power saving, enable sound card power saving, tune virtual memory to save power.
*******
Code:
sudo gedit /etc/init.d/ondemand
paste this:
Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides: ondemand
# Required-Start: $remote_fs $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Set the CPU Frequency Scaling governor to "ondemand"
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/init/vars.sh
. /lib/lsb/init-functions
case "$1" in
start)
start-stop-daemon --start --background --exec /etc/init.d/ondemand background
;;
background)
sleep 60 # probably enough time for desktop login
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
do
[ -f $CPUFREQ ] || continue
echo -n ondemand > $CPUFREQ
done
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
This will correct the init script for cpu governor, default one is bugged!!
You can reduce the time value at line 22, default is "sleep 60".
I have an SSD and my boot time is very fast, so I use "sleep 20", you can try this:
add CPU frequency applet to your panel, reboot, login as fast as you can and look when your CPU governor switch from "performance" to "ondemand"; you can reduce the "sleep" time to a value that make governor switch appen some seconds after login, maybe "sleep 30" or "sleep 40" for a mechanical hard disk.
*******
Code:
sudo gedit /etc/pm/power.d/powersave-policy-dirty-writeback
paste this:
Code:
#!/bin/sh -e
# increase dirty_writeback to ten minutes
# Author: Martin Pitt <martin.pitt@ubuntu.com>
WB=/proc/sys/vm/dirty_writeback_centisecs
[ -w $WB ] || exit 0
if [ "$1" = true ]; then
echo 60000 > $WB
else
echo 60000 > $WB
fi
save and close, then:
Code:
sudo chmod +x /etc/pm/power.d/powersave-policy-dirty-writeback
*******
Code:
sudo gedit /usr/lib/pm-utils/power.d/usb-autosuspend
paste this:
Code:
#!/bin/bash
if [ "$1" = "true" ]; then
for i in /sys/bus/usb/devices/*/power/level; do
[ "$(cat $i)" = "auto" ] && continue
echo "auto" > $i
done
for i in /sys/bus/usb/devices/*/power/autosuspend; do
[ "$(cat $i)" -ge 0 2>/dev/null ] && continue
echo "2" > $i
done
fi
save and close, then:
Code:
sudo chmod +x /usr/lib/pm-utils/power.d/usb-autosuspend
This script forces usb autosuspend for all devices.
*******
Code:
sudo gedit /etc/fstab
add this line:
Code:
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
then add "commit=100" option to ext partitions, look at this fstab:
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=f450fc7b-f218-4c0c-bb63-5afa69608ab4 / ext4 commit=100,errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=6de7b138-6ef1-4f4a-bea0-74268a4b302c /home ext4 commit=100,defaults 0 2
# swap was on /dev/sda5 during installation
UUID=25e066d9-6950-49ac-b078-5547ca161bfb none swap sw 0 0
#tmp su ram
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
save and close.
With this setting the system will use RAM instead of disk to write temporary files, less disk usage will save power. The commit option will reduce filesystem kernel accesses.
*******
Code:
sudo gedit /etc/default/grub
look at line 10, change to this:
Code:
GRUB_CMDLINE_LINUX="rootflags=commit=100"
save and close, then:
This will reduce filesystem kernel accesses.
*******
Open Firefox, on the url bar write about:config, open it and create a new string:
Code:
browser.cache.disk.parent_directory
set the value to /tmp
This will set Firefox to write it's cache over RAM.
*******
There are two Evolution daemons that may drain some power, they keep running even after you have closed Evolution, you can uninstall them if you don't need Exchange sync and Ubuntu One calendar and contacts sync:
Code:
sudo apt-get purge evolution-exchange evolution-couchdb
*******
TOUCHPAD
*********
Code:
sudo gedit /etc/modprobe.d/psmouse.conf
paste this:
Code:
options psmouse force_elantech=1
save and close, then:
Code:
sudo add-apt-repository ppa:yurivkhan/proposed
then:
Code:
sudo apt-get update && sudo apt-get -y upgrade
This will enable our elantech touchpad for synaptic driver and install a patched gnome-settings-daemon we need.
*******
To get working disable touchpad (Fn+F9) button:
Code:
sudo gedit /etc/acpi/asus-touchpad.sh
delete everything and paste this:
Code:
#!/bin/sh
[ -f /usr/share/acpi-support/state-funcs ] || exit 0
. /usr/share/acpi-support/power-funcs
getXconsole
DEVICE_ID=`xinput -list | grep -i touchpad | grep id= | sed 's/.*id=\([0-9]*\).*/\1/' `
if xinput -list-props $DEVICE_ID | grep "Device Enabled" | grep "1$" > /dev/null
then
xinput set-int-prop $DEVICE_ID "Device Enabled" 8 0
else
xinput set-int-prop $DEVICE_ID "Device Enabled" 8 1
fi
save and close.
*******
Now we have to add an option to grub to solve touchpad problems after suspension (DON'T APPLY THIS IF YOU HAVE 2.6.35-14 OR SUCCESSIVE KERNEL, IT'S ONLY NEEDED WITH EARLIER KERNELS):
Code:
sudo gedit /etc/default/grub
look at line 9, change to this:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor i8042.reset"
save and close, then:
*******
Reboot (apply SSD tips first if you have one), go to mouse preferences, now there's a "Touchpad" tab!!
Enable two finger scrolling and horizontal scrolling.
You'll notice that 2 finger and 3 finger tap is inverted now, let's fix it:
Code:
gconftool-2 --set "/desktop/gnome/peripherals/touchpad/tap_button_2" --type int "2" && gconftool-2 --set "/desktop/gnome/peripherals/touchpad/tap_button_3" --type int "3"
Now let's set up touchpad feeling.
To me, this is the best setting, open a terminal:
Code:
synclient MinSpeed=1 MaxSpeed=1 AccelFactor=0
if touchpad is too speedy, reduce MinSpeed and MaxSpeed to 0.7, find your values!!
Once you've found good values, put that command in a new entry on System -> Preferences -> Startup Applications
*******
BLUETOOTH RESUME FIX
*******************
Code:
sudo gedit /etc/pm/sleep.d/asus-bluetooth
paste this:
Code:
#!/bin/bash
case "$1" in
hibernate|suspend)
invoke-rc.d --quiet bluetooth stop
;;
thaw|resume)
invoke-rc.d --quiet bluetooth start
;;
*) exit $NA
;;
esac
save and close, then:
Code:
sudo chmod +x /etc/pm/sleep.d/asus-bluetooth
This will fix bluetooth switch on panel indicator applet not working after resume from suspend-hibernate.
*******
SSD TIPS
********
Code:
sudo gedit /etc/default/grub
look at line 10, change to this:
Code:
GRUB_CMDLINE_LINUX="elevator=noop rootflags=commit=100"
save and close, then:
*******
Code:
sudo gedit /etc/fstab
add "noatime" option to ext partitions, look at my fstab:
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=f450fc7b-f218-4c0c-bb63-5afa69608ab4 / ext4 noatime,commit=100,errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=6de7b138-6ef1-4f4a-bea0-74268a4b302c /home ext4 noatime,commit=100,defaults 0 2
# swap was on /dev/sda5 during installation
UUID=25e066d9-6950-49ac-b078-5547ca161bfb none swap sw 0 0
#tmp su ram
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
save and close.
*******
I think that's all, obviously you have to reboot to apply all tips!
Bookmarks