diff options
Diffstat (limited to 'source/ap/pm-utils')
-rw-r--r-- | source/ap/pm-utils/49bluetooth-generic | 15 | ||||
-rw-r--r-- | source/ap/pm-utils/README.SLACKWARE | 28 | ||||
-rw-r--r-- | source/ap/pm-utils/fix-wrong-path-in-intel-audio-powersave.patch | 32 | ||||
-rwxr-xr-x | source/ap/pm-utils/pm-utils.SlackBuild | 25 | ||||
-rw-r--r-- | source/ap/pm-utils/use_more_sane_harddrive_defaults.patch | 12 |
5 files changed, 102 insertions, 10 deletions
diff --git a/source/ap/pm-utils/49bluetooth-generic b/source/ap/pm-utils/49bluetooth-generic new file mode 100644 index 00000000..e62790e7 --- /dev/null +++ b/source/ap/pm-utils/49bluetooth-generic @@ -0,0 +1,15 @@ +#!/bin/sh + +. "${PM_FUNCTIONS}" + +case "$1" in + hibernate|suspend) + rfkill block bluetooth + ;; + thaw|resume) + rfkill unblock bluetooth + ;; + *) + ;; +esac + diff --git a/source/ap/pm-utils/README.SLACKWARE b/source/ap/pm-utils/README.SLACKWARE index 26ff48d8..7f91f228 100644 --- a/source/ap/pm-utils/README.SLACKWARE +++ b/source/ap/pm-utils/README.SLACKWARE @@ -1,5 +1,5 @@ README.SLACKWARE -20100319 - rworkman@slackware.com +20101229 - rworkman@slackware.com =============================================================================== PLEASE READ THIS ENTIRE FILE BEFORE REPORTING PROBLEMS OR ASKING FOR HELP! @@ -29,7 +29,7 @@ it works at all. Here's the short version of using suspend to disk: Stanza in /etc/lilo.conf should look something like this: - image = /boot/vmlinuz-generic-smp-2.6.33.1-smp + image = /boot/vmlinuz-generic-smp-2.6.35.10-smp initrd = /boot/initrd.gz append = "resume=/dev/sda2" root = /dev/sda1 @@ -37,13 +37,13 @@ Stanza in /etc/lilo.conf should look something like this: read-only /etc/mkinitrd.conf should look something like this: - MODULE_LIST="jfs" + MODULE_LIST="ext4" ROOTDEV="/dev/sda1" - ROOTFS="jfs" + ROOTFS="ext4" RESUMEDEV="/dev/sda2" mkinitrd command invocation would be this: - mkinitrd -c -k 2.6.33.1-smp -F + mkinitrd -c -k 2.6.35.10-smp -F All of the above assumes at least a cursory understanding of what those commands and parameters do. If it's not clear, don't attempt it on a @@ -93,6 +93,24 @@ you don't want the suspend operation to fail. Some other exit codes are also available; none of these will cause the suspend to fail: $NA (not applicable), $NX (hook not executable), and $DX (hook disabled) +============================================================================== + +The default powersave hooks are in /usr/lib(64)/pm-utils/power.d/ -- if you +need to override any parameters set in those, you can do so with same-named +files in /etc/pm/power.d/ (populated with only the parameters you wish to +change). As an example, if you wanted to change the hdparm setting for +your hard drive's power management setting: rather than copying the entire +contents of /usr/lib(64)/pm-utils/power.d/harddrive to /etc/pm/power.d/ and +editing the copy, you could place only these two lines: + + DRIVE_POWER_MGMT_BAT=128 # edit value as desired + DRIVE_POWER_MGMT_AC=128 # edit value as desired + +Also note that any files in the /etc/pm/ hierarchy must be executable (use +chmod +x) in order to be used by pm-utils; otherwise, they will be ignored. + +============================================================================== + One way to contribute to pm-utils indirectly is by writing and sending any needed hooks scripts to upstream projects; as an example, the hook that ships with wicd was contributed by me. Ideally, the pm-utils package should diff --git a/source/ap/pm-utils/fix-wrong-path-in-intel-audio-powersave.patch b/source/ap/pm-utils/fix-wrong-path-in-intel-audio-powersave.patch new file mode 100644 index 00000000..90039710 --- /dev/null +++ b/source/ap/pm-utils/fix-wrong-path-in-intel-audio-powersave.patch @@ -0,0 +1,32 @@ +From 67abbd2f5109a732ab967c94bef4d6d9b2a11541 Mon Sep 17 00:00:00 2001 +From: Florian Kriener <florian@kriener.org> +Date: Sat, 25 Sep 2010 11:27:30 +0200 +Subject: [PATCH] wrong path in intel-audio-powersave (and a small bug) + +Package: pm-utils +Version: 1.4.1-2 +Severity: normal +Tags: patch +--- + pm/power.d/intel-audio-powersave | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +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 + } +-- +1.7.3.4 + diff --git a/source/ap/pm-utils/pm-utils.SlackBuild b/source/ap/pm-utils/pm-utils.SlackBuild index 0b9eacd1..1ae12666 100755 --- a/source/ap/pm-utils/pm-utils.SlackBuild +++ b/source/ap/pm-utils/pm-utils.SlackBuild @@ -25,9 +25,9 @@ PKGNAM=pm-utils VERSION=$(echo ${PKGNAM}-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev) -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} -QUIRKS=20100316 # Version of the quirks database +QUIRKS=20100619 # Version of the quirks database NUMJOBS=${NUMJOBS:-" -j7 "} @@ -63,7 +63,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PKGNAM-$VERSION -tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1 +tar xvf $CWD/$PKGNAM-$VERSION.tar.gz || exit 1 cd $PKGNAM-$VERSION || exit 1 chown -R root:root . find . \ @@ -72,6 +72,9 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +zcat $CWD/use_more_sane_harddrive_defaults.patch.gz | patch -p1 || exit 1 +zcat $CWD/fix-wrong-path-in-intel-audio-powersave.patch.gz | patch -p1 || exit 1 + CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -86,10 +89,22 @@ make install DESTDIR=$PKG || exit 1 # Now let's add the video quirks PM_UTILS_LIBDIR="/usr/lib${LIBDIRSUFFIX}/pm-utils" -mkdir -p $PKG/$PM_UTILS_LIBDIR/video-quirks -tar xf $CWD/pm-quirks-$QUIRKS.tar.xz -C $PKG/$PM_UTILS_LIBDIR/video-quirks +mkdir -p $PKG/$PM_UTILS_LIBDIR +tar xf $CWD/pm-quirks-$QUIRKS.tar.gz -C $PKG/$PM_UTILS_LIBDIR chown -R root:root $PKG/$PM_UTILS_LIBDIR/video-quirks +# Probably this shouldn't be needed, but some bluetooth hardware isn't +# properly handled during the sleep/wake process +( cd $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/sleep.d + mv 49bluetooth 49bluetooth-ibm + cat $CWD/49bluetooth-generic > 49bluetooth-generic + chmod 0755 49bluetooth-generic +) + +# Remove the NetworkManager hook since we don't ship it; +# it should be included with NetworkManager +rm -f $PKG/usr/lib64/pm-utils/sleep.d/55NetworkManager + find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null diff --git a/source/ap/pm-utils/use_more_sane_harddrive_defaults.patch b/source/ap/pm-utils/use_more_sane_harddrive_defaults.patch new file mode 100644 index 00000000..3dcc8156 --- /dev/null +++ b/source/ap/pm-utils/use_more_sane_harddrive_defaults.patch @@ -0,0 +1,12 @@ +diff -Nur pm-utils-1.4.1.orig//pm/power.d/harddrive pm-utils-1.4.1/pm/power.d/harddrive +--- pm-utils-1.4.1.orig//pm/power.d/harddrive 2010-07-04 09:50:13.000000000 -0500 ++++ pm-utils-1.4.1/pm/power.d/harddrive 2010-12-27 14:23:12.729597017 -0600 +@@ -11,7 +11,7 @@ + # Default values on battery + DRIVE_SPINDOWN_VALUE_BAT="${DRIVE_SPINDOWN_VALUE_BAT:-6}" + DRIVE_WRITE_CACHE_BAT="${DRIVE_WRITE_CACHE_BAT:-0}" +-DRIVE_POWER_MGMT_BAT="${DRIVE_POWER_MGMT_BAT:-1}" ++DRIVE_POWER_MGMT_BAT="${DRIVE_POWER_MGMT_BAT:-128}" + DRIVE_ACOUSTIC_MGMT_BAT="${DRIVE_ACOUSTIC_MGMT_BAT:-254}" + + # Default devices to operate on |