Connect to gnome-screensaver when needed instead of at startup

Bug #912186 reported by Martin Pitt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNOME Settings Daemon
Fix Released
Low
The Ubuntu Boot Speed Project
Fix Released
Medium
Martin Pitt
gnome-settings-daemon (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

In current trunk and 3.2.x, the libpower plugin connects to gnome-screensaver's D-BUS interface right at startup, and then saves the GDBusProxy.

This causes gnome-screensaver to be dbus-activated very early during session startup, which unnecessarily slows down boot speed. Usually g-s gets started much later through an autostart .desktop file, which can be further delayed with e. g. X-GNOME-Autostart-Delay=20 to keep it out of the critical path during boot.

Also, the proxy object will be invalid if gnome-screensaver gets killed or restarted in between g-s-d startup and the time when the power plugin actually calls it in upower_notify_sleep_cb().

To fix both, it would be better to create the GDBusProxy object in upower_notify_sleep_cb() instead of gsd_power_manager_start().

If gnome-screensaver fails to start, it will just fail as well at the beginning, so in both cases the screen lock will just fail on sleep. In the normal case, g-s is already running through the autostart desktop file, so there is no additional delay for entering sleep mode.

Martin Pitt (pitti)
Changed in gnome-settings-daemon (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
Changed in ubuntu-boot-speed:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
Changed in gnome-settings-daemon:
importance: Unknown → Low
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-settings-daemon - 3.2.2-0ubuntu7

---------------
gnome-settings-daemon (3.2.2-0ubuntu7) precise; urgency=low

  * Add 54_lazily_connect_to_screensaver.patch: Do not D-BUS activate
    gnome-screensaver right at startup, this unnecessarily slows down boot
    speed. Instead, D-BUS activate it the first time we actually need it.
    (LP: #912186)
 -- Martin Pitt <email address hidden> Thu, 05 Jan 2012 12:42:24 +0100

Changed in gnome-settings-daemon (Ubuntu):
status: In Progress → Fix Released
Martin Pitt (pitti)
Changed in ubuntu-boot-speed:
status: In Progress → Fix Released
Changed in gnome-settings-daemon:
status: New → Confirmed
Changed in gnome-settings-daemon:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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