WMC slept fine until I added a tuner

clemon79

Posts: 63
Joined: Wed Nov 13, 2013 6:59 am
Location:

HTPC Specs: Show details

WMC slept fine until I added a tuner

#1

Post by clemon79 » Sat Jan 18, 2014 4:04 am

Hi! Hopefully this is the right place for this...

I've been building a WMC machine, and hadn't picked up the tuner yet. It slept exactly as I wanted it to; 15 minutes of idle, wake on magic packet or attempt to access with an Xbox extender. No problem.

Well, yesterday I finally got the tuner hooked up, an HDHomeRun Prime. And the nutshell is, I've seen it sleep, but only once, and it was definitely not sleeping at time when I would expect it to sleep, and it's not obeying the idle time sleeps either.

I have since installed and configured MCE Standby Tool, but it doesn't seem to be helping. I am wondering if the fact that the HDHomeRun is a network device is causing a problem here. I know I read about ways to check to see what's stopping it from sleeping, but damned if I can find them now, of course. :)

Hopefully there are a couple of HDHomeRun / MST users here that can help me out. Thanks much!

-- Chris

User avatar
UCBearcat

Posts: 249
Joined: Sat Jan 28, 2012 12:08 am
Location: Cincinnati

HTPC Specs: Show details

#2

Post by UCBearcat » Sat Jan 18, 2014 6:00 pm

I saw your post, and it sounded very similar to an issue that I had when I first set up WMC w/ the Prime. I was running into a number of odd issues with my setup and sleep.... one of which was that the Prime kept waking the PC from sleep.

http://www.thegreenbutton.tv/forums/vie ... =89&t=1489

The first reply by erkotz may be the answer that you're looking for. Check to see if your NIC has an option to under Power Management for "only allow magic packet to wake it." On my Realtek NIC drivers, I have 3 boxes.
Allow computer to turn off this device to save energy.
Allow device to wake the computer from sleep.
-- Only allow a magic packet to wake it.

If you have these options, you probably don't have the 3rd box checked.

clemon79

Posts: 63
Joined: Wed Nov 13, 2013 6:59 am
Location:

HTPC Specs: Show details

#3

Post by clemon79 » Sat Jan 18, 2014 7:11 pm

UCBearcat wrote:The first reply by erkotz may be the answer that you're looking for. Check to see if your NIC has an option to under Power Management for "only allow magic packet to wake it." On my Realtek NIC drivers, I have 3 boxes.
Allow computer to turn off this device to save energy.
Allow device to wake the computer from sleep.
-- Only allow a magic packet to wake it.

If you have these options, you probably don't have the 3rd box checked.
I was pretty sure I did, but I just double-checked now...Magic Packets are checked on both network adapters. (Even though I am only using the first one.)

Here's what currently can wake the machine according to MST:

