如何找出禁用睡眠的应用程序?

wer*_*ika 5 sleep xfce power-management suspend

有时,当我尝试挂起我的笔记本电脑(使用睡眠键盘按钮)时,我会从 xfce4-power-manager 得到这个弹出窗口:"Are you sure you want to hibernate the system? An application is currently disabling the automatic sleep. Doing this action now may damage the working state of this application." 我不想休眠 - 我想知道哪个应用程序正在禁用睡眠,以便我可以退出并正常挂起系统。我怎样才能找到这个?

我在 Xubuntu 15.10。

Gil*_*il' 10

在 Freedesktop 兼容环境下,包括 XFCE4,睡眠抑制通过总线上的 D-Bus 进行通信org.freedesktop.PowerManagement。我找不到任何关于此的文档;xfce4 代码有一个方法列表,其中包括一个被调用的方法GetInhibitors所以这应该可以工作:

dbus-send --print-reply --dest=org.freedesktop.PowerManagement /org/freedesktop/PowerManagement/Inhibit org.freedesktop.PowerManagement.Inhibit.GetInhibitors
Run Code Online (Sandbox Code Playgroud)