video tearing with textured video on intel card

Bug #278318 reported by Ralph
198
This bug affects 24 people
Affects Status Importance Assigned to Milestone
xf86-video-intel
Fix Released
High
xserver-xorg-video-intel (Ubuntu)
Fix Released
High
Bryce Harrington
Intrepid
Fix Released
High
Unassigned

Bug Description

[Impact]
Previously we shipped an option to turn textured video on/off. For Intrepid, textured video was felt to be stable so we removed this option. However, as evidenced by this bug, some people are still seeing some issues, and wish to still have a mechanism to turn it on/off if they desire.

[Development Branch]
The identical fix is uploaded to Jaunty.

[Patch]
The attached patch is a modified version of one we've shipped for a long time in the past. It has been modified to default to on instead of off.

[Test Case]
On affected hardware, try setting the "TexturedVideo" option to false in xorg.conf. It will have no effect in the unpatched version. With the patched version, it will cause textured video to be disabled.

[Regression Potential]
Extremely unlikely. It just adds a configuration option whose default value leaves the system identical to how it was before.

For people who choose to use this option to turn off textured video, they may see artifacts, performance effects, or other undesired behavior (all reasons why textured video was desired to begin with). It is assumed that people who wish to configure their systems this way, will accept these behaviors.

[Original Report]
Textured video seems to be enabled in the intel driver now in intrepid and a patch that made it possible to disable it has been removed.

This leads to severe video tearing in all video players I tried: mplayer, totem, vlc.

The only workaround for me at the moment is to use mplayer and instruct it to use the xv port that isn't textured. This also seems to confirm, that it is indeed textured video that is causing the problem.

I'm using a netbook with a Mobile 945GME Express Integrated Graphics Controller.

My suggestion would be to give people who have this problem the opportunity back to disable textured video altogether.

Revision history for this message
Arvind (arvind0) wrote :

I have the same problem on an intel gma 965 (x3100)

Revision history for this message
noOneSpecial (steve72b) wrote :

Same here on an intel gma 950.

You can work around this problem in totem. If you run 'gstreamer-properties' from the terminal, select the video tab, and select 'X Window System (X11/XShm/Xv)' for the plugin option. You can select Overlay or Textured mode in the Device options. Textured mode gives be the tearing effect, Overlay seems to get rid of it. I assume this will work on all gstreamer based players.

Revision history for this message
Arvind (arvind0) wrote :

by running xvinfo i can get the port of video overlay
then using mplayer -vo xv:port={port} i can workaround this problem.

however this is quite unstable and causes the the display to go blank and the system freezes 20% of the time. The only thing i can do is switch off the power then

Revision history for this message
Arvind (arvind0) wrote :

I downgraded to the 2:2.4.0-1ubuntu1 version which was the version before the textured video was made default.
http://launchpadlibrarian.net/16642729/xserver-xorg-video-intel_2.4.0-1ubuntu1_i386.deb

video overlay is now the default(and only) rendering listed by xvinfo.

Revision history for this message
Arvind (arvind0) wrote :

update: Downgrading to the 2:2.4.0-1ubuntu1 version has not solved the problem. The computer freezes with the display becoming entirely blank/grey/green. A hard shutdown is necessary.

Also i notice that when i start any video, the screen flickers for an instant with random colours/lines before the video starts

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

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.

Changed in xserver-xorg-video-intel:
status: New → Incomplete
Revision history for this message
Arvind (arvind0) wrote :
Revision history for this message
Arvind (arvind0) wrote :

the screen changes to some random color, not just the ones listed above

Revision history for this message
Arvind (arvind0) wrote :
Revision history for this message
Ralph (ralph-s) wrote :
Revision history for this message
Ralph (ralph-s) wrote :
Revision history for this message
khelidan (khelidan) wrote :

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

i have the same problems....intel developers says that in 2.5 release of driver tearing video troubles will be fix,but for now we need a patch to disable texured video!Again on Intrepid i have tering video also without compiz/composite

Revision history for this message
Andreas Braml (a-strich-b) wrote :

I can see this issue, too. Kubuntu Intrepid as of today, having KWin effects eabled or not doesn't make any difference. There's tearing in all players I use, even e.g. VLC under Wine.

Revision history for this message
Andreas Braml (a-strich-b) wrote :
Revision history for this message
Andreas Braml (a-strich-b) wrote :
Revision history for this message
Andreas Braml (a-strich-b) wrote :
Revision history for this message
Ste (ilpillo) wrote :

here we are, the tearing problem seems fixed in the new intel driver 2.5 release:
http://lists.freedesktop.org/archives/xorg/2008-October/039555.html

now we just need an updated package

Revision history for this message
Andreas Braml (a-strich-b) wrote :

Fixing the video tearing was planned for 2.5, but it wasn't. As says the announcement ipillo refers to ;)

Revision history for this message
Arvind (arvind0) wrote :

According to that post "(4) no more video tearing with textured video & XvMC" was planned but was missed out on this release. Was there something I missed?

Revision history for this message
khelidan (khelidan) wrote :

i thing is too late for an upgrade package in intrepid,i hope in a third part repo or i will try compile driver myself but i think it requires an update libdrm

Revision history for this message
Ste (ilpillo) wrote :

sorry for the mistake!
I have installed the new intel driver from here:
https://launchpad.net/~thjaeger/+archive
and the tearing bug is still there, by the way I have found a workaround to get a decent quality in movie playing, you just have to install driconf and enable the vsync option “always”
This trick works for me and fixes the tearing issue under mplayer (but not compiz)

Revision history for this message
khelidan (khelidan) wrote :

trick don't works for me,tearing is still here also with last 2.5 drivers and vsync

Revision history for this message
Ste (ilpillo) wrote :

I forgot to mention that you have to use the GL video driver in mplayer

Revision history for this message
Øyvind Stegard (oyvindstegard) wrote :

Tearing video in Intrepid here, too .. :(
HW: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04)

* Using plain video-overlay XV-port works very poorly, but it doesn't crash Xorg. It is, however, not usable, and there are lots of artifacts, window rendering bugs, etc. whenever it is in use. But I'm guessing the plain old overlay works much better without Compiz (haven't tried, yet). However, in Hardy, using the plain overlay actually worked in Compiz, even though it wasn't properly composited, etc. I'd rather have that, than textured video with tearing.

* Using Textured Video XV-port (default) causes video-tearing, and that sucks. However, it plays very nicely together with Compiz.

* Enabling VSYNC in Compiz does not help.

Revision history for this message
Øyvind Stegard (oyvindstegard) wrote :

An update on my last comment:

Plain overlay actually works fine with MPlayer, and then there's no tearing :). Seems like only Totem has troubles with the plain overlay, probably b/c of different window/fullscreen handling.

Revision history for this message
khelidan (khelidan) wrote :

work for me thanks!
But do you know how set overlay port also in embedded adobe flash player?

Revision history for this message
Tore Anderson (toreanderson) wrote :

Status = Confirmed, happens here too. G33 chipset. Normal overlay works fine.

Tore

Changed in xserver-xorg-video-intel:
status: Incomplete → Confirmed
Revision history for this message
Adam K (trogdor282) wrote :

Same here. I had the same problem back in Hardy, and then Bryce put the patch in for overlay which fixed it, and there was much rejoicing, and now I think he took it back out again thinking the problem was fixed. It isn't.

Revision history for this message
Nahuel (nawels) wrote :

Same problem here after upgrading from Hardy.

HW: VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03)

Revision history for this message
Nahuel (nawels) wrote :

Solved it in VLC changing the "XVideo adaptor number" to "1".

To do this go to Tools->Preferences, select "All" in "Show settings", then go to Video->Output modules->XVideo and change "XVideo adaptor number" value to "1". This will force VLC to use video overlay instead of textured.

Revision history for this message
caish5 (caish5-hotmail) wrote :

Same problem here with..

00:02.0 VGA compatible controller [0300]: Intel Corporation 82G35 Express Integrated Graphics Controller [8086:2982] (rev 03)

Such a disapointment because otherwise intrepid is very good.

Revision history for this message
Bo90 (joakimcarli) wrote :

Same problem as well with..

00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)

Revision history for this message
Bo90 (joakimcarli) wrote :

Can confirm that changing the "XVideo adaptor number" to "1" in VLC works!
Overlay works fine in VLC with compiz enabled.

Revision history for this message
khelidan (khelidan) wrote :

i use vlc and it works fine but i prefer a system wide solution,for example there is video tearing with flash video!
And totem doesn't work with compiz and overlay...

Revision history for this message
Arvind (arvind0) wrote : Re: [Bug 278318] Re: video tearing with textured video on intel card

even mplayer works with the setting vo=xv:port=83 (or whatever port you get
from xvinfo)
but flash tearing is one thing that is still very irritating

On Wed, Nov 5, 2008 at 3:12 AM, khelidan <email address hidden> wrote:

> i use vlc and it works fine but i prefer a system wide solution,for example
> there is video tearing with flash video!
> And totem doesn't work with compiz and overlay...
>
> --
> video tearing with textured video on intel card
> https://bugs.launchpad.net/bugs/278318
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Doc. Odine (doc-odine-cz) wrote :

Same here, Intel 965.
The VLC solution does not work for me though.

Revision history for this message
tghazali (tare2) wrote :

Intel 945 here. Mplayer's workaround works great. I hope they release an update soon..

Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel:
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Bryce Harrington (bryce) wrote :

Adding an xorg.conf option to disable textured video in Intrepid is probably feasible. I can try taking a look at that.

Changed in xserver-xorg-video-intel:
assignee: nobody → bryceharrington
Revision history for this message
Tore Anderson (toreanderson) wrote :

Bryce,

I think it would be better if your option simply re-ordered the textured video and overlay XVideo adapters, so that applications would use the overlay adapter by default.

Tore

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

the patch is still there, just enable patch 11 and recompile the driver

Maybe the patch could be reworked to not use the overlay on 965, since textured video should work with it (does on mine, and for many others too).

Revision history for this message
larson.eric.d@gmail.com (larsoner) wrote :

Timo: I have the GMA965 (X3100) on my laptop. Textured video tears like crazy. Overlay doesn't. How can we figure out why textured video doesn't work for me but does for you?

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

Here's patch 11 re-enabled, with the logic flipped around to make it true by default. I would be comfortable putting this in as an SRU.

If it's felt that something more elaborate than this is desired though, I'll skip doing an SRU and leave the further development work for Jaunty.

Changed in xserver-xorg-video-intel:
status: Triaged → In Progress
Revision history for this message
Bryce Harrington (bryce) wrote :

Prebuilt debs available for i386 at http://people.ubuntu.com/~bryce/Testing/intel/

Please test and verify that the options work correctly for you (textured video enabled by default, but can be shut off by setting the "TexturedVideo" driver option to "False"). If it does, and you think it's an acceptable solution for Intrepid, let me know and I'll push through an SRU for it.

Revision history for this message
j^ (j) wrote :

can confirm that it with
        Option "TexturedVideo" "false"
i do not have the flickering in video playback,
but each time i open a video in totem or vlc the entire screen flickers for a moment in the beginning now.

Prebuild debs for amd64 http://oil21.org/~j/intel/

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

Thanks j, I'd also like to get confirmations on this from Ralph and/or one or two other prior commenters before I put the SRU through on this.

Revision history for this message
j^ (j) wrote :

one problem i had with
        Option "TexturedVideo" "false"

is that Flash videos stop playing after a very short time.
this only seams to happen with TexturedVideo disabled.

Revision history for this message
tghazali (tare2) wrote :

I am sorry, but how can I do this Option "TexturedVideo" "false"? gstream-properties now has overlay enablable and it works great. But is that what you mean?

Revision history for this message
Arvind (arvind0) wrote :

with bryce's patched driver mplayer works fine. flash tearing still exists.
vlc by default still uses textured video, even though xvinfo lists overlay
as the only adapter available. The screen flashing before any video using
overlay is played also exists.

On Thu, Nov 13, 2008 at 7:52 PM, tghazali <email address hidden> wrote:

> I am sorry, but how can I do this Option "TexturedVideo" "false"?
> gstream-properties now has overlay enablable and it works great. But is
> that what you mean?
>
> --
> video tearing with textured video on intel card
> https://bugs.launchpad.net/bugs/278318
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Ralph (ralph-s) wrote :

I just tested the patched driver and it solves the problem for me.

After disabling textured video in xorg.conf, mplayer, totem-gstreamer and vlc use the overlay port and the screen tearing is gone. So with this patch enabled again I think we'll be able to consider this bug as solved.

Flash does also still have video tearing for me, but I think it simply doesn't use xv but videos still play fine and don't suddenly stop for me as j described. I also don't see the initial screen flicker that has been reported.

tghazali: After installing the new driver, you can disable textured video in your xorg.conf. To do this, simply add Option "TexturedVideo" "false" in the Device section of /etc/X11/xorg.conf like this:
Section "Device"
        Identifier "Configured Video Device"
Option "TexturedVideo" "false"
EndSection

Finally, thanks to all the people posting great workarounds here and of course to Bryce Harrington for solving this thing!

Revision history for this message
tghazali (tare2) wrote :

Thanks alot

Revision history for this message
Andrewsha (ptash) wrote :

Also have problem on 8.10
Before on 8.04 everything was OK.
lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xserver-xorg-video-intel - 2:2.4.1-1ubuntu11

---------------
xserver-xorg-video-intel (2:2.4.1-1ubuntu11) jaunty; urgency=low

  * Re-enable 11_textured_video_option.patch, but change logic so it is
    enabled by default. This allows people seeing issues with it to
    turn it off if they wish. (LP: #278318)

 -- Bryce Harrington <email address hidden> Fri, 14 Nov 2008 14:55:33 -0800

Changed in xserver-xorg-video-intel:
status: In Progress → Fix Released
Revision history for this message
Bryce Harrington (bryce) wrote :

Fix uploaded to both jaunty and intrepid. SRU is ready to go. :-)

Thanks everyone for the testing.

description: updated
Changed in xserver-xorg-video-intel:
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Corry Haines (tabletcorry) wrote :

While the patch provided (http://people.ubuntu.com/~bryce/Testing/intel/) does prevent the tearing problem, it also causes a new problem.

About 10% of the time that I open a movie in mplayer, the screen will entirely switch to one (random) color and flash between that color and black on an irregular basis.

Oddly, the programs running are still responsive (i.e. 'q' still quits, and 'space' still pauses mplayer), but there is no way to use the computer at this point. Switching to a virtual console (ctrl-alt-F1) simply causes the screen to black out. Ctrl-alt-backspace has no effect.

The only way to recover is to reboot the system.

Revision history for this message
Corry Haines (tabletcorry) wrote :

I forgot to mention that the same thing happens without the patch, if mplayer is used with the Video Overlay port, i.e.

mplayer -vo xv:port=84 foo.avi

where port 84 is the "Adaptor #1: "Intel(R) Video Overlay"" port.

Also, this happens regardless of whether or not compiz is activated.
Here is some info on my setup:

Ubuntu 8.10
lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)

Revision history for this message
Arvind (arvind0) wrote :

I have the same problem as Tabletcorry. Playing any video causes the screen
to flicker before the video is played using overlay. Sometimes the screen
changes to the random color as said and nothing can be done to make the
display work again, except for restarting. This problem is only on 8.10 and
did not occur on any of the previous versions.

I however did manage to decrease the frequency of it from 20% of videos i
open to about 5% using a driconf fix. I forced mplayer to use vertical
refresh using driconf. After that the flicker still exists but the video
plays most of the time. However the screen freeze still occurs on occasions.

lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960
Integrated Graphics Controller (rev 0c)

On Sat, Nov 15, 2008 at 9:57 AM, Tabletcorry <email address hidden> wrote:

> I forgot to mention that the same thing happens without the patch, if
> mplayer is used with the Video Overlay port, i.e.
>
> mplayer -vo xv:port=84 foo.avi
>
> where port 84 is the "Adaptor #1: "Intel(R) Video Overlay"" port.
>
> Also, this happens regardless of whether or not compiz is activated.
> Here is some info on my setup:
>
> Ubuntu 8.10
> lspci | grep -i vga
> 00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960
> Integrated Graphics Controller (rev 0c)
>
> --
> video tearing with textured video on intel card
> https://bugs.launchpad.net/bugs/278318
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
someuser90 (someuser90-deactivatedaccount) wrote :

Is there a patch for the 64bit platform? The ones here (http://people.ubuntu.com/~bryce/Testing/intel/) don't work.
:/

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
nogac (nogacsoid) wrote :

Using xv still crashes the system sometimes as reported before, possible data loss

Revision history for this message
frausch (rauscher) wrote :

Hi,

I have a Intel 82852/855GM graphics controller on my Lifebook. After playing about 10 sec of video the display becomes blank. After killing the x-serverwith ctrl-alt-backspace, the system crashes completely.

I tried to update xserver-xorg-video-intel from the intrepid-proposed, and added the line

        Option "TexturedVideo" "off"

in the device section of the xorg.conf. The problem persists. Is the xorg.conf the correct place to put this? I read somewhere, that the xorg.conf is not used anymore.

Revision history for this message
Grzegorz Cyuńczyk (cyunczykg) wrote :

I've installed deb from http://people.ubuntu.com/~bryce/Testing/intel/ and added Option "TexturedVideo" "off" to my xorg.conf

I'm using Kaffeine on my Acer Travelmate 4320 with intel 965 chipset, and those annoying choppy playback disapeared.

Everything works fine till I'm choosing files to play directly from Kaffeine menu (File->Open), but if I'm trying to play my wideo files directly from dolphin every time I see a short flash after playing about 4-7 sec of video and sometimes shortly after "display becomes blank. After killing the x-serverwith ctrl-alt-backspace, the system crashes completely."

It's strange, can anyone commit that choosing files using file menu prevent crashing or it's just my imagination/coincidence?

Revision history for this message
Grzegorz Cyuńczyk (cyunczykg) wrote :

Forget about this thing with opening from file menu. My today experience shows that there's no such connection, and looks like I've a lot of luck yesterday.
Still randomly, shortly after video start "display becomes blank. After killing the x-server with ctrl-alt-backspace, the system crashes completely."

Revision history for this message
junior (olav-ekkje) wrote :

Niiice! I've been anoyed by this tearing, but actually just thought it was my video-card since I've been using nvidia earlier.. This xorg-patch-thing worked like a charm it seems. Just wondering what the benefits of textured video are and why we would want it? And when the new driver from intel with textured support will be shipped in Ubuntu?

Revision history for this message
khelidan (khelidan) wrote :

tearing is not fix with new intel driver,it seems will be fix only with dri2 infrastructure

Revision history for this message
oudalrich (uhkeller) wrote :

I'd love to test the new version in intrepid-proposed, but I just don't know how.

I followed the guide at http://people.ubuntu.com/~bryce/Testing/intel/, but how do I get aptitude to actually update the package? When I run

sudo aptitude -t intrepid-proposed

I see that there is a new version of xorg-xserver-video-intel (in upgradable packages), but aptitude says:

xserver-xorg-video-intel will not be upgraded to version 2:2.4.1-1ubuntu10.1,
to avoid breaking the following dependencies:

  * xserver-xorg-video-intel replaces xserver-xorg (< 6.8.2-35) [UNAVAILABLE]
  * xserver-xorg-video-intel replaces xserver-xorg-driver-i810 [UNAVAILABLE]
  * xserver-xorg-video-intel replaces xserver-xorg-video-i810 [universe] (<
    2:1.9.91-1) [UNAVAILABLE]
  * xserver-xorg-video-intel replaces xserver-xorg-video-i810-modesetting
    [UNAVAILABLE]
  * xserver-xorg-video-intel replaces xserver-xorg-video-intel-modesetting
    [UNAVAILABLE]

Sounds scary. What do I do?

Also, is it Option "TexturedVideo" "off" or Option "TexturedVideo" "false"? And where exactly in xorg.conf does this go? The device section, but which device? Like this (this is from an xorg.conf posted here)?

Section "Device"
 Identifier "Configured Video Device"
 Option "TexturedVideo" "false"
 Option "VideoOverlay" "on"
EndSection

Revision history for this message
oudalrich (uhkeller) wrote :

(In the post above, I pasted the wrong link. Of course I meant the guide at https://wiki.ubuntu.com/Testing/EnableProposed.)

I have installed the new package from http://people.ubuntu.com/~bryce/Testing/intel/xserver-xorg-video-intel_2.4.1-1ubuntu10.1_i386.deb (verified with dpkg -s) and added the relevant lines to xorg.conf. There's still tearing in all players I tested (VLC, SMplayer, Movie Player). xvinfo still lists textured video output as "Adaptor 0".

lspci info:
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller [8086:27a2] (rev 03)

I tried all the different formats listed above for the xorg.conf entry: "TexturedVideo" "off" and "TexturedVideo" "false", with and without the "VideoOverlay" line, nothing makes any difference. At least for me, the fix is no fix.

Current xorg.conf in attachment.

Revision history for this message
Victor Vargas (kamus) wrote :

I have same problem here but with gutsy (xserver-xorg-video-intel 2:2.1.1-0ubuntu9.1) and Intel Corporation 82G33/G31, now i am playing with "TexturedVideo" = off . I hope that with this litle hack i can fix the problem.

Thanks for information anyway :)

Revision history for this message
Horst (l-lenny) wrote :

I have to confirm the this bug.
lspci info:
00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
I do not depend in nice optical gimmicks and therefore I tried this workaround:
With sudo apt-get install xfce4 I installed another X GUI and until now everything works just fine. A nice goody is the that the system speeds up a lot now. Everything is a lot faster, although my machine is a 1,6 GHz processor with 2 GB RAM.

Sorry I am definitely no specialist but I try things when I get pissed. Sometimes it works.

Revision history for this message
nesys (nesys-team) wrote :

Hi folks,

for me that patch doesn't work :(
In attach my conf.
In a word: I've installed the debs at http://people.ubuntu.com/~bryce/Testing/intel/
I've configured the xorg.conf as described
but I've always the same problem: with vlc, or mplayer, or another video player, when I try to see a DVD, from CD or from hd, every 10 secs I see a little freeze (late picture skipped in vlc debug).

My laptop is a Dell 620. HTH to try to find the solution of my issue. It doesn't matter if I'll use vlc or mplayer or another player ... I would see a DVD with my new special distro, Ibex :)

Thank you very much for all you made, and make, for this Community.
Regards

Revision history for this message
nesys (nesys-team) wrote :

second attach

Revision history for this message
nesys (nesys-team) wrote :

third attach.
I forgotten to say that my distro is Kubuntu 8.10.

Regards

Revision history for this message
nesys (nesys-team) wrote :

Well, I've found that:

ariela@elendil:~$ xvinfo
X-Video Extension version 2.2
screen #0
  Adaptor #0: "Intel(R) Video Overlay"
    number of ports: 1
    port base: 70
    operations supported: PutImage
    supported visuals:
      depth 24, visualID 0x21
    number of attributes: 12
