Add logind support (ConsoleKit and UPower suspend/resume are being deprecated)

Bug #1155021 reported by Martin Pitt
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
High
Martin Pitt
unity (Ubuntu)
Fix Released
High
Unassigned

Bug Description

As per https://blueprints.launchpad.net/ubuntu/+spec/foundations-1303-consolekit-logind-migration we finally want to move away from the deprecated ConsoleKit and use logind instead.

Unity calls ConsoleKit in ./UnityCore/GnomeSessionManager.cpp as a fallback if gnome-session's D-BUS API does not work, for Logout/Shutdown/Reboot. logind's D-BUS API is almost identical, except that it takes an "interactive" parameter, which for the purposes of Unity should be false:

  http://www.freedesktop.org/wiki/Software/systemd/logind

Unfortunately it seems that using gnome-session's D-BUS API does not work. When I use Unity/indicator-session with just logind but ConsoleKit purged, I merely get logged out and get back to lightdm. Can it be that it first tells the session to shutdown and then try to call CallGnomeSessionMethod("Shutdown", ...)? This would be prone to fail, and explain the observations.

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :

For the record, using gnome-session's D-BUS API does work in general. I can call it with gdbus and d-feet, and it always shuts down/reboots the machine properly. To add some Heisenbug fun, when I run dbus-monitor shutdown/reboot from the indicator works (I tried four times).

So this seems to be a race condition somewhere. When I install CK it works, so that fallback should be kept, and also support logind.

Revision history for this message
Martin Pitt (pitti) wrote :

As this is mostly monkey-patching, I'll have a go at this.

Changed in unity:
status: New → In Progress
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

While I am at it, UPower's suspend/resume is also being deprecated: http://lists.freedesktop.org/archives/devkit-devel/2013-January/001339.html

summary: - Add logind support (ConsoleKit is being deprecated)
+ Add logind support (ConsoleKit and UPower suspend/resume are being
+ deprecated)
Martin Pitt (pitti)
Changed in unity (Ubuntu):
status: New → In Progress
Changed in unity (Ubuntu):
importance: Undecided → High
Changed in unity:
importance: Undecided → High
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:unity at revision None, scheduled for release in unity, milestone backlog

Changed in unity:
status: In Progress → Fix Committed
Changed in unity (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 6.12.0daily13.03.25.1-0ubuntu1

---------------
unity (6.12.0daily13.03.25.1-0ubuntu1) raring; urgency=low

  [ Martin Pitt ]
  * Add logind support (ConsoleKit and UPower suspend/resume are being
    deprecated) (LP: #1155021)

  [ Chris Townsend ]
  * Urgent apps need higher glow intensity (LP: #1157866)
  * Launcher: Icon Backlight Mode "Edge Illumination Toggles" broken
    (regression) (LP: #1103742)

  [ Paolo Rotolo ]
  * Shutdown dialog should have correct punctuation (LP: #1157927)

  [ Andrea Azzarone ]
  * Launcher tooltips keeps hanging on Desktop (LP: #1158378)
  * Launcher tooltips don't disappear when dash is open (LP: #1158021)
  * Some tooltip AP tests fail (LP: #1158357)

  [ Didier Roche ]
  * Unity/Libunity unit tests broken by latest glib (LP: #1159677)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 3252
 -- Ubuntu daily release <email address hidden> Mon, 25 Mar 2013 13:10:17 +0000

Changed in unity (Ubuntu):
status: Fix Committed → Fix Released
Martin Pitt (pitti)
Changed in unity:
status: Fix Committed → Fix Released
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.