Logout dialog signals gdm to perform p-m actions

Bug #43872 reported by Matthew Garrett
14
Affects Status Importance Assigned to Milestone
gnome-session (Ubuntu)
Fix Released
Critical
Manu Cornet

Bug Description

Binary package hint: gnome-session

The logout dialog makes no effort to check gnome-power-manager in order to determine what states are available, and then triggers state transitions via gdm. As a result, user preferences such as screen locking are not taken into account.

Revision history for this message
Matthew Garrett (mjg59) wrote :

The current situation introduces gross inconsistencies into the interface. The fix is fairly straightforward - dbus calls should be made rather than talking to gdm.

Revision history for this message
Manu Cornet (lmanul) wrote :

The code is indeed asking GDM whether sleep, hibernate, etc., is enabled, and this has been imported from the upstream logout dialog. Marking as confirmed.

Changed in gnome-session:
status: Unconfirmed → Confirmed
Revision history for this message
Manu Cornet (lmanul) wrote :

If you give me a few hints about which functions should be used (I'm not familiar with dbus), I can make a patch. Or maybe I should leave this for somebody already knowing well how dbus works ?

Revision history for this message
Matthew Garrett (mjg59) wrote :

You need to call the following methods, all of which are under the org.gnome.PowerManager namespace:

CanSuspend
CanHibernate

to determine whether the system can suspend or hibernate, and

Suspend
Hibernate

to actually perform the actions. Daniel has more experience of dbus implementation stuff than me, so may be able to offer more advice.

Manu Cornet (lmanul)
Changed in gnome-session:
assignee: nobody → lmanul
status: Confirmed → In Progress
Revision history for this message
Manu Cornet (lmanul) wrote :

Marking as fix commited, the patch should be uploaded some time tomorrow.

Changed in gnome-session:
status: In Progress → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the work on that Manu, fixed with that upload:

 gnome-session (2.14.1-0ubuntu6) dapper; urgency=low
 .
   * debian/control.in:
     - Build-Depends on libdbus-1-dev, libdbus-glib-1-dev
   * debian/patches/16_use_gpm.patch:
     - code changes by Manu Cornet <email address hidden>
     - make gnome-session build with dbus and dbus-glib too
     - use gnome-power-manager for hibernate, shutdown and suspend
       (Ubuntu: #43872)
   * debian/patches/17_autoconf.patch:
     - configure update to apply the changes to build with dbus and dbus-glib

Changed in gnome-session:
status: Fix Committed → Fix Released
Revision history for this message
Pavel Rojtberg (rojtberg) wrote :

then gnome-session should also depend on g-p-m, since right now it only kills the x-server when g-p-m is not present...

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you open a different bug about that?

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.