Search code examples
c#wpfwakeup

Wake System from Sleep C#


I'm trying to add functionality in my program that will allow the user to wake their system from sleep at a set duration.

I've googled a lot about this and the examples online don't seem to work.

I've used WaitableTimer set the system to go to sleep but it doesn't seem to wake up.

Can anyone help me out here.

for code reference, I am using WPF

Thanks


Solution

  • Is any other software able to wake your computer on schedule? You need to find out whether the problem is with your code or with your system configuration, and running someone else's software as a test is the easiest way.

    You may need to enable "Wake on Timer" support in the BIOS.

    What version of Windows are you using? Windows Vista and 7 come with some tools for enabling/disabling the ability of individual components to wake the system, in order to e.g. resolve problems when a very sensitive mouse unintentionally moves enough to wake the computer. You may need to enable wake support for the HPET or RTC components.