Video is choppy

I’ve got choppy video on my Asus M3000N laptop.
It happens in flash videos inside a browser and local files played using kaffine/xine.
I had to change the video output to xshm, Which is the only video output plugin that works.

I found this thread :

Shoddy 3D/Compiz performance under hardy with Intel based hardware - Page 2 - Ubuntu Forums

on the ubuntu forums, As it seems to be a problem with X.

Here’s my results :

tony@linux-2oo3:~> INTEL_BATCH=1 glxgears
2140 frames in 5.0 seconds = 427.913 FPS
2177 frames in 5.0 seconds = 435.293 FPS
2222 frames in 5.0 seconds = 444.335 FPS
2178 frames in 5.0 seconds = 435.434 FPS
2189 frames in 5.0 seconds = 437.713 FPS
2180 frames in 5.0 seconds = 435.973 FPS
^C
tony@linux-2oo3:~> glxgears
1977 frames in 5.0 seconds = 395.391 FPS
2052 frames in 5.0 seconds = 410.377 FPS
2064 frames in 5.0 seconds = 412.665 FPS
2049 frames in 5.0 seconds = 409.624 FPS
2095 frames in 5.0 seconds = 418.952 FPS
2048 frames in 5.0 seconds = 409.425 FPS
2050 frames in 5.0 seconds = 409.821 FPS
^C
tony@linux-2oo3:~>

so it appears to do something.

Do I just add

INTEL_BATCH="1"

to

/etc/environment

or does OpenSuSe 11 work differently?

Is there anything else like this that will improve performance. I have enabled 3D acceleration in sax2. I also have compiz-fusion running with emerald but it has no effect on the choppy video when turned off.

Video is choppy in both windowed or fullscreen resolution and the graphics card is an intel 855 GM.
DVD playback works fine and in fullscreen surprisingly.

When you disable compiz-fusion. You need to logout or reboot for it to take effect.
Did you do that? If not try it and see if that helps.

There also might be others with the same problem. You could try doing a forum search.

just a quick Q, have you increased the video buffers ? Had a similar problem on my old dell laptop ( circa 1999 ) & increasing the buffers solved it

Andy

deltaflyer44, Are you talking about increasing the video buffers in the xine output plugin or is there some option in the xorg configuration?

Doog, I restarted x, Ctr + alt + backspace and there was no effect.
I rebooted. There was no effect. I also uninstalled xgl and rebooted. No effect.

There also might be others with the same problem. You could try doing a forum search.

Best I could find was this :

Tearing in Videos in Intel graphics card - openSUSE Forums

which doesn’t provide a solution to the problem.

Telling me to use the search function isn’t really helping me to solve my problem. Please try and answer the questions I posted.

I am certain that this is not a compiz-fusion problem.

increase the buffers in xine plug-in

Andy

There isn’t a buffer setting that I can find for the xshm output plugin.
It doesn’t matter because it’s flash video that’s choppy too. So it’s not an xine problem.
It’s almost certainly an x problem that I need to file a bug for over at x.org but I still need to know about :

Do I just add

INTEL_BATCH=“1”
to

/etc/environment
or does OpenSuSe 11 work differently?

Anyone, Please.

truetype
You would be surprised that the amount of people that don’t use the search function before they post.
Also Compiz has been known to mess up video function if it is enabled while trying to play video.

I was just trying to rule out the easy things first.

Good Luck with your problem.

Think I answered this one myself then.

I can add that line to /etc/environment.
(There is a bug with games though, Don’t play’em, Don’t care.)

This is definately an xorg problem.
xorg seem to have depreciated something in the intel video driver and the new alternative has a bug. Others are experiencing slow x performance and such.

openSUSE 11 performance issues - openSUSE Forums

OpenSuSE 11 and Xorg update - openSUSE Forums

https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/177492

So it’s a waiting game for the next official xorg release.

On Tue, 2008-08-19 at 15:46 +0000, truetype wrote:
> I’ve got choppy video on my Asus M3000N laptop.
> It happens in flash videos inside a browser and local files played
> using kaffine/xine.
> I had to change the video output to xshm, Which is the only video
> output plugin that works.

