MCE Standby tool sleeping PC during Netflix playback(FIXED!)

User avatar
newfiend

Posts: 2503
Joined: Tue Jun 07, 2011 12:10 pm
Location: Earth

HTPC Specs: Show details

MCE Standby tool sleeping PC during Netflix playback(FIXED!)

#1

Post by newfiend » Fri Jan 20, 2012 2:39 pm

I installed MCE standby tool by slick solutions but it's sleeping my PC while watching Netflix, any suggestions on how to fix this?

Thanks.
newfiend

Sent from my SGH-i937 using Board Express
Last edited by newfiend on Sat Jan 21, 2012 7:13 pm, edited 2 times in total.

User avatar
tony_park

Posts: 261
Joined: Fri Jun 10, 2011 12:01 pm
Location: South Yorkshire

HTPC Specs: Show details

#2

Post by tony_park » Fri Jan 20, 2012 2:57 pm

The simplest, would be to ensure that its reported on the MST forum, their developer hangs out there quite a lot :-)

Tony

User avatar
newfiend

Posts: 2503
Joined: Tue Jun 07, 2011 12:10 pm
Location: Earth

HTPC Specs: Show details

#3

Post by newfiend » Fri Jan 20, 2012 3:24 pm

Just registered so I can post there, if I'm approved I'll post there also and see if I can get a response. If anyone else has fixed this problem please lmk. PC is working awesome with the tool other than this small issue. I am using his latest beta version for Windows 7.

Sent from my SGH-i937 using Board Express

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#4

Post by barnabas1969 » Fri Jan 20, 2012 3:36 pm

Newfiend,

I have a solution for this. I gave my solution to the MST dev, but I don't think it has been incorporated yet. My solution was to write a little program that gets kicked off by the task scheduler every 5 minutes. If the program does not detect an outbound network connection by the Netflix plugin, then it just exits. If it does detect a connection, then it keeps checking every minute until there is no longer a connection present. Then, in the registry settings for MST, I added a setting to cause MST to watch for the presence of my program running. If my program is running, then MST will not make the PC sleep.

I can get you my program, and details of how to set it up if you like. I believe I posted it here or on WEC or maybe even on the MST forum somewhere. In any case, my username is the same in all three places.

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#5

Post by barnabas1969 » Fri Jan 20, 2012 3:40 pm

I should also add that my little program has a hook into LEDSDriver so that you can change the state of your LED's when Netflix is playing.

User avatar
makryger

Posts: 2132
Joined: Sun Jun 05, 2011 2:01 pm
Location: Illinois

HTPC Specs: Show details

#6

Post by makryger » Fri Jan 20, 2012 3:51 pm

Oh wow, that would be quite useful- i use MST, LEDSDriver and Netflix. I have the same problem where my computer goes to sleep, but I just dealt with it by doing anything on the remote periodically.

Don't suppose you could post your program here?
My Channel Logos XL: Get your Guide looking good! ~~~~ TunerSalad: Increase the 4-tuner limit in 7MC

User avatar
newfiend

Posts: 2503
Joined: Tue Jun 07, 2011 12:10 pm
Location: Earth

HTPC Specs: Show details

#7

Post by newfiend » Fri Jan 20, 2012 3:57 pm

Yes please post it if you don't mind! That would be awesome thank you!!
has anyone had an issue using tmt5 with the same problems.. Sleeping during playback, or has this already been fixed?
Sent from my SGH-i937 using Board Express

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#8

Post by barnabas1969 » Fri Jan 20, 2012 5:56 pm

I did some searching and I can't seem to find my post about it. I know I also e-mailed it to Herman, the guy who wrote MST. I'll search my e-mail.

As for TMT5, I think that has already been fixed in MST by default, but if not... I know there's a registry setting to make it work. I'm at work right now, but I can remote-desktop into my HTPC if I must. I really wish I could find my post. I did it as much for my own documentation as I did it for others' benefit.

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#9

Post by barnabas1969 » Fri Jan 20, 2012 7:12 pm

OK, here goes...

Media Center Standby Tool (MST) has some registry settings that you can set to cause MST to prevent standby when a specific program is running on the machine. There are also registry settings to prevent standby when an in-bound network connection is established on a specified port.

