View Single Post
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#490
[SIGSLEEP for userspace apps]
Originally Posted by igor View Post
I would recommend you to follow the discussion on the linux-pm mailing list about this subject.

Android folks are coming up with similar arguments but so far have had little success.
I certainly don't think this should be done in the kernel, but I've been repondering a daemon which would receive DBUS notifications (locked screen etc.) and, after a configurable timeout, start SIGSLEEPing processes with a .desktop file. A particular key in the .desktop could disable the feature (e.g. for IM clients). Things in the foreground could be slept after the ones in the background (which might start sleeping even whilst the device is unlocked).

However, I then start thinking about how annoying it already is to start loading a complex site, lock the screen, walk downstairs and the load has been effectively frozen by that operation, until I unlock the device.

Certainly, this thread has shown that the utopia of an always-on, long-battery life device is out of the reach of some users (based on the AP they connect to or software they install) and far too hard to debug when the device is dead in the morning. A more forceful sleep for user-space apps may be a pragmatic solution to the problems.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 

The Following 2 Users Say Thank You to Jaffa For This Useful Post: