wake up, record, go hibernate/shutdown (1 Viewer)

Stonepecker

Portal Member
October 9, 2010
6
0
Home Country
Germany Germany
Hi everybody,

this is what I want MediaPortal to do for me, but it doesn't:

1. wake up my PC when hibernating
2. record something
3. go hibernate or shutdown when done.

(1) and (2) work fine, (3) doesn't. PC continues running after the recording.

I don't seem to find the place in the MP Server settings where I can instruct MP to behave the way I want.

Setting the PowerScheduler option "Shutdown server after n minutes" to say 2 minutes causes the whole system to shutdown on me after 2 minutes which is NOT what I want.

Another setting I use with PowerSchedler is: Forced shutdown.


What am I missing / overlooking?

Thanks for support,
Stonepecker

MediaPortal Version: 1.1.1.0 w. PowerScheduler
MediaPortal Skin:
Windows Version: Win 7
CPU Type: Core 2 Duo
 

Jay_UK

Test Group
  • Team MediaPortal
  • October 6, 2009
    1,780
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi there,

    Have you enabled/configured the client Powerscheduler plugin?

    We need logs/config to be able to accurately help you....without these we're blind and just guessing.

    J.
     

    Stonepecker

    Portal Member
    October 9, 2010
    6
    0
    Home Country
    Germany Germany
    Thanks for replying.

    Yes the Powerscheduler is enabled. As I said, wakeup works fine, just where do I tell PowerScheduler to go hibernate or shutdown the system once a scheduled recording is done? Right now it just shuts down on me - no recording scheduled, while I'm doing other things.

    I'll gladly send you log files - there are about 18 of them, which do you need?

    Stonepecker
     

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,780
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi there,

    If you start MePo with the debug option (available from the Start Menu/Programs/Team Mediaportal) that will generate a zip file with everything in there...

    Can I just reconfirm with you.... that you have enabled both powerscheduler plugins (one in TV Server config, and the other in MePo config)? By the sounds of it you haven't??

    The option where you have specified 2 minutes is what is used to determine when the plugin will shutdown after detecting no "activity". If you have only enabled the TVServer plugin, then the "activity" is only when a recording is happening, etc. It will ignore any other activity (movies, music, radio, pictures, etc) This is where you need to enable the Mediaportal Client Powerscheduler plugin. This plugin simply reports back to the TVServer plugin if there is activity on the front end (eg viewing movies, pictures, music, etc) - if there is activity then the TVServer powerscheduler plugin won't shutdown.

    Hope this helps,

    J.
     

    Stonepecker

    Portal Member
    October 9, 2010
    6
    0
    Home Country
    Germany Germany
    Can I just reconfirm with you.... that you have enabled both powerscheduler plugins (one in TV Server config, and the other in MePo config)? By the sounds of it you haven't??

    I have. In both.

    As to specifying in the TVserver shutdown/hibernate after 2 mins of inactivity - this results in shutting down the whole system while I'm writing this to you, for example. Which is what I do not want.

    What I'd like to see, but seems not to be implemented in this fashion, is the option to shut down etc. OR NOT to when I'm scheduling a recording. Sometime it's practical to let a recording run while I'm doing other things, hence no shutdown at the end of it. Sometimes the opposite makes sense, e.g. in the dead of night when I'm sleeping, but I want the machine to work for me and then go to sleep, too. *grin*

    I'll do what you suggest - start with the debug option and post the zip.

    Thanks for enduring my nagging...

    Regards,
    Stonepecker

    It did it again - shut down while writing this. I had scheduled a recording then exited MP. Two minutes later it powered down.

    Anyhow, the MP debugger starts gathering system eventlog information it enters an endless loop with the following error (I tried all three debug options)

    "MS .NET Framework: Unicode character \uD868 in index 616 cannot be transleted into the indicated code page".
    Here are the details, unfortunately in German:

    Informationen über das Aufrufen von JIT-Debuggen
    anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

    ************** Ausnahmetext **************
    System.Text.EncoderFallbackException: Das Unicode-Zeichen \uD868 im Index 616 kann nicht in die angegebene Codepage übersetzt werden.
    bei System.Text.EncoderExceptionFallbackBuffer.Fallback(Char charUnknown, Int32 index)
    bei System.Text.EncoderFallbackBuffer.InternalFallback(Char ch, Char*& chars)
    bei System.Text.UTF8Encoding.GetBytes(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount, EncoderNLS baseEncoder)
    bei System.Text.EncoderNLS.GetBytes(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount, Boolean flush)
    bei System.Text.EncoderNLS.GetBytes(Char[] chars, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex, Boolean flush)
    bei System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
    bei System.IO.StreamWriter.Dispose(Boolean disposing)
    bei System.IO.TextWriter.Dispose()
    bei MediaPortal.Support.EventLogCsvLogger.CreateLogs(String destinationFolder)
    bei WatchDog.PostTestActions.PerformActions()
    bei WatchDog.MPWatchDog.PerformPostTestActions(Boolean autoClose)
    bei WatchDog.MPWatchDog.tmrMPWatcher_Tick(Object sender, EventArgs e)
    bei System.Windows.Forms.Timer.OnTick(EventArgs e)
    bei System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
    bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Geladene Assemblys **************
    mscorlib
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.4952 (win7RTMGDR.050727-4900).
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll.
    ----------------------------------------
    WatchDog
    Assembly-Version: 1.1.1.11856.
    Win32-Version: 1.1.1.0.
    CodeBase: file:///C:/Program%20Files/Team%20MediaPortal/MediaPortal/WatchDog.exe.
    ----------------------------------------
    System.Windows.Forms
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.4927 (NetFXspW7.050727-4900).
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
    ----------------------------------------
    System
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.4927 (NetFXspW7.050727-4900).
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll.
    ----------------------------------------
    System.Drawing
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.4927 (NetFXspW7.050727-4900).
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
    ----------------------------------------
    Accessibility
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.4927 (NetFXspW7.050727-4900).
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll.
    ----------------------------------------
    Utils
    Assembly-Version: 2.2.7.11849.
    Win32-Version: 2.2.7.0.
    CodeBase: file:///C:/Program%20Files/Team%20MediaPortal/MediaPortal/Utils.DLL.
    ----------------------------------------
    System.Xml
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.4927 (NetFXspW7.050727-4900).
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll.
    ----------------------------------------
    mscorlib.resources
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.4952 (win7RTMGDR.050727-4900).
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll.
    ----------------------------------------
    DaggerLib.DSGraphEdit
    Assembly-Version: 1.0.2866.28351.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///C:/Program%20Files/Team%20MediaPortal/MediaPortal/DaggerLib.DSGraphEdit.DLL.
    ----------------------------------------
    DirectShowLib-2005
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.0.0.
    CodeBase: file:///C:/Program%20Files/Team%20MediaPortal/MediaPortal/DirectShowLib-2005.DLL.
    ----------------------------------------
    DaggerLib
    Assembly-Version: 1.0.2856.27998.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///C:/Program%20Files/Team%20MediaPortal/MediaPortal/DaggerLib.DLL.
    ----------------------------------------
    MediaPortal.Support
    Assembly-Version: 1.1.1.11847.
    Win32-Version: 1.1.1.0.
    CodeBase: file:///C:/Program%20Files/Team%20MediaPortal/MediaPortal/MediaPortal.Support.DLL.
    ----------------------------------------
    System.resources
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.4927 (NetFXspW7.050727-4900).
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.resources/2.0.0.0_de_b77a5c561934e089/System.resources.dll.
    ----------------------------------------
    System.Windows.Forms.resources
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.4927 (NetFXspW7.050727-4900).
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
    ----------------------------------------

    ************** JIT-Debuggen **************
    Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
    Konfigurationsdatei der Anwendung oder des Computers
    (machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
    Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.

    Zum Beispiel:

    <configuration>
    <system.windows.forms jitDebugging="true" />
    </configuration>

    Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
    Ausnahmen an den JIT-Debugger gesendet, der auf dem
    Computer registriert ist, und nicht in diesem Dialogfeld behandelt.
     

    robbo100

    Retired Team Member
  • Premium Supporter
  • May 5, 2009
    1,290
    309
    UK
    Home Country
    United Kingdom United Kingdom
    It sounds like you are saying that the PC hibernates whilst you are busy doing other things. To be honest, if this is the case then Powerscheduler is working correctly.

    If there are programs which you want to use on your PC which prohibit powerscheduler from hibernating (i.e. if you are browsing the internet or using outlook then don't hibernate, but if both of those are closed then do hibernate) then configure powerscheduler as you did before and then add those programs to the list of processes which stop hibernation (I think it is the "processes" tab in powerscheduler within the TVService from memory).

    If you do this, then the system will keep running while you are using these programs, but then hibernate when you are not using them, and start-up to record. When the recording is done, assuming you haven't opened up one of the programs in your permitted process list, then it will hibernate again.

    (Tip: if you run the program that you want to prohibit hibernation, whilst you are configuring powerscheduler, then it will appear as a process within a drop-down list which you can simply select (and it will be automatically be added to a process list). It will make sense when you do it.)

    Hope this helps

    Robbo
     

    Stonepecker

    Portal Member
    October 9, 2010
    6
    0
    Home Country
    Germany Germany
    Thank you.

    Perhaps there's is some suggestion coming as to how to perform a scheduled system shutdown after a scheduled TV recording has been completed, this being the only circumstance where MP shuts down the system.

    A definitive statement to the effect that this is not possible would also be helpful.

    Thanks,
    Stonepecker
     

    robbo100

    Retired Team Member
  • Premium Supporter
  • May 5, 2009
    1,290
    309
    UK
    Home Country
    United Kingdom United Kingdom
    To the best of my knowledge (99.9% sure), there is no setting that will hibernate the system based upon the criteria of "a program recording is complete". The reason for this is because if are watching TV and recording something at the same time (which is a very common activity for MediaPortal users), then the system might hibernate whilst you are watching TV - which would be very annoying indeed.

    Because of this, the powerscheduler is based purely upon system inactivity with a confirmation timer. Clearly you can set this timer to 1 minute, so that it hibernates very shortly after the system becomes inactive (I don't think you can set it lower than 1 minute though).

    As I said before, you can configure the system to prohibit the hibernation if a certain process is active. I personally have iexplore.exe set as one of these processes and if I am working on the PC and don't want it to hibernate, then I just leave iexplore.exe running in the background. I think this is probably fairly common for MediaPortal users. I also have any video-editing software in the process list, so if I am editing video, the system stays active until I finish.

    Like I say, I think there is a good reason for the current system design, and it should be easy to configure the software to cover most (if not all) people's usage.

    It might help if you describe exactly how you are planning on using your HTPC (e.g. what are you doing when you don't want it to hibernate, and why must it hibernate instantly on the completion of a recording (rather than 1 minute later) which makes the current system design incompatible. That way someone might be able to suggest a work-around to help your situation.

    Robbo
     

    Stonepecker

    Portal Member
    October 9, 2010
    6
    0
    Home Country
    Germany Germany
    Thank you Robbo. I find your reply to be very thoughtful indeed.

    Setting explorer.exe or iexplorer.exe as processes which prevent shutdown crossed my mind too. Then I wondered what happens when MP wakes up the system for a scheduled recording, finishes it, then sees explorer running and doesn't shut it down again because of that.

    Is this the case? Anyway, I'll test this theory.

    My typical - in fact only - use for a tool like MP is that of a videorecorder: a movie is on TV late at night, or at a time whn I don't want or cannot watch TV. I want to record it, then burn it on a DVD to watch it later on my sofa on my TV - not on the PC. Hence I want the PC to run just about for as long as it takes to record the film, or whatever.

    The PC doesn't need to stop the moment the recording is done, a minute or two, or three later is fine.

    Until recently I was using a tool called Bonavista which let me schedule the start and end of a recording with the option at the end of the recording to a) hibernate b) suspend c)power off or d) do nothing. I find this to be a sensible approach. It doesn't impose a certain behaviour forcing the user to look for workarounds if he doesn't like it. Unfortunately Bonavista is very unreliable about actually recording anything, so I went shopping and found MP.

    I never watch TV on the PC while a recording is running, and only rarely do something at the PC while a recording is going. Since it is rather unpredictable what I'm working on at that moment, I find it unreasonable to include all possible candidates on a list of processes.

    Again, your patient and pertinent explanation very much appreciated.

    Stonepecker
     

    robbo100

    Retired Team Member
  • Premium Supporter
  • May 5, 2009
    1,290
    309
    UK
    Home Country
    United Kingdom United Kingdom
    Stonepecker,

    I suspect the main issue here is that you are using MediaPortal for a single task rather than using it for what it is designed for. This isn't a problem and I am sure the developers would be delighted that it can be used in many different ways, but clearly the software will not be tailored exactly to your requirements (as it is designed for systems where MediaPortal is the central hub to all of the PC's activity).

    Setting explorer.exe or iexplorer.exe as processes which prevent shutdown crossed my mind too. Then I wondered what happens when MP wakes up the system for a scheduled recording, finishes it, then sees explorer running and doesn't shut it down again because of that.

    If you set "explorer.exe" as a process to prevent shutdown, the system will never hibernate since explorer.exe runs all the time (it is the basis of windows file navigation and is always active). It would have to be "iexplore.exe" (Internet Explorer) such that when you are using your PC and want to stop it hibernating, then you run Internet Explorer and leave it running in the background (or use it in the foreground if you need it). When you finish using the PC, simply close Internet Explorer and walk away from your PC. One minute later (or however long you set the timer) the system will hibernate.

    If there is a recording, the system will then wake-up and record and then 1 minute after it completes the recording, the system will hibernate again.

    If you want to use your PC whilst it is recording, as long as you run Internet Explorer before you start working, the system will complete the recording, see that iexplore.exe is still running and not hibernate (allowing you to continue working). As before, when you finish work, close Internet Explorer down and one minute later the system will hibernate.

    Other than this, the only suggestion I have is to use a completely different recording software and rely solely on the windows power-management as you were before.

    I can't think of any other advice I can give you. Sorry.

    Robbo100
     

    Users who are viewing this thread

    Top Bottom