[systemd-devel] Failed to inhibit: The operation inhibition has been requested for is already running

Tom remyabel at gmail.com
Thu Apr 18 12:01:24 UTC 2019


Hi all,

I'm trying to create a simple timer that will wake up the system from
suspend and run an operation with systemd-inhibit.

Contents of test.service:

[Unit]
Description=Test

[Service]
Type=oneshot
ExecStart=/bin/systemd-inhibit /bin/su user -c "echo 'Test' >
$HOME/asdf"

Contents of test.timer:

[Unit]
Description=Test

[Timer]
Unit=test.service
OnCalendar=minutely
WakeSystem=true

[Install]
WantedBy=multi-user.target

It successfully wakes up the system but spits out the error in the
title. I have no problem running the script or systemd-inhibit
manually, but when putting it in the unit combined with systemd-inhibit 
I get that error. Am I missing some basic usage?

systemd version is systemd-239-12.git8bca462 on Fedora 29.



More information about the systemd-devel mailing list