Pause CPU-heavy apps that lose focus

Hello fellow Adventurers,

For many years I have been unhappy with browser that uses 15-99% of a CPU core while doing no useful function.

I made my own script to pause browser with SIGSTOP when it loses window focus, but the solution was not elegant.

Now developer ‘uvos’ has taken the idea and made a solid application to pause processes (specified by user) when they lose window focus.

You can get .debs and source here
https://maedevu.maemo.org/extras/pool/main/s/sigstoped/

Compile or install the .deb matching your host architecture. Then invoke sigstoped. It reads a textfile in ~/.config/sigstoped/blacklist. It will pause processes matching the names listed in blacklist.

It is new, but I have reviewed the code and it looks fine. And it works for me. Finally happy cool computer.

Thanks to Uvos!

[Edit] Process continues for 10 seconds, set in argpopt.h:26: int timeoutSecs = 10;

This allows opening a new webpage, switching to terminal or other app while you wait for it to load. If you need more than 10 seconds, increase timeoutSecs.

7 Likes