On Tue, May 12, 2020 at 12:34:00PM +0100, Patrick O'Callaghan
wrote:
> Where is the magic setting to stop this happening? Is it specific to
> each program or something more general? I'm using KDE on F32, if it
> matters, and I'm getting this whenever I log out, either with Ctrl-Alt-
> Del or with the menu option. It has started happening with qbittorrent
> specifically, but I recently reset its configuration to fix a problem
> so that might be the root cause. I have to explicitly exit the program
> first.
systemd has the ability to register and track processes that want to
inhibit system shutdown and sleep. See the developer documentation
here for more details on how it works:
https://www.freedesktop.org/wiki/Software/systemd/inhibit/
Looking at the source of qbittorrent, it registers an inhibition for
sleep/shutdown. Run 'systemd-inhibit --list' to see when its running.
Now, most services that use this service also gracefully shut down
when they inhibit shutdown/sleep, so it sounds like that isn't working
or it's just taking a long time. It also looks like you can change
the setting to inhibit in qbittorrent.