Choppy video playback

Bug #961124 reported by Lollerke
46
This bug affects 10 people
Affects Status Importance Assigned to Milestone
xserver-xorg-driver-ati
In Progress
Medium
xserver-xorg-video-ati (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Choppy video playback under Unity and Gnome Shell, but not Unity 2D with VLC and Mplayer. Tried different video outputs, but none of them fixed the problem. It looks like the video is running at about 20 fps, but both VLC and Mplayer doesn't show dropped frames. CPU usage is only 50%. Using compiz under Unity 2D results in stuttering too. Experiencing the same with a Radeon HD6450 using the open source driver.

12.04 Live CD (2012.03.21.) with unity 5.6.0-0ubuntu4

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: compiz 1:0.9.7.0+bzr3035-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-19.30-generic-pae 3.2.11
Uname: Linux 3.2.0-19-generic-pae i686
.tmp.unity.support.test.0:

ApportVersion: 1.94.1-0ubuntu2
Architecture: i386
CasperVersion: 1.312
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,vpswitch,snap,mousepoll,resize,place,move,wall,grid,regex,imgpng,session,gnomecompat,animation,fade,unitymtgrabhandles,workarounds,scale,expo,ezoom,unityshell]
CompositorRunning: compiz
Date: Wed Mar 21 13:25:50 2012
DistUpgraded: Fresh install
DistroCodename: precise
DistroVariant: ubuntu
GraphicsCard:
 Advanced Micro Devices [AMD] nee ATI RC410 [Radeon Xpress 200M] [1002:5a62] (prog-if 00 [VGA controller])
   Subsystem: Toshiba America Info Systems Device [1179:ff31]
LiveMediaBuild: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20120321)
Lsusb:
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 003: ID 0951:162c Kingston Technology
 Bus 002 Device 002: ID 0458:003a KYE Systems Corp. (Mouse Systems) NetScroll+ Mini Traveler / Genius NetScroll 120
MachineType: TOSHIBA Satellite L30
PackageArchitecture: all
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcEnviron:
 TERM=xterm
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: initrd=/casper/initrd.lz file=/cdrom/preseed/hostname.seed boot=casper quiet splash -- BOOT_IMAGE=/casper/vmlinuz
SourcePackage: compiz
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/17/2007
dmi.bios.vendor: TOSHIBA
dmi.bios.version: V3.00
dmi.board.name: Satellite L30
dmi.board.vendor: TOSHIBA
dmi.board.version: Not Applicable
dmi.chassis.type: 10
dmi.chassis.vendor: TOSHIBA
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnTOSHIBA:bvrV3.00:bd08/17/2007:svnTOSHIBA:pnSatelliteL30:pvrPSL33E-00E00XHU:rvnTOSHIBA:rnSatelliteL30:rvrNotApplicable:cvnTOSHIBA:ct10:cvrN/A:
dmi.product.name: Satellite L30
dmi.product.version: PSL33E-00E00XHU
dmi.sys.vendor: TOSHIBA
version.compiz: compiz 1:0.9.7.0+bzr3035-0ubuntu1
version.libdrm2: libdrm2 2.4.30-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.1-0ubuntu5
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.1-0ubuntu5
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu7
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Revision history for this message
Lollerke (pumba88) wrote :
description: updated
Lollerke (pumba88)
description: updated
Lollerke (pumba88)
description: updated
Revision history for this message
Lollerke (pumba88) wrote :

Not a compiz problem, tried Fedora 16 with GNOME Shell and I've got the same.

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

so you've been reproducing this issue with both an ATI card and an intel card? Or just an ATI card?

Revision history for this message
Lollerke (pumba88) wrote :

Just ATI with the open source driver. On my laptop which has a Radeon X200M and on a desktop computer with ATI Radeon HD6450.

Revision history for this message
Lollerke (pumba88) wrote :

