diff options
author | sibel <lesibel@free.fr> | 2011-05-23 09:04:23 +0200 |
---|---|---|
committer | sibel <lesibel@free.fr> | 2011-05-23 09:04:23 +0200 |
commit | bcd0153645655db6b258477e25ac1d183dafc55c (patch) | |
tree | 6874df3e2cfeae3fa8e1c4ed3097c0a1b4324ca4 /extra/pm-utils | |
parent | 120d1e11c2e6817e78ed139fec6dda0b948ad47b (diff) | |
download | nutyx-extra-bcd0153645655db6b258477e25ac1d183dafc55c.tar.gz nutyx-extra-bcd0153645655db6b258477e25ac1d183dafc55c.tar.bz2 nutyx-extra-bcd0153645655db6b258477e25ac1d183dafc55c.tar.xz nutyx-extra-bcd0153645655db6b258477e25ac1d183dafc55c.zip |
pm-utils 1.4.1-1 ajout port
Diffstat (limited to 'extra/pm-utils')
-rw-r--r-- | extra/pm-utils/.footprint.i686 | 64 | ||||
-rw-r--r-- | extra/pm-utils/.footprint.x86_64 | 64 | ||||
-rw-r--r-- | extra/pm-utils/.md5sum.i686 | 5 | ||||
-rw-r--r-- | extra/pm-utils/.md5sum.x86_64 | 5 | ||||
-rw-r--r-- | extra/pm-utils/Pkgfile | 34 | ||||
-rw-r--r-- | extra/pm-utils/pm-utils-02-loggin-append.patch | 20 | ||||
-rw-r--r-- | extra/pm-utils/pm-utils-11-netcfg | 27 | ||||
-rw-r--r-- | extra/pm-utils/pm-utils-12-fix-intel-audio-powersave-hook.patch | 16 | ||||
-rw-r--r-- | extra/pm-utils/pm-utils-13-49bluetooth-sync.patch | 44 | ||||
-rw-r--r-- | extra/pm-utils/pm-utils-14-disable-sata-alpm.patch | 27 |
10 files changed, 306 insertions, 0 deletions
diff --git a/extra/pm-utils/.footprint.i686 b/extra/pm-utils/.footprint.i686 new file mode 100644 index 000000000..454e9742d --- /dev/null +++ b/extra/pm-utils/.footprint.i686 @@ -0,0 +1,64 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/pm/ +drwxr-xr-x root/root etc/pm/config.d/ +drwxr-xr-x root/root etc/pm/power.d/ +drwxr-xr-x root/root etc/pm/sleep.d/ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/on_ac_power +-rwxr-xr-x root/root usr/bin/pm-is-supported +drwxr-xr-x root/root usr/lib/ +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/pm-utils.pc +drwxr-xr-x root/root usr/lib/pm-utils/ +drwxr-xr-x root/root usr/lib/pm-utils/bin/ +-rwxr-xr-x root/root usr/lib/pm-utils/bin/pm-action +-rwxr-xr-x root/root usr/lib/pm-utils/bin/pm-pmu +-rwxr-xr-x root/root usr/lib/pm-utils/bin/pm-reset-swap +-rwxr-xr-x root/root usr/lib/pm-utils/bin/service +-rw-r--r-- root/root usr/lib/pm-utils/defaults +-rwxr-xr-x root/root usr/lib/pm-utils/functions +drwxr-xr-x root/root usr/lib/pm-utils/module.d/ +-rwxr-xr-x root/root usr/lib/pm-utils/module.d/kernel +-rwxr-xr-x root/root usr/lib/pm-utils/module.d/tuxonice +-rwxr-xr-x root/root usr/lib/pm-utils/module.d/uswsusp +-rwxr-xr-x root/root usr/lib/pm-utils/pm-functions +drwxr-xr-x root/root usr/lib/pm-utils/power.d/ +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/hal-cd-polling +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/intel-audio-powersave +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/journal-commit +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/laptop-mode +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/pcie_aspm +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/readahead +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/sata_alpm +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/sched-powersave +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/wireless +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/xfs_buffer +drwxr-xr-x root/root usr/lib/pm-utils/sleep.d/ +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/00logging +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/00powersave +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/01grub +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/11netcfg +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/49bluetooth +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/75modules +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/90clock +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/94cpufreq +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/95led +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/98video-quirk-db-handler +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/99video +drwxr-xr-x root/root usr/sbin/ +lrwxrwxrwx root/root usr/sbin/pm-hibernate -> /usr/lib/pm-utils/bin/pm-action +-rwxr-xr-x root/root usr/sbin/pm-powersave +lrwxrwxrwx root/root usr/sbin/pm-suspend -> /usr/lib/pm-utils/bin/pm-action +lrwxrwxrwx root/root usr/sbin/pm-suspend-hybrid -> /usr/lib/pm-utils/bin/pm-action +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/doc/ +drwxr-xr-x root/root usr/share/doc/pm-utils/ +-rw-r--r-- root/root usr/share/doc/pm-utils/HOWTO.hooks +-rw-r--r-- root/root usr/share/doc/pm-utils/HOWTO.modules +-rw-r--r-- root/root usr/share/doc/pm-utils/README +-rw-r--r-- root/root usr/share/doc/pm-utils/README.debugging +-rw-r--r-- root/root usr/share/doc/pm-utils/README.distributions +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +drwxr-xr-x root/root usr/share/man/man8/ diff --git a/extra/pm-utils/.footprint.x86_64 b/extra/pm-utils/.footprint.x86_64 new file mode 100644 index 000000000..454e9742d --- /dev/null +++ b/extra/pm-utils/.footprint.x86_64 @@ -0,0 +1,64 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/pm/ +drwxr-xr-x root/root etc/pm/config.d/ +drwxr-xr-x root/root etc/pm/power.d/ +drwxr-xr-x root/root etc/pm/sleep.d/ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/on_ac_power +-rwxr-xr-x root/root usr/bin/pm-is-supported +drwxr-xr-x root/root usr/lib/ +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/pm-utils.pc +drwxr-xr-x root/root usr/lib/pm-utils/ +drwxr-xr-x root/root usr/lib/pm-utils/bin/ +-rwxr-xr-x root/root usr/lib/pm-utils/bin/pm-action +-rwxr-xr-x root/root usr/lib/pm-utils/bin/pm-pmu +-rwxr-xr-x root/root usr/lib/pm-utils/bin/pm-reset-swap +-rwxr-xr-x root/root usr/lib/pm-utils/bin/service +-rw-r--r-- root/root usr/lib/pm-utils/defaults +-rwxr-xr-x root/root usr/lib/pm-utils/functions +drwxr-xr-x root/root usr/lib/pm-utils/module.d/ +-rwxr-xr-x root/root usr/lib/pm-utils/module.d/kernel +-rwxr-xr-x root/root usr/lib/pm-utils/module.d/tuxonice +-rwxr-xr-x root/root usr/lib/pm-utils/module.d/uswsusp +-rwxr-xr-x root/root usr/lib/pm-utils/pm-functions +drwxr-xr-x root/root usr/lib/pm-utils/power.d/ +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/hal-cd-polling +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/intel-audio-powersave +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/journal-commit +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/laptop-mode +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/pcie_aspm +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/readahead +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/sata_alpm +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/sched-powersave +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/wireless +-rwxr-xr-x root/root usr/lib/pm-utils/power.d/xfs_buffer +drwxr-xr-x root/root usr/lib/pm-utils/sleep.d/ +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/00logging +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/00powersave +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/01grub +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/11netcfg +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/49bluetooth +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/75modules +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/90clock +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/94cpufreq +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/95led +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/98video-quirk-db-handler +-rwxr-xr-x root/root usr/lib/pm-utils/sleep.d/99video +drwxr-xr-x root/root usr/sbin/ +lrwxrwxrwx root/root usr/sbin/pm-hibernate -> /usr/lib/pm-utils/bin/pm-action +-rwxr-xr-x root/root usr/sbin/pm-powersave +lrwxrwxrwx root/root usr/sbin/pm-suspend -> /usr/lib/pm-utils/bin/pm-action +lrwxrwxrwx root/root usr/sbin/pm-suspend-hybrid -> /usr/lib/pm-utils/bin/pm-action +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/doc/ +drwxr-xr-x root/root usr/share/doc/pm-utils/ +-rw-r--r-- root/root usr/share/doc/pm-utils/HOWTO.hooks +-rw-r--r-- root/root usr/share/doc/pm-utils/HOWTO.modules +-rw-r--r-- root/root usr/share/doc/pm-utils/README +-rw-r--r-- root/root usr/share/doc/pm-utils/README.debugging +-rw-r--r-- root/root usr/share/doc/pm-utils/README.distributions +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +drwxr-xr-x root/root usr/share/man/man8/ diff --git a/extra/pm-utils/.md5sum.i686 b/extra/pm-utils/.md5sum.i686 new file mode 100644 index 000000000..4bd8b95b6 --- /dev/null +++ b/extra/pm-utils/.md5sum.i686 @@ -0,0 +1,5 @@ +94f3d52a487526e6c682b183fa0b1d43 pm-utils-02-loggin-append.patch +1742a556089c36c3a89eb1b957da5a60 pm-utils-1.4.1.tar.gz +f6b803c7237b2447a8b6f4d9664afd4a pm-utils-11-netcfg +fa36c14ea36dea717a788378ede9121d pm-utils-13-49bluetooth-sync.patch +597f2636405219a83982ca34b8145415 pm-utils-14-disable-sata-alpm.patch diff --git a/extra/pm-utils/.md5sum.x86_64 b/extra/pm-utils/.md5sum.x86_64 new file mode 100644 index 000000000..4bd8b95b6 --- /dev/null +++ b/extra/pm-utils/.md5sum.x86_64 @@ -0,0 +1,5 @@ +94f3d52a487526e6c682b183fa0b1d43 pm-utils-02-loggin-append.patch +1742a556089c36c3a89eb1b957da5a60 pm-utils-1.4.1.tar.gz +f6b803c7237b2447a8b6f4d9664afd4a pm-utils-11-netcfg +fa36c14ea36dea717a788378ede9121d pm-utils-13-49bluetooth-sync.patch +597f2636405219a83982ca34b8145415 pm-utils-14-disable-sata-alpm.patch diff --git a/extra/pm-utils/Pkgfile b/extra/pm-utils/Pkgfile new file mode 100644 index 000000000..0da983420 --- /dev/null +++ b/extra/pm-utils/Pkgfile @@ -0,0 +1,34 @@ +# Description: Utilitaires et scripts pour la gestion de l'hibernation +# URL: http://pm-utils.freedesktop.org +# Maintainer: NuTyX core team +# Packager: lesibel at free dot fr +# Depends on: pm-quirks +# Run on: pm-quirks + +name=pm-utils +version=1.4.1 +release=1 +source=(http://pm-utils.freedesktop.org/releases/$name-$version.tar.gz + pm-utils-02-loggin-append.patch + pm-utils-11-netcfg + pm-utils-13-49bluetooth-sync.patch + pm-utils-14-disable-sata-alpm.patch ) + +build() { + cd $SRC/$name-$version + + patch -Np1 -i ../pm-utils-02-loggin-append.patch + patch -Np1 -i ../pm-utils-13-49bluetooth-sync.patch + patch -Np1 -i ../pm-utils-14-disable-sata-alpm.patch + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var + make + make DESTDIR=$PKG install + + install -m755 $SRC/pm-utils-11-netcfg $PKG/usr/lib/pm-utils/sleep.d/11netcfg + rm -f $PKG/usr/lib/pm-utils/sleep.d/55NetworkManager + rm -f $PKG/usr/lib/pm-utils/power.d/{harddrive,disable_wol} +} + diff --git a/extra/pm-utils/pm-utils-02-loggin-append.patch b/extra/pm-utils/pm-utils-02-loggin-append.patch new file mode 100644 index 000000000..879c0ffdf --- /dev/null +++ b/extra/pm-utils/pm-utils-02-loggin-append.patch @@ -0,0 +1,20 @@ +Author: James Westby <james.westby@ubuntu.com> +Description: Do not clear the log file on each operation, but instead append to it. + This makes debugging of several suspends much easier. +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25255 +Bug-Ubuntu: https://launchpad.net/bugs/410352 + +Index: pm-utils/pm/pm-functions.in +=================================================================== +--- pm-utils.orig/pm/pm-functions.in 2010-07-05 18:41:21.118322244 +0200 ++++ pm-utils/pm/pm-functions.in 2010-07-05 18:41:24.126325221 +0200 +@@ -271,7 +271,7 @@ + return 1 + fi + export LOGGING=true +- exec > "$1" 2>&1 ++ exec >> "$1" 2>&1 + } + + check_suspend() { [ -n "$SUSPEND_MODULE" ]; } + diff --git a/extra/pm-utils/pm-utils-11-netcfg b/extra/pm-utils/pm-utils-11-netcfg new file mode 100644 index 000000000..86ff8bafd --- /dev/null +++ b/extra/pm-utils/pm-utils-11-netcfg @@ -0,0 +1,27 @@ +#!/bin/bash + +. /usr/lib/pm-utils/functions + +suspend_netcfg() { + netcfg2 all-suspend +} + +resume_netcfg() { + netcfg2 all-resume +} + +if [ -x /usr/bin/netcfg2 ]; then + case "$1" in + hibernate|suspend) + suspend_netcfg + ;; + thaw|resume) + resume_netcfg + ;; + *) + ;; + esac +fi + +exit $? + diff --git a/extra/pm-utils/pm-utils-12-fix-intel-audio-powersave-hook.patch b/extra/pm-utils/pm-utils-12-fix-intel-audio-powersave-hook.patch new file mode 100644 index 000000000..41e5b0917 --- /dev/null +++ b/extra/pm-utils/pm-utils-12-fix-intel-audio-powersave-hook.patch @@ -0,0 +1,16 @@ +diff --git a/pm/power.d/intel-audio-powersave b/pm/power.d/intel-audio-powersave +index 36675a8..da63e40 100644 +--- a/pm/power.d/intel-audio-powersave ++++ b/pm/power.d/intel-audio-powersave +@@ -20,9 +20,9 @@ EOF + + audio_powersave() { + [ "$INTEL_AUDIO_POWERSAVE" = "true" ] || exit $NA +- for dev in /sys/module/snd_*/parameters/power_save; do ++ for dev in /sys/module/snd_*; do + [ -w "$dev/parameters/power_save" ] || continue +- printf "Setting power savings for $s to %d..." "$dev##*/" "$1" ++ printf "Setting power savings for %s to %d..." "${dev##*/}" "$1" + echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed. + done + } diff --git a/extra/pm-utils/pm-utils-13-49bluetooth-sync.patch b/extra/pm-utils/pm-utils-13-49bluetooth-sync.patch new file mode 100644 index 000000000..0083ca942 --- /dev/null +++ b/extra/pm-utils/pm-utils-13-49bluetooth-sync.patch @@ -0,0 +1,44 @@ +From 640b53438c20818b3e344343b58b1f1765606a85 Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martin.pitt@ubuntu.com> +Date: Mon, 31 Jan 2011 15:30:01 +0100 +Subject: [PATCH] 49bluetooth: Wait for btusb module to get unused + +The 49bluetooth hook disables /proc/acpi/ibm/bluetooth but this isn't +synchronous, i. e. it doesn't wait until the module usage count actually drops +to 0. Due to that, it's impossible to add btusb to SUSPEND_MODULES (on some +models/older kernels you need to do that to fix suspend problems), as at that +point the module is still in use. + +On my system (ThinkPad X201) the module takes between 0.3 and 0.5 seconds to +unload, so use 100 ms wait steps with a timeout of 2 seconds. + +Bug: https://bugs.freedesktop.org//show_bug.cgi?id=33759 +Bug-Ubuntu: https://launchpad.net/bugs/698331 +--- + pm/sleep.d/49bluetooth | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/pm/sleep.d/49bluetooth b/pm/sleep.d/49bluetooth +index d46ba49..0dc1909 100755 +--- a/pm/sleep.d/49bluetooth ++++ b/pm/sleep.d/49bluetooth +@@ -12,6 +12,15 @@ suspend_bluetooth() + if grep -q enabled /proc/acpi/ibm/bluetooth; then + savestate ibm_bluetooth enable + echo disable > /proc/acpi/ibm/bluetooth ++ ++ # wait for up to 2 seconds for the module to actually get ++ # unused ++ TIMEOUT=20 ++ while [ $TIMEOUT -ge 0 ]; do ++ [ `cat /sys/module/btusb/refcnt` = 0 ] && break ++ TIMEOUT=$((TIMEOUT-1)) ++ sleep 0.1 ++ done + else + savestate ibm_bluetooth disable + fi +-- +1.7.2.3 + + diff --git a/extra/pm-utils/pm-utils-14-disable-sata-alpm.patch b/extra/pm-utils/pm-utils-14-disable-sata-alpm.patch new file mode 100644 index 000000000..020484809 --- /dev/null +++ b/extra/pm-utils/pm-utils-14-disable-sata-alpm.patch @@ -0,0 +1,27 @@ +Description: Disable SATA link power management by default, as it still causes disk errors and corruptions on many hardware. +Author: Martin Pitt <martin.pitt@ubuntu.com> +Bug-Ubuntu: https://launchpad.net/bugs/539467 + +Index: pm-utils/pm/power.d/sata_alpm +=================================================================== +--- pm-utils.orig/pm/power.d/sata_alpm 2011-02-01 15:53:09.164867778 +0100 ++++ pm-utils/pm/power.d/sata_alpm 2011-02-01 15:53:28.954867786 +0100 +@@ -2,7 +2,7 @@ + + . "${PM_FUNCTIONS}" + +-SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-true} ++SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-false} + + help() { + cat <<EOF +@@ -16,7 +16,7 @@ + + This hook has 1 parameter: + SATA_ALPM_ENABLE = whether to use SATA ALPM on battery. +-Defaults to "true". ++Defaults to "false". + + EOF + } + |