Ever since I changed to Xubuntu 16.04 there is an annoying behavior when suspending my laptop: it seems like there's a delay so that the network manager can turn off. This causes long suspend and resume time. The new times are 10-15 seconds which are way longer than what I had before...
Anyway, it seems like systemd-inhibit may be responsible for this. The command systemd-inhibit lists the delay before sleep since NetworkManager needs to turn off networks. There's also another inhibitor which blocks completely xfce4 power management.
How can I get rid of the systemd inhibitors? It is possible to disable them somehow?
I had the same problem and the following fixed it for me:
edit the file
/etc/systemd/logind.conf
:There is a list of entries that define, among other things, delay times for
systemd
(andsystemd-inhibit
!)I uncommented (removed the leading
#
) from this line:and saved the file. That immediately remedied the delay. When I close the laptop lid, the system goes to suspend immediately.
Reference - freedesktop.org
First find run
locate org.freedesktop.login1.policy
to find where the file is located then open it in a text editor, for example.Find the block corresponding to
<action id="org.freedesktop.login1.inhibit-block-idle">
and make sure you haveThe problem was that before only root users could bypass the inhibitors. Now the system suspends like before in just a few seconds.