isjerryxiao / pacroller

The "Unattended Upgrades" for Arch Linux.
GNU General Public License v3.0
29 stars 2 forks source link

systemd-inhibit 与 suspend 冲突的问题 #10

Open tsieyy opened 2 weeks ago

tsieyy commented 2 weeks ago

唤醒休眠后systemd运行pacroller会出现该错误: failed to inhibit: the operation inhibition has been requested for is already running

该问题在我的机器上出现的原因是笔记本合盖之后会休眠,再次开盖启动时pacroller会在systemd-suspend.service结束之前启动,导致出现了该问题。

参考该issue,一个可行的简单解决办法是在pacroller.service中添加ExecStartPre=/bin/sleep 1m在pacroller启动之前延迟一段时间。

isjerryxiao commented 1 week ago

I wouldn't ship sleep 1 into pacroller.
I believe this problem should be solved by declaring additional unit dependencies.