--- pm-utils-1.1.2.4.orig/debian/95hdparm-apm +++ pm-utils-1.1.2.4/debian/95hdparm-apm @@ -0,0 +1,50 @@ +#! /bin/sh +# +# This script adjusts hard drive APM settings using hdparm. The hardware +# defaults (usually hdparm -B 128) cause excessive head load/unload cycles +# on many modern hard drives. We therefore set hdparm -B 254 while on AC +# power. On battery we set hdparm -B 128, because the head parking is +# very useful for shock protection. +# +# Refactored from acpi-support's 90-hdparm.sh for pm-utils + +resume_hdparm_apm() +{ + if [ -e /usr/sbin/laptop_mode ] ; then + LMT_CONTROL_HD_POWERMGMT=$(. /etc/laptop-mode/laptop-mode.conf && echo "$CONTROL_HD_POWERMGMT") + if [ "$LMT_CONTROL_HD_POWERMGMT" != 0 ] \ + && [ -e /var/run/laptop-mode-tools/enabled ] + then + # Laptop mode controls hdparm -B settings, we don't. + return + fi + fi + + # Determine the APM policy based on the AC state + level=254 + + if [ "$(get_power_status)" = battery ] + then + level=128 + fi + + for dev in /dev/sd? /dev/hd? ; do + if [ -b $dev ] ; then + # Check for APM support; discard errors since not all + # drives support HDIO_GET_IDENTITY (-i). + if hdparm -i $dev 2> /dev/null | grep -q 'AdvancedPM=yes' + then + hdparm -B $level $dev + fi + fi + done +} + +case "$1" in + thaw|resume) + resume_hdparm_apm + ;; + *) + exit 254 + ;; +esac --- pm-utils-1.1.2.4.orig/debian/rules +++ pm-utils-1.1.2.4/debian/rules @@ -0,0 +1,30 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +configure/pm-utils:: + # Hack to not build some stuff + touch src/pm-pmu.o src/pm-reset-swap.o + touch src/pm-pmu src/pm-reset-swap + +binary-install/pm-utils:: + # We depend on powermgmt-base to provide on_ac_power. + # This way we don't have to conflict with this package. + rm -f debian/pm-utils/usr/bin/on_ac_power + rm -f debian/pm-utils/usr/share/man/man1/on_ac_power.1 + # Remove tools/hooks that are not suitable for Debian. + rm -f debian/pm-utils/usr/lib/pm-utils/sleep.d/55battery + rm -f debian/pm-utils/usr/lib/pm-utils/sleep.d/65alsa + rm -f debian/pm-utils/usr/lib/pm-utils/sleep.d/01grub + rm -f debian/pm-utils/usr/lib/pm-utils/bin/pm-reset-swap + rm -f debian/pm-utils/usr/lib/pm-utils/bin/pm-pmu + rm -f debian/pm-utils/usr/share/man/man8/pm-pmu.8 + + cp debian/00sleep_module debian/pm-utils/etc/pm/config.d/ + + install -m 755 debian/95hdparm-apm debian/pm-utils/usr/lib/pm-utils/sleep.d/ + + chmod -x debian/pm-utils/usr/lib/pm-utils/defaults + --- pm-utils-1.1.2.4.orig/debian/00sleep_module +++ pm-utils-1.1.2.4/debian/00sleep_module @@ -0,0 +1,9 @@ +# The sleep/wake system to use. Valid values are: +# kernel The built-in kernel suspend/resume support. +# Use this if nothing else is supported on your system. +# uswsusp If your system has support for the userspace +# suspend programs (s2ram/s2disk/s2both), then use this. +# tuxonice If your system has support for tuxonice, use this. +# +# The system defaults to "kernel" if this is commented out. +# SLEEP_MODULE="kernel" --- pm-utils-1.1.2.4.orig/debian/changelog +++ pm-utils-1.1.2.4/debian/changelog @@ -0,0 +1,379 @@ +pm-utils (1.1.2.4-1ubuntu8.1) intrepid-proposed; urgency=low + + * debian/95hdparm-apm: apply a default apm policy to all drives on + resume/thaw, based on AC state, for consistency with the settings + applied by acpi-support. LP: #59695. + + -- Steve Langasek Mon, 09 Feb 2009 16:01:01 +0000 + +pm-utils (1.1.2.4-1ubuntu8) intrepid-proposed; urgency=low + + * debian/patches/10-uswsusp-fall-back-on-kernel.patch: + + Patched pm/module.d/uswsusp to fall back on kernel if s2ram not present + (Closes LP: #287374) + * debian/patches/25-pmu.patch: + + Refreshed to patch cleanly + + -- Chow Loong Jin Fri, 24 Oct 2008 03:45:55 +0800 + +pm-utils (1.1.2.4-1ubuntu7) intrepid; urgency=low + + * Drop debian/patches/10-sleep-module-auto-detection.patch as we don't + want to use uswsusp unless the user explicitly chooses it. (LP: #267141) + * Add an example file /etc/pm/config.d/00sleep_module that shows the user + how to change the sleep module in use, for instance if they want to + enable uswsusp. + + -- James Westby Fri, 26 Sep 2008 12:28:19 +0100 + +pm-utils (1.1.2.4-1ubuntu6) intrepid; urgency=low + + * Drop the Recommends: on uswsusp; it is in fact not recommended at + all. + + -- Steve Langasek Fri, 10 Oct 2008 15:43:10 +0000 + +pm-utils (1.1.2.4-1ubuntu5) intrepid; urgency=low + + * Drop 30-swap-file.patch again. Reportedly, resuming from a swap file works + just fine. (LP: #224697) + + -- Martin Pitt Tue, 07 Oct 2008 19:44:20 +0200 + +pm-utils (1.1.2.4-1ubuntu4) intrepid; urgency=low + + * brown papaerbag upload ... to whoever wrote quilt: yes you are cleverar + than me, no need to prove it all the time ! + + -- Oliver Grawert Mon, 06 Oct 2008 20:01:53 +0200 + +pm-utils (1.1.2.4-1ubuntu3) intrepid; urgency=low + + * make the modprobe on resume respect module blacklists by using modprobe -b + instead of plain modprobe in the script (85-respect-blacklists.patch) + + -- Oliver Grawert Mon, 06 Oct 2008 19:19:41 +0200 + +pm-utils (1.1.2.4-1ubuntu2) intrepid; urgency=low + + * 10-sleep-module-auto-detection.patch: Do not check for s2ram, since + current uswsusp does not build it any more. Just check for s2disk. Thanks + to Thomas Dingermann for the suggestion! + + -- Martin Pitt Tue, 02 Sep 2008 12:48:07 +0200 + +pm-utils (1.1.2.4-1ubuntu1) intrepid; urgency=low + + * Merge from Debian unstable. Remaining Ubuntu changes: + - 30-swap-file.patch: Disable hibernation when swap resides on a file. + (LP #224697) + - 99-ubuntu-acpi-support-vbestate.patch: Change the path of the VBE state + dump to where acpi-support writes it to. (Ubuntu specific) + + -- Martin Pitt Wed, 06 Aug 2008 10:26:53 +0200 + +pm-utils (1.1.2.4-1) unstable; urgency=low + + * New upstream release + - Fix suspend/resume on 2.6.26 and greater Linux kernels using kernel mode + setting for Intel video drivers. (Closes: #488144) + * debian/control + - Update Recommends on uswsusp and vbetool to only list them on + architectures where they are actually available. (Closes: #452368) + + -- Michael Biebl Sun, 03 Aug 2008 11:47:19 +0200 + +pm-utils (1.1.2.3-1) unstable; urgency=low + + * New upstream release. + * debian/patches/01-escape-comparison.patch + - Removed, merged upstream. + + -- Michael Biebl Mon, 23 Jun 2008 17:00:50 +0200 + +pm-utils (1.1.2.2-3) unstable; urgency=low + + * Brown paper bag release. + * debian/patches/series + - Actually apply 01-escape-comparison.patch. (Closes: #485125) + * Bump Standards-Version to 3.8.0. + - Add debian/README.source as recommended by the new policy. + + -- Michael Biebl Sat, 14 Jun 2008 16:01:50 +0200 + +pm-utils (1.1.2.2-2ubuntu1) intrepid; urgency=low + + * Merge from Debian unstable (LP: #238303), remaining changes: + - 30-swap-file.patch: Disable hibernation when swap resides on a file + - 99-ubuntu-acpi-support-vbestate.patch: Change the path of the VBE state + dump to where acpi-support writes it to. (Ubuntu specific; unclear, if + still needed) + * Fix syntax errors in 99-ubuntu-acpi-support-vbestate.patch (LP: #238189) + * Drop 01-fix-vberestore.patch (applied upstream) + + -- Tormod Volden Sun, 08 Jun 2008 10:37:03 +0200 + +pm-utils (1.1.2.2-2) unstable; urgency=low + + * debian/patches/01-escape-comparison.patch + - Escape comparison of the kernel version. (Closes: #485125) + + -- Michael Biebl Sun, 08 Jun 2008 14:40:15 +0200 + +pm-utils (1.1.2.2-1) unstable; urgency=low + + * New upstream release. + * debian/control + - Remove docbook-utils from Build-Depends. All man pages are now generated + from DocBook XML. + * debian/rules + - The man pages are now included upstream, so remove all man page related + build rules. + * debian/pm-utils.manpages + - Removed, no longer required. + * debian/pm-powersave.xml, debian/pm-action.xml, debian/pm-is-supported.xml + - Removed, all merged upstream. + + -- Michael Biebl Thu, 29 May 2008 15:42:54 +0200 + +pm-utils (1.1.1-1) unstable; urgency=low + + * New upstream release. + * Removed patches + - debian/patches/15-hibernate_mode_check.patch (merged upstream) + - debian/patches/20-uswsusp-fixes.patch (merged upstream) + * Refreshed patches + - debian/patches/10-sleep-module-auto-detection.patch + - debian/patches/25-pmu.patch + - debian/patches/80-service.patch + * debian/copyright + - Update download location. + * debian/control + - Add Suggests on cpufrequtils. cpufrequtils allows to automatically load + the correct kernel module to enable cpufreq scaling and set the default + cpufreq governor. + + -- Michael Biebl Tue, 20 May 2008 22:12:23 +0200 + +pm-utils (1.1.0-1ubuntu2) intrepid; urgency=low + + * 30-swap-file.patch: Added to disable hibernation when swap resides on a + file. + + -- Evan Dandrea Wed, 28 May 2008 10:59:14 -0400 + +pm-utils (1.1.0-1ubuntu1) intrepid; urgency=low + + * Merge with Debian unstable. Most of our modifications are upstream/in + Debian now and could be dropped. + * Drop debian/patches/98-unload_network_modules.patch: Unloading all network + modules during suspend is a blunt hack and won't be accepted/supported by + upstream. The few modules which need it should be fixed in the kernel + (only known one is e1000 on some systems on 2.6.24). + * 99-fixup-ubuntu-behaviour.patch: Drop --quirk-reset-brightness backport + (upstream now) and shopt fix (not needed with this upstream version). + Split the remaining bits into: + - 01-fix-vberestore.patch: Fix VBE mode restoration; mode 3 special casing + by Matthew Garrett, copy&paste fix by Martin Pitt; forwarded upstream to + FD#15840. + - 99-ubuntu-acpi-support-vbestate.patch: Change the path of the VBE state + dump to where acpi-support writes it to. (Ubuntu specific; unclear, if + still needed) + + -- Martin Pitt Tue, 06 May 2008 08:22:30 +0200 + +pm-utils (1.1.0-1) unstable; urgency=low + + * New upstream release. + - Fixes the uswsusp module to pass the correct parameters to s2ram when + using the --quirk-s3-* parameters. (Closes: #448137) + - Correctly includes multiple config files from /etc/pm/config.d. + (Closes: #451493, #475565) + - Correctly restores the cpufreq governors on multi-core machines. + (Closes: #452620) + - Fixes filename expansion in current directory. (Closes: #454092) + - Updated and improved README. (Closes: #425282, #453866) + - The uswsusp module uses s2ram --force in do_suspend. (Closes: #457019) + This also means, that the internal whitelist of s2ram is no longer used. + The preferred way is to get the quirks from hal. + * debian/control + - Update the upstream URL and use the new Homepage field. (Closes: #473799) + - The Vcs-* fields are now officially supported, so remove the XS- prefix. + - Bump Standards-Version to 3.7.3. No further changes required. + - Fix a small typo in the long package description. (Closes: #466631) + - Add Build-Depends on quilt. + - Add Depends on kbd | console-tools. The kernel and tuxonice module + require the chvt utility. (Closes: #474637) + * debian/watch + - Updated. Parse the homepage at http://pm-utils.freedesktop.org/wiki/ for + the latest release. + * Removed patches + - debian/patches/10-uswsusp-support.patch (obsolete) + - debian/patches/15-laptop-tools.patch (obsolete) + - debian/patches/20-do-not-unload-button.patch (merged upstream) + - debian/patches/30-comment-defaults-file.patch (obsolete) + - debian/patches/40-performance-gov-on-hibernate.patch (fixed upstream) + - debian/patches/50-no-usleep.patch (merged upstream) + - debian/patches/60-suspend-hybrid.patch (obsolete) + - debian/patches/70-remove-pm-pmu.patch (obsolete) + - debian/patches/75-suspend-support.patch (obsolete) + - debian/patches/85-remove-empty-NEW.patch (obsolete) + - debian/patches/90-support-modules-with-dash.patch (obsolete) + - debian/patches/95-fix-config-file-parsing.patch (merged upstream) + * Updated patches + - debian/patches/80-service.patch + * debian/patches/10-sleep-module-auto-detection.patch + - Try to autodetect which sleep module to use. Check tuxonice first, then + uswsusp and fall back to kernel. + * debian/patches/15-hibernate_mode_check.patch + - Add a safety check before writing the hibernate method to + /sys/power/disk. (Closes: #450515) + * debian/patches/20-uswsusp-fixes.patch + - Disable the 99video hook for the uswsusp module. s2ram has it's own vt + switching functionality. + - Check if s2ram is available. + * debian/patches/25-pmu.patch + - As we don't ship the pm-pmu binary, implement the pmu suspend + functionality with a bit of perl magic. Thanks to Martin Pitt for the + idea and the code. (Closes: #450601, #452367, #452909) + - Prefer the /sys/power/state interface over poking /dev/pmu. This + requires a Linux kernel >= 2.6.25. + * debian/pm-action.xml + - Fix some typos in the pm-action manpage. (Closes: #450414) + - Document new configuration variables. + - Improve explanation of the quirk options. (Closes: #475755) + * debian/copyright + - Update list of authors. + * debian/rules + - The 60sysfont hook is no longer shipped upstream, so we don't have to + remove it anymore. + - Switch patch system to quilt. + + -- Michael Biebl Thu, 24 Apr 2008 06:31:51 +0200 + +pm-utils (0.99.2-3ubuntu9) hardy; urgency=low + + * debian/patches/70-remove-pm-pmu.patch: Check for /dev/pmu before calling + /usr/lib/hal/hal-system-power-pmu. Not doing so causes error messages and + g-p-m error beeps on non-powerpc systems. (LP: #210832) + * debian/patches/98-unload_network_modules.patch: Restart network after + resuming, since this unloads/reloads network modules during suspend. This + unbreaks static network configuration after suspend, and mimics + acpi-support's behaviour of previous releases. (LP: #162654) + + -- Martin Pitt Fri, 11 Apr 2008 08:21:13 -0500 + +pm-utils (0.99.2-3ubuntu8) hardy; urgency=low + + * Fix "!grep" to be "! grep" in last patch. + + -- Ben Collins Thu, 03 Apr 2008 09:02:51 -0400 + +pm-utils (0.99.2-3ubuntu7) hardy; urgency=low + + * Do not "chvt 1" on resume when using fglrx. Work around for corrupted + terminal, suggested and tested by AMD/AGP. + + -- Ben Collins Wed, 02 Apr 2008 11:54:18 -0400 + +pm-utils (0.99.2-3ubuntu6) hardy; urgency=low + + * Add debian/patches/97_fix_ppc_suspend_test.patch: Fix suspend test on + PowerPC, thanks to Matthew Garrett (see patch header for details). + * debian/patches/70-remove-pm-pmu.patch: Change the patch to not entirely + drop pm-pmu, but use hal-system-power-pmu instead. This brings back + suspend to PowerPC. (LP: #189851) + * Add debian/patches/98-unload_network_modules.patch: Unload/reload network + modules during suspend. Thanks to Matthew Garrett! (LP: #162654) + + -- Martin Pitt Thu, 27 Mar 2008 16:26:43 +0100 + +pm-utils (0.99.2-3ubuntu5) hardy; urgency=low + + * Fix typo in 95-fix-config-file-parsing.patch which made loading + configs from /etc/pm/config.d/* break. LP: #190679 + * Add 35-skip-linked-cpus-cpufreq.patch which skips all CPUs whose speed + is shared with other CPUs (or cores) when saving state. LP: #162652. + + -- Tollef Fog Heen Wed, 26 Mar 2008 09:00:25 +0100 + +pm-utils (0.99.2-3ubuntu4) hardy; urgency=low + + * debian/patches/25-functions-modunload-regex.patch: + - in modunload(): Fix literally quoted regular expression to + make SUSPEND_MODULES work (LP: #188261) + + -- John Dong Fri, 01 Feb 2008 23:49:53 -0500 + +pm-utils (0.99.2-3ubuntu3) hardy; urgency=low + + * Drop 96-video-quirk-ignoring.patch again. It is incomplete (since we need + to do the same on the suspend side) and does not really fit here (if + pm-utils gets quirks passed on the command line, they should actually be + used). We'll solve this in the hal suspend script instead. (LP: #198808) + + -- Martin Pitt Mon, 24 Mar 2008 16:32:06 +0100 + +pm-utils (0.99.2-3ubuntu2) hardy; urgency=low + + * Add debian/patches/96-video-quirk-ignoring.patch: Ignore resume video + quirks when using the proprietary nvidia or fglrx drivers, or Intel >= + 915G, since they are not needed on them and actively break resuming. Since + this cannot be expressed as FDI rules with current hal, this hack needs to + suffice for Hardy. See patch tags for links to further information. + (LP: #198808) + * Modify Maintainer value to match the DebianMaintainerField + specification. + + -- Martin Pitt Fri, 21 Mar 2008 13:09:45 +0100 + +pm-utils (0.99.2-3ubuntu1) hardy; urgency=low + + * debian/patches/99-fixup-ubuntu-behaviour.patch + - fix globbing to avoid hooks being run twice + - explicitly reset text mode if it was in use before + - Ubuntu keeps the vbestate file in a separate location and stores + it on boot + - backport the brightness resetting quirk from 0.99.4 + + -- Matthew Garrett Tue, 15 Jan 2008 22:52:23 +0000 + +pm-utils (0.99.2-3) unstable; urgency=low + + * Support modules/services with dashes (closes: #433179) + * Fix config file parser (closes: #427254) + + -- Tim Dijkstra Mon, 16 Jul 2007 22:31:53 +0200 + +pm-utils (0.99.2-2) unstable; urgency=low + + * Make --hibernate test in pm-is-supported less strict so we + can support suspend2 too (closes: #422745) + * pm-action: Fix pm-suspend-hybrid support (closes: 427253) + * Add some more words to the pm-action manpage (closes: #425282) + * Don't install useless NEWS file (closes: #431551) + * Add support for NO_QUIRKS from HAL. Now we can distinguish + between `no quirks' and 'unknown' (closes: #427052) + + -- Tim Dijkstra Sat, 14 Jul 2007 22:41:06 +0200 + +pm-utils (0.99.2-1) unstable; urgency=low + + [ Michael Biebl ] + * Initial release (Closes: #389817). + * Do not install on_ac_power binary. Instead depend on powermgmt-base + package. + + [ Tim Dijkstra ] + * Support for `s2ram' for hal >= 0.5.9 + * First stab at suspend-hybrid support + * Do not install pm-pmu, it is hack for old kernels (older than the one + in etch) which is also present in the s2ram binary if needed. + * Do not install pm-reset-swap, it has bugs and is superflous since + swapon in debian has similar functionality. + * Recommend vbetool and radeontool (not depend on it) else pm-utils + won't be installable on anything but x86_* + * Add manpages. + + -- Tim Dijkstra Wed, 25 Apr 2007 22:48:19 +0200 + --- pm-utils-1.1.2.4.orig/debian/control +++ pm-utils-1.1.2.4/debian/control @@ -0,0 +1,20 @@ +Source: pm-utils +Section: admin +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Tim Dijkstra +Uploaders: Michael Biebl +Build-Depends: cdbs, debhelper (>= 5), xmlto, quilt +Standards-Version: 3.8.0 +Vcs-Svn: svn://svn.debian.org/svn/collab-maint/ext-maint/pm-utils/trunk +Vcs-Browser: http://svn.debian.org/wsvn/collab-maint/ext-maint/pm-utils/trunk +Homepage: http://pm-utils.freedesktop.org/ + +Package: pm-utils +Architecture: all +Depends: ${misc:Depends}, powermgmt-base, kbd | console-tools, hdparm +Recommends: hal (>= 0.5.9), vbetool [amd64 i386], radeontool +Suggests: cpufrequtils +Description: utilities and scripts for power management + This package provides simple shell command line tools to suspend and + hibernate your computer. --- pm-utils-1.1.2.4.orig/debian/watch +++ pm-utils-1.1.2.4/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://pm-utils.freedesktop.org/wiki/ .*pm-utils-(.*)\.tar\.gz --- pm-utils-1.1.2.4.orig/debian/copyright +++ pm-utils-1.1.2.4/debian/copyright @@ -0,0 +1,38 @@ +This package was debianized by Michael Biebl on +Sat, 3 Mar 2007 04:12:26 +0100. + +It was downloaded from http://pm-utils.freedesktop.org/ + +Upstream Author: + Bill Nottingham + Peter Jones + David Zeuthen + Richard Hughes + Victor Lowther + +Copyright: + Copyright 2006 Red Hat, Inc. + Copyright 2007 Peter Jones + Copyright 2006-2007 Richard Hughes + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2007, Michael Biebl and +is licensed under the GPL, see above. + --- pm-utils-1.1.2.4.orig/debian/compat +++ pm-utils-1.1.2.4/debian/compat @@ -0,0 +1 @@ +5 --- pm-utils-1.1.2.4.orig/debian/README.source +++ pm-utils-1.1.2.4/debian/README.source @@ -0,0 +1,3 @@ +This package uses the quilt patch management system. + +Please refer to /usr/share/doc/quilt/README.source for further information. --- pm-utils-1.1.2.4.orig/debian/patches/99-ubuntu-acpi-support-vbestate.patch +++ pm-utils-1.1.2.4/debian/patches/99-ubuntu-acpi-support-vbestate.patch @@ -0,0 +1,19 @@ +Index: pm-utils-1.1.2.2/pm/sleep.d/99video +=================================================================== +--- pm-utils-1.1.2.2.orig/pm/sleep.d/99video 2008-06-08 11:28:52.000000000 +0200 ++++ pm-utils-1.1.2.2/pm/sleep.d/99video 2008-06-08 12:41:37.000000000 +0200 +@@ -76,7 +76,13 @@ + + # save/restore vbe state + vbe_savestate() { vbe vbestate save |savestate vbestate; } +-vbe_restorestate() { restorestate vbestate |vbe vbestate restore; } ++vbe_restorestate() { ++ if [ -e /var/lib/acpi-support/vbestate ]; then ++ vbe vbestate restore < /var/lib/acpi-support/vbestate ++ else ++ restorestate vbestate |vbe vbestate restore ++ fi ++} + + # save/restore the vbe mode + vbe_savemode() { vbe vbemode get |savestate vbemode; } --- pm-utils-1.1.2.4.orig/debian/patches/series +++ pm-utils-1.1.2.4/debian/patches/series @@ -0,0 +1,5 @@ +10-uswsusp-fall-back-on-kernel.patch +25-pmu.patch +80-service.patch +99-ubuntu-acpi-support-vbestate.patch +85-respect-blacklists.patch --- pm-utils-1.1.2.4.orig/debian/patches/10-uswsusp-fall-back-on-kernel.patch +++ pm-utils-1.1.2.4/debian/patches/10-uswsusp-fall-back-on-kernel.patch @@ -0,0 +1,52 @@ +Index: pm-utils-1.1.2.4/pm/module.d/uswsusp +=================================================================== +--- pm-utils-1.1.2.4.orig/pm/module.d/uswsusp 2008-10-22 13:33:10.000000000 +0800 ++++ pm-utils-1.1.2.4/pm/module.d/uswsusp 2008-10-22 13:39:52.000000000 +0800 +@@ -1,10 +1,14 @@ + #!/bin/sh + ++. ${PM_UTILS_LIBDIR}/module.d/kernel ++ + # disable processing of 99video + before_hooks() + { +- disablehook 00clear "disabled by uswsusp" +- disablehook 99video "disabled by uswsusp" ++ if [ "$ACTION" = hibernate ] || command_exists s2ram ; then ++ disablehook 00clear "disabled by uswsusp" ++ disablehook 99video "disabled by uswsusp" ++ fi + } + + get_quirks() +@@ -33,17 +37,19 @@ + [ "$QUIRK_NONE" = "true" ] && OPTS="" + } + +-check_suspend() +-{ +- command_exists s2ram || return 1 +- [ -c /dev/pmu ] || grep -q mem /sys/power/state +-} +- +-do_suspend() +-{ +- get_quirks +- s2ram --force $OPTS +-} ++if command_exists s2ram ; then ++ check_suspend() ++ { ++ command_exists s2ram || return 1 ++ [ -c /dev/pmu ] || grep -q mem /sys/power/state ++ } ++ ++ do_suspend() ++ { ++ get_quirks ++ s2ram --force $OPTS ++ } ++fi + + check_hibernate() + { --- pm-utils-1.1.2.4.orig/debian/patches/85-respect-blacklists.patch +++ pm-utils-1.1.2.4/debian/patches/85-respect-blacklists.patch @@ -0,0 +1,13 @@ +Index: pm-utils-1.1.2.4/pm/functions.in +=================================================================== +--- pm-utils-1.1.2.4.orig/pm/functions.in 2008-10-06 19:18:14.000000000 +0200 ++++ pm-utils-1.1.2.4/pm/functions.in 2008-10-06 19:18:41.000000000 +0200 +@@ -118,7 +118,7 @@ + { + for x in "${STORAGEDIR}"/module:* ; do + [ -O "${x}" ] || continue +- modprobe "${x##*:}" >/dev/null 2>&1 || \ ++ modprobe -b "${x##*:}" >/dev/null 2>&1 || \ + log "Could not reload module ${x##*:}." + + done --- pm-utils-1.1.2.4.orig/debian/patches/25-pmu.patch +++ pm-utils-1.1.2.4/debian/patches/25-pmu.patch @@ -0,0 +1,93 @@ +Index: pm-utils-1.1.2.4/pm/module.d/kernel +=================================================================== +--- pm-utils-1.1.2.4.orig/pm/module.d/kernel 2008-10-22 13:31:29.000000000 +0800 ++++ pm-utils-1.1.2.4/pm/module.d/kernel 2008-10-22 13:39:58.000000000 +0800 +@@ -2,15 +2,15 @@ + + check_suspend() + { +- [ -c /dev/pmu ] || grep -q mem /sys/power/state ++ grep -q mem /sys/power/state || [ -c /dev/pmu ] + } + + do_suspend() + { +- if [ -c /dev/pmu ]; then +- pm-pmu --suspend +- else ++ if grep -q mem /sys/power/state; then + echo -n "mem" > /sys/power/state ++ elif [ -c /dev/pmu ]; then ++ check_suspend_pmu && do_suspend_pmu + fi + } + +Index: pm-utils-1.1.2.4/pm/module.d/tuxonice +=================================================================== +--- pm-utils-1.1.2.4.orig/pm/module.d/tuxonice 2008-10-22 13:31:29.000000000 +0800 ++++ pm-utils-1.1.2.4/pm/module.d/tuxonice 2008-10-22 13:39:58.000000000 +0800 +@@ -13,15 +13,15 @@ + + check_suspend() + { +- [ -c /dev/pmu ] || grep -q mem /sys/power/state ++ grep -q mem /sys/power/state || [ -c /dev/pmu ] + } + + do_suspend() + { +- if [ -c /dev/pmu ]; then +- pm-pmu --suspend +- else ++ if grep -q mem /sys/power/state; then + echo -n "mem" > /sys/power/state ++ elif [ -c /dev/pmu ]; then ++ check_suspend_pmu && do_suspend_pmu + fi + } + +Index: pm-utils-1.1.2.4/pm/module.d/uswsusp +=================================================================== +--- pm-utils-1.1.2.4.orig/pm/module.d/uswsusp 2008-10-22 13:39:52.000000000 +0800 ++++ pm-utils-1.1.2.4/pm/module.d/uswsusp 2008-10-22 13:40:34.000000000 +0800 +@@ -41,7 +41,7 @@ + check_suspend() + { + command_exists s2ram || return 1 +- [ -c /dev/pmu ] || grep -q mem /sys/power/state ++ grep -q mem /sys/power/state || [ -c /dev/pmu ] + } + + do_suspend() +Index: pm-utils-1.1.2.4/pm/pm-functions.in +=================================================================== +--- pm-utils-1.1.2.4.orig/pm/pm-functions.in 2008-10-22 13:31:29.000000000 +0800 ++++ pm-utils-1.1.2.4/pm/pm-functions.in 2008-10-22 13:39:58.000000000 +0800 +@@ -199,6 +199,27 @@ + exec > "$1" 2>&1 + } + ++check_suspend_pmu() ++{ ++ perl << EOF ++sub PMU_IOC_CAN_SLEEP { 0x40044205; } ++open PMU, '/dev/pmu' or die "open /dev/pmu: \$!"; ++\$p = pack 'l', 0; ++ioctl PMU, &PMU_IOC_CAN_SLEEP, \$p or die "ioctl: \$!"; ++(\$v) = unpack 'l', \$p; ++exit (\$v ? 0 : 1); ++EOF ++} ++ ++do_suspend_pmu() ++{ ++ perl << EOF ++sub PMU_IOC_SLEEP { 0x20004200; } ++open PMU, "/dev/pmu" or die "open /dev/pmu: \$!"; ++ioctl PMU, &PMU_IOC_SLEEP, 0; ++EOF ++} ++ + + SLEEP_FUNCTIONS="${PM_UTILS_LIBDIR}/module.d/${SLEEP_MODULE}" + [ -f "${SLEEP_FUNCTIONS}" ] || { --- pm-utils-1.1.2.4.orig/debian/patches/80-service.patch +++ pm-utils-1.1.2.4/debian/patches/80-service.patch @@ -0,0 +1,23 @@ +Index: pm-utils/pm/functions.in +=================================================================== +--- pm-utils.orig/pm/functions.in 2008-05-29 15:13:37.000000000 +0200 ++++ pm-utils/pm/functions.in 2008-06-11 13:28:49.000000000 +0200 +@@ -142,15 +142,15 @@ + + stopservice() + { +- if service "$1" status 2>/dev/null | grep -c -q running; then ++ if [ -x "/etc/init.d/$1" ]; then + touch "${STORAGEDIR}/service:$1" +- service "$1" stop ++ invoke-rc.d "$1" stop + fi + } + + restartservice() + { +- [ -O "${STORAGEDIR}/service:$1" ] && service "$1" start ++ [ -O "${STORAGEDIR}/service:$1" ] && invoke-rc.d "$1" start + } + + # Disable a hook.