Plugins in Media Center run under a program named ehexthost32.exe on 64-bit machines (On 32-bit machines, this program is named ehexthost.exe. You can start the Netflix plugin and look in the Task Manager to see which one runs when you run the Netflix plugin). Some people have simply tried to make MST prevent standby whenever ehexthost.exe or ehexthost32.exe is running. This, however, causes a problem if you have other plugins active like commercial skipping, etc. This is because ALL plugins in MCE run in ehexthost32.exe (or ehexthost.exe).

So, the perfect solution would be if MST could detect out-bound network connections. I've asked Herman at Slick Solutions to incorporate this in MST, but he hasn't done it yet. He thought it was a good idea, but he can't test it because he doesn't live in the USA, so the Netflix plugin doesn't work for him to test it.

My workaround was to write a small program that detects the outbound network connection. I scheduled the program in Task Scheduler to run once every 5 minutes when the user is logged in. The program runs, checks for the outbound connection to Netflix, and then exits if none is found. If an outbound connection is found, the program continues to run... checking once every 1 minute for the connection. When the connection is no longer found, the program exits. Also, if the watch_ehexthost32.exe program is already running when Task Scheduler starts it again, the 2nd instance of watch_ehexthost32.exe will just exit... because it detects another instance of itself already running on the machine.

Then, the registry settings are created to make MST prevent standby anytime my program is running. It works really well.

1) Download the watch_ehexthost32.exe program here:
watch_ehexthost32.zip
(359.16 KiB) Downloaded 180 times
Save the file in a directory where the user that normally runs when you are watching Netflix can access/execute the program (my user is named "HTPC". Yours will vary). I chose to create a directory named "C:\Program Files (x86)\BKR" and put my special little programs there. On a 32-bit machine, that would be "C:\Program Files\BKR".
2) Open the Task Scheduler. Click on the "Task Scheduler Library" folder in the left pane.
3) Click "Create Task..." in the "Actions" pane on the right side.
4) Setup your task as follows:

On the "General" tab:
a) Name: Netflix Watcher
b) When running the task, use the following user account: <Insert your username here, using the "Change" button>
c) Select "Run only when user is logged in"
d) Check the box next to "Run with highest privileges" (THIS IS REQUIRED!!!)
On the "Triggers" tab:
e) Create a new trigger by clicking the "New" button.
f) Choose to Begin the task: "At log on"
g) Choose "Specific user" and set the username to the one you used in step 4b above.
h) Check the box for "Delay task for: 5 minutes"
i) Check the box for "Repeat task every: 5 minutes" for a duration of "Indefinitely"
j) Check the box for "Enabled"
k) Click OK (answer any prompts for passwords)
On the "Actions" tab:
l) Click "New"
m) Action: "Start a program"
n) Program/script: (must be in double quotes if there are any spaces in the path!!!)
"C:\Your Path Here\watch_ehexthost32.exe"
o) Add arguments: (again, must use double quotes for any argument that has spaces)
arg1 arg2 arg3 (these are explained in detail below)
p) Click OK.
q) The "Conditions" and "Settings" tabs can be left at defaults.
r) Click OK.

5) Using the Windows Registry Editor, set the registry settings below (you may have to create some of the keys):
Note: The path for the registry keys is different in 32 and 64 bit windows.
The 64-bit key is:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Herman van Eijk\MceStandbyTool\Non Idle Applications\
The 32-bit key is:
HKEY_LOCAL_MACHINE\SOFTWARE\Herman van Eijk\MceStandbyTool\Non Idle Applications\

Under the Non Idle Applications key, create a new string value named "Netflix" with a value of "watch_ehexthost32.exe" (no quotes)

6) Now, reboot or logoff/logon. Problem fixed.

Detailed explanation of the arguments for watch_ehexthost32.exe:
arg1: the name of the program to watch. This will be either "ehexthost32.exe" (64-bit Windows) or "ehexthost.exe" (32-bit Windows), depending on whether your are running 64 or 32 bit windows. You could also use my watcher program to watch just about any program name... and my program will detect outbound network connections from the program named in arg1.
arg2: (optional) This is the path to the LEDSDriver executable. In my case, it's set to "C:\Program Files (x86)\LEDSdriver\LEDSdriver.exe" This is not necessary if you don't want Netflix to affect your LEDS, or if you are not using LEDSdriver.
arg3: (optional, see above) This is the name of the USEREVENT that you want to trigger in LEDSdriver when an out-bound connection from the Netflix plugin is detected. I believe LEDSdriver supports USEREVENT0, USEREVENT1, and USEREVENT2. Check the documentation for LEDSdriver to be certain.

