Bug#452367: hal: can no longer suspend
Martin Pitt wrote: Hi, Benoît Dejean [2007-11-22 10:42 +0100]: hal can no longer suspend my laptop. gnome-power-manager no longer shows the suspend option and $ sudo /usr/sbin/pm-suspend Error: kernel cannot suspend to ram. Just a quick note: This is an issue in pm-utils. On powerpc, /sys/power/state only contains 'disk', not 'mem'. On powerpc with a PMU the prefered way of querying sleep capability and causing suspend-to-ram is to use a sysctl (see attached script from Ubuntu's powermanagement-interface). Hi Martin, thanks for the idea with the embedded perl code. Does this script require a full perl installation or would perl-base (which is essentiell), be sufficient? Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#452367: hal: can no longer suspend
Hi all, FYI, this is the patch I applied to Ubuntu's pm-utils to get back suspend on powerpc. NB that it is not 100% correct, since the mere existance of /dev/pmu does not theoretically *guarantee* that the machine can suspend. For that we'd need to port the PMU_IOC_CAN_SLEEP ioctl [1]. But IMHO this is a much smaller evil than the current situation. Martin [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=pmi.pbb;att=1;bug=452367 -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) diff -u pm-utils-0.99.2/debian/patches/70-remove-pm-pmu.patch pm-utils-0.99.2/debian/patches/70-remove-pm-pmu.patch --- pm-utils-0.99.2/debian/patches/70-remove-pm-pmu.patch +++ pm-utils-0.99.2/debian/patches/70-remove-pm-pmu.patch @@ -1,11 +1,12 @@ pm/functions 2007-03-26 21:54:19.0 +0200 -+++ pm/functions 2007-03-26 21:56:34.0 +0200 -@@ -145,7 +145,7 @@ - if [ -x /usr/sbin/s2ram ]; then - /usr/sbin/s2ram $S2RAM_OPTS +diff -Nur -x '*.orig' -x '*~' pm-utils-0.99.2/pm/functions pm-utils-0.99.2.new/pm/functions +--- pm-utils-0.99.2/pm/functions 2008-03-27 14:49:58.0 +0100 pm-utils-0.99.2.new/pm/functions 2008-03-27 14:50:49.0 +0100 +@@ -154,7 +154,7 @@ + echo This machine is unkown, please try to find out how to suspend this machine. See s2ram(8). + fi else - pm-pmu --suspend || echo -n mem /sys/power/state -+ echo -n mem /sys/power/state ++ /usr/lib/hal/hal-system-power-pmu sleep || echo -n mem /sys/power/state fi } diff -u pm-utils-0.99.2/debian/changelog pm-utils-0.99.2/debian/changelog --- pm-utils-0.99.2/debian/changelog +++ pm-utils-0.99.2/debian/changelog @@ -1,3 +1,13 @@ +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) + + -- Martin Pitt [EMAIL PROTECTED] Thu, 27 Mar 2008 14:51:05 +0100 + pm-utils (0.99.2-3ubuntu5) hardy; urgency=low * Fix typo in 95-fix-config-file-parsing.patch which made loading only in patch2: unchanged: --- pm-utils-0.99.2.orig/debian/patches/97_fix_ppc_suspend_test.patch +++ pm-utils-0.99.2/debian/patches/97_fix_ppc_suspend_test.patch @@ -0,0 +1,16 @@ +# Description: on PPC (with PMU), /sys/power/state does not contain +# 'mem', suspend to ram needs an ioctl. Thus, do not claim that +# suspend is not supported. +# Ubuntu: https://launchpad.net/bugs/189851 +# Debian: http://bugs.debian.org/452367 +--- pm-utils-0.99.2/src/pm-is-supported2008-03-27 12:42:26.0 + pm-utils-0.99.2.new/src/pm-is-supported2008-03-27 12:42:45.0 + +@@ -29,7 +29,7 @@ + + case $ARG in + suspend) +- grep -q mem /sys/power/state || exit 1 ++ grep -q mem /sys/power/state || [ -c /dev/pmu ] || exit 1 + ;; + hibernate) + grep -q disk /sys/power/state || exit 1
Bug#452367: hal: can no longer suspend
Le mardi 18 décembre 2007 à 01:49 +0100, Michael Biebl a écrit : Michael Biebl schrieb: We will have to fix pm-is-supported to report true for --suspend if /dev/pmu (and s2ram) is found. Then it will work again in g-p-m. I've been working on the new pm-utils upstream release. I can't promise though that I have enough time before christmas to upload it. I will have time though during the holidays, so stay tuned. Unless Tim beats me to it, of course ;-) Well, this is free software, i know you do your best. Thanks. -- Benoît Dejean GNOME http://www.gnomefr.org/ LibGTop http://directory.fsf.org/libgtop.html signature.asc Description: Ceci est une partie de message numériquement signée
Bug#452367: hal: can no longer suspend
On Fri, 14 Dec 2007 15:29:36 + Benoît Dejean [EMAIL PROTECTED] wrote: Le dimanche 25 novembre 2007 à 22:27 +0100, Michael Biebl a écrit : Benoît Dejean schrieb: Le dimanche 25 novembre 2007 à 20:11 +0100, Tim Dijkstra a écrit : On Thu, 22 Nov 2007 21:44:49 +0100 Benoît Dejean [EMAIL PROTECTED] wrote: \echo -n mem /sys/power/state -bash: echo: write error: Invalid argument Than suspend to ram has never worked on your machine with pm-utils. It was not recommended with previous versions, so i haven't got it. So this needs a quirk/fix/workaround in pm-utils. All quirks are in the uswsusp package. If you install it you'll have a binary s2ram, that will use some iotcl to suspend the machine. pm-utils recommends it, so under normal circumstances you should have it. Since uswusp is not installable on PPC ... Well, initially pm-utils contained a small utility called pm-pmu, which just did that: poke /dev/pmu via ioctl, to put ppc machines to sleep. Tim decided to keep pm-utils a arch:all package and not ship this tool in pm-utils and instead rely on s2ram from uswsusp, to avoid duplicated functionality (and imho his reasons are sound). Tim, why is uswsusp not available on PPC (and only for i386/amd64)? Is it because of s2ram or s2disk? Should the uswsusp packge be split? Could we support more platforms this way? Any news ? s2ram is now installable on ppc and works. But hall doesn't yet? Can you see what output you get from: pm-is-supported --suspend echo yup! s2ram --test /dev/null echo yup! grts Tim signature.asc Description: PGP signature
Bug#452367: hal: can no longer suspend
Le lundi 17 décembre 2007 à 21:19 +0100, Tim Dijkstra a écrit : On Fri, 14 Dec 2007 15:29:36 + Benoît Dejean [EMAIL PROTECTED] wrote: Any news ? s2ram is now installable on ppc and works. But hall doesn't yet? Can you see what output you get from: pm-is-supported --suspend echo yup! [blank] s2ram --test /dev/null echo yup! yup So s2ram works fine, but i can't suspend from gnome-power-manager. -- Benoît Dejean GNOME http://www.gnomefr.org/ LibGTop http://directory.fsf.org/libgtop.html signature.asc Description: Ceci est une partie de message numériquement signée
Bug#452367: hal: can no longer suspend
Benoît Dejean schrieb: Le lundi 17 décembre 2007 à 21:19 +0100, Tim Dijkstra a écrit : On Fri, 14 Dec 2007 15:29:36 + Benoît Dejean [EMAIL PROTECTED] wrote: Any news ? s2ram is now installable on ppc and works. But hall doesn't yet? Can you see what output you get from: pm-is-supported --suspend echo yup! [blank] s2ram --test /dev/null echo yup! yup So s2ram works fine, but i can't suspend from gnome-power-manager. We will have to fix pm-is-supported to report true for --suspend if /dev/pmu (and s2ram) is found. Then it will work again in g-p-m. I've been working on the new pm-utils upstream release. I can't promise though that I have enough time before christmas to upload it. I will have time though during the holidays, so stay tuned. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#452367: hal: can no longer suspend
Michael Biebl schrieb: We will have to fix pm-is-supported to report true for --suspend if /dev/pmu (and s2ram) is found. Then it will work again in g-p-m. I've been working on the new pm-utils upstream release. I can't promise though that I have enough time before christmas to upload it. I will have time though during the holidays, so stay tuned. Unless Tim beats me to it, of course ;-) Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#452367: hal: can no longer suspend
Le dimanche 25 novembre 2007 à 22:27 +0100, Michael Biebl a écrit : Benoît Dejean schrieb: Le dimanche 25 novembre 2007 à 20:11 +0100, Tim Dijkstra a écrit : On Thu, 22 Nov 2007 21:44:49 +0100 Benoît Dejean [EMAIL PROTECTED] wrote: \echo -n mem /sys/power/state -bash: echo: write error: Invalid argument Than suspend to ram has never worked on your machine with pm-utils. It was not recommended with previous versions, so i haven't got it. So this needs a quirk/fix/workaround in pm-utils. All quirks are in the uswsusp package. If you install it you'll have a binary s2ram, that will use some iotcl to suspend the machine. pm-utils recommends it, so under normal circumstances you should have it. Since uswusp is not installable on PPC ... Well, initially pm-utils contained a small utility called pm-pmu, which just did that: poke /dev/pmu via ioctl, to put ppc machines to sleep. Tim decided to keep pm-utils a arch:all package and not ship this tool in pm-utils and instead rely on s2ram from uswsusp, to avoid duplicated functionality (and imho his reasons are sound). Tim, why is uswsusp not available on PPC (and only for i386/amd64)? Is it because of s2ram or s2disk? Should the uswsusp packge be split? Could we support more platforms this way? Any news ? s2ram is now installable on ppc and works. -- Benoît Dejean GNOME http://www.gnomefr.org/ LibGTop http://directory.fsf.org/libgtop.html signature.asc Description: Ceci est une partie de message numériquement signée
Bug#452367: hal: can no longer suspend
On Sun, 25 Nov 2007 22:27:38 +0100 Michael Biebl [EMAIL PROTECTED] wrote: Benoît Dejean schrieb: Le dimanche 25 novembre 2007 à 20:11 +0100, Tim Dijkstra a écrit : On Thu, 22 Nov 2007 21:44:49 +0100 Benoît Dejean [EMAIL PROTECTED] wrote: \echo -n mem /sys/power/state -bash: echo: write error: Invalid argument Than suspend to ram has never worked on your machine with pm-utils. It was not recommended with previous versions, so i haven't got it. So this needs a quirk/fix/workaround in pm-utils. All quirks are in the uswsusp package. If you install it you'll have a binary s2ram, that will use some iotcl to suspend the machine. pm-utils recommends it, so under normal circumstances you should have it. Since uswusp is not installable on PPC ... Well, initially pm-utils contained a small utility called pm-pmu, which just did that: poke /dev/pmu via ioctl, to put ppc machines to sleep. Tim decided to keep pm-utils a arch:all package and not ship this tool in pm-utils and instead rely on s2ram from uswsusp, to avoid duplicated functionality (and imho his reasons are sound). Tim, why is uswsusp not available on PPC (and only for i386/amd64)? Is it because of s2ram or s2disk? Should the uswsusp packge be split? Could we support more platforms this way? I added ppc support to uswsusp and also update the control file with an `Architecture: i386 amd64 powerpc' line. But apparently it doesn't get build. I now vaguely remember that there also is some override somewhere. Maybe I have to bug ftp-master for that? Any idea Michael? grts Tim signature.asc Description: PGP signature
Bug#452367: hal: can no longer suspend
Tim Dijkstra schrieb: On Sun, 25 Nov 2007 22:27:38 +0100 Michael Biebl [EMAIL PROTECTED] wrote: Benoît Dejean schrieb: Le dimanche 25 novembre 2007 à 20:11 +0100, Tim Dijkstra a écrit : On Thu, 22 Nov 2007 21:44:49 +0100 Benoît Dejean [EMAIL PROTECTED] wrote: \echo -n mem /sys/power/state -bash: echo: write error: Invalid argument Than suspend to ram has never worked on your machine with pm-utils. It was not recommended with previous versions, so i haven't got it. So this needs a quirk/fix/workaround in pm-utils. All quirks are in the uswsusp package. If you install it you'll have a binary s2ram, that will use some iotcl to suspend the machine. pm-utils recommends it, so under normal circumstances you should have it. Since uswusp is not installable on PPC ... Well, initially pm-utils contained a small utility called pm-pmu, which just did that: poke /dev/pmu via ioctl, to put ppc machines to sleep. Tim decided to keep pm-utils a arch:all package and not ship this tool in pm-utils and instead rely on s2ram from uswsusp, to avoid duplicated functionality (and imho his reasons are sound). Tim, why is uswsusp not available on PPC (and only for i386/amd64)? Is it because of s2ram or s2disk? Should the uswsusp packge be split? Could we support more platforms this way? I added ppc support to uswsusp and also update the control file with an `Architecture: i386 amd64 powerpc' line. But apparently it doesn't get build. I now vaguely remember that there also is some override somewhere. Maybe I have to bug ftp-master for that? Any idea Michael? CCed the powerpc buildd mailing list. Please schedule builds for uswsusp on powerpc and let us know if there are any problems with the new version 0.7-1 on powerpc. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#452367: hal: can no longer suspend
On Thu, 22 Nov 2007 21:44:49 +0100 Benoît Dejean [EMAIL PROTECTED] wrote: Le jeudi 22 novembre 2007 à 11:29 +0100, Martin Pitt a écrit : Hi, Benoît Dejean [2007-11-22 10:42 +0100]: hal can no longer suspend my laptop. gnome-power-manager no longer shows the suspend option and $ sudo /usr/sbin/pm-suspend Error: kernel cannot suspend to ram. Just a quick note: This is an issue in pm-utils. On powerpc, /sys/power/state only contains 'disk', not 'mem'. I don't you suspend to disk, on suspend to ram. On powerpc with a PMU the prefered way of querying sleep capability and causing suspend-to-ram is to use a sysctl (see attached script from Ubuntu's powermanagement-interface). I believe that echoing 'mem' to /sys/power/state works, too, though. Not really, this has never worked on my ibook \echo -n mem /sys/power/state -bash: echo: write error: Invalid argument Than suspend to ram has never worked on your machine with pm-utils. So this needs a quirk/fix/workaround in pm-utils. All quirks are in the uswsusp package. If you install it you'll have a binary s2ram, that will use some iotcl to suspend the machine. pm-utils recommends it, so under normal circumstances you should have it. grts Tim signature.asc Description: PGP signature
Bug#452367: hal: can no longer suspend
Le dimanche 25 novembre 2007 à 20:11 +0100, Tim Dijkstra a écrit : On Thu, 22 Nov 2007 21:44:49 +0100 Benoît Dejean [EMAIL PROTECTED] wrote: \echo -n mem /sys/power/state -bash: echo: write error: Invalid argument Than suspend to ram has never worked on your machine with pm-utils. It was not recommended with previous versions, so i haven't got it. So this needs a quirk/fix/workaround in pm-utils. All quirks are in the uswsusp package. If you install it you'll have a binary s2ram, that will use some iotcl to suspend the machine. pm-utils recommends it, so under normal circumstances you should have it. Since uswusp is not installable on PPC ... -- Benoît Dejean GNOME http://www.gnomefr.org/ LibGTop http://directory.fsf.org/libgtop.html signature.asc Description: Ceci est une partie de message numériquement signée
Bug#452367: hal: can no longer suspend
Benoît Dejean schrieb: Le dimanche 25 novembre 2007 à 20:11 +0100, Tim Dijkstra a écrit : On Thu, 22 Nov 2007 21:44:49 +0100 Benoît Dejean [EMAIL PROTECTED] wrote: \echo -n mem /sys/power/state -bash: echo: write error: Invalid argument Than suspend to ram has never worked on your machine with pm-utils. It was not recommended with previous versions, so i haven't got it. So this needs a quirk/fix/workaround in pm-utils. All quirks are in the uswsusp package. If you install it you'll have a binary s2ram, that will use some iotcl to suspend the machine. pm-utils recommends it, so under normal circumstances you should have it. Since uswusp is not installable on PPC ... Well, initially pm-utils contained a small utility called pm-pmu, which just did that: poke /dev/pmu via ioctl, to put ppc machines to sleep. Tim decided to keep pm-utils a arch:all package and not ship this tool in pm-utils and instead rely on s2ram from uswsusp, to avoid duplicated functionality (and imho his reasons are sound). Tim, why is uswsusp not available on PPC (and only for i386/amd64)? Is it because of s2ram or s2disk? Should the uswsusp packge be split? Could we support more platforms this way? Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#452367: hal: can no longer suspend
Package: hal Version: 0.5.10-2 Severity: grave Justification: renders package unusable hal can no longer suspend my laptop. gnome-power-manager no longer shows the suspend option and $ sudo /usr/sbin/pm-suspend Error: kernel cannot suspend to ram. Going back to 0.5.9.1-6 re-enables suspend. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: powerpc (ppc) Kernel: Linux 2.6.22.10-ibook Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages hal depends on: ii adduser 3.105 add and remove users and groups ii dbus 1.1.1-3 simple interprocess messaging syst ii hal-info 20070618-1 Hardware Abstraction Layer - fdi f ii libc62.6.1-6 GNU C Library: Shared libraries ii libdbus-1-3 1.1.1-3 simple interprocess messaging syst ii libdbus-glib-1-2 0.74-1 simple interprocess messaging syst ii libexpat11.95.8-4XML parsing C library - runtime li ii libglib2.0-0 2.14.2-1The GLib library of C routines ii libhal-storage1 0.5.10-2Hardware Abstraction Layer - share ii libhal1 0.5.10-2Hardware Abstraction Layer - share ii libusb-0.1-4 2:0.1.12-7 userspace USB programming library ii libvolume-id00.114-2 libvolume_id shared library ii lsb-base 3.1-24 Linux Standard Base 3.1 init scrip ii mount2.13-12 Tools for mounting and manipulatin ii pciutils 1:2.2.4-1.1 Linux PCI Utilities ii pm-utils 0.99.2-3utilities and scripts for power ma ii udev 0.114-2 /dev/ and hotplug management daemo ii usbutils 0.73-4 Linux USB utilities Versions of packages hal recommends: ii eject 2.1.5-6ejects CDs and operates CD-Changer -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#452367: hal: can no longer suspend
Hi, Benoît Dejean [2007-11-22 10:42 +0100]: hal can no longer suspend my laptop. gnome-power-manager no longer shows the suspend option and $ sudo /usr/sbin/pm-suspend Error: kernel cannot suspend to ram. Just a quick note: This is an issue in pm-utils. On powerpc, /sys/power/state only contains 'disk', not 'mem'. On powerpc with a PMU the prefered way of querying sleep capability and causing suspend-to-ram is to use a sysctl (see attached script from Ubuntu's powermanagement-interface). I believe that echoing 'mem' to /sys/power/state works, too, though. So this needs a quirk/fix/workaround in pm-utils. Martin -- Martin Pitthttp://www.piware.de Ubuntu Developer http://www.ubuntu.com Debian Developer http://www.debian.org #!/bin/bash # This is the PowerPC version of PMI. # (C) 2006 Martin Pitt [EMAIL PROTECTED] command=$1 event=$2 usage () { echo Usage: $0 query|action event 2 echo$0 capabilities 2 exit 254 } query () { [ ! -z $1 ] event=$1 case $event in suspend|sleep) 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 result=$? ;; hibernate) # no hibernation support at the moment result=1 ;; *) result=1 echo No such event found 2 ;; esac } call_scripts() { if [ -x /etc/apm/apmd_proxy ]; then /etc/apm/apmd_proxy $1 $2 else run-parts --arg=$1 --arg=$2 /etc/apm/event.d if [ -d /etc/apm/$1.d ]; then run-parts --arg=$1 --arg=$2 /etc/apm/$1.d fi fi } run () { case $1 in suspend|sleep) # call suspend scripts call_scripts suspend user # trigger sleep perl EOF sub PMU_IOC_SLEEP { 0x20004200; } open PMU, /dev/pmu or die open /dev/pmu: \$!; ioctl PMU, PMU_IOC_SLEEP, 0; EOF # call resume scripts call_scripts resume suspend ;; hibernate) echo 'Not implemented' 2 ;; *) echo No such event found 2 ;; esac } capabilities () { for i in hibernate suspend; do query $i [ $result -eq 0 ] caps=$caps $i done echo $caps } case $command in query) query $event exit $result ;; action) run $event ;; capabilities) capabilities ;; *) usage ;; esac exit 0 signature.asc Description: Digital signature
Bug#452367: hal: can no longer suspend
severity 452367 normal reassign 452367 pm-utils merge 452367 450601 thanks Benoît Dejean schrieb: Package: hal Version: 0.5.10-2 Severity: grave Justification: renders package unusable hal can no longer suspend my laptop. gnome-power-manager no longer shows the suspend option and $ sudo /usr/sbin/pm-suspend Error: kernel cannot suspend to ram. Going back to 0.5.9.1-6 re-enables suspend. Hi, this is an issue in pm-utils, because in hal_0.5.10 we decided to only support pm-utils as power management backend. Merging with the existing bug report #450601. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#452367: hal: can no longer suspend
Le jeudi 22 novembre 2007 à 11:29 +0100, Martin Pitt a écrit : Hi, Benoît Dejean [2007-11-22 10:42 +0100]: hal can no longer suspend my laptop. gnome-power-manager no longer shows the suspend option and $ sudo /usr/sbin/pm-suspend Error: kernel cannot suspend to ram. Just a quick note: This is an issue in pm-utils. On powerpc, /sys/power/state only contains 'disk', not 'mem'. I don't you suspend to disk, on suspend to ram. On powerpc with a PMU the prefered way of querying sleep capability and causing suspend-to-ram is to use a sysctl (see attached script from Ubuntu's powermanagement-interface). I believe that echoing 'mem' to /sys/power/state works, too, though. Not really, this has never worked on my ibook \echo -n mem /sys/power/state -bash: echo: write error: Invalid argument So this needs a quirk/fix/workaround in pm-utils. Martin -- Benoît Dejean GNOME http://www.gnomefr.org/ LibGTop http://directory.fsf.org/libgtop.html signature.asc Description: Ceci est une partie de message numériquement signée