7

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).

3

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':

enter image description here

  • Oh, since I do NOT have media streaming on, I didn't think about this option, and it doesn't seem to work anyway. The remote device is set to use smb://pc/sharename as its source. – frumbert Aug 11 '15 at 21:27
  • @frumbert I'm afraid I can't help then :c – cascer1 Aug 12 '15 at 9:16
1
+50

You will need an external application like "Coffee" to keep your PC awake:

https://sourceforge.net/projects/coffee-sc/

This little open-source software project allows you to set thresholds, like if you are uploading more than 10KB per second the computer should not sleep. Take a look at what your traffic patterns are and set it to something not too high and not too low. Windows will generate traffic all the time and if your threshold is too low then Windows will keep itself awake just talking to itself on the network.

Example of what settings you get:

enter image description here

  • this is exactly what I was looking for, can you choose protocol? (smb for instance) – AK_ Dec 30 '17 at 12:09
  • It appears to be cumulative. The good news is that it's open source. You could write your own version with protocol selection and make a pull request for the author to include your version in an official release. – HackSlash Jan 2 '18 at 16:08
0

I was searching for an answer to a quite similar question to yours. I'm using Kodi as the client on a Raspberry Pi accessing a Windows (SMB) Share on a Win7 box. I would like to prevent the Win7 box from sleeping if Kodi is still reading files over the network i.e. I'm watching a video.

I believe this is a non-issue, because Windows will issue a "stay awake" -type request to power management, suspending sleep, when it detects the share being accessed.

To provide some evidence for this, on the Win7 box from an elevated command prompt, type powercfg /? and it will explain:

-REQUESTS
           Enumerate application and driver Power Requests. Power
           Requests prevent the computer from automatically powering off
           the display or entering a low-power sleep mode.

Then play back some content via Kodi.

Next, back in your elevated command prompt, type powercfg -REQUESTS. You should see the following:

DISPLAY:
None.

SYSTEM:
[DRIVER] \FileSystem\srvnet
An active remote client has files opened on this machine.
[DRIVER] \FileSystem\srvnet
An active remote client has recently sent requests to this machine.

AWAYMODE:
None.

I'll confess that I haven't tested how this pans out in practice. However, in theory you should be able to use a Balanced power plan in Windows whilst still being able to watch content using Kodi, without Windows going to sleep part way through.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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