Closed buzztiaan closed 3 years ago
Found what I meant: https://www.mail-archive.com/maemo-developers@maemo.org/msg27190.html
I've often thought that something like that would be nice to have, not necessarily in the title bar, but maybe a "pause" button on each app in the task manager.
It would be really nice if it supported not only SIGSTOP/SIGCONT, but also checkpoint/restore to suspend the process to disk in order to free up memory. This would be particularly useful on devices like the N900 which don't have very much physical memory.
I don't think it is a good idea to automatically stop/suspend an application - this is what android does more or less, so, please, lets not go that route. If an application is not optimized - well, either fix it or just stop (using) it.
I don't see why users can't use these launchers for programs they want to use. I agree that the maemo core should be PM friendly, but if a user wants to use Firefox and suspend it on device lock, why stop them?
If it is implemented as a kind of a blacklist (like list of applications or a parameter in the .desktop file) to be suspended when in background and not a permission "allow running in background", then it might be ok. However, I think hildon already have some support for "hibernating" an application, though I have no idea how and where
Agreed regarding blacklist / upon request, rather than default/heuristic based. I think what I posted above is as close as 'anything integrated' goes.
@freemangordon the suggestion wasnt really to make it automagical , but just extend the 'kill application' button in powermenu to have a 'stop/unstop application' button aswell
it could be through a service like @IMbackK suggests, but there's methods with even lower demands on system
@dderby this is not necessary the kernel already prioritizes swapping out processes in SIGSTOP.
@dderby this is not necessary the kernel already prioritizes swapping out processes in SIGSTOP.
@IMbackK, true, but checkpoint/restore would be more flexible. It wouldn't be limited by the available swap space and it would also persist between reboots.
I would prefer a user controlled solution, no automation, just a button on each app in the task manager to send a SIGSTOP or SIGCONT. I don't think we need a blacklist or daemon.
@dderby this is not necessary the kernel already prioritizes swapping out processes in SIGSTOP.
@IMbackK, true, but checkpoint/restore would be more flexible. It wouldn't be limited by the available swap space and it would also persist between reboots.
I would prefer a user controlled solution, no automation, just a button on each app in the task manager to send a SIGSTOP or SIGCONT. I don't think we need a blacklist or daemon.
I have to disagree - if the goal is to make some applications behave properly from the user point of view, then stopping them in device lock seems like the right approach to me. If the user locks the device, he/she probably doesn't really want to go over every application that they have previously deemed 'power hungry' and close them all.
In any case - I think this would go in -extras. As @freemangordon also said, if users want to user it to work around non-pm-friendly applications, let's do that. But our core will just be PM friendly.
Sigstoped is now in extras.
i gues this is solved(ish) by sigstoped. sigstoped dosent help with console applications only gui ones so maybe not fully.
Thank you IMbackK... I have wanted something like this to pause firefox (cpu hog) on other machines also.
To pause midori i add to sigstoped/blacklist midori WebKitNetworkProcess WebKitWebProcess
And midori obeys!
And it works on desktop too! Finally firefox browser stops chewing up my cycles displaying a static file!
THANK YOU IMbackK!
apt-get source sigstoped didn't work but i grabbed https://maedevu.maemo.org/extras/pool/main/s/sigstoped/sigstoped_1.0.6%2B2m7.tar.gz
sigstoped usage:
Maybe usage information could be made visible to user via postinst script or manpage?
@clort81 glad you liked it.
explicitly stating WebKitNetworkProcess and WebKitWebProcess is unneseccary and can cause issues, sigstoped automaticly traverses the process tree and recursively stops all child processes. I agree documentation is currently lacking, ill improve it when i find the time for it. I dont know how to make apt source work :\ There is also qsigstoped to configure sigstoped in a graphical way. on leste also add --ignore-client-machine to your sigstoped launch otherwise sigstoped cant stop qt processes due to a bug in qt on leste.
@MerlijnWajer lets close this?
On #maemo-leste it became consensus quickly that it would be a nice feature to expand hildon to be able to SIGSTOP/SIGCONT applications on demand. That way , you could stop firefox from slurping up cputime when you're actually working somewhere else.
tmlind suggested to just have a cgroup that all get sigstop on lcd blank :)