and I forgot to mention that the videos that I tested are 720p x264 videos with a bitrate of ~6000kbps.

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Thanks for the speedy reply. It appears, based on comment 2, that this is indeed not window manager-based but rather a problem with the ATI drivers. I'm going to go ahead and reassign.

Other possibilities are bad decoding libraries but I doubt it as you tried with both Totem (gstreamer) and VLC (ffmpeg).

affects: compiz (Ubuntu) → xserver-xorg-video-ati (Ubuntu)
Changed in xserver-xorg-video-ati (Ubuntu):
importance: Undecided → Medium
Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Looking at your original description, though, you claim that Unity2D is unaffected. If this is true then I'm guessing that either the driver is having issues with compositors + hardcore video playback or that both compiz or mutter are having the same issue.

description: updated
Revision history for this message
Lollerke (pumba88) wrote :

Yes, this must be a driver issue, because I checked it today with a laptop which has an Intel GMA X4500 and there was no stuttering. In fact this makes the open source driver useless, because under Unity 2D theres no stuttering, but I got video tearing instead on both machines (bug 792315) and the ATI X200M is not supported by the proprietary driver (Catalyst), so I'm unable to watch videos properly on 12.04.

Revision history for this message
In , Lollerke (pumba88) wrote :

Choppy video playback with GNOME Shell, Unity, Gnome-fallback with compiz, but not with Unity 2D and Gnome-fallback without compiz on two machines (1. Laptop with ATI Radeon X200M, 2. Desktop system with ATI Radeon HD6450). Media players doesn't report dropped frames, CPU usage is well below 100%. Tested with a 720p x264 video at about ~6000kbps. See https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/961124. Tried Fedora 16 and the problem is the same.

Revision history for this message
In , Lollerke (pumba88) wrote :

Same under KWin too.

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

Can you elaborate what 'choppy' means exactly? And how you estimated around 20 fps?

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

Also, please attach the Xorg.0.log file and the output of dmesg and glxinfo to this report.

Revision history for this message
In , Lollerke (pumba88) wrote :

Created attachment 59141
dmesg

Revision history for this message
In , Lollerke (pumba88) wrote :

Created attachment 59142
Xorg

Revision history for this message
In , Lollerke (pumba88) wrote :

Created attachment 59143
dmesg

Revision history for this message
In , Lollerke (pumba88) wrote :

Created attachment 59144
glxinfo

Revision history for this message
In , Lollerke (pumba88) wrote :

It's looks like the the video is skipping some frames (2 or 3) every second, so the picture is stuttering and in rare cases there's also some tearing. I also noticed that if I run glxgears (Vsync on) I can see stuttering there too, but not that often (every 5-10 sec).

Revision history for this message
In , Lollerke (pumba88) wrote :

Correction: it's not true, that it skips the frames every second, sometimes the video playback is smooth for 3 sec. Looks like a syncing issue.

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

Is that with fullscreen and/or windowed video playback?

Which version of gnome-shell are you running? Have you configured compiz and kwin to unredirect fullscreen windows?

Revision history for this message
In , Lollerke (pumba88) wrote :

Both full screen and windowed, but if I shrink the media player's window size to about 400 x 280 the video is smooth. Also if I try to play an SD Xvid (632x486) video it's smooth even on fullscreen. This indicates that the problem depends on video resolution.

I tried turning on the unredirect fullscreen windows option, but it didn't help. I have Gnome Shell 3.3.92 and 3.2 (in Fedora).

Revision history for this message
In , Lollerke (pumba88) wrote :

I mean not video resolution, the playback resolution.

Revision history for this message
Lollerke (pumba88) wrote :

I created a bug report about this on freedesktop.org: https://bugs.freedesktop.org/show_bug.cgi?id=47776. The problem is related with the playback resolution, because if i shrink the media player's windows size to 400x260 the all videos are running smoothly.

Revision history for this message
In , Lollerke (pumba88) wrote :

Sorry, it depends on both, because a 600x400 video plays back smoothly on fullscreen (1280x800), but a 1280x720 video doesn't. The interesting thing is that the 1280x720 video is running smoothly at 600x400.

