有时,当我尝试挂起笔记本电脑(使用睡眠键盘按钮)时,我从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。
在符合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
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句