No DBus signal available for Wake event in linux

I wanted to perform some task in my application, as soon as the application wakes from sleep mode. To do that I wanted to detect the wake event in my application.
In the ‘org.freeDesktop.login1’ interface, there is a signal ‘PrepareForSleep’ available to detect the sleep event, however, there is no counterpart DBus signal available to detect the wake event. Either it is not available or I m not able to find the signal.

I m using a laptop with Ubuntu version 20.04 with default Gnome desktop environment.

Can someone help me?

There is, it’s the same signal. The PrepareForSleep signal has a boolean parameter that indicates whether the system is going to sleep (true) or waking up (false).

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.