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

Tomeu Vizoso tomeu at tomeuvizoso.net
Wed Sep 29 02:31:28 EDT 2010


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

> Regards
>
> Gonzalo
>
>
> On Thu, Sep 16, 2010 at 8:23 PM, James Cameron <quozl at laptop.org> wrote:
>>
>> On Thu, Sep 16, 2010 at 05:38:29PM -0400, Martin Langhoff wrote:
>> > 2 - hack the Tubes/Telepathy stack to _prevent sleep_ while an actual
>> > collaboration session is running
>>
>> This might help.  Once an activity is shared, the laptop stays awake
>> until the activity is stopped.
>>
>> (sugar-toolkit.git)
>> --- a/src/sugar/activity/activity.py
>> +++ b/src/sugar/activity/activity.py
>> @@ -916,6 +916,14 @@ class Activity(Window, gtk.Container):
>>         self._share_id = self._pservice.connect("activity-shared",
>>                                                 self.__share_cb)
>>         self._pservice.share_activity(self, private=private)
>> +        # inhibit suspend during sharing
>> +        path = '/var/run/powerd-inhibit-suspend/%s' % os.getpid()
>> +        try:
>> +            fd = open(path, 'w')
>> +        except IOError:
>> +            pass
>> +        else:
>> +            fd.close()
>>
>>     def _show_keep_failed_dialog(self):
>>         alert = Alert()
>>
>> --
>> James Cameron
>> http://quozl.linux.org.au/
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.laptop.org
>> http://lists.laptop.org/listinfo/devel
>
>



More information about the Devel mailing list