Black screen & seeing part of desktop after resume from standby (1 Viewer)

pridehaveit

Portal Member
April 7, 2008
34
4
Kiel
Germany Germany
I had the problem that sometimes ofter resuming from standby parts of the screen were black and the other part showed the desktop. When i pressed the down key on my MCE compatible remote MediaPortal was reacting again and also show correctly on screen again.

I hunted down the problem in the MedioPortal 1.0 code and found out that sometimes OnSizeChanged was called in class D3DApp after resuming from standby. That leads to the affect that MediaPortal tried to change from fullscreen mode to normal mode although MediaPortal was started in fullscreen mode.

I fixed that issue by extending the if statement in OnSizeChanged. Current code:

2475 protected override void OnSizeChanged(EventArgs e)
2476 {
2477 if (GUIGraphicsContext.IsDirectX9ExUsed() && this.Visible && !_resizeOngoing && !_toggleFullWindowed &&
2478 !_ignoreNextResizeEvent && this.WindowState == _windowState)
2479 {
2480 Log.Info("Main: OnSizeChanged - Resetting device");
2481 SwitchFullScreenOrWindowed(false);
2482 OnDeviceReset(null, null);
2483 }
2484 base.OnSizeChanged(e);
2485 }


New code:

2475 protected override void OnSizeChanged(EventArgs e)
2476 {
2477 if (GUIGraphicsContext.IsDirectX9ExUsed() && this.Visible && !_resizeOngoing && !_toggleFullWindowed &&
2478 !_ignoreNextResizeEvent && this.WindowState == _windowState && !startFullscreen)
2479 {
2480 Log.Info("Main: OnSizeChanged - Resetting device");
2481 SwitchFullScreenOrWindowed(false);
2482 OnDeviceReset(null, null);
2483 }
2484 base.OnSizeChanged(e);
2485 }


Can someone please put this change to subversion.

