I did some tests today with the suspend-sync function.
I was able to verify that following the improvement made by smac89 (# 276) that inhibit lock is functional (I was able to reproduce the problem with the previous version and see the expiration of the InhibitDelayMaxSec timeout).
There is one more problem that remains:
A process gdbus monitor --system --dest org.freedesktop.login1 becomes orphan after each resume.
That's because killing the script psd-suspend-sync does not stop this process.
In addition, I found that killing the script psd-suspend-sync after each resume and restarting 2 gdbus processes by cycle (one process initialized with the coproc for suspend (when creating the inhibit lock) and one process for resume), is not optimal.
On the other hand, the release_inhibit_lock () function of the main script will try to kill the psd-suspend-sync script regardless of the user (because of the pgrep -cf "psd-suspend-sync" command) and will generate error messages. This situation is problematic in a multi-user environment.
I did some tests today with the suspend-sync function. I was able to verify that following the improvement made by smac89 (# 276) that inhibit lock is functional (I was able to reproduce the problem with the previous version and see the expiration of the
InhibitDelayMaxSec
timeout).There is one more problem that remains: A process
gdbus monitor --system --dest org.freedesktop.login1
becomes orphan after each resume. That's because killing the scriptpsd-suspend-sync
does not stop this process.In addition, I found that killing the script
psd-suspend-sync
after each resume and restarting 2gdbus
processes by cycle (one process initialized with thecoproc
for suspend (when creating the inhibit lock) and one process for resume), is not optimal.On the other hand, the
release_inhibit_lock ()
function of the main script will try to kill thepsd-suspend-sync
script regardless of the user (because of thepgrep -cf "psd-suspend-sync"
command) and will generate error messages. This situation is problematic in a multi-user environment.The proposed changes correct these problems.