gnome-power-manager does not report suspend or hibernate failures when inhibited at the pm-utils level

Bug #374919 reported by Andy Whitcroft
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-power-manager (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Binary package hint: gnome-power-manager

When the pm-utils scripts pm-suspend/pm-hibernate trigger a low-level inhibit this triggers failures from hal back to gnome-power-manager which do not contain any error strings. This is not handled by gnome-power-manager and the errors are silently ignored (from the users point of view), leading to a log entry:

    Hibernate failed in a horrible way!

If we look at hal_gpower_pm_method_void() we can see that if the dbus call is successful, but the reply is a non-zero retval with no error string associated with it we will end up with:

    ret = 0
    retval != 0
    *error == NULL

This in turn results in us producing a warning to the log and nothing for the user. This result form seems to occur when the hal runs pm-suspend/pm-hibernate and those run but exit non-zero:

   hal_gpower_pm_method_void(...)
   {
   [...]
        time (&start);
        ret = dbus_g_proxy_call (proxy, method, error,
                                 G_TYPE_INVALID,
                                 G_TYPE_INT, &retval,
                                 G_TYPE_INVALID);
        /* we might have to ignore the error */
        if (error != NULL && hal_gpower_filter_error (error))
                return TRUE;
        if (retval != 0)
                g_warning ("%s failed in a horrible way!", method);
   [...]
        return ret;
   }

Losing this information seems incorrect.

ProblemType: Bug
ACAdapter: Present
Architecture: amd64
Battery: Present
CPUScaling: Present
DistroRelease: Ubuntu 9.04
LaptopPanel: Present
Package: gnome-power-manager 2.24.2-2ubuntu8
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-power-manager
Uname: Linux 2.6.28-13-generic x86_64

Revision history for this message
Andy Whitcroft (apw) wrote :
Revision history for this message
Andy Whitcroft (apw) wrote :

Losing this information sees wrong. If we simply convert this error message free return into a real error and return that the pre-existing failure detection will trigger and pop-up a failure dialog for the user.

Changed in gnome-power-manager (Ubuntu):
status: New → In Progress
Revision history for this message
Andy Whitcroft (apw) wrote :

Currently we do not really have a working userspace to confirm whether this bug still affects karmic. Attached is a proposed patch for this issue for Jaunty levels of gnome-power-manager, karmic has a somewhat later version which appears to suffer the same issue.

Revision history for this message
Scott Howard (showard314) wrote :

Looking at the attachments in this bug report, I noticed that an attachment was not flagged as a patch. A patch contains changes to an Ubuntu package that will resolve a bug and this attachment is one! Subsequently, I've checked the patch flag for it. In the future when submitting patches please use the patch checkbox as there are some Launchpad searches that use this feature. You can learn more about the patch workflow at https://wiki.ubuntu.com/Bugs/Patches.

Changed in gnome-power-manager (Ubuntu):
status: In Progress → Confirmed
Revision history for this message
Andy Whitcroft (apw) wrote :

@Scott -- my bad missed the ticky when submitting that one. Moving back to In Progress as I am working on it.

Changed in gnome-power-manager (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Andy Whitcroft (apw)
importance: Undecided → Medium
Andy Whitcroft (apw)
Changed in gnome-power-manager (Ubuntu):
assignee: Andy Whitcroft (apw) → nobody
status: In Progress → Triaged
Revision history for this message
Ken VanDine (ken-vandine) wrote :

This patch no longer applies, gnome-power-manager doesn't use hal at all anymore. Is this still an issue? I am marking this as incomplete, until we get confirmation the bug still exists.

Changed in gnome-power-manager (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gnome-power-manager (Ubuntu) because there has been no activity for 60 days.]

Changed in gnome-power-manager (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.