Revision history for this message
In , Lollerke (pumba88) wrote :

Also if the video is running smoothly, there's no tearing.

Revision history for this message
In , Deathsimple (deathsimple) wrote :

May I guess something?

Cause mplayer isn't complaining about dropped frames the best explanation is that instead of a constant stream of frames:

---*---*---*---*---*---*---*---*---*--- ...

We get something like this:

---***---------****------------*---*--- ...

That is usually caused by to long pipelines, e.g. the 3D rendering causes to long stalls, witch lead to burst of frames with the playback...

I'm also guessing that you are using Xv + "classic" mplayer, could you try the VDPAU implementation with mplayer2 instead? The result won't be better, but you get at least a good error message of what is going wrong here.

Revision history for this message
In , Lollerke (pumba88) wrote :

If I run glxgears simultaneously with the video playback even though the video is stuttering badly I get 56-60 fps on glxgears (my monitor works at 60Hz).

I'm already using Mplayer2, but with XV - Textured Video. If I try VDPAU I get this message: "Failed to open VDPAU backend libvdpau_r300.so: cannot open shared object file: No such file or directory".

Revision history for this message
In , Lollerke (pumba88) wrote :

But I guess, that's the problem. The glxgears FPS should be at 60 all the time. If I run glxgears during an SD video, it starts stuttering and tearing.

Revision history for this message
In , Lollerke (pumba88) wrote :

Correction: Running glxgears during an SD video introduces some tearing, but no stuttering.

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

Does

    Option "SwapbuffersWait" "off"

make the stuttering better (or worse)? Note that it'll probably increase tearing for non-fullscreen apps.

Revision history for this message
In , Lollerke (pumba88) wrote :

Xorg.0.log:
[ 14.912] (II) RADEON(0): KMS Color Tiling: enabled
[ 14.913] (II) RADEON(0): KMS Pageflipping: enabled
[ 14.913] (II) RADEON(0): SwapBuffers wait for vsync: disabled

Nothing changed, the stuttering remained the same.

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) wrote :

Thanks, Lollerke! I had meant to do that myself but I got a little busy and the tab kind of sat dry for a while.

Changed in xserver-xorg-driver-ati:
importance: Unknown → Medium
status: Unknown → In Progress
Revision history for this message
In , Lollerke (pumba88) wrote :

I get tear-free video playback with disabled metacity compositing and enabled EXAVSync in the xorg.conf file under Unity 2D and Gnome fallback. Disabling compositing alone doesn't solve the tearing problem, it only works with enabled EXAVSync.

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

(In reply to comment #21)
> Disabling compositing alone doesn't solve the tearing problem, it only works
> with enabled EXAVSync.

For some reason, Ubuntu seem to have patched their metacity to enable automatic (server side) compositing even when client side compositing is disabled in the metacity configuration.

Does EXAVSync help also when compositing is explicitly enabled in metacity?

Revision history for this message
In , Lollerke (pumba88) wrote :

"Does EXAVSync help also when compositing is explicitly enabled in metacity?"

Yes.

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
Revision history for this message
madbiologist (me-again) wrote :

It's not going to help with the older ATI Radeon Xpress 200M, but video decoding and playback on your ATI Radeon HD 6450 will benefit from the UVD support in the imminent (due in approximately one week from now) 3.10 kernel. This will be available at http://kernel.ubuntu.com/~kernel-ppa/mainline/
You will also need updated versions of libdrm, mesa and xserver-xorg-video-radeon, all of which can be found in the xorg-edgers PPA at https://launchpad.net/~xorg-edgers/+archive/ppa

All of the above package versions are expected to find their way into the upcoming Ubuntu 13.10 "Saucy Salamander" which is currently scheduled for release on October 17th, 2013, as per https://wiki.ubuntu.com/SaucySalamander/ReleaseSchedule

madbiologist (me-again)
Changed in xserver-xorg-video-ati (Ubuntu):
status: Confirmed → Fix Released
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.