<omitted>

so, the patch works, but is not the solution for my issue :(
Any advice will be appreciated!

Regards

Revision history for this message
junior (olav-ekkje) wrote :

I must say I like the fix from comment #2 best (with metacity --replace): With the xorg.conf fix I get a lot of blue everywhere, and it integrates poorly with compiz.

BUT I have a big problem witch none of these methods fix; I'm running XBMC and I love it! But no matter what I do, I get tearing playing vids in it!

Does anybody have any ideas on how I can avoid it? (Except from running Windows :S )

Revision history for this message
junior (olav-ekkje) wrote :

Well I found out that using sync to vblack in settings fixed it, though I feel that option makes my system more resource hungry..

Revision history for this message
Steve Beattie (sbeattie) wrote :

This bug was found in the Intrepid development cycle; removing regression-potential and marking as regression-release.

Revision history for this message
nesys (nesys-team) wrote :

Apologize my stupidity, Steve,

but what does it mean? This bug will be fixed for Intrepid?

Thank you very much for your support
Regards
Andrea

On 12/16/08, Steve Beattie <email address hidden> wrote:
> This bug was found in the Intrepid development cycle; removing
> regression-potential and marking as regression-release.
>
> ** Tags added: regression-release
>
> ** Tags removed: regression-potential
>
> --
> video tearing with textured video on intel card
> https://bugs.launchpad.net/bugs/278318
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "xserver-xorg-video-intel" source package in Ubuntu: Fix Released
> Status in xserver-xorg-video-intel in Ubuntu Intrepid: Fix Committed
>
> Bug description:
> [Impact]
> Previously we shipped an option to turn textured video on/off. For
> Intrepid, textured video was felt to be stable so we removed this option.
> However, as evidenced by this bug, some people are still seeing some issues,
> and wish to still have a mechanism to turn it on/off if they desire.
>
> [Development Branch]
> The identical fix is uploaded to Jaunty.
>
> [Patch]
> The attached patch is a modified version of one we've shipped for a long
> time in the past. It has been modified to default to on instead of off.
>
> [Test Case]
> On affected hardware, try setting the "TexturedVideo" option to false in
> xorg.conf. It will have no effect in the unpatched version. With the
> patched version, it will cause textured video to be disabled.
>
> [Regression Potential]
> Extremely unlikely. It just adds a configuration option whose default value
> leaves the system identical to how it was before.
>
> For people who choose to use this option to turn off textured video, they
> may see artifacts, performance effects, or other undesired behavior (all
> reasons why textured video was desired to begin with). It is assumed that
> people who wish to configure their systems this way, will accept these
> behaviors.
>
> [Original Report]
> Textured video seems to be enabled in the intel driver now in intrepid and a
> patch that made it possible to disable it has been removed.
>
> This leads to severe video tearing in all video players I tried: mplayer,
> totem, vlc.
>
> The only workaround for me at the moment is to use mplayer and instruct it
> to use the xv port that isn't textured. This also seems to confirm, that it
> is indeed textured video that is causing the problem.
>
> I'm using a netbook with a Mobile 945GME Express Integrated Graphics
> Controller.
>
> My suggestion would be to give people who have this problem the opportunity
> back to disable textured video altogether.
>

Revision history for this message
enderdsus7 (trent-jacobs) wrote :

The proposed package "2:2.4.1-1ubuntu10.1" with
 Option "TexturedVideo" "false"
 Option "VideoOverlay" "on"
resolves the tearing I was experiencing with video on my shuttle kpc (intel i915).

Only using the "TexturedVideo" "false" option resulted in strange color artifacts. Adding the VideoOverlay option seems to have resolved all ill effects.

Revision history for this message
unggnu (unggnu) wrote :

Proposed packages works for me fine too but I don't know why Textured should be the default?
The only problem of Overlay afaik is that if you use special Compiz effects they doesn't work in this field. I mean who cares? Glxgears and nearly no other OpenGl app work fine with Compiz so why should the video output? With Textured there is a higher cpu usage and the tearing which is of course not as severe as the vsync tearing but still makes movie watching very annoying.

Afaik Ubuntu is for the standard user who doesn't want to change many options to get the best experience. Textured video is something for power users who want special effects even on videos who are also able to set an xorg.conf option.
I mean most people watch videos in full screen so there is no need for eye candy effects.

Revision history for this message
unggnu (unggnu) wrote :

Btw. I have found one little issue except of the bigger default decision. The option and default value should be mentioned in the intel manpage so every experienced Ubuntu user can find it without searching the web.

Revision history for this message
Arvind (arvind0) wrote :

While the new/proposed driver does prevent the tearing problem, it also causes another problem as I said before

About 10% of the time that I open a movie in mplayer, the screen will entirely switch to one (random) color

Oddly, the programs running are still responsive (i.e. 'q' still quits, and 'space' still pauses mplayer), but there is no way to use the computer at this point. Switching to a virtual console (ctrl-alt-F1) simply causes the screen to black out. Ctrl-alt-backspace has no effect.

The only way to recover is to reboot the system.

The whole screen also flickers before any video starts.

Should this be reportedas a new bug?

Revision history for this message
unggnu (unggnu) wrote :

It works fine but there is a short flicker before video start with i965 and Overlay.
It is amazing to take a nearly complete driver integrate a non working video output, make this one standard long before it is ready and then mess up the only working one. So users with Intel cards have to stay with Hardy I guess.
But at least we have EXA.

Revision history for this message
Arvind (arvind0) wrote :

I agree. Considering I watch a lot of movies on my laptop, it is really
painful when the display freezes up and I need to restart the system
(i965gm). I back on hardy now.

On Fri, Jan 2, 2009 at 2:58 PM, unggnu <email address hidden> wrote:

> It works fine but there is a short flicker before video start with i965
> and Overlay.
> It is amazing to take a nearly complete driver integrate a non working
> video output, make this one standard long before it is ready and then mess
> up the only working one. So users with Intel cards have to stay with Hardy I
> guess.
> But at least we have EXA.
>
> --
> video tearing with textured video on intel card
> https://bugs.launchpad.net/bugs/278318
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Denis Malinovsky (dmalinovsky) wrote :

Guys, comment #77 helped me to resolve this issue. Hope it'll help you too. See it below.

> The proposed package "2:2.4.1-1ubuntu10.1" with
> Option "TexturedVideo" "false"
> Option "VideoOverlay" "on"
> resolves the tearing I was experiencing with video on my shuttle kpc (intel i915).

Revision history for this message
Frank Groeneveld (frankgroeneveld) wrote :

That only works if you disable Desktop Effects...

Revision history for this message
Denis Malinovsky (dmalinovsky) wrote :

Sorry, I'm always disabling them.

Revision history for this message
Grzegorz Cyuńczyk (cyunczykg) wrote :

"Guys, comment #77 helped me to resolve this issue. Hope it'll help you too. See it below.

> The proposed package "2:2.4.1-1ubuntu10.1" with
> Option "TexturedVideo" "false"
> Option "VideoOverlay" "on"
> resolves the tearing I was experiencing with video on my shuttle kpc (intel i915)."

I can confirm. No crashes since I've disabled "TexturedVideo" and turned "VideoOverlay" "on" on my intel 965.
Thank's for the tip enderdsus7.

Revision history for this message
Frank Groeneveld (frankgroeneveld) wrote :

Crashes weren't the problem, video tearing was the problem...

2009/1/2 Grzegorz Cyuńczyk <email address hidden>:
> "Guys, comment #77 helped me to resolve this issue. Hope it'll help you
> too. See it below.
>
>> The proposed package "2:2.4.1-1ubuntu10.1" with
>> Option "TexturedVideo" "false"
>> Option "VideoOverlay" "on"
>> resolves the tearing I was experiencing with video on my shuttle kpc (intel i915)."
>
> I can confirm. No crashes since I've disabled "TexturedVideo" and turned "VideoOverlay" "on" on my intel 965.
> Thank's for the tip enderdsus7.
>
> --
> video tearing with textured video on intel card
> https://bugs.launchpad.net/bugs/278318
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Denis Malinovsky (dmalinovsky) wrote :

I have no video tearing with these instructions, that's the point.

> Crashes weren't the problem, video tearing was the problem...

Revision history for this message
In , Sven Arvidsson (sa) wrote :

Video playback using textured video suffers from tearing. This problem mostly concerns G45 users, as it doesn't have hardware overlay.

It was discussed on the xorg mailing list where Keith Packard outlined a few possible solutions:
 http://lists.freedesktop.org/archives/xorg/2009-January/042530.html

and Michel Dänzer described how the radeon driver handles the same problem:
 http://lists.freedesktop.org/archives/xorg/2009-January/042541.html

(It's a well known problem, I only created this bug report so it's easy to track progress for users.)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xserver-xorg-video-intel - 2:2.4.1-1ubuntu10.1

---------------
xserver-xorg-video-intel (2:2.4.1-1ubuntu10.1) intrepid-proposed; urgency=low

  * Re-enable 11_textured_video_option.patch, but change logic so it is
    enabled by default. This allows people seeing issues with it to
    turn it off if they wish. (LP: #278318)

 -- Bryce Harrington <email address hidden> Wed, 12 Nov 2008 14:39:03 -0800

Changed in xserver-xorg-video-intel:
status: Fix Committed → Fix Released
Revision history for this message
unggnu (unggnu) wrote :

I just wanted to confirm again that the fix works fine. The flickering has most likely something to do with this Bug #278146.

Thanks!

Revision history for this message
unggnu (unggnu) wrote :

Btw. isn't it possible to change to overlay in full screen which would fix the tearing and change back to textured in window mode? At least for the driver?

Revision history for this message
Peter Clifton (pcjc2) wrote :

New intel chips just don't have the overlay hardware.

There was some talk on the Xorg list of a kludge-round, forcing a sync to vblank - which could be acceptable on a full screen window.

Revision history for this message
Craig Younkins (cyounkins) wrote :

> Option "TexturedVideo" "false"
> Option "VideoOverlay" "on"

These fixed the problem for me. No conclusions yet on stability though. Compiz still works just fine. Thanks guys!

Revision history for this message
In , Gordon Jin (gordon-jin) wrote :

The current suggested solution is to use a vblank synced composite window manager like compiz. Does that work for you?

Revision history for this message
In , Sven Arvidsson (sa) wrote :

Compiz didn't seem to work for me. It might be a configuration problem, but I made sure unredirect_fullscreen_windows is set to false, and sync_to_vblank is true.

I'm not using DRI2, and other apps seems to use sync to vblank.

Revision history for this message
In , Aabones (aabones) wrote :

What info is needed for this bug to progress? I can get you whatever is needed.

I'm running an intel DG45FC with G45/X4500HD on gentoo amd64. I only use this machine for fullscreen video (HTPC) so tearing is really the only thing that matters to me. I was running the 2008Q4 package with DRI2 but now i'm back on 2.5.1.

Revision history for this message
In , Gordon Jin (gordon-jin) wrote :

(In reply to comment #3)
> What info is needed for this bug to progress? I can get you whatever is
> needed.

Does using compiz avoid tearing?

Revision history for this message
In , Will Uther (willu-mailinglists) wrote :

Hi all,
  I'm seeing this on ubuntu jaunty when running mythtv. I've tried both with and without compiz (compiz is on by default in jaunty - I turned it off to see if that would help). It doesn't seem to make any difference. The myth logs show:

2009-01-31 12:10:52.935 Video timing method: DRM

Which suggests that myth is trying to vsync. It just doesn't seem to be successful. (although the tear is often in a consistent location which might suggest it is sync'd to the VBI, just not in phase... or something.)

I also note that the mailing list mail #042530 mentioned in the original report mentions a patch that would fix this in a kludgy way. Is there a pointer to that patch anywhere for those of us who wouldn't mind a short term kludge?

Be well,

Will

Revision history for this message
In , Gordon Jin (gordon-jin) wrote :

Eric, so compiz doesn't help. Any other idea?

Revision history for this message
In , Sven Arvidsson (sa) wrote :
Revision history for this message
In , Will Uther (willu-mailinglists) wrote :

(In reply to comment #7)
> Is this the kludgy fix?
> http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=555eea5411cf8c725df5f1b4cb80198fa6a1225b
>

That switch seems to be off in the source of the package I'm using. I'll switch it on and test it tonight.

I note that this is in a file called intel_xvmc.c. How should the use of mythtv's xv-blit renderer vs their xvmc renderer affect this? Does xv-blit also use the textured video system?

Revision history for this message
In , Will Uther (willu-mailinglists) wrote :

Okie - that patch seems to make a difference to XVMC output. I'm just about to return to the unpatched version to check this (I have been using XV-blit, but I tested XVMC a while ago to see if it would help). Unfortunately this only solves the problem for XVMC.

I still see tearing with normal XV-blit output. And I can't use XVMC output with HD video (I've heard this is a standard limitation - is that right?).

Looking in my mythfrontend logs it seems I can answer my own question from above - xv-blit is using textured video. Here are the relevant mythfrontend logs:

2009-02-09 20:20:33.867 VideoOutputXv: @ j=0 Looking for flag[s]: XvInputMask XvImageMask 10
2009-02-09 20:20:33.867 VideoOutputXv: Adaptor#0: Intel(R) Textured Video has flag[s]: XvInputMask XvImageMask
2009-02-09 20:20:33.867 VideoOutputXv: Has XVideo flags...
2009-02-09 20:20:33.867 VideoOutputXv: Has XV_BRIGHTNESS...
2009-02-09 20:20:33.867 VideoOutputXv: Here...
2009-02-09 20:20:33.867 VideoOutputXv: Grabbed xv port 80
2009-02-09 20:20:33.867 VideoOutputXv: XVideo surface found on port 80
2009-02-09 20:20:33.868 VideoOutputXv: XVideo Adaptor Name: 'Intel(R) Textured Video'
2009-02-09 20:20:33.868 VideoOutputXv: XVideo Format #0 is 'YUY2'
2009-02-09 20:20:33.868 VideoOutputXv: XVideo Format #1 is 'YV12'
2009-02-09 20:20:33.868 VideoOutputXv: XVideo Format #2 is 'I420'
2009-02-09 20:20:33.868 VideoOutputXv: XVideo Format #3 is 'UYVY'
2009-02-09 20:20:33.868 VideoOutputXv: XVideo Format #4 is 'XVMC'
2009-02-09 20:20:33.868 VideoOutputXv: Using XVideo Format 'YV12'
2009-02-09 20:20:33.868 VideoOutputXv: CreateShmImages(32): video_dim: 720x576
2009-02-09 20:20:33.893 VDP: SetVideoRenderer(xv-blit)
[snip]
2009-02-09 20:20:34.245 Video timing method: DRM

BTW - if I say anything stupid here, please correct me. I'm not an expert on this stuff and am picking it up as I go along.

Revision history for this message
In , Aabones (aabones) wrote :

I finally got Compiz Fusion compiled, installed and running. So it actually did correct the tearing, for both 720p and 1080i (don't have any 1080p video content). I output 1080p via HDMI though. BUT, and this is a big but, I can't really run compiz because I'm running a diskless client (over NFS) with 2GB of RAM and zero swap. So where as before I was running X, openbox, mythfrontend within 500MB of ram now X, Compiz (with just about all plugins disabled), and mythfrontend now takes up all 2GB. So now I have video buffering problems. 1080i seems to run ok, but 720p stutters horribly.

I'm running:
Gentoo but using Intel Kernel (.28 w/ 6 patches)
Xorg-server-1.5.99.901 (1.6 rc1)
mesa-9999 (as of couple weeks ago)
xf86-video-intel-2.6.1

Others things to note:
Using DRI2/UXA there was a LOT of refreshing problems. Pretty much the only thing that looked right was fullscreen video. The mythfrontend wasn't drawing anything else correctly. I'll have to double check if 720p content played correctly here, I only tried 1080i.

Using EXA everything looked great, but it was very slow and, like I stated above, very memory intensive. I'm assuming 720p playback issues where from memory buffering problems though.

Revision history for this message
In , Aabones (aabones) wrote :

(In reply to comment #10)
Forgot to state I'm running compiz-0.7.8 (with the sync to vblank checkbox on under the General options).

Revision history for this message
In , Will Uther (willu-mailinglists) wrote :

I might have made a user error with my compiz testing. To get the vsync setting on ubuntu you need to install the compizconfig-settings-manager package. The vsync setting was off by default. It made little difference, but I still need to double-check the unredirect_fullscreen_windows setting. I'll try to check this in the next few days.

Revision history for this message
ilchymis (mshroyer) wrote :

Like Arvind, I find that this overlay video setting fixes the tearing problem, however it results in random crashes when opening or closing videos about every 10th or 15th time. Should this be a new bug?

Ubuntu 8.10 x86-64
Intel Mobile GM965

Revision history for this message
In , Gordon Jin (gordon-jin) wrote :

*** Bug 16435 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Aabones (aabones) wrote :

Did a little more testing, here is what I found:

Part of my memory problem was that I was compiling in a tmpfs and forgot to clear it. Clearing it resolved the stuttering problem, although xorg is still taking up 700MB of ram, conbined with compiz and mythfrontend its still using all 2GB of ram. Doesn't that seem a little odd?

DRI2/UXA tearing was still a problem for 720p content. Just a general note that DRI2/UXA is pretty unusable at the moment, at least for my current setup.

As for EXA, things seem to be doable for now. Its not as snappy, but at least the video doesn't tear.

Also, forgot to mention I'm running an E8400 cpu, core 2 duo 3GHz.

Revision history for this message
In , Will Uther (willu-mailinglists) wrote :

I tested with compiz + syncing option + ! unredirect full screen option. Still tears. Again, tearing is consistent in location - the tear isn't slowly moving up or down as I've seen on previous hardware with tearing issues. Tearing seems to be more noticeable with SD content (PAL 720x576 interlaced) than with HD content (1080i?).

FWIW: I'm running a E7300 (2.66 GHz Core 2 Duo) and a Gigabyte GA-EG45M-D2SH motherboard using builtin video. The screen is a Samsung LCD connected using DVI.

Revision history for this message
eggbert (c0de-munkey) wrote :

> Option "TexturedVideo" "false"
> Option "VideoOverlay" "on"

Seems to make no difference for me running an Intel X3100 on a Dell Inspiron 530 desktop. Also, it's not just video that tears, it's pretty much EVERYTHING. E.g, dragging windows, scrolling web pages, flash youtube videos, etc. Perceived video performance is just downright horrible. It occurs with or without compiz enabled.

What's really frustrating is that under Vista Aero on the same machine video is perfect, smooth and no tearing at all.

Will EVER be a solution for tearing under intel hardware?

Revision history for this message
unggnu (unggnu) wrote :

I guess you use Jaunty where the Overlay option doesn't really work.

I am pretty sure that Windows Vista uses Overlay at least in full screen video mode. Some say that the i965 chipset doesn't support Overlay but then suddenly it was possible too. https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/152206/comments/15

I am not sure if there ever be a solution because the devs will always find some cutting edge which could be integrated to mess things up because Linux people live in the future and doesn't need working things right now. That's why there is no real stable Xorg branch imho.

Revision history for this message
eggbert (c0de-munkey) wrote :

Sorry, I should have mentioned that I am using Intrepid.

Revision history for this message
In , Aabones (aabones) wrote :

I noticed some tearing last night when viewing SD 480i content. The horiz tear was right in the middle of the screen. Didn't move up or down. Looked pretty bad.

Revision history for this message
In , unggnu (unggnu) wrote :

Can someone of the devs say something about the problem or at least give some very good reasons? This is serious.

I mean textured video output is standard in the intel driver for years and it still doesn't work because of the tearing or missing vsync.

Another thing I don't understand is why overlay can't be enabled with the VideoOverlay xorg.conf option anymore? Nearly all Intel graphic cards seem to support overlay so why mess it up for them too?

This all means that video output doesn't really work since ages and all distributions need patches.

I have an i915 card but according to https://bugs.launchpad.net/bugs/278318 many others are also effected.

Revision history for this message
In , Aabones (aabones) wrote :

From my understanding, and please correct me if I'm wrong, overlay hardware is obsoleted with the move to 3D hardware/software. So all the 2D operations that where implemented in the overlay now has to be re-implemented in 3D operations.

Also, this thread:
    http://<email address hidden>/msg04078.html
which mentions option A, a "trivial" solution that will cause everything else to perform worse, but might be acceptable for fullscreen video. I think the patch he refers to is the XvMC path mentioned above, which doesn't affect xv.

What is the possibility for getting that implemented and only enabling it via an xorg.conf variable? So those of us that only ever run in fullscreen video will be happy :)

Revision history for this message
In , unggnu (unggnu) wrote :

Atm video watching without seasickness is only possible with overlay output which requires a patched intel driver.
There might be penalties like blue borders with compiz or kwin but at least it works.
I guess nearly every standard user doesn't care if overlay is old, deprecated or 2d if there is no working alternative to watch videos.

If of course textured video uses vsync or similar and doesn't tear anymore I have no problem when overlay is disabled but this hasn't happened in over a year as I mentioned above.

Maybe if you have a time machine through which I could watch videos with a working intel driver textured video output it would be fine too. :D

Please remember that people live in the present, NOT in the future. Nobody needs textured video, EXA, UXA or any other new fancy feature if they mess things up. Workings features should be kept until the new ones are really able to replace them. That's why there normally is a stable and unstable branch.

Revision history for this message
unggnu (unggnu) wrote :

The Overlay option doesn't seem to work in Jaunty anymore and Intel driver has still the bug there so reopened.

Changed in xserver-xorg-video-intel:
status: Fix Released → New
Changed in xserver-xorg-video-intel:
status: Unknown → Confirmed
Revision history for this message
Arvind (arvind0) wrote : Re: [Bug 278318] Re: video tearing with textured video on intel card

In jaunty I can specify xv overlay by using the option vo=xv:port=97 in
mplayer (97 was the port i got using xvinfo). However I still have the same
crashes with the entire screen turning a random colour and the system
hanging, like what happened in intrepid 20% of the time when i start a
video. So it is not a good enough solution/workaround. I am using Hardy now
since xv overlay works perfectly in it.

On Thu, Feb 19, 2009 at 6:12 PM, Bug Watch Updater <
<email address hidden>> wrote:

> ** Changed in: xserver-xorg-video-intel
> Status: Unknown => Confirmed
>
> --
> video tearing with textured video on intel card
> https://bugs.launchpad.net/bugs/278318
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
In , Will Uther (willu-mailinglists) wrote :

One quick extra comment based on the "we're using 3D hardware now" meme: I tried using the opengl renderer in mythtv but it turned everything green and then froze. Once it froze I needed to reboot the machine to get my screen back - I couldn't restart X.

That is a separate bug, but it removes a possible work-around.

Revision history for this message
In , Aabones (aabones) wrote :

yes, I've been trying to use the opengl renderer in mythtv for sometime now, but it's always a green monochrome. It states this on the MythTV wiki under the XvMC section. http://www.mythtv.org/wiki/XvMC#Intel
Although I'm not using XvMC, just the opengl renderer, I'm still seeing the green.

I'm not sure what it is, intel driver or mythtv software. I can run mplayer using -vo GL or GL2 and it looks fine, and for a while had no tearing when using this. So I'm assuming its a mythtv colorspace conversion error. I haven't tested this in a while though.

http://svn.mythtv.org/trac/ticket/5999
No response.

Revision history for this message
Andreas Braml (a-strich-b) wrote :

The option in xorg.conf in Jaunty has been renamed to

Option "XvPreferOverlay" "true"

It's in the manpage. Works for me (TM), no freezes etc. that others report.

Revision history for this message
In , unggnu (unggnu) wrote :

OpenGL video output with EXA or UXA seem to have the tearing problem too. At least if used in kwin and with activated vsync option.

I don't know if this is a fglrx problem or a general OpenGL video one but the gl output seems to much more grainy than Xv. Not as much as Xorg video output but similar.

Revision history for this message
In , Will Uther (willu-mailinglists) wrote :

Started doing some debugging.

The mythtv vsync code is here: <http://svn.mythtv.org/trac/browser/trunk/mythtv/libs/libmythtv/vsync.cpp>.

If you edit the function drmWaitVBlank() on line 264 to include some calls to gettimeofday() and print out when the wait is less than 10ms, you'll see plenty of output.

If you look in the function DRMVideoSync::WaitForFrame() at line 325 you'll see some commented out debug statements. If you uncomment them you get:

WaitForFrame at : 15548 Delay at first sync: 7750
Wait 1 intervals. Count 60491126 Delay -8970
WaitForFrame at : 24978 Delay at first sync: 14499
Wait 1 intervals. Count 60491128 Delay -2240
WaitForFrame at : 46073 Delay at first sync: 37744
Wait 3 intervals. Count 60491132 Delay -12440
WaitForFrame at : 20562 Delay at first sync: 11037
Wait 1 intervals. Count 60491134 Delay -5689
WaitForFrame at : 28353 Delay at first sync: 17584
Wait 2 intervals. Count 60491137 Delay -15875
WaitForFrame at : 16296 Delay at first sync: 7597

The waitForFrame number is how long myth thinks you should wait from the time that function is called until the next frame should be displayed - i.e. how long it thinks it should sleep for. It then tries to sleep until the next vblank. It then calculates how long it has to sleep until it is near the next frame and shows that as the Delay number on the first line. i.e. the difference between those two numbers is how long the ioctl actually waited. Also note that the second number should be around 0 if myth was perfectly synced. This wont happen as there is 20ms between video frames and 16ms between vsyncs.

Revision history for this message
In , Will Uther (willu-mailinglists) wrote :

Having seen that it didn't want to sleep for more than 10ms, I added the following code at the front of myth's WaitForFrame():

    if (m_delay > 8000) {
      int sleepTime = m_delay - 6000;
      usleep(sleepTime);
    }

i.e. delay until there are 2ms until the time myth thinks the frame should be displayed. This leads to logs that look like this:

WaitForFrame at : 17808 sleeptime : 11808
WaitForFrame II at : 5870 Delay at sync: -9631
WaitForFrame at : 24409 sleeptime : 18409
WaitForFrame II at : 5865 Delay at sync: -2885
WaitForFrame at : 31029 sleeptime : 25029
WaitForFrame II at : 5871 Delay at sync: 3662
Wait 1 intervals. Count 93245119 Delay -13069
WaitForFrame at : 21271 sleeptime : 15271
WaitForFrame II at : 5849 Delay at sync: -6322

And the problem wasn't fixed.

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

Please take the MythTV issue elsehwere, as it isn't directly related to this bug. The DRM vblank support isn't intended to be used by applications directly.

Revision history for this message
unggnu (unggnu) wrote :

Works for me, even with UXA.

Thanks.

Changed in xserver-xorg-video-intel:
status: New → Fix Released
Revision history for this message
Arvind (arvind0) wrote : Re: [Bug 278318] Re: video tearing with textured video on intel card

I think the fix might be card dependent. Does the fix work for anyone with a
GM965 (X3100) card?

On Fri, Feb 20, 2009 at 4:56 AM, Andreas Braml <email address hidden> wrote:

> The option in xorg.conf in Jaunty has been renamed to
>
> Option "XvPreferOverlay" "true"
>
> It's in the manpage. Works for me (TM), no freezes etc. that others
> report.
>
> --
> video tearing with textured video on intel card
> https://bugs.launchpad.net/bugs/278318
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
unggnu (unggnu) wrote :

I965 should still support overlay if the intel devs haven't removed the code too but I can't test it.

Revision history for this message
In , Will Uther (willu-mailinglists) wrote :

  You're saying this is a Mythtv bug? Mythtv didn't tear with my previous graphics card (admittedly a couple of things have changed as well as the graphics card - narrowing that down is what debugging is about).

  What is the correct way to get video sync? (i.e. If I take this tearing to the mythtv mailing list, I'll need to tell them more than "I get tearing". I'd really like to be able to say something like "I get tearing because mythtv does its vsync wrong - according to the intel driver guys it shouldn't be doing X, it should be doing Y".)

  Is there another program that you know does it 'right' and hence would allow me to test my setup?

Revision history for this message
In , unggnu (unggnu) wrote :

@ William Uther
Just use overlay if possible. I guess most distributions have patches for it, at least Ubuntu.

According to this mailing list entry http://<email address hidden>/msg04078.html posted before the Intel devs are fully aware that textured video does tear and it looks like that it does on every Intel card. They were planning to fix this with DRI2 but the changes doesn't make it in time.
Furthermore it was no problem for them to disable and remove the non tearing output - overlay - a year ago or something like that.

I guess either Intel devs doesn't watch videos with their pcs, have another graphic card, always use patched drivers or live in the future/have a time machine :D .

I mean if this situation appears for some weeks or a month, nobody would care but you wouldn't salvage your only car if your new one arrives in over a year.

Maybe it is only me but I don't get it.

Revision history for this message
In , Sven Arvidsson (sa) wrote :

By the way, is it only possible for a gl-based compositing manager (such as compiz) to use sync to vblank to get rid of tearing, or would it also be possible for an xrender based one (such as metacity)?

Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

If X has an equivalent of glXSwapBuffers, and we can make it swap w/o tearing, then yes. But at this point that's not possible. And in fact even with a GL compositor it's not possible in a reliable way on Intel; we don't implement a reliable buffer swap, and waiting for vblank in the client is subject to scheduling hiccups, so isn't really suitable.

Revision history for this message
In , Aabones (aabones) wrote :

Does this thread solve this bug? I'm getting good results:

http://lists.freedesktop.org/archives/intel-gfx/2009-March/001608.html

>>>
I finally get to report some good news...great news in fact. I finally have
tear free XV fullscreen video on my G45. No Compiz needed, w00t! Thanks to
all the devs/community for getting it there.

I just sync'd to head on xf86-video-intel driver. This is what else I'm
running, all -9999 packages were sync'd to head within the last week of this
posting.

media-libs/mesa-9999
x11-libs/libX11-9999
x11-libs/libXext-9999
x11-libs/libXi-9999 (XInput.h moved to)
x11-libs/libdrm-9999
x11-libs/libxcb-9999
x11-proto/dri2proto-9999
x11-proto/inputproto-9999 (XInput.h moved from)
x11-proto/xcb-proto-9999
x11-proto/xextproto-9999
x11-proto/xproto-9999
x11-drivers/xf86-input-evdev-2.1.3
x11-drivers/xf86-input-keyboard-1.3.2
x11-drivers/xf86-input-mouse-1.4.0
x11-drivers/xf86-video-intel-9999
x11-base/xorg-server-1.6.0
x11-wm/openbox-3.4.7.2
kernel intel-drm 2.6.28 (w/ patches)
gentoo ~amd64

Runs mythfrontend, openbox, and X, within 1gig of ram. Fullscreen video with
EXA was tear-free at 1080p and 720p, E8400 cpu ~20-27%

Revision history for this message
In , Haihao-xiang (haihao-xiang) wrote :

fixed in xf86-video-intel
commit 67fef27f4b76490be085d232aba0ca9cbb3c5e59
Author: Xiang, Haihao <email address hidden>
Date: Fri Mar 6 09:40:07 2009 +0800

    Xv: free tearing on textured video

    Add an Xv attribute XV_SYNC_TO_VBLANK which has three values -1(auto), 0(off)
    and 1(on) to control whether textured adapter synchronizes the screen
    update to the vblank. The default value is -1(auto).

Revision history for this message
In , Sven Arvidsson (sa) wrote :

The description in the man page is a bit confusing:

 It has three
 values 'auto'(-1), 'off'(0) and 'auto'(1). 'off' means never sync, 'on' means
 always sync, no matter what size, and 'auto' means sync if the Xv image is
 more than quarter of the pixels on the screen. The default is 'auto'(-1).

I guess it should say 'on'(1)?

As for tearing, it doesn't seem to be fixed on my G45.

The default value of XV_SYNC_TO_VBLANK seems to be 1. Even if I manually set -1 or 0, it's set back to 1 after using MPlayer.

Changed in xserver-xorg-video-intel:
status: Confirmed → Fix Released
Revision history for this message
In , Haihao-xiang (haihao-xiang) wrote :

(In reply to comment #32)
> The description in the man page is a bit confusing:
>
> It has three
> values 'auto'(-1), 'off'(0) and 'auto'(1). 'off' means never sync, 'on' means
> always sync, no matter what size, and 'auto' means sync if the Xv image is
> more than quarter of the pixels on the screen. The default is 'auto'(-1).
>
> I guess it should say 'on'(1)?
It should be 'on' (1).

> As for tearing, it doesn't seem to be fixed on my G45.
Really? I tested on my GM965/GM45/G45 and don't see tearing any more. Comment #30 also said he got good result on his G45.

> The default value of XV_SYNC_TO_VBLANK seems to be 1. Even if I manually set -1
> or 0, it's set back to 1 after using MPlayer.
The default valude is -1, you can use xvattr to query it before using MPlayer. It is changed by MPlayer. (some other video drivers also have XV_SYNC_TO_VBLANK attribute, and MPlayer sets it to sync by default)

>

Revision history for this message
In , Sven Arvidsson (sa) wrote :

(In reply to comment #33)
> Really? I tested on my GM965/GM45/G45 and don't see tearing any more. Comment
> #30 also said he got good result on his G45.

Yeah, it's weird, tearing seems worse now. There's almost always a horizontal tear in any full-screen video.

Revision history for this message
In , Sven Arvidsson (sa) wrote :

I figured out why. It's because of the Xrender based compositor Metacity uses.

It is limited to 50 fps at the moment, I have tried to increase the refresh rate, but so far I haven't noticed a difference.

It seems to work fine if the compositor is turned off, so I guess this problem lies with metacity?

Revision history for this message
In , Haihao-xiang (haihao-xiang) wrote :

Jesse has some commits to eliminate tearing when using composite manager, but he doesn't push them out now.

Revision history for this message
caish5 (caish5-hotmail) wrote :

I've so far managed to get Kaffeine and Miro to play nice by adding the tweaks to xorg.conf.
However Totem is still tearing.
Is there specific settings that fix it in gstreamer-properties that i don't know about?

Revision history for this message
In , unggnu (unggnu) wrote :

Is this supposed to be fixed in intel 2.6.3?
It is not so I think this bug shouldn't be marked as resolved.

Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

(In reply to comment #37)
> Is this supposed to be fixed in intel 2.6.3?
> It is not so I think this bug shouldn't be marked as resolved.

We already have https://bugs.freedesktop.org/show_bug.cgi?id=20664 open for the composite tearing case. Our driver doesn't yet support a good method to prevent tearing of OpenGL or composited applications, but I have some patches to add that. I'll point people at them in #20664.

Revision history for this message
In , Will Uther (willu-mailinglists) wrote :

Just so that I understand unggnu's comment correctly... This bug isn't fixed in 2.6.3, but is fixed in the repository and that fix will be released in 2.7, right?

Revision history for this message
Cype (mikards) wrote :

I have this same problem with Intrepid. Video tearing with intel i945 chipset laptop. I have tried almost everything and now run out of ideas.

This mplayer command works fine mplayer -vo xv:port=98 (98 is the overlay port) but I'd like to get it working with VLC and other programs too. Will insert xorg.conf and xorg.0.log soon.

Revision history for this message
Dekar (dekar-wc3edit) wrote :

I think this bug should be reopened until the default configuration is tearing free!

Revision history for this message
pvanbrakel (pvanbrakel-deactivatedaccount) wrote :

Have the same problem with the video tearing while playing a dvd with or without compiz turned on, so also with the gtk metacity manager, the dvd shows big lines. All the other movie files are fine, except dvd. I tried this whole week all the solutions, but none of them seems to help.

Iam using ubuntu 9.04:

Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)

though after testing, kaffeine seems to have less trouble playing dvds

pieter

Revision history for this message
Anton Blanchard (anton-samba) wrote :

The G45 chips only support textured video so the workaround is no good for them. The issue is fixed in the upstream driver:

http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=67fef27f4b76490be085d232aba0ca9cbb3c5e59

I built from the 2.7 branch and the tearing went away. It would be great if someone could make a PPA of it.

Revision history for this message
unggnu (unggnu) wrote :

It is only fixed if composite isn't enabled but according to the devs this should be fixed soon.

Btw. there is already a ppa with stable upstream drivers https://edge.launchpad.net/~ubuntu-x-swat/+archive/x-updates/ .

Revision history for this message
Andy (acc-launchpad) wrote :

Can confirm that adding

Section "Extensions"
    Option "Composite" "false"
EndSection

and using x-updates ppa the tearing is gone on the textured video port.

00:02.0 VGA compatible controller: Intel Corporation 82G35 Express Integrated Graphics Controller (rev 03)

Revision history for this message
pvanbrakel (pvanbrakel-deactivatedaccount) wrote :

Dear Andy,

I tried these solution, and the video tearing almost disapeared, except by fast actions, it still shows some tearing. parts of a movie with simple camp fire for example.

pieter

Revision history for this message
Arvind (arvind0) wrote :

Video tearing with composite seems to have been solved upstream.

https://bugs.freedesktop.org/show_bug.cgi?id=20664

With the latest drivers from the xorg-edgers ppa there doesn't seem to be any tearing. Although, it did cause some system hangs on screen blanking using dpms/screensaver.

Revision history for this message
unggnu (unggnu) wrote :

This is still an issue in Karmic. It is better than before but still makes video watching impossible with my i915.
Since KMS it is not possible to activate Overlay output so I need to disable this too.

Changed in xserver-xorg-video-intel:
importance: Unknown → High
Revision history for this message
Denis Malinovsky (dmalinovsky) wrote : FW:FW

Recently I often bought some products from a business company.
Very cost-effective and convenient,
if you are free, you can go to browse: okayele.com ,
enrich a shopping choice for yourself wonderful life

Changed in xserver-xorg-video-intel:
importance: High → Unknown
Changed in xserver-xorg-video-intel:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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