Power Management Notifications in Linux

风格不统一 提交于 2019-12-23 15:22:10

问题


Which are the approach (simplest possible) that we can use to get notified for Power Status changes (for instance when computer goes to sleep, hibernate, etc.) in Linux based systems?

I will need this mainly for persisting some state before sleeping, and of course, restoring that state once the computer wakes up.


回答1:


You can get all these events by just configuring your acpid to send them via socket, for example.

There's an official specification document that describes all possible events and circumstances. An extensive read though.



来源:https://stackoverflow.com/questions/8067768/power-management-notifications-in-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!