1.15.0 - MediaPortal Invisible on Resume from Hibernate | Page 3

Discussion in 'Archive' started by rmeredit, October 1, 2016.

  1. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,240
    Likes Received:
    6,203
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,202 / 9
    Home Country:
    France France
    Show System Specs
    I'm agree with you but still the error i have explain about GPU crash, MP will not recover even with releasing render target because GPU card are not more available, but this happen only when GPU is recovered/crashed and for sure there are other devicelost message that can surely be solved by like you explain.

    I will surely add log to know if in @rmeredit case, GPU information are there or not on his system.

    I will supply you the log when i trigger/simulate the GPU recovery and you will see what is happening and i really hope i'm wrong and that releasing render target can be enough :p


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,526
    Likes Received:
    4,734
    Ratings:
    +8,200 / 17
    Home Country:
    New Zealand New Zealand
    I am saying that "GPU card are not more available" because reset failed, and reset failed because the render target was not released.
    Release render target => reset succeeds ==> GPU available again

    Is it clear now? :)
     
    • Thank You! Thank You! x 1
  4. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,240
    Likes Received:
    6,203
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,202 / 9
    Home Country:
    France France
    Show System Specs
    I'm understanding you very clear :)
    Maybe i'm wrong but it seems that we can have different level of GPU failed but like i'm saying, i'm maybe totally wrong.
    Let's hope we can clear correctly render target.
     
  5. SpudR
    • Team MediaPortal

    SpudR Documentation Group

    Joined:
    July 27, 2007
    Messages:
    2,599
    Likes Received:
    448
    Occupation:
    CTO, MD
    Location:
    Yorkshire, UK
    Ratings:
    +674 / 2
    Home Country:
    England England
    Show System Specs
    Glad you guys know WTF is going on - Waaaaaaay above my pay grade...
    FYi, I also had an error with the MusicInfoHandler timing out. Disabled and testing...
    Not sure if at all relevant...
     
  6. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,240
    Likes Received:
    6,203
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,202 / 9
    Home Country:
    France France
    Show System Specs
    It seems that we can't have 'IDirect3DDevice9::CreateAdditionalSwapChain' method on C#.

    Still my simulation doesn't exactly what @rmeredit get in log but like MPC-HC / DVBViewer handle that correctly, we should be able to do it with MP but in my case after disable/enable the card, MP can't get the list of GPU card who was disabled.

    I have added logs :

    Code (Text):
    1. [2016-10-06 20:22:12,451] [Log    ] [MPMain   ] [DEBUG] - D3D: Init()
    2. [2016-10-06 20:22:13,616] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information : NVIDIA GeForce GTX 460
    3. [2016-10-06 20:22:14,368] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information :
    4. [2016-10-06 20:22:15,054] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information :
    5. [2016-10-06 20:22:15,058] [Log    ] [MPMain   ] [DEBUG] - D3D: Init Adapter #0: NVIDIA GeForce GTX 460 - Driver: nvd3dum.dll (10.18.13.6839) - DeviceName: \\.\DISPLAY10
    6. [2016-10-06 20:22:15,059] [Log    ] [MPMain   ] [DEBUG] - D3D: Init Adapter #1:  - Driver:  (0.0.0.0) - DeviceName:
    7. [2016-10-06 20:22:15,059] [Log    ] [MPMain   ] [DEBUG] - D3D: Init Adapter #2:  - Driver:  (0.0.0.0) - DeviceName:
    8. [2016-10-06 20:22:24,929] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information : NVIDIA GeForce GTX 460
    9. [2016-10-06 20:22:25,622] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information :
    10. [2016-10-06 20:22:26,224] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information :
    11. [2016-10-06 20:22:26,245] [Log    ] [MPMain   ] [DEBUG] - D3D: Starting and find Enumeration Settings - retry 0
    12. [2016-10-06 20:22:26,808] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information : NVIDIA GeForce GTX 460
    13. [2016-10-06 20:22:27,405] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information :
    14. [2016-10-06 20:22:28,008] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information :
    15. [2016-10-06 20:22:28,011] [Log    ] [MPMain   ] [DEBUG] - D3D: Starting and find Adapter info - retry #0
    16. [2016-10-06 20:22:28,659] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information : NVIDIA GeForce GTX 460
    17. [2016-10-06 20:22:29,263] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information :
    18. [2016-10-06 20:22:29,901] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information :
    19. [2016-10-06 20:22:30,525] [Log    ] [MPMain   ] [DEBUG] - D3D: FindAdapterForScreen Adapter #0: NVIDIA GeForce GTX 460 - Driver: nvd3dum.dll (10.18.13.6839) - DeviceName: \\.\DISPLAY10
    20. [2016-10-06 20:22:31,253] [Log    ] [MPMain   ] [DEBUG] - D3D: Starting and find Adapter #0: NVIDIA GeForce GTX 460 - retry #1
    Against when on MP start :
    Code (Text):
    1. [2016-10-06 20:19:17,341] [Log    ] [MPMain   ] [DEBUG] - D3D: Init()
    2. [2016-10-06 20:19:18,058] [Log    ] [MPMain   ] [DEBUG] -  D3DEnumeration ai.Information : NVIDIA GeForce GTX 460
    3. [2016-10-06 20:19:18,718] [Log    ] [MPMain   ] [DEBUG] -  D3DEnumeration ai.Information : Intel(R) HD Graphics 4000
    4. [2016-10-06 20:19:19,526] [Log    ] [MPMain   ] [DEBUG] -  D3DEnumeration ai.Information : Intel(R) HD Graphics 4000
    5. [2016-10-06 20:19:19,535] [Log    ] [MPMain   ] [DEBUG] - D3D: Init Adapter #0: NVIDIA GeForce GTX 460 - Driver: nvd3dum.dll (10.18.13.6839) - DeviceName: \\.\DISPLAY10
    6. [2016-10-06 20:19:19,536] [Log    ] [MPMain   ] [DEBUG] - D3D: Init Adapter #1: Intel(R) HD Graphics 4000 - Driver: igdumdim32.dll (10.18.10.4425) - DeviceName: \\.\DISPLAY85
    7. [2016-10-06 20:19:19,536] [Log    ] [MPMain   ] [DEBUG] - D3D: Init Adapter #2: Intel(R) HD Graphics 4000 - Driver: igdumdim32.dll (10.18.10.4425) - DeviceName: \\.\DISPLAY86
    8. [2016-10-06 20:19:19,941] [Log    ] [MPMain   ] [DEBUG] -  D3DEnumeration ai.Information : NVIDIA GeForce GTX 460
    9. [2016-10-06 20:19:20,303] [Log    ] [MPMain   ] [DEBUG] -  D3DEnumeration ai.Information : Intel(R) HD Graphics 4000
    10. [2016-10-06 20:19:20,612] [Log    ] [MPMain   ] [DEBUG] -  D3DEnumeration ai.Information : Intel(R) HD Graphics 4000
    11. [2016-10-06 20:19:20,613] [Log    ] [MPMain   ] [DEBUG] - D3D: Starting and find Enumeration Settings - retry 0
    12. [2016-10-06 20:19:29,481] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information : NVIDIA GeForce GTX 460
    13. [2016-10-06 20:19:30,238] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information : Intel(R) HD Graphics 4000
    14. [2016-10-06 20:19:30,982] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information : Intel(R) HD Graphics 4000
    15. [2016-10-06 20:19:30,984] [Log    ] [MPMain   ] [DEBUG] - D3D: Starting and find Adapter info - retry #0
    16. [2016-10-06 20:19:35,303] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information : NVIDIA GeForce GTX 460
    17. [2016-10-06 20:19:35,885] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information : Intel(R) HD Graphics 4000
    18. [2016-10-06 20:19:36,173] [Log    ] [MPMain   ] [DEBUG] - D3DEnumeration ai.Information : Intel(R) HD Graphics 4000
    19. [2016-10-06 20:19:36,427] [Log    ] [MPMain   ] [DEBUG] - D3D: FindAdapterForScreen Adapter #2: Intel(R) HD Graphics 4000 - Driver: igdumdim32.dll (10.18.10.4425) - DeviceName: \\.\DISPLAY86
    20. [2016-10-06 20:19:36,800] [Log    ] [MPMain   ] [DEBUG] - D3D: Starting and find Adapter #2: Intel(R) HD Graphics 4000 - retry #1
    We can see clearly that Intel(R) HD Graphics 4000 is no more detected until MP restart.

    So we have both thing to fix :
    - When GPU hung -> add a restart of MP because for now it's not possible to retrieve GPU card list and other information from 'Microsoft.DirectX.Direct3D.Manager.Adapters'
    - Trying to fix render target etc. (or have a wait loop with a timeout and trying to properly release it until all was ok and let MP rendering)
     
  7. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,526
    Likes Received:
    4,734
    Ratings:
    +8,200 / 17
    Home Country:
    New Zealand New Zealand
    Quick Google search tells me it is done like this:
    https://msdn.microsoft.com/en-us/library/windows/desktop/bb153281(v=vs.85).aspx
    Code (Text):
    1. SwapChain sc = new SwapChain(device, presentParams);
    As I said in my previous replies, I think restarting is only necessary if we can't reset properly. My opinion is that failure to receive the GPU card list is due to failure to reset. As it says in the documentation:
    https://msdn.microsoft.com/en-us/library/windows/desktop/bb174425(v=vs.85).aspx
     
    • Thank You! Thank You! x 1
  8. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,240
    Likes Received:
    6,203
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,202 / 9
    Home Country:
    France France
    Show System Specs
    Thanks :)
    I have done a quick try and for sure like you explain the reset failed hard (it failed for both line):

    Code (Text):
    1.  
    2.                 SwapChain sc = new SwapChain(GUIGraphicsContext.DX9Device, _presentParamsBackup);
    3.                 GUIGraphicsContext.DX9Device.Reset(_presentParamsBackup);
    4.  
    When i disable/enable the card, GUIGraphicsContext.DX9Device is no longer valid along with 'Microsoft.DirectX.Direct3D.Manager.Adapters'

    So 'SwapChain sc = new SwapChain(GUIGraphicsContext.DX9Device, _presentParamsBackup);' failed too because of GUIGraphicsContext.DX9Device
     
  9. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,526
    Likes Received:
    4,734
    Ratings:
    +8,200 / 17
    Home Country:
    New Zealand New Zealand
    I expect it to fail like that. In order to have a chance of working, the swap chain must be integrated properly from MP startup (ie. D3D/DX init) including replacement of Device.Present() with SwapChain.Present() etc. etc. etc. I think that's going to be quite a lot of work, and unfortunately I don't have the skill to do it.
     
    • Like Like x 1
  10. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,240
    Likes Received:
    6,203
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,202 / 9
    Home Country:
    France France
    Show System Specs
    No luck :(

    After many try, until we are not able to retrieve list of GPU card after a recovery from Windows, it's even no need to try to fix the rendertarget or swapchain etc :(
    The only way that i have quite succeeded was about to start new mediaportalApp inside already started one but after it doesn't work well.
    So in case of GPU driver crash, the only way is to restart MP (but i have two gpu card so maybe it's why it was working lol).

    What can be done is to have a loop running to check if D3D device is ready.
    It seems that DX11 can be handled correctly :)

    Or maybe make a real big rework to have some kind of process before the window form that analyse the device and know where to create the form with GPU failed (but still we can't solve the issue of GPU no more retrieved after a recovery/crash of GPU driver.

    @rmeredit did you try the mediaportal.exe attached few post back ?
     
  11. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,240
    Likes Received:
    6,203
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,202 / 9
    Home Country:
    France France
    Show System Specs
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!