MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » Quality Assurance » Archive » 1.0 final and SVN Builds



Reply
 
LinkBack Thread Tools Display Modes
Old 2009-03-23, 13:22   #1 (permalink)
Portal Member
 
Join Date: Apr 2008
Location: Kiel
Age: 36
Posts: 33
Thanks: 0
Thanked 4 Times in 2 Posts

Country:

My System

Default Black screen & seeing part of desktop after resume from standby

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

Last edited by pridehaveit; 2009-03-23 at 13:24..
pridehaveit is offline   Reply With Quote
Old 2009-03-23, 19:19   #2 (permalink)
Portal Developer
 
Join Date: Jan 2005
Age: 32
Posts: 8,567
Thanks: 359
Thanked 654 Times in 423 Posts


Default

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.
__________________
http://day2.no-ip.org/

"Commy64 - The problem there is that Oprah was on. MP tried to save you by blanking the screen"
tourettes is offline   Reply With Quote
Old 2009-03-25, 15:34   #3 (permalink)
Portal Member
 
Join Date: Apr 2008
Location: Kiel
Age: 36
Posts: 33
Thanks: 0
Thanked 4 Times in 2 Posts

Country:

My System

Default

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?
pridehaveit is offline   Reply With Quote
Old 2009-03-25, 20:38   #4 (permalink)
Portal Member
 
Join Date: Mar 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

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 !

Last edited by d0nd; 2009-03-25 at 22:17.. Reason: Removed email address
d0nd is offline   Reply With Quote
Old 2009-03-25, 21:44   #5 (permalink)
Portal Member
 
Join Date: Apr 2008
Location: Kiel
Age: 36
Posts: 33
Thanks: 0
Thanked 4 Times in 2 Posts

Country:

My System

Default

You can download the modified MediaPortal.exe for version 1.0 here.
Help to narrow down S3 Resume bug
Look for my post.
pridehaveit is offline   Reply With Quote
Old 2009-03-25, 22:21   #6 (permalink)
Portal Member
 
Join Date: Mar 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

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 is offline   Reply With Quote
Old 2009-03-26, 08:59   #7 (permalink)
Portal Member
 
Join Date: Apr 2008
Location: Kiel
Age: 36
Posts: 33
Thanks: 0
Thanked 4 Times in 2 Posts

Country:

My System

Default

If i should help you you need to post your log files directly after the problem occurs.
pridehaveit is offline   Reply With Quote
Old 2009-03-26, 11:01   #8 (permalink)
Portal Member
 
Join Date: Mar 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

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 !
d0nd is offline   Reply With Quote
Old 2009-03-26, 11:12   #9 (permalink)
Portal Member
 
Join Date: Apr 2008
Location: Kiel
Age: 36
Posts: 33
Thanks: 0
Thanked 4 Times in 2 Posts

Country:

My System

Default

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.

Last edited by pridehaveit; 2009-03-26 at 11:35.. Reason: Automerged Doublepost
pridehaveit is offline   Reply With Quote
Old 2009-04-16, 23:57   #10 (permalink)
Portal Member
 
Join Date: Apr 2008
Location: Kiel
Age: 36
Posts: 33
Thanks: 0
Thanked 4 Times in 2 Posts

Country:

My System

Default

@d0nd:

Here is a fixed MediaPortal.exe for version 1.0.1 if you are interested.
Attached Files
File Type: zip MediaPortal.zip (180.6 KB, 8 views)
pridehaveit is offline   Reply With Quote
Reply

Bookmarks

Tags
desktop, resume, screen, standby

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
On resume -> black screen hjbaard General Support 4 2009-01-27 11:45
Black screen when resume from standby classico pre 1.0 RC1 9 2006-11-15 18:09
monitor := standby && screen := startpage && f0rmula MediaPortal 1 Talk 5 2006-01-27 16:55


All times are GMT +1. The time now is 20:01.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden