1

Is there a way to detect a wake from hibernation? I am developing an extension that displays information when the user turns on the computer and logs in to the system. I can do that easily by setting the extension to run when the system starts and execute the codes instantly.

background.js

function displayInfo(){ /*...*/ }

displayInfo();

However, some users might not turn off their computer, rather, they would hibernate for faster wake time. Hibernate should still be considered that the user is "turning on" the computer, but currently I have no way of detecting that.

Is there anyway I can achieve that?

1 Answer 1

1

No "perfect/foolproof" method, but some an idea:

  • Record the system time every 5 minutes or so. If the current time is much larger than the expected time, assume it slept/hibernated.
1
  • This is a nice idea, but one problem I notice is that if the timer interval is set too high, it will take too long for it to realize the computer is waken from hibernation. Jun 23, 2014 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.