summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-04-21 15:03:19 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-04-21 15:03:19 +0000
commit3aadbd04d72b51d0bd75099b0a4c52a04cea8b23 (patch)
treef9ebe0c7bf6ae691cce170a12050f13e609fad65 /sys-power/pm-utils
parentQA: fix header line. (diff)
downloadhistorical-3aadbd04d72b51d0bd75099b0a4c52a04cea8b23.tar.gz
historical-3aadbd04d72b51d0bd75099b0a4c52a04cea8b23.tar.bz2
historical-3aadbd04d72b51d0bd75099b0a4c52a04cea8b23.zip
Backport some patches to fix issues with bluetooth/sata/... Per bug #336654.
Package-Manager: portage-2.2.0_alpha30/cvs/Linux x86_64
Diffstat (limited to 'sys-power/pm-utils')
-rw-r--r--sys-power/pm-utils/ChangeLog12
-rw-r--r--sys-power/pm-utils/Manifest18
-rw-r--r--sys-power/pm-utils/files/1.4.1-bluetooth-sync.patch43
-rw-r--r--sys-power/pm-utils/files/1.4.1-disable-sata-alpm.patch26
-rw-r--r--sys-power/pm-utils/files/1.4.1-fix-intel-audio-powersave-hook.patch40
-rw-r--r--sys-power/pm-utils/files/1.4.1-logging-append.patch19
-rw-r--r--sys-power/pm-utils/pm-utils-1.4.1-r2.ebuild (renamed from sys-power/pm-utils/pm-utils-1.4.1-r1.ebuild)32
7 files changed, 172 insertions, 18 deletions
diff --git a/sys-power/pm-utils/ChangeLog b/sys-power/pm-utils/ChangeLog
index 980b83d68a4f..66ffa08cc8ab 100644
--- a/sys-power/pm-utils/ChangeLog
+++ b/sys-power/pm-utils/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-power/pm-utils
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/ChangeLog,v 1.57 2010/12/12 16:50:12 armin76 Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/ChangeLog,v 1.58 2011/04/21 15:03:19 scarabeus Exp $
+
+*pm-utils-1.4.1-r2 (21 Apr 2011)
+
+ 21 Apr 2011; Tomáš Chvátal <scarabeus@gentoo.org>
+ +files/1.4.1-bluetooth-sync.patch, +files/1.4.1-disable-sata-alpm.patch,
+ +files/1.4.1-fix-intel-audio-powersave-hook.patch, -pm-utils-1.4.1-r1.ebuild,
+ +files/1.4.1-logging-append.patch, +pm-utils-1.4.1-r2.ebuild:
+ Backport some patches to fix issues with bluetooth/sata/... Per bug #336654.
12 Dec 2010; Raúl Porcel <armin76@gentoo.org> pm-utils-1.4.1.ebuild,
pm-utils-1.4.1-r1.ebuild:
diff --git a/sys-power/pm-utils/Manifest b/sys-power/pm-utils/Manifest
index 1cd21a883f83..40f32acb37ec 100644
--- a/sys-power/pm-utils/Manifest
+++ b/sys-power/pm-utils/Manifest
@@ -1,5 +1,19 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX 1.4.1-bluetooth-sync.patch 1504 RMD160 244c9ffefa49975f669bb7845dc908e2fe0190fd SHA1 95898d1184cc81bb561ce557247bcb5a98e86250 SHA256 2af763812d609f384c818635028791c875e3e56a1fa387e80b7f1ca5afc3c4e3
+AUX 1.4.1-disable-sata-alpm.patch 778 RMD160 5f162c05ed2be3f39fc20b76549ddc939c7ef4ea SHA1 c4cd214ae098f0573183017ae4a7324e383a9e02 SHA256 c995912f25fd1f0c30c90136c36ac49e2d3a5fdb94ef1710a7e0426dd10dad8a
+AUX 1.4.1-fix-intel-audio-powersave-hook.patch 1412 RMD160 09d3f8cc95e893b86728c393b1786dd354c444c6 SHA1 9222d73eef1979667d4ecbe4d68d7d6428533aa6 SHA256 16d5355d1c5cff6316fef11768673434394582c67039c79e8b86aafe2d2f7797
+AUX 1.4.1-logging-append.patch 683 RMD160 a8ed4297f3f2536313004dfd765357b245714937 SHA1 3f25b0cb916ee060922c076667f26e331820e924 SHA256 5622a42167a5f6b725ecbe473d8f0994c4b3ac32e5c6607ce1fab0888894f139
DIST pm-utils-1.4.1.tar.gz 208687 RMD160 04798d6d3aa3bbbfbca6dc48037916b425714108 SHA1 9aacb9b4a5f11f751d94f5257c6c54460f106197 SHA256 8ed899032866d88b2933a1d34cc75e8ae42dcde20e1cc21836baaae3d4370c0b
-EBUILD pm-utils-1.4.1-r1.ebuild 1619 RMD160 a2f1f0402826270b866d16f683da39654c1b888c SHA1 1bf091952e437a49948875e532c0845d6909deda SHA256 ac1d5ce5f16b71226e54c1722c459de75caea95a60925bb5144f93f1d6d41594
+EBUILD pm-utils-1.4.1-r2.ebuild 1692 RMD160 7e08397a732ab80bb4956979ad555feadb0c4686 SHA1 61a2b271a80a3fe540b00f3403c63564161677dd SHA256 bba79eda31721384c17e7872340dad3f9d93a4834e21441051a71dade50aa71e
EBUILD pm-utils-1.4.1.ebuild 1581 RMD160 4e3204b517e5efe0d7d61a3d658e6c2d18d951a0 SHA1 21a1c0b52d94082474e9633221a4007fcacce43a SHA256 d29333f16893b48c1ad3af0072c0f90e2afe6f2544137faa3509be776906ef18
-MISC ChangeLog 8750 RMD160 52b399b8893e54a26752a25493da82bf20db0014 SHA1 efe34dc1fd23579f017db7ed612307b6e2a231ec SHA256 c4f3bb824b46cb722acd4443d68261a23be775873622ef3a11cef007d0973332
+MISC ChangeLog 9140 RMD160 ed0f0b7b2a00851cad4d3981987ae247b3c001c0 SHA1 3fda53467f8aab3f6d4581efdcf372c5128055b4 SHA256 fc8c08d92156b7a23d703154bce6c3be3f91423d3110a914d3f63879fd385f6d
MISC metadata.xml 333 RMD160 28ff42d27d929095e83151b3a6bc06e9acdc1a10 SHA1 bd2334f7ff7c962f0d98678472e7feb673b942b6 SHA256 f06c34f767b411fcbc763a18bfd022d40fd4eb7fb38d3d14473a47064685bbda
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iEYEARECAAYFAk2wRxkACgkQHB6c3gNBRYd1twCglebEq7FFuSysW2CLL6ijsb9x
+03AAniZ/cHE4O7NKwSA8P8JKUWCdyHvR
+=hGOg
+-----END PGP SIGNATURE-----
diff --git a/sys-power/pm-utils/files/1.4.1-bluetooth-sync.patch b/sys-power/pm-utils/files/1.4.1-bluetooth-sync.patch
new file mode 100644
index 000000000000..b41f32cf9165
--- /dev/null
+++ b/sys-power/pm-utils/files/1.4.1-bluetooth-sync.patch
@@ -0,0 +1,43 @@
+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/sys-power/pm-utils/files/1.4.1-disable-sata-alpm.patch b/sys-power/pm-utils/files/1.4.1-disable-sata-alpm.patch
new file mode 100644
index 000000000000..7b5494932c95
--- /dev/null
+++ b/sys-power/pm-utils/files/1.4.1-disable-sata-alpm.patch
@@ -0,0 +1,26 @@
+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
+ }
diff --git a/sys-power/pm-utils/files/1.4.1-fix-intel-audio-powersave-hook.patch b/sys-power/pm-utils/files/1.4.1-fix-intel-audio-powersave-hook.patch
new file mode 100644
index 000000000000..2d884da1e7b6
--- /dev/null
+++ b/sys-power/pm-utils/files/1.4.1-fix-intel-audio-powersave-hook.patch
@@ -0,0 +1,40 @@
+From: Florian Kriener <florian@kriener.org>
+To: submit@bugs.debian.org
+Subject: [pm-utils] wrong path in intel-audio-powersave (and a small bug)
+Date: Sat, 25 Sep 2010 11:27:30 +0200
+
+In the script intel-audio-powersave is this loop
+
+for dev in /sys/module/snd_*/parameters/power_save; do
+ [ -w "$dev/parameters/power_save" ] || continue
+ printf "Setting power savings for $s to %d..." "$dev##*/" "$1"
+ echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
+done
+
+I think it should be
+
+for dev in /sys/module/snd_*; do
+ [ -w "$dev/parameters/power_save" ] || continue
+ printf "Setting power savings for %s to %d..." "${dev##*/}" "$1"
+ echo $1 > "$dev/parameters/power_save" && echo Done. || echo Failed.
+done
+
+
+This fixes the two bugs.
+
+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/sys-power/pm-utils/files/1.4.1-logging-append.patch b/sys-power/pm-utils/files/1.4.1-logging-append.patch
new file mode 100644
index 000000000000..987e0570a9c1
--- /dev/null
+++ b/sys-power/pm-utils/files/1.4.1-logging-append.patch
@@ -0,0 +1,19 @@
+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/sys-power/pm-utils/pm-utils-1.4.1-r1.ebuild b/sys-power/pm-utils/pm-utils-1.4.1-r2.ebuild
index 595b6ce5542c..4e2c9c747197 100644
--- a/sys-power/pm-utils/pm-utils-1.4.1-r1.ebuild
+++ b/sys-power/pm-utils/pm-utils-1.4.1-r2.ebuild
@@ -1,9 +1,10 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/pm-utils-1.4.1-r1.ebuild,v 1.3 2010/12/12 16:50:12 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/pm-utils-1.4.1-r2.ebuild,v 1.1 2011/04/21 15:03:19 scarabeus Exp $
-EAPI=2
-inherit multilib
+EAPI=4
+
+inherit eutils
DESCRIPTION="Suspend and hibernation utilities"
HOMEPAGE="http://pm-utils.freedesktop.org/"
@@ -15,10 +16,8 @@ KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="alsa debug ntp video_cards_intel video_cards_radeon"
vbetool="!video_cards_intel? ( sys-apps/vbetool )"
-DEPEND="!<app-laptop/laptop-mode-tools-1.55-r1
- !<sys-power/powermgmt-base-1.31
- !>=sys-power/powermgmt-base-1.31[-pm-utils]"
-RDEPEND="${DEPEND}
+RDEPEND="!<app-laptop/laptop-mode-tools-1.55-r1
+ !sys-power/powermgmt-base[-pm-utils(+)]
sys-apps/dbus
>=sys-apps/util-linux-2.13
sys-power/pm-quirks
@@ -27,6 +26,7 @@ RDEPEND="${DEPEND}
amd64? ( ${vbetool} )
x86? ( ${vbetool} )
video_cards_radeon? ( app-laptop/radeontool )"
+DEPEND="${RDEPEND}"
src_prepare() {
local ignore="01grub"
@@ -34,22 +34,26 @@ src_prepare() {
use debug && echo 'PM_DEBUG="true"' > "${T}"/gentoo
echo "HOOK_BLACKLIST=\"${ignore}\"" >> "${T}"/gentoo
+
+ epatch "${FILESDIR}"/${PV}-bluetooth-sync.patch \
+ "${FILESDIR}"/${PV}-disable-sata-alpm.patch \
+ "${FILESDIR}"/${PV}-fix-intel-audio-powersave-hook.patch \
+ "${FILESDIR}"/${PV}-logging-append.patch
+
}
src_configure() {
econf \
- --docdir=/usr/share/doc/${PF} \
- --disable-dependency-tracking \
--disable-doc
}
src_install() {
- emake DESTDIR="${D}" install || die
- dodoc AUTHORS ChangeLog NEWS pm/HOWTO* README* TODO || die
- doman man/*.{1,8} || die
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog NEWS pm/HOWTO* README* TODO
+ doman man/*.{1,8}
insinto /etc/pm/config.d
- doins "${T}"/gentoo || die
+ doins "${T}"/gentoo
# NetworkManager 0.8.2 is handling suspend/resume on it's own with UPower
find "${D}" -type f -name 55NetworkManager -exec rm -f '{}' +