Awful video tearing+blinking when using any output method except X11 in video players.

Bug #315267 reported by PowerUser
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fglrx-installer (Ubuntu)
New
Undecided
Unassigned
xorg (Ubuntu)
New
Undecided
Unassigned

Bug Description

Configuration:
 Kubuntu 8.10 (AMD64 version) on AMD Athlon x2 3800+ CPU (dual-core CPU). ATI x1300 videocard with proprietary drivers. Desktop effects in KDE are on. Players tested: virtually all tested. I'm generally prefer Mplayer or VLC and both are affected as well of course. This also occurs in Ubuntu 8.10 AMD64 as well and in many previous OS versions.

Problem:
 When you have desktop effects switched ON (in KDE4 or with Compiz) and therefore composite mode in use, you generally out of luck with video playback.
 The ONLY output method that is willing to work properly in such scenario is basic X11 output method. It will work BUT it is very slow and causes awful CPU load by X server process (when playing high-resolution video, load can go as high as 40% of CPU, i.e. nearly 80% of one of cores wasted JUST TO DRAW VIDEO FRAMES TO THE SCREEN).
 Attempt to use any more advanced output methods like xvideo, OpenGL or similar will work and CPU load is reduced. For example xvideo playback loads CPU with X server process only by some 10% on same scenario (so, it is nearly 4 times more efficient for me). But any such method usage leads to awful tearing and blinking so I can see partially drawn frames and their edges and so on - generally frames are displayed without regard to syncing with monitor's frame rate anyhow. This leads to very annoying blinking on playback and video is generally unwatchable.

Workaround:
 If I'm disabling desktop effects, I can use Xvideo or GL video outputs without any problem and enjoy by fast video playback with relaxed CPU load. However obvious disadvantage is that I can't use desktop effects anymore (i.e. this setting corresponds to "no effects" for Compiz).

So, either you can use desktop effects OR you can enjoy by fast video playback. But not both in same time.

Some details:
 This is long-standing and well-known problem with Linux distributions, affect other Linux distributions as well.
 This bug also affects Nvidia cards users as well: see bug 151674 for example. So I believe that statement in bug 151674 that bug is in Nvidia driver itself is not so true and other drivers are affected (ATI at least affected too) or it is not a video card driver what causes this problem.

Note: fixing this bug could be not an easy task (it is reasonably known in Linux community but I never seen any good solution on this issue except of obvious choice: either you have cool desktop effects OR you have good video playback but not both in same time). It is mandatory to fix it to have real success on desktop. Right now users often prefer to use Windows to watch videos due to such issues.

My system information (if needed, however issue occus on many other configurations as well):
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION="Ubuntu 8.10"

$ uname -a
Linux ath64 2.6.27-11-generic #1 SMP Fri Dec 19 16:29:35 UTC 2008 x86_64 GNU/Linux

$ lspci
[...skip...]
06:00.0 VGA compatible controller: ATI Technologies Inc RV515 [Radeon X1300]
06:00.1 Display controller: ATI Technologies Inc RV515 [Radeon X1300] (Secondary)
[...skip...]

Revision history for this message
Bryce Harrington (bryce) wrote :

Hi i-am-sergey,

Please attach the output of `lspci -vvnn`, and attach your /var/log/Xorg.0.log file from after reproducing this issue. If you've made any customizations to your /etc/X11/xorg.conf please attach that as well.

Please attach the output of `lspci -vvnn` too.

[This is an automated message. If this script has reached you erroneously, please accept our apologies; any reply to this message will be sufficient to prevent it from doing further automated processing.]

Changed in xorg:
status: New → Incomplete
Revision history for this message
PowerUser (i-am-sergey) wrote :

Actually, this problem not seems to depend on exact card model or something like this (people with at least ATI and Nvidia encounter this in various Linux distros including Ubuntu, Kubuntu and whatever else).

And actually there is nothing wrong with X server. It is obvious that usual output method was never intended to draw hi-resolution video so it's slow and this is "by design". About accelerated video... as far as I know, there is something like this happens: when composite mode used, screen updates are no longer synchronized with display frame rate. This causes no troubles to usual windowing operations but video displayed through accelerated interfaces (xvideo, opengl, ...) blinks and tears. Blinking and tearing happens since when composite mode used it happens that video frames are output without syncing to monitor frame rate. Hence it happens that frames could be just partially drawn when getting actually displayed. This surely leads to nasty blinking due to repeated sequence of partially-drawn frames.

Here goes verbose lspci log (launched under sudo since without it it lacks some info).

Revision history for this message
PowerUser (i-am-sergey) wrote :
Revision history for this message
PowerUser (i-am-sergey) wrote :

There is absolutely no any new entries appear in /var/log/Xorg.0.log after trying to play video into xvideo output (attempted to play it with mplayer and VLC using xvideo output in both players). However video blinks (it not looks like it is possible to screen shot this bug since this is a issue on border of hardware and software interaction and screen shot has nothing to do with frame rates)

 I bet that from point of view of X server there is exactly nothing wrong. There is no errors in usual sense. There is just no sync in how frames are drawn to the screen so partially drawn frames are actually being displayed (while they do not have to and hardware should wait until frame is drawn fully before actually displaying it, it does so when composite mode is off and then video playback works perfectly but then you can't use Compiz or KDE4 desktop effects).

If someone needs log, here it goes anyway, BUT KEEP IN MIND: there was NO ANY SINGLE LINE ADDED when I played video through xvideo extension. So this log is pretty USELESS for sure and has nothing to do with this bug.

Revision history for this message
PowerUser (i-am-sergey) wrote :

Well, marking bug as "New" again since I added requested information. If someone needs further information, feel free to change bug state back to "incomplete" and\or request more info.

Changed in xorg:
status: Incomplete → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.