I’ve got a HP 6710b with a 965GM (at least that’s how it is
identified). In my xorg.conf for the intel section I have

Option “AccelMethod” “XAA”
Option “XAANoOffscreenPixmaps” “true”
Option “FramebufferCompresssion” “false”

(last one might not matter)

>
> I found this thread :
>
> ‘Shoddy 3D/Compiz performance under hardy with Intel based hardware -
> Page 2 - Ubuntu Forums’
> (http://ubuntuforums.org/showthread.php?p=4190756)
>
> on the ubuntu forums, As it seems to be a problem with X.

Ubuntu forums are NOT the best place to get information.
But might lead you to the right answer (after taking
you around the block, under the bridge, through the tree
and back about 7 times or so).

I have composite enabled… but the Intel doesn’t
to Xv exactly right… it works sort of… but it’s
not composite aware in that multiple monitors won’t
be mapped correctly (one will show blue… you’ll
also see the blue fringing when dragging around xv
windows).

The composite problem with videos to the external monitor
is ugly enough to where I use x11/xshm mode by default.
But Xv does somewhat work as long as you are just needing
the local built-in display. And Xv should be less taxing
on the cpu.

AFAIK, the INTEL_BATCH set is NOT needed for the xorg
in 11.0 (makes no difference on my machine).

I get about 1148 fps in glxgears.

@cjcox: Very useful info for those using Intel GMA chipsets. Can you please post your entire xorg.conf contents? Might be useful to others trying to get the most out of their grapics card. I’ve seen a lot of posts about similar video performance issues recently.

Big post… sorry… here’s my whole xorg.conf


# SaX generated X11 config file
# Created on: 2008-08-08T18:46:30-0500.
#
# Version: 8.1
# Contact: Marcus Schaefer <sax@suse.de>, 2005
# Contact: SaX-User list <https://lists.berlios.de/mailman/listinfo/sax-users>
#
# Automatically generated by [ISaX] (8.1)
# PLEASE DO NOT EDIT THIS FILE!
#

Section "Files"
  FontPath     "/usr/share/fonts/misc:unscaled"
  FontPath     "/usr/share/fonts/local"
  FontPath     "/usr/share/fonts/75dpi:unscaled"
  FontPath     "/usr/share/fonts/100dpi:unscaled"
  FontPath     "/usr/share/fonts/Type1"
  FontPath     "/usr/share/fonts/URW"
  FontPath     "/usr/share/fonts/Speedo"
  FontPath     "/usr/share/fonts/PEX"
  FontPath     "/usr/share/fonts/cyrillic"
  FontPath     "/usr/share/fonts/latin2/misc:unscaled"
  FontPath     "/usr/share/fonts/latin2/75dpi:unscaled"
  FontPath     "/usr/share/fonts/latin2/100dpi:unscaled"
  FontPath     "/usr/share/fonts/latin2/Type1"
  FontPath     "/usr/share/fonts/latin7/75dpi:unscaled"
  FontPath     "/usr/share/fonts/baekmuk:unscaled"
  FontPath     "/usr/share/fonts/japanese:unscaled"
  FontPath     "/usr/share/fonts/kwintv"
  FontPath     "/usr/share/fonts/truetype"
  FontPath     "/usr/share/fonts/uni:unscaled"
  FontPath     "/usr/share/fonts/CID"
  FontPath     "/usr/share/fonts/ucs/misc:unscaled"
  FontPath     "/usr/share/fonts/ucs/75dpi:unscaled"
  FontPath     "/usr/share/fonts/ucs/100dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/misc:unscaled"
  FontPath     "/usr/share/fonts/hellas/75dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/100dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/Type1"
  FontPath     "/usr/share/fonts/misc/sgi:unscaled"
  FontPath     "/usr/share/fonts/xtest"
  FontPath     "/opt/kde3/share/fonts"
  InputDevices "/dev/gpmdata"
  InputDevices "/dev/input/mice"
EndSection

Section "ServerFlags"
  Option       "AIGLX" "on"
  Option       "AllowMouseOpenFail" "on"
  Option       "ZapWarning" "on"
EndSection

Section "Module"
  Load         "extmod"
  Load         "type1"
  Load         "glx"
  Load         "freetype"
  Load         "dbe"
  Load         "dri"
EndSection

Section "InputDevice"
  Driver       "kbd"
  Identifier   "Keyboard[0]"
  Option       "Protocol" "Standard"
  Option       "XkbLayout" "us"
  Option       "XkbModel" "microsoftpro"
  Option       "XkbRules" "xfree86"
EndSection


Section "InputDevice"
  Driver       "synaptics"
  Identifier   "Mouse[1]"
  Option       "Buttons" "5"
  Option       "Device" "/dev/input/mice"
  Option       "Emulate3Buttons" "on"
  Option       "HorizScrollDelta" "0"
  Option       "InputFashion" "Mouse"
  Option       "Name" "Synaptics;Touchpad"
  Option       "Protocol" "explorerps/2"
  Option       "SHMConfig" "on"
  Option       "Vendor" "Sysp"
  Option       "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
  Driver       "mouse"
  Identifier   "Mouse[3]"
  Option       "Buttons" "5"
  Option       "Device" "/dev/input/mice"
  Option       "Name" "ImPS/2 Generic Wheel Mouse"
  Option       "Protocol" "explorerps/2"
  Option       "Vendor" "Sysp"
  Option       "ZAxisMapping" "4 5"
EndSection


Section "Monitor"
  DisplaySize  331 207
  HorizSync    30-82
  Identifier   "Monitor[0]"
  ModelName    "LGPHILIPSLCD LCD MONITOR"
  Option       "DPMS"
  Option       "PreferredMode" "1680x1050"
  VendorName   "LPL"
  VertRefresh  43-60
  UseModes     "Modes[0]"
EndSection


Section "Modes"
  Identifier   "Modes[0]"
EndSection


Section "Screen"
  DefaultDepth 24
  SubSection "Display"
    Depth      15
    Modes      "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      16
    Modes      "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      24
    Modes      "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
  EndSubSection
  SubSection "Display"
    Depth      8
    Modes      "1680x1050" "1600x1024" "1600x1000" "1400x1050" "1280x1024" "1440x900" "1280x960" "1366x768" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
  EndSubSection
  Device       "Device[0]"
  Identifier   "Screen[0]"
  Monitor      "Monitor[0]"
EndSection


Section "Device"
  BoardName    "965 GM"
  BusID        "0:2:0"
  Driver       "intel"
  Identifier   "Device[0]"
  Option       "SaXDualHead"
  Option       "SaXDualMonitorVendor" "--> VESA"
  Option       "SaXDualOrientation" "LeftOf"
  Option       "SaXDualResolution" "1024x768"
  Option       "SaXDualMode" "Clone"
  Option       "SaXDualHSync" "31-50"
  Option       "SaXDualMonitorModel" "1024X768@60HZ"
  Option       "SaXDualVSync" "50-60"
  Option       "SaXExternal" "Identifier&EXT+DisplaySize&+VendorName&--> VESA+PreferredMode&1024x768+HorizSync&31-50+ModelName&1024X768@60HZ+VertRefresh&50-60"
  Screen       0
  VendorName   "Intel"
#cjc  Option       "AccelMethod" "EXA"
#cjc  Option       "ExaNoComposite" "false"
#cjc  Option       "MigrationHeuristic" "greedy"
  Option       "AccelMethod" "XAA"
  Option       "XAANoOffscreenPixmaps" "true"
  Option       "FramebufferCompresson" "false"
EndSection


Section "Monitor"
  HorizSync    31-50
  Identifier   "EXT"
  ModelName    "1024X768@60HZ"
  Option       "PreferredMode" "1024x768"
  VendorName   "--> VESA"
  VertRefresh  50-60
                                                                            
Section "ServerLayout"
  Identifier   "Layout[all]"
  InputDevice  "Keyboard[0]" "CoreKeyboard"
  InputDevice  "Mouse[1]" "CorePointer"
  InputDevice  "Mouse[3]" "SendCoreEvents"
  Option       "Clone" "off"
  Option       "Xinerama" "off"
  Screen       "Screen[0]"
EndSection


Section "DRI"
    Group      "video"
    Mode       0660
EndSection

Section "Extensions"
EndSection



Thanks. :slight_smile:

Thanks cjcox, Very helpful indeed.
I will look into editing the xorg.conf and applying your suggestions when I get a free minute or two.

I already had the Option “XAANoOffscreenPixmaps” “true” enabled. I selected it in sax2 after reading around somewhere.
It’s interesting though, That I noticed that it creates artifacts behind the systray icons in kde4, Which look really messy. The icons just don’t have transparent backgrounds if I disable it but that’s to do with a bug that’s not relevant here. In case your’e interested, It’s something to do with kde4’s systray, Which is somekind of workaround that one of the kde developers have had to do and the guy who did the last fix doesn’t even like the systray. I don’t think he even uses it.
Anyway it’s something that the kde people are going to discuss at their konference and try to come up with a solution to.

I also have the xvideo option enabled. I added that one too. Not sure if it’s improved anything.

I don’t have an entry for Option “AccelMethod” “XAA”

or

Option “AccelMethod” “EXA” in xorg.conf but I assume that it is defaulting to EXA which is the new method as XAA is now depreciated. So this might be the fix I’m looking for. However, I am not sure, If it does fix the problem, I then need to think about what happens if I update xorg and XAA is dropped. Atleast if I try it I can get to that bridge when I come to it.
I’ll see if I get any better results from glx gears and post them up.

You are dead right about the ubuntu forums, I found it using google. You won’t find me lurking round there!

I haven’t tried plugging a monitor into the external output yet so I’ll try that also to see if I’m getting the same thing.
I was actually considering using a larger screen if the driver can handle a larger resolution.

Lastly, I can’t use the XV output plugin to play video at all in xine. The screen just stays blue so it doesn’t seem to work with my card. Do you think it should?

That’s why I have been using the xshm output plugin.

Thanks for the help cjcox, Rep added.

On Wed, 2008-08-20 at 00:56 +0000, truetype wrote:
> Thanks cjcox, Very helpful indeed.
> I will look into editing the xorg.conf and applying your suggestions
> when I get a free minute or two.

>
> I already had the Option “XAANoOffscreenPixmaps” “true” enabled. I
> selected it in sax2 after reading around somewhere.
> It’s interesting though, That I noticed that it creates artifacts
> behind the systray icons in kde4, Which look really messy. The icons
> just don’t have transparent backgrounds if I disable it but that’s to
> do with a bug that’s not relevant here. In case your’e interested, It’s
> something to do with kde4’s systray, Which is somekind of workaround
> that one of the kde developers have had to do and the guy who did the
> last fix doesn’t even like the systray. I don’t think he even uses it.
> Anyway it’s something that the kde people are going to discuss at their
> konference and try to come up with a solution to.
>
> I also have the xvideo option enabled. I added that one too. Not sure
> if it’s improved anything.
>
> I don’t have an entry for Option “AccelMethod” “XAA”

Seems that EXA support is something sort of new to the Intel
driver (??)

I had more problems with EXA.

>
> or
>
> Option “AccelMethod” “EXA” in xorg.conf but I assume that it is
> defaulting to EXA which is the new method as XAA is now depreciated. So
> this might be the fix I’m looking for. However, I am not sure, If it
> does fix the problem, I then need to think about what happens if I
> update xorg and XAA is dropped. Atleast if I try it I can get to that
> bridge when I come to it.
> I’ll see if I get any better results from glx gears and post them up.
>
> You are dead right about the ubuntu forums, I found it using google.
> You won’t find me lurking round there!
>
> I haven’t tried plugging a monitor into the external output yet so I’ll
> try that also to see if I’m getting the same thing.
> I was actually considering using a larger screen if the driver can
> handle a larger resolution.
>
> Lastly, I can’t use the XV output plugin to play video at all in xine.
> The screen just stays blue so it doesn’t seem to work with my card. Do
> you think it should?

I would think so… but I don’t truly know. With all the hype
about Intel’s involvement in Xorg I was expecting something really
great… instead I was greatly disappointed.

>
> That’s why I have been using the xshm output plugin.

Works best for using composite with certain features… obviously
makes your display networkable as well… and dual monitors… etc.
etc… Using the Intel driver reminds me a lot of how well the
Nvidia driver worked… 5+ years ago.

>
> Thanks for the help cjcox, Rep added.

Hey… thanks… I usually say something bad, tick off the moderators
and get a reputation bomb hurled at me :slight_smile:

Perhaps an Intel engineer will do that? :slight_smile:

Hey cj, I tried the xorg.conf options you suggested with mixed results.

The options speeded up glxgears slightly then I tried the intel batch variable with glxgears again. The fps had increased again somewhat.

glxgears
2062 frames in 5.0 seconds = 412.221 FPS
2202 frames in 5.0 seconds = 440.298 FPS
2012 frames in 5.0 seconds = 402.252 FPS
2108 frames in 5.0 seconds = 421.488 FPS
2093 frames in 5.0 seconds = 418.577 FPS

INTEL_BATCH=1 glxgears
2364 frames in 5.0 seconds = 472.778 FPS
2368 frames in 5.0 seconds = 473.532 FPS
2371 frames in 5.0 seconds = 474.003 FPS
2369 frames in 5.0 seconds = 473.618 FPS
2384 frames in 5.0 seconds = 476.665 FPS

As you can see, Much better opengl but then I tried the video.
No difference at all. I tried adding the intel batch environment variable to /etc/environment and video was even more choppy and emerald disappeared.
I was able to get emerald back by using the compiz desktop effect setting switch.

So after messing with xorg.conf I have decided to revert to the original and hope for an update in the future with the thought of filling a bug over at x.org I have got rid of the batch command in /etc/environment too.

It’s mainly fullscreen video that’s choppy so I’m guessing it’s to do with the way the driver is handling video resizing but I don’t know.

I tried the dual head display, It’s fine with no blue edges or anything like that. So that’s good.

I don’t think that this is an opengl problem as even with improved glxgears fps scores there were no improved effects.
I think I’m going to head over to x.org with this one.

On Wed, 2008-08-20 at 16:06 +0000, truetype wrote:

>
> It’s mainly fullscreen video that’s choppy so I’m guessing it’s to do
> with the way the driver is handling video resizing but I don’t know.

Full screen is going to be choppy… basically it’s using your
CPU (not the GPU). I have a T7700 … that’s a pretty good GPU
for a laptop. Full screen (1680x1050) works reasonable well for
me.

>
> I tried the dual head display, It’s fine with no blue edges or anything
> like that. So that’s good.

But… my guess no Xvideo support. If Xv worked for you, you’d get
the blue thing. Especially with compostite enabled.

>
> I don’t think that this is an opengl problem as even with improved
> glxgears fps scores there were no improved effects.
> I think I’m going to head over to x.org with this one.

Again, I’m not really sure if there’s an issue with the Xorg that
comes with openSUSE 11, or if the Intel guy just didn’t do the
work right inside of Xorg. Right now, it’s an “ok” CPU to me.

Most of my machines use an Nvidia GPU… using a “good” version
of their proprietary driver, things work really well (Xv, composite,
3D, etc).

OK. It’s compiz-fusion that’s causing the problem. More specifically the compiz window manager. I thought I had tested with it disabled but obviously not.

I can’t decide if this is a bug or the hardware is not good enough.
Maybe when compiz-fusion is actually released, This will be ironed out.

I found this today :

Ended the X Server Bling Wars Have « SmSpillaz’ Blog

Which might have something to do with it.

I noticed I have a git version of xgl installed and there are no aiglx packages in the repositories. It would seem that using aiglx instead of xgl might be the solution to this but without packages to test it, I don’t know. Anyway, I don’t think there should be two ways of doing the same thing and if aiglx has proved to be more popular and has less bugs, Novell needs to drop xgl and focus on helping develop that instead of trying to develop xgl away from xorg.