#10363 NORM 10.1.3: Auto-Suspend gets in the way when sharing over Salut

Simon Schampijer simon at schampijer.de
Tue Oct 12 11:27:27 EDT 2010


On 09/29/2010 08:31 AM, Tomeu Vizoso wrote:
> On Tue, Sep 28, 2010 at 21:43, Gonzalo Odiard<gonzalo at laptop.org>  wrote:
>> We have this code in many places, I found it in the Distance activity and
>> bitfrost updater.
>> May be is a good idea inhibit suspend when is displayed the neighborhood
>> view also.
>> Can we have a unique class like PowerManager or anything like that?
>
> Good with me if that's the way to go from the POV of the systems
> people, would be great if it could be implemented in Sugar in terms of
> org.freedesktop.UPower, so we don't need to maintain two or more
> backends.
>
> Regards,
>
> Tomeu

So the GNOME hook for inhibiting suspend seems to be in gnome-session 
[1][2]. For 0.92 we can look into possibilities on using that. As we 
already include parts of the gnome session manager code to handle 
shutdown etc we might be able to switch to the gnome session manager 
completely.

For 0.84 we can do what powerd offers, creating a file based on the pid 
in /var/run/powerd-inhibit-suspend/ (those are removed by powerd when it 
goes into suspend the next time). I modified James's example to handle 
the share and join case (in the base activity class). Quite good results 
here in terms of usability.

I guess one wants to inhibit as well when one invite someone to an 
activity. Not sure we need to inhibit suspend when we display the 
neighborhood view. The presence (buddies and activities) should be 
synced when we come out of suspend (Upower+Aavahi [3]). Not sure we need 
as well to inhibit here then.

Regards,
    Simon

[1] 
http://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.Inhibit
[2] 
http://live.gnome.org/GnomePowerManager/FAQ#How_do_I_make_my_application_stop_the_computer_auto-suspending.3F
[3] http://lists.freedesktop.org/archives/avahi/2010-October/001939.html



More information about the Devel mailing list