summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorMichael Biebl <mbiebl@gmail.com>2008-03-16 23:58:19 +0100
committerMichael Biebl <mbiebl@gmail.com>2008-03-16 23:58:19 +0100
commit54eff27133ce0ed1f899b237d9946a3f31546a96 (patch)
tree8b95b8f232fd6868e04b881346cad60c8778c2e4 /pm
parent1234dd9926d0f5a816a5a0728d7289dd932d87e0 (diff)
parentfe612997f9809777864ce859ad5ad47a02fb6dcb (diff)
Merge branch 'pmu'
Diffstat (limited to 'pm')
-rwxr-xr-xpm/module.d/kernel9
-rwxr-xr-xpm/module.d/tuxonice9
-rwxr-xr-xpm/module.d/uswsusp3
3 files changed, 16 insertions, 5 deletions
diff --git a/pm/module.d/kernel b/pm/module.d/kernel
index dc6724e..9a6b5ad 100755
--- a/pm/module.d/kernel
+++ b/pm/module.d/kernel
@@ -2,12 +2,17 @@
check_suspend()
{
- grep -q mem /sys/power/state
+ [ -e /dev/pmu ] && return 0
+ grep -q mem /sys/power/state && return 0
}
do_suspend()
{
- pm-pmu --suspend || echo -n "mem" > /sys/power/state
+ if [ -e /dev/pmu ]; then
+ pm-pmu --suspend
+ else
+ echo -n "mem" > /sys/power/state
+ fi
}
check_hibernate()
diff --git a/pm/module.d/tuxonice b/pm/module.d/tuxonice
index 568faec..cc32f60 100755
--- a/pm/module.d/tuxonice
+++ b/pm/module.d/tuxonice
@@ -13,12 +13,17 @@ done
check_suspend()
{
- grep -q mem /sys/power/state
+ [ -e /dev/pmu ] && return 0
+ grep -q mem /sys/power/state && return 0
}
do_suspend()
{
- echo "mem" >/sys/power/state
+ if [ -e /dev/pmu ]; then
+ pm-pmu --suspend
+ else
+ echo -n "mem" > /sys/power/state
+ fi
}
check_hibernate()
diff --git a/pm/module.d/uswsusp b/pm/module.d/uswsusp
index 711761c..ca87a30 100755
--- a/pm/module.d/uswsusp
+++ b/pm/module.d/uswsusp
@@ -8,7 +8,8 @@ before_hooks()
check_suspend()
{
- grep -q mem /sys/power/state
+ [ -e /dev/pmu ] && return 0
+ grep -q mem /sys/power/state && return 0
}
do_suspend()