Bug 33377

Summary: [RADEON:KMS:R600C:DDX] screen not refreshed after full-screen mplayer playback.
Product: xorg Reporter: Pawel Sikora <pawel_sikora>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: bugs.xorg, oldium.pro
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
desktop after mplayer window->fullscreen->window cycle.
none
desktop after additional mplayer window moves.
none
desktop after returning from fullscreen in digikam
none
Xorg.0.log none

Description Pawel Sikora 2011-01-23 04:20:04 UTC
hi,

when i'm switching mplayer (with textured xv output) display
from window -> full screen -> window then sometimes the background
isn't refreshed.
Comment 1 Pawel Sikora 2011-01-23 04:21:11 UTC
Created attachment 42330 [details]
desktop after mplayer window->fullscreen->window cycle.
Comment 2 Pawel Sikora 2011-01-23 04:21:55 UTC
Created attachment 42331 [details]
desktop after additional mplayer window moves.
Comment 3 Oldrich Jedlicka 2011-01-23 11:07:32 UTC
I don't know if it is related, but I have simillar problem with fullscreen updating. Everything works with desktop effects switched off. When I enable desktop effects (using KDE 4.6 RC2), I can see fullscreen updating problem (see below).

I have two screens (LVDS, HDMI), ATI Mobility Radeon HD 3470, Gentoo linux, xorg-server-1.9.3.901-r1, mesa Git master, libdrm Git master, xf86-video-ati Git master, kernel branch drm-radeon-testing. I'm using Gallium driver.

When I move fullscreened mplayer to second screen (it just fully changes the screen where it is rendered, not that it is partly shown on both screens), the second screen doesn't show the video, it just freezes updating. Alt-Tab forward and back helps. When returning back from fullscreen, the window gets to the first screen (where it was originally windowed) and the second screen gets black - only the freshly updated components (clock for example) shows-up. Now the effect is the same as the bug described.

This used to work better when I last tried it (long time ago) - the fullscreened mplayer content was correctly visible when moved across screens, but the bug after changing from fullscreen to windowed mode was there too.

Note: I'm moving the windows with Alt+right mouse button as a customized shortcut to move windows.
Comment 4 Pawel Sikora 2011-01-23 11:24:17 UTC
(In reply to comment #3)

> I have two screens (LVDS, HDMI), ATI Mobility Radeon HD 3470, Gentoo linux,
> xorg-server-1.9.3.901-r1, mesa Git master, libdrm Git master, xf86-video-ati
> Git master, kernel branch drm-radeon-testing. I'm using Gallium driver.

hmmm, i can't reproduce desktop refresh problems on single screen configuration
with aiglx kde effects enabled. it looks like a dual screen setup is required
to expose problem.
Comment 5 Alex Deucher 2011-01-23 12:00:37 UTC
How big is your dualscreen setup?  Mesa had a limits of 4096 pixels for textures until recently.  Do you still have problems if you disable vblank?  run your compositor with vblank_mode=0?  If you start the GL app on one head, then migrate to another, it's likely still waiting for vblanks on the other head.
Comment 6 Pawel Sikora 2011-01-23 12:58:11 UTC
(In reply to comment #5)
> How big is your dualscreen setup?  Mesa had a limits of 4096 pixels for
> textures until recently.

at this moment i have a 1600x1050 lcd connected via analog dsub
and 1920x1080 tv connected via dvi<->hdmi cable. i've a plan
to connect 1600x1050 lcd with digital cable in few days...

> Do you still have problems if you disable vblank? 
> run your compositor with vblank_mode=0?

could you please translate this to the average-kde-user language? :)

in kde 'desktop effects' i have a 'compositing type' set to opengl,
'opengl mode' set to 'texture from pixmap, 'enable direct rendering'
set to yes and 'use vsync' turned off.
Comment 7 Oldrich Jedlicka 2011-01-24 10:55:06 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Do you still have problems if you disable vblank? 
> > run your compositor with vblank_mode=0?
> 
> could you please translate this to the average-kde-user language? :)

This means to start mplayer from command line with `vlank_mode=0 mplayer test.avi`. Or there is an option vblank_mode in .drirc, but the driver should be set to "dri2" for KMS.

Just use the command line option.
Comment 8 Oldrich Jedlicka 2011-01-24 11:17:19 UTC
I've tried to run fullscreen mplayer with vblank_mode=0, but it didn't make any difference.
Comment 9 boris64 2011-06-28 10:03:05 UTC
I'm suffering from the same problem, also using a dualscreen setup here.
Disabling vsync doesn't make any difference. Is there anything else we
could try out? I'm curious, is nobody else using dualscreen experiencing
this? Any news?
Btw., this also affects gallium/r600g (using mesa/ddx/libdrm from git).
Comment 10 boris64 2011-08-14 08:32:21 UTC
I can also reproduce this with fullscreen in digikam.
Please see attachment. Btw., could this be a problem with kwin?
Comment 11 boris64 2011-08-14 08:33:13 UTC
Created attachment 50207 [details]
desktop after returning from fullscreen in digikam
Comment 12 Michel Dänzer 2011-08-14 09:02:45 UTC
If page flipping is enabled and kwin configured to unredirect fullscreen windows, this might be fixed with current xf86-video-ati Git. If not, please attach Xorg.0.log.
Comment 13 boris64 2011-08-14 14:49:42 UTC
Created attachment 50211 [details]
Xorg.0.log

Looks like it didn't work for me :[
Comment 14 Michel Dänzer 2011-08-15 01:27:48 UTC
So if I understand correctly, this only happens if

* More than one monitor is enabled
* Compositing is enabled in kwin

Correct?

If so, does it also happen with kwin compositing set to use XRender instead of OpenGL?
Comment 15 boris64 2011-08-15 01:45:28 UTC
(In reply to comment #14)
> So if I understand correctly, this only happens if
> 
> * More than one monitor is enabled
> * Compositing is enabled in kwin
> Correct?
If 3D effects are disabled, screen is refreshed correctly after fullscreen.


> 
> If so, does it also happen with kwin compositing set to use XRender instead of
> OpenGL?
Xrender makes no difference.
Comment 16 Michel Dänzer 2011-08-15 02:29:45 UTC
(In reply to comment #15)
> > If so, does it also happen with kwin compositing set to use XRender instead of
> > OpenGL?
> Xrender makes no difference.

Then it seems more likely that the problem is with kwin or maybe the core X server than with the radeon driver.
Comment 17 boris64 2011-09-22 07:44:19 UTC
FYI i tested fullscreen video in XFCE-4.8.1 and wasn't able to
reproduce the issue with compositing enabled. So to me it
looks like a kwin+dualhead problem.
Comment 18 Jerome Glisse 2012-02-22 10:14:35 UTC
Closing, please open a bug against kwin in proper bugzilla. But i guess you can also first check if newer kwin,ddx,mesa helps

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.