Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi I'm getting this error after installing laptop-mode-tools in Oneiric Ocelot when its trying to run for the first time:

Unhandled kernel version: 3.0 ('uname -r' = 3.0.0-12-generic)

So my laptop-mode-tools is 1.57-1ubuntu1, and I saw in the launchpad that Ubuntu team is preparing 1.58-3ubuntu1 that contains support for kernel 3.0.

However, I don't find 1.58-3ubuntu1 in apt-cache showpkg laptop-mode-tools (only 1.57 is listed) so I can't upgrade my laptop-mode-tools.

I tried adding kernel PPA into my repository cache and apt-get update, and in apt-cache showpkg linux-headers only is showing up. So I can't downgrade my kernel either.

I want laptop-mode-tools to work with Oneiric since I'm on laptop, what do you guys suggest me to do ? I'm an absolute beginner so please be easy on your answer. I can work with packages, but not with patching/compiling, etc.

share|improve this question
up vote 5 down vote accepted

As per the suggestion in this bug I added kernel version in laptop-mode-tools script. So you should add "3.0");; to the file /usr/sbin/laptop_mode about line 506 so it reads as follows:

case "$KLEVEL" in
 "2.4" ) ;;
 "2.6" ) ;;
 "3.0" ) ;;
  log "ERR" "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2
  exit 1

If you want to avoid laptop-mode-tools completely you may add the following script in /etc/pm/power.d/ and name it powersave. It does something similar to laptop-mode. You may need to tweak the script according to you hardware.

# A script to enable laptop power saving features for #! & Debian GNU+linux.

# List of modules to unload, space seperated. Edit depending on your hardware and preferences.
# Bus list for runtime pm. Probably shouldn't touch this.
buslist="pci spi i2c"

case "$1" in
    # Enable some power saving settings while on battery
       # Enable laptop mode
        echo 5 > /proc/sys/vm/laptop_mode
       # Less VM disk activity. Suggested by powertop
        echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
       # Intel power saving
        echo Y > /sys/module/snd_hda_intel/parameters/power_save_controller
        echo 1 > /sys/module/snd_hda_intel/parameters/power_save
       # Set backlight brightness to 50%
        echo 3 > /sys/class/backlight/acpi_video0/brightness
       # USB powersaving
        for i in /sys/bus/usb/devices/*/power/autosuspend; do
            echo 1 > $i
       # SATA power saving
        for i in /sys/class/scsi_host/host*/link_power_management_policy; do
            echo min_power > $i
       # Disable hardware modules to save power
        for mod in $modlist; do
            grep $mod /proc/modules >/dev/null || continue
            modprobe -r $mod 2>/dev/null
       # Enable runtime power management. Suggested by powertop.
        for bus in $buslist; do
            for i in /sys/bus/$bus/devices/*/power/control; do
                echo auto > $i
       #Return settings to default on AC power
        echo 0 > /proc/sys/vm/laptop_mode
        echo 500 > /proc/sys/vm/dirty_writeback_centisecs
        echo N > /sys/module/snd_hda_intel/parameters/power_save_controller
        echo 0 > /sys/module/snd_hda_intel/parameters/power_save
        echo 12 > /sys/class/backlight/acpi_video0/brightness
        for i in /sys/bus/usb/devices/*/power/autosuspend; do
            echo 2 > $i
        for i in /sys/class/scsi_host/host*/link_power_management_policy
            do echo max_performance > $i
        for mod in $modlist; do
            if ! lsmod | grep $mod; then
                modprobe $mod 2>/dev/null
        for bus in $buslist; do
            for i in /sys/bus/$bus/devices/*/power/control; do
                echo on > $i

exit 0


OR although I havenot used it, many have recommended jupiter applet for power saving. You can install it from ppa:

sudo add-apt-repository ppa:webupd8team/jupiter
sudo apt-get update
sudo apt-get install jupiter


share|improve this answer
Ah.. cool! I followed your first suggestion and it works. Thanks! – Tony Prawiro Nov 1 '11 at 11:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.