Linux中的电源管理通知 [英] Power Management Notifications in Linux

查看:74
本文介绍了Linux中的电源管理通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在基于Linux的系统中,有哪些方法(最简单)可用于通知电源状态更改(例如,当计算机进入睡眠,休眠状态等)?

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.

推荐答案

您只需配置 acpid 通过套接字发送它们.

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.

这篇关于Linux中的电源管理通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