One thing to note: If you use the LEDSdriver hook in my program, keep in mind that your LED won't change immediately when you start playing a video in Netflix. You've scheduled my program watch_ehexthost32.exe to run every 5 minutes, so it could take up to 5 minutes after you start playing a video in Netflix before the LED will change. I don't recommend scheduling the program to run more often than 5 minutes as this could affect MST and prevent it from EVER putting your machine in standby.

By the way, while you are in the Registry Editor, look in the Non Idle Applications key to see if there are string values for "TotalMedia Theatre 5 MCE player" with a value of "uMCEPlayer5.exe" If it's not there already, add it so that your HTPC won't sleep when you are running TMT5.

EDIT 07OCT2012: I uploaded the program as a zipped attachment instead of a link to Google Docs.
Last edited by barnabas1969 on Sun Oct 07, 2012 3:32 pm, edited 2 times in total.

User avatar
newfiend

Posts: 2503
Joined: Tue Jun 07, 2011 12:10 pm
Location: Earth

HTPC Specs: Show details

#10

Post by newfiend » Fri Jan 20, 2012 7:16 pm

Thanks barnabas1969! Its really no rush if you have time this evening after work would he fine. I appreciate you helping me with this. I just swapped out my old psu for a brand new gold series corsair. My htpc hasn't been able to sleep for @ 6 months. My old psu would crash windows if I tried to let it sleep for more than @ 5 min. Resume from sleep would hang and I wold have to do a hard reset to get it working again. I finally just set it to shut down instead of sleep and that worked ok, but I would much rather have it just sleep the machine. Since event viewer errors pointed to my psu or memory I ran some tests and determined it was the psu. Since the swap it sleeps flawless, and wakes perfect I just have to work out this Netflix thing and I'll be very happy. Thanks again for your help!
newfiend

Sent from my SGH-i937 using Board Express

User avatar
newfiend

Posts: 2503
Joined: Tue Jun 07, 2011 12:10 pm
Location: Earth

HTPC Specs: Show details

#11

Post by newfiend » Fri Jan 20, 2012 7:25 pm

Thanks for the help barnabas! I'll give this a go tonight. Appreciate all your help!
on a side note.. Have you thought about compiling this as an installer package for x86 and x64 machines for people to download? You could charge a small fee for it as I am sure most people would pay to not have to deal with going through all the registry editing etc. as some people don't like messing with it.. doesn't bother me in the slightest but some just don't like messing with it.. I'm sure I am not the only one that has had this problem and your fix seems like the perfect solution.. You could make a few extra $ I'm sure.. remember that "fart app" that you refered to in another thread that made the phone guys lots of cash?..this could be you! (disclaimer: I am in no way refering to your fix as a fart or poo btw by the previous comment) LOL :D

newfiend~
Last edited by newfiend on Fri Jan 20, 2012 7:43 pm, edited 1 time in total.

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#12

Post by barnabas1969 » Fri Jan 20, 2012 7:34 pm

Hope it works well for you. One thing that I don't think I made clear enough in my explanation is that when you create the Action in Task Scheduler, you need to put a space between each of the arguments. My arguments box contains the following:

Code: Select all

ehexthost32.exe "C:\Program Files (x86)\LEDSdriver\LEDSdriver.exe" USEREVENT0

User avatar
newfiend

Posts: 2503
Joined: Tue Jun 07, 2011 12:10 pm
Location: Earth

HTPC Specs: Show details

#13

Post by newfiend » Fri Jan 20, 2012 7:45 pm

barnabas1969 wrote:Hope it works well for you. One thing that I don't think I made clear enough in my explanation is that when you create the Action in Task Scheduler, you need to put a space between each of the arguments. My arguments box contains the following:

Code: Select all

ehexthost32.exe "C:\Program Files (x86)\LEDSdriver\LEDSdriver.exe" USEREVENT0
Im not using LEDSdriver at this time. Just trying to fix netflix... I am running x64 Windows 7 Home Premium.,
And my HTPC is named HTPC as well...had to laugh at that a little.. :)
So for clarification my arguments box would just have the txt below:

