Sleep Issues

Post Reply
gator99

Posts: 54
Joined: Sun Sep 23, 2012 1:08 pm
Location:

HTPC Specs: Show details

Sleep Issues

#1

Post by gator99 » Wed Dec 03, 2014 8:33 pm

So for the past 4-5 years I have just left my HTPC running - never sleeping. With that said I thought I would setup MCE Standby Tool (0.9.102) let it sleep (sleep - s3) while not in use.

I have setup MCE ST, but for some reason my HTPC keeps waking up every half hour or so. I looked in the event view for "Power Trouble Shooter" info, but in the "Wake Source:" it gives me Unknown.

with that said, I am running MCE buddy to rename and move recorded files and it appears to be an issue within MCE Buddy.

I have MCE buddy scheduled to Start at 8AM and stop at 11:59PM and have chosen to not allow it to wake the system, I do however have it set to prevent sleep if working on a conversion.

below is the event view warning and these warnings occur right at or within seconds of my "resume from sleep"

Log Name: Application
Source: MCEBuddy2x
Date: 12/3/2014 2:12:49 PM
Event ID: 23332
Task Category: None
Level: Warning
Keywords: Classic
User: N/A
Computer: HTPC
Description:
Error trying to resume MCEBuddy System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.

Server stack trace:
at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at MCEBuddy.Globals.ICore.SuspendConversion(Boolean suspend)
at MCEBuddy.Service.ServiceModule.OnPowerEvent(PowerBroadcastStatus powerStatus)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="MCEBuddy2x" />
<EventID Qualifiers="0">23332</EventID>
<Level>3</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-12-03T19:12:49.000000000Z" />
<EventRecordID>44948</EventRecordID>
<Channel>Application</Channel>
<Computer>HTPC</Computer>
<Security />
</System>
<EventData>
<Data>Error trying to resume MCEBuddy System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.

Server stack trace:
at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at MCEBuddy.Globals.ICore.SuspendConversion(Boolean suspend)
at MCEBuddy.Service.ServiceModule.OnPowerEvent(PowerBroadcastStatus powerStatus)</Data>
</EventData>
</Event>

mercalia

Posts: 168
Joined: Tue Aug 19, 2014 5:39 pm
Location:

HTPC Specs: Show details

#2

Post by mercalia » Thu Dec 04, 2014 12:07 am

In my case I have to switch out the usb mouse and keyboard whose random agitations will wake up my wmc. does the standby tool work with windows 7?

User avatar
newfiend

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

HTPC Specs: Show details

#3

Post by newfiend » Thu Dec 04, 2014 1:04 am

