Sample Header Ad - 728x90

Capture sleep, hibernate and wakeup events on Linux

1 vote
0 answers
374 views
I need to capture these on both laptop and desktop environmetns. Explored 2 options, but unfortunately none of them worked as expected. 1. DBus works on desktop but these events also need to be captured on laptops and environments without any GUI. Is there a way to use DBus in both such situations? 2. Acpid requires us to write scripts and put these scripts in specific paths and in turn these scripts call the required running application. In the opensource implementation, the latest version uses netlink sockets to catch the signal. Tried to capture the events using netlink and it worked for sleep and wakeup when running on Ubuntu 20.04 on Oracle VM but unfortunately, did not work on when tested on Ubuntu 20.04 physical machine. Is there any other way to capture these events?
Asked by apoorva-ask03 (11 rep)
Apr 1, 2021, 06:36 AM