ehexthost32.exe

is this correct?
newfiend~
Last edited by newfiend on Fri Jan 20, 2012 7:58 pm, edited 1 time in total.

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#14

Post by barnabas1969 » Fri Jan 20, 2012 7:58 pm

newfiend wrote:
barnabas1969 wrote:Hope it works well for you. One thing that I don't think I made clear enough in my explanation is that when you create the Action in Task Scheduler, you need to put a space between each of the arguments. My arguments box contains the following:

Code: Select all

ehexthost32.exe "C:\Program Files (x86)\LEDSdriver\LEDSdriver.exe" USEREVENT0
Im not using LEDSdriver at this time. Just trying to fix netflix... I am running x64 Windows 7 Home Premium.,
And my HTPC is named HTPC as well...had to laugh at that a little.. :)
Then you would only need the first argument, which will be ehexthost32.exe.

User avatar
newfiend

Posts: 2503
Joined: Tue Jun 07, 2011 12:10 pm
Location: Earth

HTPC Specs: Show details

#15

Post by newfiend » Fri Jan 20, 2012 7:59 pm

barnabas1969 wrote:
newfiend wrote:
barnabas1969 wrote:Hope it works well for you. One thing that I don't think I made clear enough in my explanation is that when you create the Action in Task Scheduler, you need to put a space between each of the arguments. My arguments box contains the following:

Code: Select all

ehexthost32.exe "C:\Program Files (x86)\LEDSdriver\LEDSdriver.exe" USEREVENT0
Im not using LEDSdriver at this time. Just trying to fix netflix... I am running x64 Windows 7 Home Premium.,
And my HTPC is named HTPC as well...had to laugh at that a little.. :)
Then you would only need the first argument, which will be ehexthost32.exe.
haha.. we posted at the same time..lol ok thanks. now i can't wait to get out of work and try this.. :D
newfiend~

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#16

Post by barnabas1969 » Fri Jan 20, 2012 8:30 pm

Yep, and if memory serves me, I had to put the directory in the "Program Files (x86)" directory in order for it to work. I'm not 100% positive about this, but it seems like I tried to put it in a directory under User\HTPC\Documents, and it would not work.

Of course, you'll need to login as an administrator with elevated privileges (or turn off UAC) in order to create a directory under Program Files (x86) and to put the program there.

User avatar
newfiend

Posts: 2503
Joined: Tue Jun 07, 2011 12:10 pm
Location: Earth

HTPC Specs: Show details

#17

Post by newfiend » Fri Jan 20, 2012 8:37 pm

barnabas1969 wrote:Yep, and if memory serves me, I had to put the directory in the "Program Files (x86)" directory in order for it to work. I'm not 100% positive about this, but it seems like I tried to put it in a directory under User\HTPC\Documents, and it would not work.

Of course, you'll need to login as an administrator with elevated privileges (or turn off UAC) in order to create a directory under Program Files (x86) and to put the program there.
Ok, thanks for the heads up.. I already have UAC off so I should be all set.
I'll post back If I have any more isues or questions.
Thanks!

User avatar
newfiend

Posts: 2503
Joined: Tue Jun 07, 2011 12:10 pm
Location: Earth

HTPC Specs: Show details

#18

Post by newfiend » Fri Jan 20, 2012 10:41 pm

Ok Just got this set up I'll post back and let you know how it works.
The Reg Key for TMT5 was already there =)

User avatar
newfiend

Posts: 2503
Joined: Tue Jun 07, 2011 12:10 pm
Location: Earth

HTPC Specs: Show details

#19

Post by newfiend » Sat Jan 21, 2012 2:01 am

Just a follow up on barnabas's program and Netflix fix for MST..it works perfectly. Watched a 2 hour +movie on Netflix and it didn't sleep once. So a huge thanks goes out to Barnabas! He went out of his way to help me out here, much thanks! My kids are much happier!
newfiend

Sent from my SGH-i937 using Board Express

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#20

Post by barnabas1969 » Sat Jan 21, 2012 2:34 am

Glad I could help. It was payback for the help you gave me in doing a clean install of my nVidia drivers. Karma at work.

Post Reply