Your message dated Wed, 25 Apr 2007 19:17:04 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#413811: fixed in kpowersave 0.7.2-2
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: kpowersave
Version: 0.7.2-1
Severity: normal

kpowersave has code to show a notification popup if suspend-to-ram
fails. This code is quite broken.

Suspend-to-RAM did not work on my system. When I tried to suspend, it
locked the screen (as configured) but never actually suspended. This
was not caused by kpowersave, however it should notify when something
goes wrong.

kpowersave.cpp contains this code to check for successful suspend:

                        bool ret = hwinfo->suspend(SUSPEND2RAM);

                        if (ret) {
                                return true;
                        } else {
                                
KPassivePopup::message(i18n("WARNING"),i18n("Suspend to RAM failed"),
                                        SmallIcon("messagebox_warning", 20), 
this, i18n("Warning"), 15000);
                                return false;
                        }

However the actual result is not returned by hwinfo->suspend(), but
through a callback from HAL. Re-compiling with debug messages enabled,
I can see the different status codes returned from HAL:

Suspend working:

 10:27:07:366:  dbusHAL::callBackSuspend
 10:27:07:366:  HardwareInfo::handleResumeSignal (int result: '0')

Suspend not working:

 10:38:03:161:  dbusHAL::callBackSuspend
 10:38:03:161:  HardwareInfo::handleResumeSignal (int result: '127')
 
This callback causes the resumed() signal to be emitted, and triggers
kpowersave::handleResumeSignal(). There is a wrong assumption here,
since it will be emitted even if the suspend failed.

And that function contains the following gem:

        // handle result of the resume/suspend
        // TODO: fill with some code
        if (result == 0) {
                // successful resumed ... remount only in this case
                if (!handleMounts(false)) {
                        KPassivePopup::message(i18n("WARNING"), i18n("Could not 
remount (all) external storage"
                                               " media."), 
SmallIcon("messagebox_warning", 20), this, 
                                               i18n("Warning"), 15000);
                }
        } else if ( result == -1 ) {
                myDebug ("Unknown if we successful resumed, look like a 
timeout");
                setAutoSuspend(true);
        } else {
                // errro case
        }

Notice the unhandled last error case!

So, to fix this properly one would check the result code above and
determine that the suspend failed, and then trigger the pop-up
warning.

Incidentally, the reason for suspend not working is that I use
uswsusp, and my laptop is not yet in the s2ram whitelist, so the
"s2ram" command fails unless given the --force option. This makes the
HAL script return an error code, which kpowersave fails to pick up.

This patch for HAL makes suspend work on non-listed
laptops, but it is only a quick-fix if you don't want to wait for a
new uswsusp release. (Please add your laptop model to the whitelist as
per /usr/share/doc/uswsusp/README.s2ram-whitelist.gz if you have this
problem.)

--- /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux   2007-03-07 
10:02:48.375989744 +0100
+++ ./hal-system-power-suspend-linux    2007-03-07 10:02:38.006060821 +0100
@@ -91,7 +91,7 @@
            /usr/sbin/hibernate -F/etc/hibernate/ram.conf
            RET=$?
        elif [ -x "/usr/sbin/s2ram" ] ; then
-           /usr/sbin/s2ram -f -a3
+           /usr/sbin/s2ram
           RET=$?
        elif [ -x "/etc/acpi/sleep.sh" ] ; then
            # Use acpi-support for suspend to ram

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20-melech
Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)

Versions of packages kpowersave depends on:
ii  hal                  0.5.8.1-6.1         Hardware Abstraction Layer
ii  kdelibs4c2a          4:3.5.6.r1.dfsg.1-2 core libraries and binaries for al
ii  libc6                2.3.6.ds1-13        GNU C Library: Shared libraries
ii  libdbus-1-3          1.0.2-1             simple interprocess messaging syst
ii  libdbus-qt-1-1c2     0.62.git.20060814-2 simple interprocess messaging syst
ii  libgcc1              1:4.1.1-21          GCC support library
ii  libhal1              0.5.8.1-6.1         Hardware Abstraction Layer - share
ii  libstdc++6           4.1.1-21            The GNU Standard C++ Library v3
ii  libxext6             1:1.0.1-2           X11 miscellaneous extension librar
ii  libxss1              1:1.1.0-1           X11 Screen Saver extension library
ii  libxtst6             1:1.0.1-5           X11 Testing -- Resource extension 

Versions of packages kpowersave recommends:
ii  acpi-support                  0.90-4     scripts for handling many ACPI eve

-- no debconf information




--- End Message ---
--- Begin Message ---
Source: kpowersave
Source-Version: 0.7.2-2

We believe that the bug you reported is fixed in the latest version of
kpowersave, which is due to be installed in the Debian FTP archive:

kpowersave_0.7.2-2.diff.gz
  to pool/main/k/kpowersave/kpowersave_0.7.2-2.diff.gz
kpowersave_0.7.2-2.dsc
  to pool/main/k/kpowersave/kpowersave_0.7.2-2.dsc
kpowersave_0.7.2-2_i386.deb
  to pool/main/k/kpowersave/kpowersave_0.7.2-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Biebl <[EMAIL PROTECTED]> (supplier of updated kpowersave package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 25 Apr 2007 20:40:41 +0200
Source: kpowersave
Binary: kpowersave
Architecture: source i386
Version: 0.7.2-2
Distribution: unstable
Urgency: low
Maintainer: Michael Biebl <[EMAIL PROTECTED]>
Changed-By: Michael Biebl <[EMAIL PROTECTED]>
Description: 
 kpowersave - HAL based power management applet for KDE
Closes: 413638 413811
Changes: 
 kpowersave (0.7.2-2) unstable; urgency=low
 .
   * Upload to unstable.
   * debian/patches/05-restore_window.patch
     - Pull from svn. Properly restore minimized configuration dialog.
       Closes: #413638
   * debian/patches/06-handle_failed_suspend.patch
     - Pull from svn. Check the return code of the Suspend() method and display
       a message box if it failed. Closes: #413811
Files: 
 10ef85e4224e8b9f620afd4064b01445 725 kde optional kpowersave_0.7.2-2.dsc
 c19604dccda22863754564b28ac24187 13591 kde optional kpowersave_0.7.2-2.diff.gz
 84af7754c5a43d466b92b5661525aede 3341376 kde optional 
kpowersave_0.7.2-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGL6aUh7PER70FhVQRAoQBAJ9g214SCM4EeRFRHhkouVPSREj8MQCeOG5m
HAyNSc7tb1yrHcM6jh+BbLs=
=seMF
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to