0

I have an application running on Linux where I want to wake up the system some seconds after it have been suspended-to-RAM.

I have set the RTC to wake up the system in 20 seconds by writing +20 to /sys/class/rtc/rtc0/wakealarm on my Linux system and this works fine. The code resumes executing at the next line after I did the suspend-to-RAM, as expected.

I want to know if there is some way to figure out what triggered a system wake up, if it was the RTC or a keyboard key press event. Is there some way to figure out the source of the wake event?

uniquenamehere
  • 1,869
  • 3
  • 31
  • 60

1 Answers1

0

You have to monitor udev events, or use the dbus interface.

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33
sancelot
  • 1,905
  • 12
  • 31