ASMedia XHCI Controller (This is for USB 3, yes? The only device I have on the USB3 bus is the external hard drive; I have the below remote and keyboard on the USB2 bus, 'cuz why waste a USB3 port on a device like that, right? If so, I can probably turn this off.)
eHome Infrared Receiver (for infrared remote)
HID Keyboard Device (for wireless keyboard)
RealTek PCIe GBE Family Controller
RealTek PCIe GBE Family Controller #2
USB Root Hub

And, note: before the tuner it woke and slept just fine with both the remote and wireless keyboard on the system, so I don't think it's either of those. And I can still _tell_ it to sleep and it will do so. The issue seems to be the wait-15-minutes-and-it-sleeps-on-its-own thing, or that (as was the case this morning) I was up in the middle of the night and saw that it had gone to sleep, then woke up this morning to discover it had turned itself back on. (This may have something to do with the daily reboot I also have set in MST, though I wish I knew more about the details.

I also have the setting ticked in MST for "if it's idle without user input for three hours, go ahead and suspend", which I suspect is the only reason it's sleeping at all right now.

The nutshell right now is that something is causing the machine to not think it's idle right now and I'm not sure how to figure out what that is.

User avatar
UCBearcat

Posts: 249
Joined: Sat Jan 28, 2012 12:08 am
Location: Cincinnati

HTPC Specs: Show details

#4

Post by UCBearcat » Sat Jan 18, 2014 7:24 pm

Hmmm... interesting indeed.
For the overnight waking - check to see if there are any scheduled tasks that can wake the machine. WMC creates a scheduled task to check for guide updates, and other stuff. I think the default time for that is around 4am... or at least, that is when mine fires up.

And just for kicks - try to put the PC to sleep manually (from start menu), and then see what happens. When I was having all my issues, I could sleep it manually, but the Prime kept auto-waking it 2 seconds later. But, that was because of the NIC driver wake settings (which you've already verified.) I'm just curious to know if yours wakes right away or not.

I'm not sure I'll be much more help, as I haven't used MST. I never had an issue with it going to sleep. Most of my issues were in the waking stage.

User avatar
Crash2009

Posts: 4357
Joined: Thu May 17, 2012 12:38 am
Location: Ann Arbor, Michigan

HTPC Specs: Show details

#5

Post by Crash2009 » Sat Jan 18, 2014 7:49 pm


clemon79

Posts: 63
Joined: Wed Nov 13, 2013 6:59 am
Location:

HTPC Specs: Show details

#6

Post by clemon79 » Sat Jan 18, 2014 7:53 pm

I have since turned off the XHCI controller and USB Root Hub, and the machine still sleeps and wakes on command.

Again, it sleeps when I tell it to just fine, stays slept, and then wakes when I tell it to. The problem is with it sleeping when idle, and that's probably a configuration issue with MST which may have something to do with Away Mode. (Also the "start eHome on boot" setting in MST seems to conflict with MCE's own "start Windows Media Center when Windows starts" setting, in that the former unchecks the latter, but then doesn't seem to work until I re-check the latter. But that's a separate issue.

Crash, I don't think so, but thanks. I *do* know I came across a method to see if there was a process keeping things from idling out, but of course I can't find it now.

dmagerl

Posts: 403
Joined: Mon Jun 06, 2011 9:16 pm
Location:

HTPC Specs: Show details

#7

Post by dmagerl » Sat Jan 18, 2014 9:07 pm

I dont think you want to know what can wake your machine. You want to know whats keeping it awake.

Open a cmd window and use the "powercfg -requests" command and it should tell you what is keeping it awake.

Similarly, "powercfg -lastwake"will tell you what last woke it up.

clemon79

Posts: 63
Joined: Wed Nov 13, 2013 6:59 am
Location:

HTPC Specs: Show details

#8

Post by clemon79 » Sat Jan 18, 2014 9:41 pm

Yes, I believe that is exactly the command I was trying to remember. Thank you!

Unfortunately, it's coming up "None" for everything right now, which you would think means it should sleep in fifteen minutes as expected, but it hasn't been doing that.

Last thing to wake the device was the NIC, though, which I'm not sure makes sense, as I could swear the last wake was me waking it with the keyboard or remote. But would follow that something about the network tuner is keeping the sleeping from working correctly.

User avatar
Crash2009

Posts: 4357
Joined: Thu May 17, 2012 12:38 am
Location: Ann Arbor, Michigan

HTPC Specs: Show details

#9

Post by Crash2009 » Sun Jan 19, 2014 1:17 am

You were looking for suggestions, how bought this one? When you exit out of WMC, do you press stop first? Is it possible that the prime is not getting the "stop streaming" command? (therefore preventing sleep) check out Scallia's description in post 40 http://www.thegreenbutton.tv/forums/vie ... 668#p12668

Also, here are the rest of the powercfg commands http://technet.microsoft.com/en-us/libr ... S.10).aspx

clemon79

Posts: 63
Joined: Wed Nov 13, 2013 6:59 am
Location:

HTPC Specs: Show details

#10

Post by clemon79 » Sun Jan 19, 2014 3:51 am

Yes, I make sure I have stopped the tuner *and* visually confirm that the tuner has been released.

User avatar
CyberSimian

Posts: 516
Joined: Mon Jun 20, 2011 5:52 pm
Location: Southampton, UK

HTPC Specs: Show details

#11

Post by CyberSimian » Sun Jan 19, 2014 11:01 am

clemon79 wrote:Magic Packets are checked on both network adapters.
May I suggest that as an experiment you disable all variations of wake-on-lan, just to see if it solves your problem? If it does, then you know that your HTPC is receiving something over the lan that is causing it not to sleep, either from your network tuner, or from some other device on your lan.

I have recently been experimenting with some alternative setups for my HTPC, one of which was connecting a Belkin Network USB Hub (no longer manufactured) to my HTPC. My HTPC hibernated as usual, but if the Belkin hub was left powered on, it woke the HTPC about 2 seconds later! That was a surprise, but I guess that the Belkin hub knew that it had been in communication with the HTPC and sent it some sort of data packet which woke the HTPC.

-- from CyberSimian in the UK

LuckyDay

Posts: 586
Joined: Mon Jul 11, 2011 10:42 pm
Location:

HTPC Specs: Show details

#12

Post by LuckyDay » Sun Jan 19, 2014 3:44 pm

CyberSimian wrote:
clemon79 wrote:Magic Packets are checked on both network adapters.
May I suggest that as an experiment you disable all variations of wake-on-lan, just to see if it solves your problem? If it does, then you know that your HTPC is receiving something over the lan that is causing it not to sleep, either from your network tuner, or from some other device on your lan.
This is what I do each time I build. Start by disabling absolutely everything that can wake, then start enabling them until I've got it all perfect. Works well.

clemon79

Posts: 63
Joined: Wed Nov 13, 2013 6:59 am
Location:

HTPC Specs: Show details

#13

Post by clemon79 » Sun Jan 19, 2014 5:39 pm

CyberSimian wrote:
clemon79 wrote:Magic Packets are checked on both network adapters.
May I suggest that as an experiment you disable all variations of wake-on-lan, just to see if it solves your problem?
That's probably a good idea, although I'm 95% sure the tuner is the culprit (again, seeing as how I had zero problems before it came into the mix), and the question is more one of "why?" Especially when I have magic-packets-only turned on? Is there a way to say "only wake on magic packet sent from THESE DEVICES?"

I am wondering if DLNA has something to do with it. I woke up in the middle of the night tonight, and saw that the machine had slept, so I tried turning on the TV and Xbox in my bedroom. It woke up in fairly short order after I'd logged into the Xbox, where before I had to actively drop into the Media Center extender on the box to get it to wake. Unfortunately, if there is a way to deactivate the DLNA functionality (which I don't use since everything in my home is either a PC or an Xbox and I don't feel a pressing need to watch TV on my iPod yet :)) I'm not seeing it. :(

When the machine woke up I turned on the logging feature of MST, so I'll have a look at that and then prolly kill Wake on LAN for a bit. I suspect we will confirm that it's happening there.

clemon79

Posts: 63
Joined: Wed Nov 13, 2013 6:59 am
Location:

HTPC Specs: Show details

#14

Post by clemon79 » Tue Jan 21, 2014 6:34 pm

Okay, I have some updates here:

Yesterday I put a packet sniffer on my network, and listened to the HDHR while I put the HTPC to sleep. (I actually listened to all traffic that my desktop machine could see originating from or destined for both the HDHR and the HTPC.)

Every ten minutes, in accordance with WMC requirements, the HDHR puts out a broadcast flood (100 packets or so) of SSDP packets. There is *no question* this flood is what is causing the HTPC to wake.

My question is why, *especially* when the NIC is allegedly set to only wake for magic packets. (The HTPC is a Shuttle barebones kit; according to their literature the NIC is a Realtek 8111e, and I updated it to the latest drivers yesterday before I ran any of these tests.) I'm not even sure if SSDP packets are one of the "matching packets" that will wake the machine with ARP offload activated, although deactivating it doesn't seem to have any effect either.

I'm stymied and need help! :)

dotbatman

Posts: 30
Joined: Thu Aug 04, 2011 6:08 pm
Location:

HTPC Specs: Show details

#15

Post by dotbatman » Tue Jan 21, 2014 7:20 pm

Sometimes the magic packet setting must also be set in the system BIOS, otherwise the BIOS will override whatever you have set in Windows. Can you give us a rundown of options available in your BIOS?

dmagerl

Posts: 403
Joined: Mon Jun 06, 2011 9:16 pm
Location:

HTPC Specs: Show details

#16

Post by dmagerl » Tue Jan 21, 2014 7:43 pm

Have you looked in the Advanced Properties tab for your NIC in device manager?

Mine lists two Wake options, Wake on Magic Packet and Wake on Pattern Match. Both are enabled. I would assume you'd have to disable the Wake on pattern match to only let it wake with Magic Packets.

clemon79

Posts: 63
Joined: Wed Nov 13, 2013 6:59 am
Location:

HTPC Specs: Show details

#17

Post by clemon79 » Tue Jan 21, 2014 8:05 pm

dotbatman wrote:Sometimes the magic packet setting must also be set in the system BIOS, otherwise the BIOS will override whatever you have set in Windows. Can you give us a rundown of options available in your BIOS?
I can! I was hoping this would be the case early on, but sadly, no. My Power Management settings are as follows:

Suspend Mode (set to S3)
Wake Up by USB (Enabled, I think? This is so the infrared remote or keyboard can use their Sleep buttons to turn it back on)
EuP Function (Disabled)
Power-On after Power Fail (Always On; like my TiVo I want this to turn on always when the power comes back after an outage)
Wake Up by Ring (for the fourteen people who still have modems :)) (Disabled)
Wake Up by LAN (Enabled)
PowerOn by RTC Alarm (Disabled)

That's it.
dmagerl wrote:Have you looked in the Advanced Properties tab for your NIC in device manager?

Mine lists two Wake options, Wake on Magic Packet and Wake on Pattern Match. Both are enabled. I would assume you'd have to disable the Wake on pattern match to only let it wake with Magic Packets.
Tried this too, but it doesn't seem to make a difference. I also tried disabling ARP Offload, which from what I have read should ALSO isolate the resume options to magic packets, and it didn't work either. I want to look into what flags those settings flip in the Registry, and whether the flags that should be getting flipped indeed are.

So here's a question: I read something about a service in Windows, "SSDP Discovery," where people fixed sleep issues by disabling that. Problem here is that based on my readings WMC depends on that to find the tuners (although I have them set in my router to have a static IP, so as long as it looks where it always does that's no problem) and for the Windows Media Center Extender service, but I don't know if that's for *being* an extender or connecting to extenders, and the latter needs to be able to happen for my Xboxen.

dmagerl

Posts: 403
Joined: Mon Jun 06, 2011 9:16 pm
Location:

HTPC Specs: Show details

#18

Post by dmagerl » Tue Jan 21, 2014 8:36 pm

Is the problem that it isnt sleeping or is it that its sleeping but then waking up?

Have you tried in a CMD window "powercfg -requests" to see whats keeping it awake or "powercfg -lastwake" to see whats waking it up?

Are you reading/writing to network storage anywhere? It wont sleep if there are "remote opens" without a reghack.

But i cant see why any of this would change by simply adding an HDhomerun.

clemon79

Posts: 63
Joined: Wed Nov 13, 2013 6:59 am
Location:

HTPC Specs: Show details

#19

Post by clemon79 » Tue Jan 21, 2014 8:55 pm

dmagerl wrote:Is the problem that it isnt sleeping or is it that its sleeping but then waking up?
It sleeps just fine, whether by being told to, being 15 minutes idle, or going three hours without user interaction, just as I have it set in MST. The problem is that it is waking up prematurely, and in exact concert with this SSDP batch. (I hate to call it a flood because SiliconDust has confirmed that they are in fact consciously sending out 100 or so packets because WMC requires them to.)

"powercfg -lastwake" points at the NIC. Don't think it specifically tells me why.

clemon79

Posts: 63
Joined: Wed Nov 13, 2013 6:59 am
Location:

HTPC Specs: Show details

#20

Post by clemon79 » Wed Jan 22, 2014 6:45 pm

For reference: looks like I fixed it.

I'd still love to know why this NIC is behaving the way it is, but it occurred to me this morning that the Shuttle kit I'm using has two NICs in it. Go into BIOS, disable one, enable the other, switch the cable over, reboot, set NIC the way I want it, voila, sleeping like a baby, waking only on command.

Next up: getting the libraries working!

Post Reply