Exceptions after stopping LiveTV and entering standby (2 Viewers)

MPUserFromGER

MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    Home Country
    Germany Germany
    TV-Server Version: SVN 17500 (24.02.2008)
    MediaPortal Version: 0.2.3 final with SVN 17500 (24.02.2008)
    MediaPortal Skin: Xface 1.4
    Windows Version: Windows Vista
    CPU Type: AMD Athlon X2 BE-2350 (AM2)
    HDD: Samsung 750GB + HAMA SSD 4GB (timeshifting)
    Memory: 1GB DDR
    Motherboard: MSI K9N SLI Platinum
    Motherboard Chipset: nForce 570
    Motherboard Bios: Award
    Video Card: Gigabyte Radeon 2600XT
    Video Card Driver: Catalyst V8.2
    Sound Card: Realtek (On-Board)
    Sound Card AC3: AC3 / optical SPDIF out
    Sound Card Driver:
    1. TV Card: Technotrend S2-3200
    1. TV Card Type: DVB-S and DVB-S2
    1. TV Card Driver: 5.0.0.12
    2. TV Card:
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: Cyberlink PowerDVD 7.3 codecs
    MPEG2 Audio Codec: Dscaler Audio codec
    Satelite/CableTV Provider: Astra 19.2 E
    HTPC Case: Ahanix MCE 601
    Cooling: power supply fan, CPU boxed cooler, 2 housing fans (all controlled by SpeedFan)
    Power Supply: Ahanix
    Remote: Logitech Harmony 555
    TV: Samsung LCD 32"
    TV - HTPC Connection: DVI to HDMI

    Hi,

    I could not use MediaPortal for about 6 weeks because my motherboard died :mad:
    and I have to say, I really missed it! :p

    I am using SVN 17500 and it works quite good. However, I observed the following issue:
    - LiveTV was running
    - Pressed ESC to enter home menu
    - Pressed STOP to stop Live TV
    - Pressed PowerOff on remote to enter standby
    - The PC shut down ok
    - After 1 minute, the PC started up automatically again, which it shouldn't and entered LiveTV again

    The attached logs do show a lot of exceptions.

    ---------------------------------------------------------------
    Update:
    A similar problem seems to be discussed here:
    https://forum.team-mediaportal.com/...mouse-inactivity-35444/index3.html#post238927
     

    MPUserFromGER

    MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    Home Country
    Germany Germany
    I am still having this issue with SVN 17827!

    Why is the PowerScheduler setting the wake up to "1 minute"?
    Code:
    2008-03-09 19:04:29.496000 [6]: PowerScheduler: Set wakeup timer to wakeup system in 1 minutes

    There is absolutely no reason for that, e.g. EPG grabbers are disabled.
    This issue is very annoying because TV is resuming and the PC will never sleep again!

    Any thoughts?
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    Try the attached file (server plugin), it should provide a bit more logging as to who is the guilty plugin.

    EDIT; also try the attached tvservice.exe.

    give me new tv.log when problem occurs.

    Look for this one in the tv.log

    Log.Debug("PowerScheduler: found next wakeup time {0} found by {1}", nextWakeupTime, handlerName);

    I have a feeling it's in the CanSuspend method of tvcontroller that is doing this.
    It reports back to the ps plugin that it is unable to suspend, thats why u get the tv.log entry;

    "2008-03-09 19:04:29.495000 [6]: PowerScheduler.DisAllowShutdown: handler ControllerActiveHandler wants to prevent standby"

    public bool CanSuspend
    {
    get
    {
    //Log.Debug("TVController.CanSuspend: checking cards");

    Dictionary<int, ITvCardHandler>.Enumerator enumer = _cards.GetEnumerator();
    while (enumer.MoveNext())
    {
    int cardId = enumer.Current.Key;
    User[] users = _cards[cardId].Users.GetUsers();
    if (users != null)
    {
    for (int i = 0; i < users.Length; ++i)
    {
    if (_cards[cardId].Recorder.IsRecording(ref users) || _cards[cardId].TimeShifter.IsTimeShifting(ref users))
    {
    //Log.Debug("TVController.CanSuspend: checking cards finished -> cannot suspend");
    return false;
    }
    }
    }
    }
    //Log.Debug("TVController.CanSuspend: IsTimeToRecord");

    // check whether the scheduler would like to record something now, but there is no card recording
    // this can happen if a recording is due, but the scheduler has not yet picked up recording (latency)
    if (_scheduler.IsTimeToRecord(DateTime.Now))
    {
    //Log.Debug("TVController.CanSuspend: IsTimeToRecord finished -> cannot suspend" );
    return false;
    }
    //Log.Debug("TVController.CanSuspend: finished, can suspend");

    return true;
    }
    }

    /gibman
     

    MPUserFromGER

    MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    Home Country
    Germany Germany
    gibman:
    Ok, I used the files that you have provided and I have reproduced the issue now.
    Please find attached the new logs.

    The issue can be seen in the file "tvserver_tv.log" right here:
    Code:
    2008-03-11 23:04:46.000000 [6]: TVController.CanSuspend: checking cards
    2008-03-11 23:04:46.000000 [6]: Inspecting card id 5, name TechnoTrend BDA/DVB-S Tuner
    2008-03-11 23:04:46.001000 [6]: Inspecting user name htpc, channel 1419
    2008-03-11 23:04:46.010000 [6]: Isrecording False cardid 5, user name htpc
    2008-03-11 23:04:46.010000 [6]: IsTimeShifting True cardid 5, user name htpc
    2008-03-11 23:04:46.010000 [6]: TVController.CanSuspend: checking cards finished -> cannot suspend
    2008-03-11 23:04:46.010000 [6]: PowerScheduler.DisAllowShutdown: handler ControllerActiveHandler wants to prevent standby
    2008-03-11 23:04:46.012000 [6]: PowerScheduler: Set wakeup timer to wakeup system in 1 minutes
    2008-03-11 23:04:48.511000 [18]: Controller: StopTimeShifting 5
    2008-03-11 23:04:48.520000 [18]: card: StopTimeShifting user:htpc sub:0
    2008-03-11 23:04:48.522000 [18]: card: StopTimeShifting user:htpc sub:0
    2008-03-11 23:04:48.523000 [18]: user:htpc remove
    2008-03-11 23:04:48.539000 [18]: Stopcard
    2008-03-11 23:04:48.539000 [18]: dvb:FreeSubChannel:1 #0
    2008-03-11 23:04:48.540000 [18]: subch:0 Decompose()
    2008-03-11 23:04:48.540000 [18]: subch:0 StopTimeshifting()
    2008-03-11 23:04:48.551000 [18]: dvb:FreeAllSubChannels:
    2008-03-11 23:04:48.551000 [18]: dvb:FreeAllSubChannels:
    2008-03-11 23:04:49.411000 [18]: PowerScheduler: UnregisterRemote StandbyHandler 2
    2008-03-11 23:04:49.412000 [18]: PowerScheduler: UnregisterRemote WakeupHandler 2
    2008-03-11 23:05:13.502000 [6]: TV service PowerEventThread 30

    For me it seems that the TVServer has not stopped timeshifting yet and therefore sets the wakeup to 1 minute. However, shortly afterwards, the timeshifting is stopped before the PC enters standby...
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    I think u r right.

    The tvengine controller state is at the time of query;

    It is still timeshfiting

    on channel with Id; 1419 (ProSieben)
    with user ; htpc.

    what if u stop TV manually before going to sleep.
    ex. by hitting the start/stop TV button in tvhome GUI ?

    We need to figure out if it's a timing problem or simply a state problem.

    in timing problem I mean that if the PS system queries tve3 if timeshifting has stopped at the wrong time, ex. when the timeshfiting-stop command hasnt yet been issued.

    I do not think it's a timing problem btw.
    It must be a state bug somehow.

    Why ?

    The PS plugin keeps on asking tve3 if it's timeshifting or not.

    Can u monitor tvsetup - does it still timeshift ?

    How do u put MP to sleep ?
    Just hitting power button on remote ?

    /gibman
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    Ok, the problem is the fact that the timeshifting is never stopped on the client.
    See if the attached client ps DLL fixed this.

    Look in mp.log for entries like "PSClientPlugin.UserShutdownNow: yadadada"

    Also thought about showing a small auto-hide popup when hiber/standby is rejected + put the user back to the home menu. Leaving the home menu idle should make the system sleep at some point :)


    /gibman
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    Try this new one instead.
    Seems like when using multiseat, the playback is stopped, but it isnt on singleseat.

    I'm coding in blindness here.
    I'm on multiseat only.

    If I just had a spare dvb-t stick :)

    /gibman
     

    shsalmi

    Portal Member
    November 18, 2007
    16
    0
    Home Country
    Finland Finland
    Hi,
    this is not quite the same problem but this was the closest active forum I could find..

    Powerscheduler is giving me headaches,
    it was working OK in rev 17500
    then on rev17811 17890 and 17897 it does not put the machine into standby anymore
    last test i made with 17897 was hardboot and then touching nothing...
    the mp log shows the following at the time it should go to standby
    2008-03-12 21:00:29.718750 [Debug][ExternalDisplay]: Active window is WINDOW_HOME
    2008-03-12 21:00:29.718750 [Debug][ExternalDisplay]: Detected status is Idle
    2008-03-12 21:00:29.718750 [Debug][ExternalDisplay]: ExternalDisplay: Sending lines to display.
    2008-03-12 21:00:29.765625 [Debug][ExternalDisplay]: Sleeping...
    2008-03-12 21:00:29.984375 [Debug][11]: PSClientPlugin: PowerScheduler: User input detected at 12.3.2008 21:00:29



    then after exactly 1 minutes the same comes again and again
    2008-03-12 21:01:29.984375 [Debug][11]: PSClientPlugin: PowerScheduler: User input detected at 12.3.2008 21:01:29

    Rest of the logs are there:
    http://personal.inet.fi/koti/sssalmi/MPLogs_PS.zip
     

    MPUserFromGER

    MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    Home Country
    Germany Germany
    gibman:
    I tested the PS plugin of your last post and it looks quite good!
    That means I haven't seen this issue any more.

    So from my perspective, the issue seems to be fixed ;)

    Can you please commit the changes?

    Thanks again for your fast reply and your great work!
     

    pnyberg

    Portal Pro
    August 21, 2006
    405
    36
    Stockholm
    Home Country
    Sweden Sweden

    Users who are viewing this thread

    Top Bottom