KubuntuPowersave

Revision 43 as of 2006-04-04 18:37:48

Clear message

Power management is one of key features required for great laptop support. Ubuntu is one of best distributions for laptop support, but there are still ways to improve this in Kubuntu.

Current Situation: KLaptop

Kubuntu by default comes with klaptopdaemon package which provides KLaptop applet in KDE systray and klaptopdaemon running in background and communicating with acpi-support scripts.

Pros:

  • Uses acpi-support infrastructure provided by Ubuntu

Cons:

  • klaptop is not maintained upstream ([http://lists.kde.org/?l=kde-devel&m=110450263016035&w=2 see post from author])

  • klaptop has many issues (and no one to fix them)
  • klaptop is not enabled by default (user has to configure klaptopdaemon and supported features manually)
  • no daemon process that control PM when user is not logged in

Alternative: Powersave/KPowersave

Dapper Universe currently have old version of of kpowersave ([http://packages.ubuntu.com/dapper/kde/kpowersave 0.5.2-1ubuntu1]) and powersave ([http://packages.ubuntu.com/dapper/admin/powersaved 0.11.2-1]). The problem is that these packages cannot be installed if conflicting packages (powernowd, cpudyn, cpufreqd, apmd) are not deinstalled first. Since powernowd and ampd are required by *-desktop packages (including kubuntu-desktop), this means that your *-desktop package has to be removed (together with powernowd and apmd) in order to make it work which is not acceptable for regular users.

Pros:

  • cleaner user interface
  • more functionality: multi battery monitor, CPU freq monitor, PM schemes...
  • clear Debian maintainer and active development team (that is accepting patches from distros)
  • power management done by daemon (powersaved) and works without active GUI (and logged user)
  • uses acpi-support infrastructure if configured EVENT_GLOBAL_SUSPEND2DISK_OTHER="suspend2" in /etc/powersave/events points to /usr/local/lib/powersave/scripts/suspend2 (fixed in v12 of powersave, works with suspend2 and with acpi-support infrastructure)

Cons:

  • conflicting with existing Ubuntu packages: powernowd, cpudyn, cpufreqd, apmd
  • needs more testing / feedback to be sure it can replace klaptop
  • no configuration module for System settings - would need to write one (SuSE has it in yast2)

How to get Powersave/KPowersave to mainstream?

Note: this is not linked to any specific release, however it would be great if something can be done already for DapperDrake.

  1. Prepare latest test packages for Dapper - DONE

    • Mbiebl provided test packages (source and i386 binaries) that can be installed on Dapper - see [https://lists.ubuntu.com/archives/kubuntu-devel/2006-March/000910.html announcement]

    • packages have Conflicts/Provides rule for all conflicting packages (allow install on Dapper w/o removal of *-desktop)
    • redirect /etc/acpi/events to ignore (temporarily until better solution is implemented)
    • packages tested by: LukaRenko, Sebastian Kügler, AchimBohnet, <please add your name here>

      • known issue: install my complain about /proc/acpi/event being busy - workaround: reboot
  2. Polish packages for upload to Universe and get the REVU-ed
    • address /etc/acpi/events redirection in a way that it does not break gnome-power-manager
      • this may require change to apci-support scripts to check for "powersaved" process
      • need to work with Ubuntu laptop team on how this should be done properly
    • fix kpowersave .desktop icon (not to show in GNOME menu)
  3. Request UpstreamVersionFreeze [https://lists.ubuntu.com/archives/ubuntu-motu/2006-February/000545.html exception] for powersave/kpowersave

    • since old version cannot be installed w/o removing *-desktop packages it makes sense anyhow
    • we should maybe wait for final release of 0.6 (as it is planned in March)
  4. Get lots of testing by Kubuntu laptop users
    • we should confirm that kpowersave is as good as exiting klaptop
    • we should get feedback for all supported platforms (i386, amd64, ppc)
  5. Consider main inclusion
    • this is prerequisite to include it by default on Kubuntu
  6. Consider making kpowersave default for kubuntu-desktop
    • as we now know it is better than klaptop Wink ;-)

Installing KPowersave from test repository

If you would like to test kpowersave/powersave on your laptop, you can install it from Kubuntu test repository (currently only i386 packages are provided):

  1. Add Kubuntu test repository to your /etc/apt/sources.list

    •   deb http://kubuntu.no-ip.org/kubuntu dapper main
        deb-src http://kubuntu.no-ip.org/kubuntu dapper main
  2. Install kpowersave (will install also powersave)
    •   sudo apt-get update
        sudo apt-get install kpowersave
  3. Start kpowersave
    •   kpowersave
  4. Reboot (check below notes first)

Note: powersave will remove apmd/powernowd/klaptopdaemon packages. If you want to go back to klaptop (not that this can happen in real life ;-)), you should remove powersave/kpowersave (sudo apt-get remove libpowersave10) and then reinstall kubuntu-desktop (sudo apt-get install kubuntu-desktop).

Note: if you have been using test repository version with acpid redirection (powersave 0.12.2, kpowersave 0.5.10), they you should do the folowing:

  • Remove divert for /usr/sbin/acpid: sudo dpkg-divert --package powersaved --rename --remove /usr/sbin/acpid

  • Reinstall acpid: sudo apt-get install --reinstall acpid

  • Reinstall acpi-support: sudo apt-get install --reinstall acpi-support

Configuration Tips

We do not have configuration GUI for all powersave options (like SuSE yast2), therefore you may need to edit configuration files in /etc/powersave directory.

  • CPU frequency scaling: by default it is performed by kernel, but leaving it to powersaved userspace daemon may be better BR set CPUFREQ_CONTROL="userspace" in /etc/powersave/cpufreq

  • automatic suspend on low battery/lid close via powersave BR see EVENT_BATTERY_WARNING, EVENT_BATTERY_LOW and EVENT_BUTTON_LID_CLOSED variables in /etc/powersave/events

  • automatic suspend on low battery/lid close via KPowersave BR add e.g. dcop kpowersave KPowersaveIface do_suspendToDisk command to the related event in KPowersave (discover via kdcop). You can configure this via the applet menu: "Configure Notifications ..." , select the related event (e.g. "Battery charge dropped to level LOW") and add the command to "Execute a program:".

Test reports

If you have tested Kpowersave on your laptop, please report it in this table:

Laptop

Tested by

Suspend RAM

Suspend Disk

Standby

CPU freq

Hotkeys

Notes

[:LaptopTestingTeam/HPNW8240/Kubuntu:HP nw8240]

LukaRenko

No

Yes

Untested

Improvement

No

suspend only with 2.6.15-15 (see [https://launchpad.net/bugs/34587 #34587])

[:LaptopTestingTeam/DellLatitudeD600:Dell D600]

AchimBohnet

Untested

No

Untested

Improvement

Yes

Regression: After every power plug in, I have to switch to powersaving mode, otherwise fan speed/noise increases

Dell Latitude D600

DannyKukawka

Improvement (with vga=0)

Yes

No

Improvement

Yes

after remove and plugin AC: max. CPUFreq not set to 1.7 GHz (kernelbug, see: SUSE bug [https://bugzilla.novell.com/show_bug.cgi?id=119836 #119836]); can't reproduce the regression from AchimBohnet; Suspend2Ram: see C640

Acer TravelMate 292LMi

GeorgeMoody4

Yes

Yes

Untested

Improvement

No

Untested

[:LaptopTestingTeam/ApplePowerbookG4_15in_1.0GHz:Powerbook G4]

RaphaelPinson

No

No

Untested

Improvement

Untested

When trying to SuspendtoDisk, I get a kernel error message. Choosing Suspend2Ram seems to block everything. However, I can still get in suspend mode by closing the lid.

IBM ThinkPad X40

AngeloLisco

Yes

Yes

Untested

Improvement

Untested

works great

IBM ThinkPad R32

DannyKukawka

Improvement

Yes

Unsupported

Improvement

Untested

Suspend2Ram didn't worked with klaptop, but with KPowersave

IBM ThinkPad R40

DannyKukawka

Improvement

Yes

Unsupported

Improvement

Untested

with klaptop Suspend2Ram failed and klaptop died (same on R32)

IBM ThinkPad T21

DannyKukawka

Yes

Improvement (APM)

Yes

Unsupported

Untested

work better with APM (use acpi=off kernelparam and start powersave after load apm module (see [https://launchpad.net/bugs/37512 #37512])); with ACPI only Suspend2Disk work, klaptop doesn't support Suspend2Disk on APM, but KPowersave

IBM ThinkPad 600E

DannyKukawka

Yes

Improvement (APM)

Yes

Unsupported

Untested

only support APM

Dell Latitude C640

DannyKukawka

Improvement (with vga=0)

Yes

Yes

Improvement

Untested

need to press powerbutton to finish Standby (with klaptop and KPowersave), with vga=0 as boot parameter s2ram work with KPowersave

FujitsuSiemens Lifebook P1510

DannyKukawka

No

Yes

Unsupported

Improvement

Untested

Klaptop crash, (K)Powersave can Suspend2Ram, but can't reactivate screen (same on SUSE, looks like hw specific problem)

Packard Bell EasyNote B3520 (AMD Turion64)

DannyKukawka

No

Yes

Unsupported

Improvement

Untested

Tested with i386 and old x86_64 packages; Suspend2Disk need more than ~10 min (work perfect with SUSE 10.1), Suspend2Ram: klaptop crash, KPowersave: refused because machine blacklisted

MSI M630 (amd64)

DannyKukawka

No/Improvement

Yes

No

Improvement

Untested

Suspend2Ram: klaptop hangs up, KPowersave suspend, but can't activate display on resume, the rest works fine, Standby: kernel oops

Notes:

  • Yes: it works like before (with klaptop)

  • No: it does not work (but it did not work with klaptop either)

  • Improvement: works better than with klaptop

  • Regression: works worse/broken (put details in notes/comments)

  • Untested: not tried (yet)

  • Unsupported: not supported by hardware

There is also discussion going on in this [http://ubuntuforums.org/showthread.php?t=151222 forum thread].

KPowersave Issues / Questions / Comments

This is a list of issues/questions that need clarification or discussion with developers of powersave/kpowersave:

  1. Administration applet for KDE
    • SuSE uses YAST, what can we do in Kubuntu (kde-guidance/pykde applet?)
  2. Performance scheme is default when on power
    • if user changes this in sys tray, should this be saved as new default into config (for next start)?
  3. Screensaver dcop call should block until screen is locked
  4. Powersave on PPC
  5. Powersave on x86_64 / amd64
    • need to provide latest packages (kubuntu.no-ip.org doesn't provide amd64 and universe contains only old version)
  6. s2ram Kubuntu packages