Install a newer kernel
sudo add-apt-repository ppa:kernel-ppa/ppa
sudo apt-get install linux-image-generic-pae-lts-backport-maverick \
linux-headers-generic-pae-lts-backport-maverick
Install acpi_call to disable the Nvidia card
The Nvidia discrete graphics card doesn’t work at the time of this writing, so it’s best to completely disable it to save battery. You’ll need the acpi_call module to do so:
git clone http://github.com/mkottman/acpi_call.git cd acpi_call make
This builds a kernel module named acpi_call.ko. Try it and see if it works:
grep rate /proc/acpi/battery/BAT0/state present rate: 19913 mW insmod acpi_call.ko echo '\_SB.PCI0.PEG1.GFX0._OFF' > /proc/acpi/call grep rate /proc/acpi/battery/BAT0/state present rate: 12558 mW
Create a script to do this at startup, let’s call it /etc/init.d/switch-dg-off:
#! /bin/sh
### BEGIN INIT INFO
# Provides: skeleton
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
### END INIT INFO
# Author: Foo Bar
#
# Please remove the "Author" lines above and replace them
# with your own name if you copy and modify this script.
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Description of the service"
NAME=switch-dg-off
SCRIPTNAME=/etc/init.d/$NAME
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
echo '\_SB.PCI0.PEG1.GFX0._OFF' > /proc/acpi/call
return 0
}
#
# Function that stops the daemon/service
#
do_stop()
{
return 0
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload()
{
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#log_daemon_msg "Reloading $DESC" "$NAME"
#do_reload
#log_end_msg $?
#;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
Add it to the startup sequence:
update-rc.d switch-dg-off defaults
Configure the trackpad
The trackpad is recognized correctly as a synaptics device with Maverick’s (2.6.35) kernel. This has the effect of making the “multitouch” functions stopping to work. Here is my config in /etc/X11/xorg.conf to bring them back:
Section "InputClass"
Identifier "touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "synaptics"
Option "VertTwoFingerScroll" "on"
Option "HorizTwoFingerScroll" "on"
Option "CircularScrolling" "off"
Option "CricularTrigger" "0"
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
EndSection
Fix suspend
Suspend doesn’t work out of the box because of a problem with the USB buses, we need to manually disable them before going to sleep. Create a file named /etc/pm/sleep.d/20_custom-ehci_hcd and paste this script:
#!/bin/sh
# File: "/etc/pm/sleep.d/20_custom-ehci_hcd".
BUSES="0000:00:1a.0 0000:00:1d.0"
case "${1}" in
hibernate|suspend)
for bus in $BUSES; do
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind
done
;;
resume|thaw)
for bus in $BUSES; do
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind
done
;;
esac
Don’t forget to make it executable :
chmod +x /etc/pm/sleep.d/20_custom-ehci_hcd
TODO: fix hibernate
Leave a Reply