23

I have a problem with Windows 7 not sleeping.

PowerCfg -requests

says a "Legacy Kernel Caller" driver prevents the sleep mode. This is not very helpful or informative. How do I get more details about that object?

EDIT:

I found that

Powercfg -requestsoverride 

is the best way of dealing with such misbehaving drivers and software.

The option -requestsoverride is not very well documented. MSDN doesn't mention NAME is case sensitive, and to remove a request from overrides list you give the option with blank REQUEST parameter.

majocha
  • 533

4 Answers4

18

Thanks for all the suggestions!

Finally I narrowed down the problem simply by trial and error, disabling devices and rebooting. It was a TV card driver hung and not releasing the power request despite being no longer in use.

EDIT:

Unfortunately, the problem with TV card is intermittently recurring. Googling shows it's also quite common. I found that disallowing the driver from making power requests with

Powercfg -requestsoverride Driver "Legacy Kernel Caller" System

solves it.

"Legacy Kernel Caller" is translated on different Windows language versions. On my Polish system it says "Starszego typu obiekt wywołujący jądro".

majocha
  • 533
1

From the start menu, type in "Performance Information and Tools".

Click the Advanced Tools and click generate a System Health Report. It should point out legacy driver issues.

Edit:

Also try powercfg -request.

surfasb
  • 22,896
0

I had this issue and the Legacy Kernal Caller kept coming back intermetently, even though it was verifiably on the list of things to be ignored.

In case anyone still has problems like that, here's a link to a batch file + explanation of how to set up a task.....both were a learning curve which I never want to repeat!!

https://github.com/richdyer2000/Sleepy

The batch file basically performs the sleep management:

a main loop runs for ~300s (standard loop with 300 iterations and a ping command with count=2 to control the duration), reading the output of 'powercfg -requests' each time. If it finds anything other than "DISPLAY:", "SYSTEM:", ..."ACTIVE LOCK SCRREN:", "None." or "[DRIVER] Legacy Kernel Caller" on a line, then the main loop is restarted.

If the end of the main loop is reached, the command "rundll32.exe powrprof.dll,SetSuspendState 0,1,0" is executed. On windows 10, it seems it is necessary to run "powercfg -hibernate off" to get a proper sleep state, so I include this in the code prior to the sleep command to make sure.

0

In my case it was Spotfiy that misbehaved. People are going ballistic in their forums over this bug.

Solution: Quit spotify before putting computer to sleep/hibernate

I still question why on earth Windows allow a poorly programmed piece of software to override all power plan settings and create wake timers. Microsoft should take their share of the blame here.

edit: Seems like issue is closed 3 days ago so I guess we should expect a fix soon.

Nilzor
  • 4,579