Startup issues (1 Viewer)

ErickTreetops

Portal Member
May 10, 2015
48
4
Brisbane
Home Country
Australia Australia
I'm still having start-up issues.
The first I think is windows related in that after about 15 minutes of being in sleep mode my PC won't wake up and ignores my remote commands to wake up. I have to perform a manual hard restart which is recorded in the event log as an unexpected shutdown.

The other issue is when i power off the PC and it goes to sleep. Switching it back on within a few minutes wakes the PC up.
The problem is that it doesn't return to the channel I was watching on shutdown.

It goes to the main TV menu where the "TV On" button is off. If i try to select it I get an error message "No free card available".

About 20 seconds later i can select the "TV On" and start watching a channel.

I believe what is happening is the the tv services appear to have gone to sleep and iseither not waking or taking too long to wake up.

On a full restart which is slower this doesn't appear to be an issue. If this is the tv services is there a way to wake it up quicker or stop it going to sleep.

regards

Erick
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    Hello Erick

    The first I think is windows related in that after about 15 minutes of being in sleep mode my PC won't wake up and ignores my remote commands to wake up. I have to perform a manual hard restart which is recorded in the event log as an unexpected shutdown.
    If I had to guess, I'd say that Windows goes into a deeper sleep after a configurable time, and that your remote driver/receiver is not able to wake the PC from that state... but I could be completely wrong.

    The other issue is...
    In general log files are required to troubleshoot issues like this. So, could you post full log files from MediaPortal and TV Server please:
    1. Set MediaPortal log verbosity to debug.
    2. Set TV Server log level to debug.
    3. Restart the TV service (TV Server configuration, manual control > stop service... then start service) to ensure the change takes effect.
    4. Reproduce the problem:
      1. Start MP.
      2. View TV for 30 seconds or so.
      3. Do whatever you do to put the PC to sleep.
      4. Do whatever you do to wake the PC.
      5. Try to start TV (expecting to get the no free card message).
      6. Wait 30 seconds (or whatever it takes).
      7. Try to start TV again (expecting it to succeed).
      8. Close MediaPortal.
    5. Use the watchdog/debug-tool option 3 to collect full log files.
    6. Post/attach the zip file.

    I believe what is happening is the the tv services appear to have gone to sleep and iseither not waking or taking too long to wake up.
    I'll reserve full judgement until I've seen the log files... but my guess based on what you've said is that the tuner driver (not TV Server) takes some time to resume/wake. Evidence for this would be that you get the "no free card" message. If TV service weren't awake, you definitely wouldn't get that message... because the message comes from TV service (!). The message can indicate a variety of conditions, including that tuner(s) are not connected/detected yet.

    On a full restart which is slower this doesn't appear to be an issue.
    This doesn't surprise me. It fits the above guess/hypothesis.

    If this is the tv services is there a way to wake it up quicker or stop it going to sleep.
    TV service doesn't sleep any more or less than all the other software you have when you put the PC to sleep. Therefore there's no way to wake it up quicker or stop it going to sleep.
    Please post the log files as directed above, and let's confirm what's really going on before we leap to conclusions.

    Regards,
    mm
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    3,265
    2,136
    Southampton
    Home Country
    United Kingdom United Kingdom
    The first I think is windows related in that after about 15 minutes of being in sleep mode my PC won't wake up and ignores my remote commands to wake up.
    My laptop does this when powered from the battery -- it sleeps after 15 minutes of inactivity, and then hibernates after 30 minutes of inactivity. But these are settings that you can alter in the power plan. Click:

    Start > Control Panel > Power Options >
    > Change plan settings (for the plan that is active) >
    > Change advanced power settings > expand "Sleep" tree

    The setting "Sleep after" controls the sleep timeout, and "Hibernate after" controls the hibernation timeout. Set the sleep timeout to the value that you want, and set the hibernation timeout to zero (Windows interprets zero to mean "never"). Then save these changes.

    Most PCs cannot wake from hibernation using a remote control; you need either a special motherboard (some Intel motherboards intended for HTPC use can do this), or special additonal hardware (such as the Simrec device), or the convoluted scheme that I use involving an ethernet hub.

    -- from CyberSimian in the UK
     

    ErickTreetops

    Portal Member
    May 10, 2015
    48
    4
    Brisbane
    Home Country
    Australia Australia
    Ok thanks for all the help.
    In regard to CyberSimian in the UK suggestion on the hibernate setting. Under the sleep option in my Power options I only have "sleep after" and "allow wake timer". No hibernate option. The two settings are respectively "15 minutes" and "enabled".

    Now as to the sleep test. I performed two and then one full shutdown and restart and have attached the logs.

    Here is what happened.
    1. 15 second test
    Watch tv channel full screen mode
    Go to sleep and wait 15 seconds to wake up.
    MP went to TV menu "TV on" was off.
    After few seconds i was able to select "TV on" but I had no Audio in MP.

    2 90 second test
    Watch TV in full screen mode (Audio came back after restart)
    Go to sleep and wait 90 seconds before wake up.
    MP went to TV menu "TV on" was off.
    When I selected it to be on error came up saying no available cards.

    3. Reboot PC
    MP starts up, but no plugins of any kind are loaded.
    All i had was the splash screen.
    Remote control couldn't shut it down.
    I had to kill it in the task manager.

    zip files have description in the name to tell them apart.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    Thanks Erick

    1. I'm not able to explain the missing audio, but I suspect that's an HDMI + power timing issue. For all intents and purposes, the logs show MP behaving as if it has and is playing audio.

    2. The reason you got the error is that the TV service hadn't finished loading.
    MP:
    [2015-05-27 18:43:15,112] [Log ] [MPMain ] [DEBUG] - Main: WM_POWERBROADCAST (PBT_APMSUSPEND)
    ...
    [2015-05-27 18:44:36,552] [Log ] [MPMain ] [DEBUG] - Main: WM_POWERBROADCAST (PBT_APMRESUMEAUTOMATIC)
    ...
    [2015-05-27 18:44:45,544] [Log ] [MPMain ] [INFO ] - TVHome.ViewChannelAndCheck(): View channel=GEM
    [2015-05-27 18:44:45,550] [Log ] [MPMain ] [ERROR] - TvServer: Failed to execute remote TV server operation (GetChannelState) The given key was not present in the dictionary.

    TV Server:
    [2015-05-27 18:43:14,338] [Log ] [PowerEventThread] [DEBUG] - OnPowerEvent: PowerStatus: Suspend
    ...
    [2015-05-27 18:44:36,041] [Log ] [PowerEventThread] [DEBUG] - OnPowerEvent: PowerStatus: ResumeAutomatic
    ...
    [2015-05-27 18:44:46,083] [Log ] [PowerEventThread] [INFO ] - Controller: TVServer initialized okay

    As you can see, you attempted to tune before the TV service had finished loading. Therefore, the error isn't surprising.

    3. I'm no expert with these sorts of things (I choose to focus on TV Server), but I wonder if this was due to what looks like insertion of a USB drive during MP start up.


    You asked why MP doesn't automatically start TV on resume.
    I could be wrong, but I suspect that is due to the way you're putting the PC to sleep. I think what I see is:
    1. TV is playing in fullscreen.
    2. You turn the TV off.
    3. Windows starts to suspend.
    4. Suspend triggers TV to stop.
    I think the key issue is (4). If you stop TV before turning the TV off, I think MP should try to start TV automatically when you resume.


    You also asked if there is a way to reduce the TV service reload time.
    Well, the above log entries show that the TV service takes approximately ten seconds to load on resume.

    Five of those ten seconds are a hard-coded delay in PowerScheduler:
    https://github.com/MediaPortal/Medi...lugins/PowerScheduler/PowerScheduler.cs#L1667
    [2015-05-27 18:44:36,075] [Log ] [PowerEventThread] [DEBUG] - PS: ReInit Controller
    [2015-05-27 18:44:41,080] [Log ] [PowerEventThread] [INFO ] - Controller: Initializing TVServer

    You wouldn't have that delay if you hadn't enabled the PowerScheduler plugin [expert mode] -> advanced -> "reinitialize TV controller on wakeup" setting:
    http://wiki.team-mediaportal.com/1_...ver_Configuration#Advanced_(Expert_Mode_only)

    Is there a reason you chose to enable that option?

    Another three of those ten seconds are spent doing nothing, due to your configured tuner detection delay:
    http://wiki.team-mediaportal.com/1_...ration/06_General#Delay_for_TV_card_detection
    [2015-05-27 18:44:41,154] [Log ] [PowerEventThread] [INFO ] - Controller: delaying device detection for 3 second(s)
    [2015-05-27 18:44:44,160] [Log ] [PowerEventThread] [INFO ] - Starting async device detection...

    Is there a reason that you put in that delay?

    The remaining two seconds are the time it actually takes to load the TV service, and that probably can't easily be reduced.

    Hope that helps. :)
     

    ErickTreetops

    Portal Member
    May 10, 2015
    48
    4
    Brisbane
    Home Country
    Australia Australia
    Yes thanks those are things i can fix.
    I re-enabled the controller because i thought it wasn't working right.
    I will deactivate this.
    I didn't touch the tuner detection delay as i didn't know what it was for. But I will change it back to zero.

    Are these the same issues which prevent MP opening going back to the channel i had open when i started the sleep process? Or will i still end up at the TV menu?

    Can you shed some more light on the USB drive issue you mentioned ?
    I have an external USB drive which i use to store movies on.
    Is that the USB causing the issue and what exactly needs fixing.

    The only part I don't get is where you mentioned I am putting my PC to sleep to wrong way.
    "If you stop TV before turning the TV off"
    What are you talking about here when you say TV? The actual TV I use as a monitor, the TV tuner, the Tv service ?
    Could you explain that a different way so i can understand it and perhaps resolve it.

    Erick
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    3,265
    2,136
    Southampton
    Home Country
    United Kingdom United Kingdom
    In regard to CyberSimian in the UK suggestion on the hibernate setting. Under the sleep option in my Power options I only have "sleep after" and "allow wake timer". No hibernate option. The two settings are respectively "15 minutes" and "enabled".
    The procedure that I described applies to Windows Vista and Windows 7. But I see from another post that you are using Windows 8.1. The following looks to be a good explanation of how to disable hibernation on Win 8.1:

    http://www.tomshardware.co.uk/faq/id-2082951/disable-hibernation-windows-windows.html

    If this does not solve your problem waking the HTPC using the remote control, I am all out of ideas! :(

    -- from CyberSimian in the UK
     

    ErickTreetops

    Portal Member
    May 10, 2015
    48
    4
    Brisbane
    Home Country
    Australia Australia
    I have removed the Power Scheduler plugin and restarted the tv service.
    Is the tuner detection delay the "tune" option on the Scan tab.
    Its default was 2 seconds but setting it to 0 stopped any channels being found by the tuner. So I reset it to 2 which is the default.

    Another 15 seconds sleep test shows on waking that MP goes to the guide this time not back to the channel. I am unable to select a tv channel until a few seconds later.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    Are these the same issues which prevent MP opening going back to the channel i had open when i started the sleep process? Or will i still end up at the TV menu?
    The answers to your questions are no and yes.
    I told you what I think is preventing MP from starting the channel you were viewing on resume:
    You asked why MP doesn't automatically start TV on resume.
    I could be wrong, but I suspect that is due to the way you're putting the PC to sleep.


    Can you shed some more light on the USB drive issue you mentioned ?
    I have an external USB drive which i use to store movies on.
    Is that the USB causing the issue and what exactly needs fixing.
    To be clear: I didn't say there was an issue or that anything needed fixing. I simply observed that the cause for the failure to load on that occasion may have been insertion of a USB drive.
    In all your threads and posts that I've read, this is the first time you've mentioned anything like this. Therefore I assumed that the situation you captured in the log files is the first and only time that has happened. Did I assume incorrectly? (Please answer this question.)

    I presume your external USB drive is drive H?
    [collapse]
    Drive: C:
    Free Space: 71.9 GB
    Total Space: 114.1 GB
    File System: NTFS
    Model: Samsung SSD 840 EVO 120GB

    Drive: D:
    Free Space: 941.0 GB
    Total Space: 953.7 GB
    File System: NTFS
    Model: WDC WD10EZRX-22A3KB0

    Drive: H:
    Free Space: 630.7 GB
    Total Space: 1907.7 GB
    File System: NTFS
    Model: WD Ext HDD 1021 USB Device[/collapse]

    The log says that the USB device that was inserted was a Lexar USB flash drive. Possibly drive letter E (E:\).
    [collapse]
    [2015-05-27 18:49:53,673] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: USB Mass Storage Device
    [2015-05-27 18:49:53,673] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVNODES_CHANGED)
    [2015-05-27 18:49:53,673] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2015-05-27 18:49:53,673] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Lexar USB Flash Drive USB Device
    [2015-05-27 18:49:53,688] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2015-05-27 18:49:53,688] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name:
    [2015-05-27 18:49:53,688] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2015-05-27 18:49:54,129] [Log ] [MPMain ] [DEBUG] - Detected new device: E[/collapse]

    Ringing any bells?


    The only part I don't get is where you mentioned I am putting my PC to sleep to wrong way.
    "If you stop TV before turning the TV off"
    What are you talking about here when you say TV? The actual TV I use as a monitor, the TV tuner, the Tv service ?
    None of these. :)
    I'm talking about TV in MediaPortal itself. The "TV On" button in the TV home screen.

    Could you explain that a different way so i can understand it and perhaps resolve it.
    Sure. :)
    When you put MP to sleep, press "stop" on your remote to stop TV playback in MediaPortal... then "power" (or whatever it is you do) to send the TV and/or PC to sleep.

    Is this clear now?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    I have removed the Power Scheduler plugin and restarted the tv service.
    To be clear: I didn't suggest to do that. I simply suggested to disable the "reinitialize..." option. TV Server won't wake for recordings without the PowerScheduler plugin.

    Is the tuner detection delay the "tune" option on the Scan tab.
    No.
    The link I posted was to a description for the Delay for TV card detection setting. That's a setting on the TV Server config -> general -> application tab. I can see how you may have been confused, but please read carefully. :)
     

    Users who are viewing this thread

    Top Bottom