I have movies and stuff that is accessed from the lan (via xbmc/kodi, usually) that reside on my Windows 7 box. I want the machine to be able to go into sleep mode when files are NOT being accessed, if I happen to not be using the machine. Wake on Lan (magic packet) is enabled in the bios and on the network card, but it doesn't seem to be enough. Wait for network is also set in XBMC, which I imagine to send that flag. My ideal situation is that the computer goes to sleep as soon as no network is used (as long as there's nobody using the computer itself).
Windows – prevent windows 7 sleep while files are being accessed by network
networkingsleepwindows 7
Related Solutions
Note: the question is a 4+ year old cross post from here. Not sure why it gets a bounty after more than 4 years, but probably it received a wol package ;-)
The ethtool manual says:
wol p|u|m|b|a|g|s|d...
Set Wake-on-LAN options. Not all devices support this. The
argument to this option is a string of characters specifying
which options to enable.
p Wake on phy activity
u Wake on unicast messages
m Wake on multicast messages
b Wake on broadcast messages
a Wake on ARP
g Wake on MagicPacket(tm)
s Enable SecureOn(tm) password for MagicPacket(tm)
d Disable (wake on nothing). This option clears all previous
options.
The PHY activity refers to the PHY chip, that handles communication on the physical layer of the OSI model. In laymans terms: any package directly send to this networking device should wake the machine up.
The following conditions should be met before wake on PHY works:
- your networking device supports this and your networking driver supports this. I'm not sure if ethtool is checking this extensively before setting the parameter. Check your manual/spec's to see if this specific feature is supported.
- your ethernet card is still on after shutdown (led lights should be on). If this isn't the case, make sure that your OS isn't shutting down the card (in most Linux distro's put
NETDOWN=no
in/etc/default/halt
). - wol settings are preserved after sleep/shutdown.
- wol is enabled in your BIOS settings.
Also note that the default arp timeout is 30 seconds (also see this SU post). After that, the ip address of your target machine will be forgotten by the machine from where you are sending any physical package. Make sure you set a static arp address on the machine from where you are sending the package.
Now any directed request (ping, http, ssh, a wol package, ...) should bring your machine up.
I solved the problem by setting the default system unattended sleep timeout in the Registry. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0\DefaultPowerSchemeValues
. When you expand it there are 3 keys:
- key
381b
is for Balanced 8c5e
for High Performancea184
for Power Saver
The default value for all is 120 seconds. I changed it to 7200 (2hrs) for both AC and DC and it works perfectly.
Best Answer
In the advanced power options for your current power plan, you can disable going to sleep when media is being shared from the computer.
It's located under 'multimedia settings'>'When sharing media':