After the PC Wakes from sleep you can open an elevated CMD prompt. At the prompt type powercfg -lastwake
It should tell you what "woke" the PC last.
Out of curiosity (I've never used MCEBuddy) can you set MCEBuddy to wake the PC at a certain time or run at a certain time? (Edit: I see you can from your post above).

I have my Media Center set up to wake @3 am and optimize itself and set other tasks to run around that time as well since the PC is already awake. (backups and media browser tasks for my PC)
To set up Optimization:
Open Media Center > Tasks/Settings > General > Optimization select Perform Optimization and set a time for it to do so.
Then set MCE Buddy to run approx. 20-30 Min. after that time if that indeed is what is waking the PC.

When the Conversion from MCEBuddy is done I would think that MCE ST should return it to a sleeping state.
My PC usually wakes up @3 and runs it's tasks approx. an hour with backups running etc. and then goes back to sleep. It could be that your drives aren't spun up or awake enough when MCEBuddy is trying to run and throwing an error. If you set it to run a bit after an optimization the drives should be awake and spinning and it may help with the error you are getting.. I could be wrong but might be worth a try.
newfiend~

gator99

Posts: 54
Joined: Sun Sep 23, 2012 1:08 pm
Location:

HTPC Specs: Show details

#4

Post by gator99 » Thu Dec 04, 2014 1:39 am

newfiend wrote:After the PC Wakes from sleep you can open an elevated CMD prompt. At the prompt type powercfg -lastwake
It should tell you what "woke" the PC last.
Out of curiosity (I've never used MCEBuddy) can you set MCEBuddy to wake the PC at a certain time or run at a certain time? (Edit: I see you can from your post above).

I have my Media Center set up to wake @3 am and optimize itself and set other tasks to run around that time as well since the PC is already awake. (backups and media browser tasks for my PC)
To set up Optimization:
Open Media Center > Tasks/Settings > General > Optimization select Perform Optimization and set a time for it to do so.
Then set MCE Buddy to run approx. 20-30 Min. after that time if that indeed is what is waking the PC.

When the Conversion from MCEBuddy is done I would think that MCE ST should return it to a sleeping state.
My PC usually wakes up @3 and runs it's tasks approx. an hour with backups running etc. and then goes back to sleep. It could be that your drives aren't spun up or awake enough when MCEBuddy is trying to run and throwing an error. If you set it to run a bit after an optimization the drives should be awake and spinning and it may help with the error you are getting.. I could be wrong but might be worth a try.
newfiend~
tried "powercfg -lastwake" below are results, which lead me to use the "power-troubleshooting" filter in Event Viewer.

C:\WINDOWS\system32>powercfg -lastwake
Wake History Count - 1
Wake History [0]
Wake Source Count - 0

No data to help determine if it is MCE Buddy.

With that said I do optimize WMC at 4 AM, so I will try your suggestion of running MCE Buddy 20 minutes or so after optimization is to begin and let it run for an hour or so which should be plenty of time.

one quick question, I have my power settings set to Balanced and sleep to start after 30 Minutes with Wake Timers enabled, what should I have my "Hard Disk" settings set to, Never or a time less than my sleep settings of 30 minutes?

I also changed my MediaBrowser to run its tasks in this timeframe as well. I will see what it does overnight and report back, thanks again.

User avatar
newfiend

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

HTPC Specs: Show details

#5

Post by newfiend » Thu Dec 04, 2014 2:47 am

My power settings are the same as yours, Balanced, sleep start after 30 min. My current HDD settings are set to 20 min, but I don't use MCEBuddy either and I don't know what type/brand/model HDD's you are using. Some have longer spin up times than others etc.. My suggestion may work for you or it may not.. but If MCEBuddy is trying to run and pull data from a drive that isn't awake/spun-up it could possibly throw an error if the drive doesn't recover from sleep quick enough.

I'm just guessing that that could be the problem?? I don't know for sure of course. A little testing on your end may be in order to see what works with the HDD settings. I don't think I would set it to never though as the drive will constantly spin and use more energy + wear down quicker.. but I say do what works best for what you need. Try different settings until you find a combination that works.

Also the powercfg -lastwake works best right after the pc wakes unexpectedly. The sooner you do it the better. It may take a few tries to get a result.
newfiend~

gator99

Posts: 54
Joined: Sun Sep 23, 2012 1:08 pm
Location:

HTPC Specs: Show details

#6

Post by gator99 » Thu Dec 04, 2014 3:59 am

I'll give it a try. As far as drives I am using a ssd for system drive, however all WMC recordings are done on one of three western digital green drives 2tb.

gator99

Posts: 54
Joined: Sun Sep 23, 2012 1:08 pm
Location:

HTPC Specs: Show details

#7

Post by gator99 » Thu Dec 04, 2014 2:28 pm

I believe it is MCE buddy and will uninstall it tonoight to see if that fixies it then regroup as I need MCE Buddy's functionality in my system. Attached are the list of events from my event viewer, both Power-troubleshooting and MCE Buddy - on the Power-Troubleshooting each event is the same, waking from sleep and if you look at the time on the MCE Buddy screenshot they correspond with the HTPC waking from sleep. https://drive.google.com/folderview?id= ... sp=sharing

User avatar
newfiend

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

HTPC Specs: Show details

#8

Post by newfiend » Fri Dec 05, 2014 12:22 am

gator99 wrote:I believe it is MCE buddy and will uninstall it tonoight to see if that fixies it then regroup as I need MCE Buddy's functionality in my system. Attached are the list of events from my event viewer, both Power-troubleshooting and MCE Buddy - on the Power-Troubleshooting each event is the same, waking from sleep and if you look at the time on the MCE Buddy screenshot they correspond with the HTPC waking from sleep. https://drive.google.com/folderview?id= ... sp=sharing
From the pic's you posted it does look as if MCEBuddy is waking the system. If removing it fixes the sleep issue that would narrow it down. From there it would be trying to re-configure MCEBuddy somehow to not wake the PC after reinstalling it.. I'm sorry I can't offer more suggestions on settings for that program but I have never used it. Hope you can at least determine what's causing it and hopefully find a workaround for it.
good luck!
newfiend~

gator99

Posts: 54
Joined: Sun Sep 23, 2012 1:08 pm
Location:

HTPC Specs: Show details

#9

Post by gator99 » Fri Dec 05, 2014 12:31 am

No problem at all and thank you to everyone that commented it was a great help and I hope I can just use MB3 only so I will watch the development of the new rename plugin

gator99

Posts: 54
Joined: Sun Sep 23, 2012 1:08 pm
Location:

HTPC Specs: Show details

#10

Post by gator99 » Sat Dec 06, 2014 2:25 pm

So I have uninstalled MCEBuddy and the MCE standby tool and my machine still keeps waking from sleep every thirty minutes. The event log still gives me no indication of what is waking it. Any other suggestions?

User avatar
newfiend

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

HTPC Specs: Show details

#11

Post by newfiend » Sat Dec 06, 2014 6:52 pm

gator99 wrote:So I have uninstalled MCEBuddy and the MCE standby tool and my machine still keeps waking from sleep every thirty minutes. The event log still gives me no indication of what is waking it. Any other suggestions?
There are many things that can wake a PC..
What USB Devices do you have attached to the PC? Any Keyboards, Mice, any MCE Receivers for the Remote control?
If you have any mice or keyboards attached (Wireless USB Dongles) try removing them see of the behavior persists.. Make sure they are OFF as any mouse movement or keyboard press wakes a PC usually.

Check that the batteries in such devices are also fresh as dying batteries can make remotes and wireless devices misbehave.
How is your network setup? Any Servers or NAS devices that might send a WOL packet to the PC? or a Service set to run at a 30 min schedule? Usually you can get some idea of what is waking the PC by running powercfg -lastwake at the CMD prompt right after it wakes.. but that seems to constantly come up empty for you.

Type Services.msc in the search box and check the services to maybe determine what if any installed software you have is trying to run every 30 min. and might wake the PC.
Have you checked that you have the latest BIOS installed for you Mainboard and that the BIOS is set to use S3 sleep mode only and Hibernation is turned off?
Just throwing out ideas and some things to check.. What other software is installed on the PC in question?
I also .. For Fun.. would download/install and run Malwarebytes : https://www.malwarebytes.org/ incase you have malware that is messing with your PC. There is a free version. Delete anything it finds.
EDIT: Found this as well http://www.cnet.com/how-to/find-out-wha ... leep-mode/
Open an elevated CMD prompt and type powercfg -requests
and see if some software is waking the PC, hopefully if it is will post a result for you.
newfiend~
Last edited by newfiend on Sat Dec 06, 2014 7: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

#12

Post by newfiend » Sat Dec 06, 2014 7:10 pm

mercalia wrote:In my case I have to switch out the usb mouse and keyboard whose random agitations will wake up my WMC. does the standby tool work with windows 7?
And to answer this question, Yes the MCE Standby tool does in fact work very well with Windows 7. There is a BETA here : http://slicksolutions.eu/downloads.shtml#MST I use the V0.9.102 Beta for Windows 7 w/o issue.
newfiend~

gator99

Posts: 54
Joined: Sun Sep 23, 2012 1:08 pm
Location:

HTPC Specs: Show details

#13

Post by gator99 » Sun Dec 07, 2014 5:25 am

newfiend wrote:
gator99 wrote:So I have uninstalled MCEBuddy and the MCE standby tool and my machine still keeps waking from sleep every thirty minutes. The event log still gives me no indication of what is waking it. Any other suggestions?
There are many things that can wake a PC..
What USB Devices do you have attached to the PC? Any Keyboards, Mice, any MCE Receivers for the Remote control?
If you have any mice or keyboards attached (Wireless USB Dongles) try removing them see of the behavior persists.. Make sure they are OFF as any mouse movement or keyboard press wakes a PC usually.

Check that the batteries in such devices are also fresh as dying batteries can make remotes and wireless devices misbehave.
How is your network setup? Any Servers or NAS devices that might send a WOL packet to the PC? or a Service set to run at a 30 min schedule? Usually you can get some idea of what is waking the PC by running powercfg -lastwake at the CMD prompt right after it wakes.. but that seems to constantly come up empty for you.

Type Services.msc in the search box and check the services to maybe determine what if any installed software you have is trying to run every 30 min. and might wake the PC.
Have you checked that you have the latest BIOS installed for you Mainboard and that the BIOS is set to use S3 sleep mode only and Hibernation is turned off?
Just throwing out ideas and some things to check.. What other software is installed on the PC in question?
I also .. For Fun.. would download/install and run Malwarebytes : https://www.malwarebytes.org/ incase you have malware that is messing with your PC. There is a free version. Delete anything it finds.
EDIT: Found this as well http://www.cnet.com/how-to/find-out-wha ... leep-mode/
Open an elevated CMD prompt and type powercfg -requests
and see if some software is waking the PC, hopefully if it is will post a result for you.
newfiend~


thanks again. I decided to wipe the machine and start fresh it was overdue, so now I have my base system back up and I will see what happens tonight then will work my way back with removing USB devices (mouse, keyboard and remote)

User avatar
newfiend

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

HTPC Specs: Show details

#14

Post by newfiend » Sun Dec 07, 2014 7:57 am

Well, I'm sorry you had to start fresh but sometimes that is the best way to fix things if you can't narrow down a specific problem. Hopefully once you get things set back up it returns to normal. Let me know how you get on with it. Good luck!

Mountainbreeze

Posts: 22
Joined: Wed Sep 17, 2014 8:13 pm
Location:

HTPC Specs: Show details

#15

Post by Mountainbreeze » Mon Dec 08, 2014 2:50 pm

By chance, do you have a smartphone running some sort of WiFi analyzer app? I do and I found that some of its functions would send a wake command to my HTPC. I turned off the WOL function on the NIC to keep it from waking when it shouldn't. That solved the problem along with some other unknown reasons the HTPC was waking.

gator99

Posts: 54
Joined: Sun Sep 23, 2012 1:08 pm
Location:

HTPC Specs: Show details

#16

Post by gator99 » Mon Dec 08, 2014 2:54 pm

Mountainbreeze wrote:By chance, do you have a smartphone running some sort of WiFi analyzer app? I do and I found that some of its functions would send a wake command to my HTPC. I turned off the WOL function on the NIC to keep it from waking when it shouldn't. That solved the problem along with some other unknown reasons the HTPC was waking.

I do use "Fing" but don't think that was it, I am happy to report that after a fresh install of Windows (7 pro 64 bit) - my machine sleeps (peacefully) now with it waking at WMC optimization and Extenders sending WOL.

The only program I have not installed yet is MCE Buddy, so I will install it later and test - always nice to have a fresh install - and now that I have this fresh install I have a system image for next time I want to go back to "Base".

thanks everyone for all the help.

User avatar
newfiend

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

HTPC Specs: Show details

#17

Post by newfiend » Mon Dec 08, 2014 9:57 pm

Glad to hear things are back to normal and that you made a system image..(Smart!) It makes starting over again not such a bad process if things go bad. Hope it goes smooth from here.. Good Luck.
newfiend~

Post Reply