TV-Server Version: 1.0
MediaPortal Version: 1.0
MediaPortal Skin: Blue3wide
Windows Version: Windows Vista Ultimate SP1
CPU Type: Intel Core 2 Duo 2.1 GHz
HDD: 160 GB
Memory: 1 MB
Motherboard: Shuttle FG33 (SG33G5M)
Video Card: GMA 3100 (onboard)
Video Card Driver: Shuttle 2008-06-05
Sound Card: Realtek ALC888DD
Sound Card AC3:
Sound Card Driver: Shuttle 2007-08-23
1. TV Card: Terratec Cinergy S2 HD PCI
1. TV Card Type: DVB-S, DVB-S2
1. TV Card Driver:
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: MPV
MPEG2 Audio Codec: MPA
h.264 Video Codec: none
Satelite/CableTV Provider: Astra 19.2°E
HTPC Case: Shuttle SG33G5M
Cooling:
Power Supply:
Remote: Shuttle Multimedia Remote (MCE compatible)
TV: Sony
TV - HTPC Connection: HDMI
 

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I'm not sure (without testing...) but the change could break ALT-ENTER toggle when MP is set to start up in fullscreen.

    Also what comes to the issue itself, sounds like a bug in display driver as the screen size will most likely change on wakeup, as normally MP shouldn't be getting OnSizeChanged() on resume from S3/S4.
     

    pridehaveit

    Portal Member
    April 7, 2008
    34
    4
    Kiel
    Germany Germany
    Have you got an idea what i can do about an error in the display driver?
    I use the newest drivers coming from Shuttle for my barebone.
    May be there are drivers from Intel for chipset GMA 3100.

    The OnSizeChanged method was introduced first in version 1.0 RC3.
    Previously the problem does not exists.

    What does the key combination ALT-ENTER?
    Does it change between fullscreen and normal mode?
     

    d0nd

    Portal Member
    March 25, 2009
    7
    0
    France France
    I am experiencing the exact same issue on my Shuttle S33G5M (Vista Ultimate SP1).
    How can I change the code myself as suggested above? I'm very interested in this tweak !
    If it requires to compile from sources etc, can pridehaveit please send me the exe or dll or whatever that is so I can benefit from this fix?
    Thanks a lot !
     

    d0nd

    Portal Member
    March 25, 2009
    7
    0
    France France
    Thanks a lot for sharing your fix !
    I just tried it and it did improve things: the black square isnt black anymore but shows MP interface which is fully functional instead of hanging.
    MP doesnt go back to full screen (720p) though, and remains a square with the desktop background behind it.
    When I launch a movie it does go fullscreen and remains fullscreen once i go back to MP Interface.
    It's still way better cause i dont need to start MP over etc but theres still something wrong I assume since it doesnt go back to full screen.
    Do you have any idea that would help me fix that one last thing ?

    Thanks a lot for your help.
     

    d0nd

    Portal Member
    March 25, 2009
    7
    0
    France France
    Since MP doesn't crash, the watchdog doesn't kick in to gather all usefull logs.
    Can you please tell me what files would be useful to investigate?

    Thanks again !
     

    pridehaveit

    Portal Member
    April 7, 2008
    34
    4
    Kiel
    Germany Germany
    Post the file C:\ProgramData\Team MediaPortal\MediaPortal\logs\MedioPortal.log or something like that.

    tourettes:

    The real problem does not reside in the OnSizeChanged method but in method SwitchFullScreenOrWindowed.
    The method contains this code:

    if (GUIGraphicsContext.IsDirectX9ExUsed() && (useEnhancedVideoRenderer || !useExclusiveDirectXMode))
    {
    BuildPresentParamsFromSettings(true);
    }
    else
    {
    BuildPresentParamsFromSettings(bWindowed);
    }


    On my system BuildPresentParamsFromSettings is called with bwindowed = true because i use EVR. This results in switching to partly to windowed mode. Can you explain why for EVR BuildPresentParamsFromSettings is always called with true?

    I look a little bit further in the subversion history of d3dapp.cs:

    The if statement was introduced in revision 20400.

    The modification was made by you with the comment:

    2nd try for Mantis issue: 0001669: MediaPortal minimizes to system tray when it loses focus (Vista specific)

    May be this change has a bad sideeffect.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    G [solved] Black Screen on all videos after upgrading to either 1.23 or 1.24 from 1.22 General Support 4
    H random black screen live tv and videos (amended) General Support 0
    G Occasional Black screen on Live TV and Recorded TV Watch / Listen Media 5
    doskabouter Black screen while watching some iptv streams General Support 2
    T frequent black screen no audio on playback NOT from beginning Watch / Listen Media 0
    C video wont open, screen goes black and reverts to video menu General Support 3
    A MP2 Black Screen General 6
    Terra some H265 videos stay black, audio is playing General Support 4
    G MadVR, black TV Picture 1.20 Pre Release 1
    C Black Gold Tuner Support General 4
    J Blue Screen Error Submit: Bug Reports 0
    azzuro [fixed] 5011: Version label in Splash screen - pos, size from skin MediaPortal 1 61
    F After resume, TV Server connection screen is shown General Support 4
    M [Duplicate] Always enter full screen when entering TV from main Menu Feature Requests 1
    M Change size of the splash screen Skins and Plugins Installer (MPEI) 2
    T Animated circular icon persists in centre of screen. General 10
    P MP2 Client Screen Flickering on Resume General 2
    Rob Hexenmeister Work arounds for an alternative home screen General Support 3
    lisag Can I get MP1 to open in the Recorded TV screen? MediaPortal 1 Talk 2
    R Media portal resumes with wrong screen resolution General Support 3
    N [Finished] [MP2-806] Playing a recorded radio program does not show screen to allow skipping forward, etc MediaPortal 2 141
    N [Finished] MP2-803 - Delete full series doesn't work when viewing a program in the extended schedule screen MediaPortal 2 12
    morpheus_xx [Finished] [MP2-802] TV-Settings availability in all TV screens MediaPortal 2 12
    G How to access Scheduled Recordings without going through TV Home screen General Support 3
    Rob Hexenmeister Radio Guide descriptions in myradio.xml (screen 30) MediaPortal 1 Skins 3
    Similar threads

























    Top Bottom