Hi everyone,
I've been reading this thread and searched the net for long about this problem, but nothing worked completely for me; Anyway In the past few days I came to a possible solution, I hope.
The problem I had regarding the auto-sleep was only due to "srvnet" driver that sometimes (randomly) keeps the power request stuck even with no network activity at all (eg disconnecting LAN cable or disabling NIC); when working correctly, srvnet request disappear after about 3 min.
So I thought that this behavior was caused by a bug in the srvnet driver that doesn't remove the request sometime; in fact when it happens, stopping and restarting the server with "net stop /y srv" and "net start /y srv" commands solves the problem, temporarily.
I also read that some users started to have sleep problems when they upgraded from Windows 8 to Windows 8.1, and that Windows 10 Tech Preview seemed to auto-sleep properly; this gave me an idea.
Since I have Windows 10 TP installed in another PC to test it, I thought to swap the W8.1 srvnet.sys driver with the W10 one.
When I found "srvnet.sys" in "C:\Windows\System32\drivers" folder, I noticed that there are another 2 files regarding network and sharing: srv.sys (Server driver) and srv2.sys.
First I swapped srvnet.sys files, but when I restarted the system the server didn't start at all and the sharing was not working, so I restored the original srvnet.sys;
then I swapped srv2.sys and the result was the same so I restored the original one;
at the end I swapped srv.sys driver and... finally everything seemed to work well!
I kept this configuration for about a week and srvnet never got stuck in power request;
so I decided to do a countercheck, swapping srv.sys with original W8.1 driver and I didn't had to wait too much before the srvnet power request got stuck forever, again.
In a nutshell, all you have to do to try this solution is to swap the W8.1 "srv.sys" file located in "C:\Windows\System32\drivers" directory with the W10 TP one.
I attached a zip containing the one I took from my W10 system.
Note that to do this you have to take ownership of the file and be sure that you have the full control (read and write) of it (there are thousands guides on how to do this).
View attachment 58865
Also, would be interesting doing the same with the "srv.sys" from Windows 8, but i couldn't find it.
I hope this could help someone.
Bye!
This is a good find. I always had problems with that driver keeping the PC awake for a very long time but replacing the file solved it. I always knew there was a bug but never understood why it was never fixed.
I switched my HTPC to a local account and turned off file sharing and did not have any issues with sleep. I wonder if I use a online account and replace srv driver and turn on file sharing if it will solve the sleep issues? I can do without an online account on my HTPC. When I used an online account on the HTPC sometimes the PC wouldn't sleep even though nothing was requested.