xine and totem-xine crashes with the fglrx driver

Bug #130696 reported by phantom xXx
90
Affects Status Importance Assigned to Milestone
linux-restricted-modules-2.6.22 (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Gutsy by guillepb
totem (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Gutsy by guillepb
xine-lib (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Gutsy by guillepb

Bug Description

Binary package hint: totem-xine

if I want to open a media file or starting xine(or totem-xine) the following lines comes:

By xine:

X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 141 (XVideo)
  Minor opcode of failed request: 14 ()
  Serial number of failed request: 2405
  Current serial number in output stream: 2405

By totem-xine:

Gdk-ERROR **: The program 'totem' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 44 error_code 8 request_code 141 minor_code 14)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
aborting...
Trace/breakpoint trap (core dumped)

I suggest that that has to do with the 3d fglrx kernel driver because if I dont have 3d acceleration all works

ProblemType: Crash
Architecture: amd64
CrashCounter: 1
Date: Mon Aug 6 18:45:58 2007
DistroRelease: Ubuntu 7.10
ExecutablePath: /usr/bin/totem
NonfreeKernelModules: fglrx
Package: totem-xine 2.19.6-0ubuntu1
PackageArchitecture: amd64
ProcCmdline: totem file:///home/phantom/.opera/cache4/temporary_download/magic_mancandy_block.mp4
ProcCwd: /home/phantom
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
Signal: 5
SourcePackage: totem
StacktraceTop:
 ?? () from /usr/lib/libgdk-x11-2.0.so.0
 _XError () from /usr/lib/libX11.so.6
 _XReply () from /usr/lib/libX11.so.6
 XvGetPortAttribute () from /usr/lib/libXv.so.1
 ?? ()
Title: totem crashed with signal 5 in _XError()
Uname: Linux xXx 2.6.20-16-generic #2 SMP Thu Jun 7 19:00:28 UTC 2007 x86_64 GNU/Linux
UserGroups: adm admin audio cdrom dialout dip floppy lpadmin netdev plugdev powerdev scanner video

Tags: apport-crash
Revision history for this message
phantom xXx (phantom007) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Symbolic stack trace

StacktraceTop:gdk_x_error (display=<value optimized out>, error=0x7fff50777db0) at /build/buildd/gtk+2.0-2.11.6/gdk/x11/gdkmain-x11.c:641
_XError (dpy=0xc45940, rep=<value optimized out>) at ../../src/XlibInt.c:2907
_XReply (dpy=0xc45940, rep=0x7fff50777f00, extra=0, discard=0) at ../../src/XlibInt.c:1833
XvGetPortAttribute (dpy=0xc45940, port=116, attribute=513, p_value=0xadff98) at ../../src/Xv.c:753
open_plugin_2 (class_gen=<value optimized out>, visual_gen=<value optimized out>) at video_out_xv.c:1097

Revision history for this message
Apport retracing service (apport) wrote : Symbolic threaded stack trace
Revision history for this message
Apport retracing service (apport) wrote : Stack trace with source code
Changed in totem:
importance: Undecided → Medium
Revision history for this message
apache2 (sullr) wrote :

I can also confirm this on an i386 machine. (Running 7.10 gusty) -- also using fglrx.

Here is some output:

ryan@ryan-laptop:~$ xine
This is xine (X11 gui) - a free video player v0.99.5.
(c) 2000-2007 The xine Team.
X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 141 (XVideo)
  Minor opcode of failed request: 14 ()
  Serial number of failed request: 2409
  Current serial number in output stream: 2409

Also, kaffeine will not start for the same reason:
https://bugs.launchpad.net/ubuntu/+source/kaffeine/+bug/131935

And, all my video is "shaky" and distorted when using Xv, I have to use gl, or gl2 in order to get my video to play smoothly:
https://bugs.launchpad.net/ubuntu/+bug/131943

Running totem-xine:

Gdk-ERROR **: The program 'totem' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 42 error_code 8 request_code 141 minor_code 14)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
aborting...
Trace/breakpoint trap (core dumped)

Revision history for this message
Jonathan Anderson (jonathan-anderson) wrote :

I can confirm this.

Running xine-check gives an odd error message, as well:

[ good ] found xvinfo: X-Video Extension version 2.2
[ good ] your Xv extension supports YV12 overlays (improves MPEG performance)
[ hint ] Your X server doesn't support YV12 overlays.
         That means xine will have to do color space transformation and scaling
         in software, which is quite CPU intensive. Maybe upgrading your
         X server will help here.
         If you have an ATI card, you'll find accelerated X servers on
         http://www.linuxvideo.org/gatos/
         press <enter> to continue...

Revision history for this message
Mario Vukelic (kreuzsakra) wrote :

Me too, also on fglrx. I'm attaching the output of xine --bug-report.

Revision history for this message
Mario Vukelic (kreuzsakra) wrote :
Download full text (4.7 KiB)

xine-check gives all kind of weird output:

xine-check
Please be patient, this script may take a while to run...
[ good ] you're using Linux, doing specific tests
[ good ] looks like you have a /proc filesystem mounted.
[ good ] You seem to have a reasonable kernel version (2.6.22-12-generic)
[ good ] intel compatible processor, checking MTRR support
[ good ] you have MTRR support and there are some ranges set.
[ good ] found the player at /usr/bin/xine
[ good ] /usr/bin/xine is in your PATH
[ hint ] No xine-config found. Assuming xine from Debian package
         The xine-config script can be used to determine some file locations
         used by xine-lib, but you don't have such a script on your system.
         However, it looks like you installed xine from the Debian packages.
         So I'll just guess that you are using the standard locations.
         If you want me to be sure about those file locations, you can install
         the 'libxine-dev' package, which contains xine-config. However, this
         package is not really needed to run xine...
         press <enter> to continue...

[ good ] plugin directory /usr/lib/xine/plugins exists.
[OUCH!!] There are no input plugins.
         xine needs at least one input plugin, but none is installed.
         You should probably reinstall xine-lib...
         press <enter> to continue...

[OUCH!!] There are no demux plugins.
         xine needs at least one demux plugin, but none is installed.
         You should probably reinstall xine-lib...
         press <enter> to continue...

[OUCH!!] There are no decoder plugins.
         xine needs at least one decoder plugin, but none is installed.
         You should probably reinstall xine-lib...
         press <enter> to continue...

[OUCH!!] There are no video_out plugins.
         xine needs at least one video_out plugin, but none is installed.
         You should probably reinstall xine-lib...
         press <enter> to continue...

[OUCH!!] There are no audio_out plugins.
         xine needs at least one audio_out plugin, but none is installed.
         You should probably reinstall xine-lib...
         press <enter> to continue...

[ good ] skin directory /usr/share/xine/skins exists.
[ good ] found logo in /usr/share/xine/skins
[ good ] I even found some skins.
[ good ] /dev/cdrom points to /dev/scd0
[ good ] /dev/dvd points to /dev/scd0
[ hint ] Your DVD drive seems not to be attached via ATAPI.
         This might be due to the use of an ide-scsi emulation.
         If you really have a SCSI DVD drive, your SCSI controller is likely
         to do perfect DMA, so there's no reason to worry about this.
         However, if you're using ide-scsi, there is a chance that DMA is
         disabled for the DVD drive. Moreover, I don't know how to enable
         DMA in that case, so you probably have to live with some performance
         loss. (FIXME: check for /proc/ide, provide solution)
         press <enter> to continue...
X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 140 (XVideo)
  Minor opcode of failed request: 14 ()
  Serial number of failed request: 30
  Current serial numbe...

Read more...

Revision history for this message
Mario Vukelic (kreuzsakra) wrote :

Aha. Installing libxine-dev solved the OUCH! cases from before, due to providing xine-config. In fact, it now finds two such files:

[ hint ] several instances of xine-config found in your PATH
         xine-config executables have been found in these places:
         /usr/bin/X11/xine-config
         /usr/bin/xine-config
         This probably means you have several versions of xine-lib installed.
         It's probably best to uninstall all unused xine-libs.
         Further tests will use /usr/bin/X11/xine-config.

dpkg -S /usr/bin/X11/xine-config
dpkg: /usr/bin/X11/xine-config not found.

ls -l /usr/bin/X11/xine-config
-rwxr-xr-x 1 root root 2067 2007-06-17 19:51 /usr/bin/X11/xine-config

Seems to be cruft from Feisty (this machine was upgraded Feisty -> Gutsy)

The end of the output stays the same, though:

X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 140 (XVideo)
  Minor opcode of failed request: 14 ()
  Serial number of failed request: 30
  Current serial number in output stream: 30
[ good ] found xvinfo: X-Video Extension version 2.2
X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 140 (XVideo)
  Minor opcode of failed request: 14 ()
  Serial number of failed request: 30
  Current serial number in output stream: 30
[ hint ] Your X server doesn't support YV12 overlays.
         That means xine will have to do color space transformation and scaling
         in software, which is quite CPU intensive. Maybe upgrading your
         X server will help here.
         If you have an ATI card, you'll find accelerated X servers on
         http://www.linuxvideo.org/gatos/
         press <enter> to continue...

[ hint ] Your X server doesn't support YV12 overlays.
         That means xine will have to do color space transformation and scaling
         in software, which is quite CPU intensive. Maybe upgrading your
         X server will help here.
         If you have an ATI card, you'll find accelerated X servers on
         http://www.linuxvideo.org/gatos/
         press <enter> to continue...

[ hint ] Your X server doesn't have any XVideo support...
         XVideo is an X server extension introduced by XFree86 4.x. This
         extension provides access to hardware accelerated color space
         conversion and scaling, which gives a great performance boost.
         If you have a fast (>1GHz) machine, you may be able to watch all
         kinds of video, anyway. You will waste lots of CPU cycles, though...
         press <enter> to continue...

Revision history for this message
Mario Vukelic (kreuzsakra) wrote :

It seems that this is actually a different issue: after "sudo rm /usr/bin/X11/xine-config", xine-config was again not found. Reinstalling libxine-dev installed this file again, but dpkg -S again states that it belongs to no package. Hmmm ...

Revision history for this message
Michael Nagel (nailor) wrote :

+1 for me...
is there any additional useful information i could provide?

Revision history for this message
guillepb (guillepb) wrote :

Same here, also running fglrx and getting the same BadMatch crash when starting totem. Please let me know if I can provide any other useful information.

Revision history for this message
Mario Vukelic (kreuzsakra) wrote :

Just adding that switching the video output to, e.g., opengl makes it work. Problem seems to be with xv

Revision history for this message
Benoit Malet (benoit-malet) wrote :

Hello !

Same problem for me on a AMD64 machine (with Ubuntu 64 latest Gutsy)

Regards,
Benoit

Revision history for this message
ericflo (ericflo) wrote :

I can confirm this as well.

Revision history for this message
lasse (lasselassi) wrote :

I had the same issue and fixed it by installing a more recent version (8.40.4) of the fglrx driver manually as desribed here:

http://wiki.cchtml.com/index.php/Ubuntu_Gutsy_Installation_Guide#Method_2:_Install_the_8.40.4_Driver_Manually

xvinfo runs without errors and xine/kaffeine are playing back videos using xv without crashing, alas, enlarged video playback (e.g. fullscreen) doesn't look as good as it used to with the stock fglrx driver that came with Feisty (scaled picture is pixelated).

I suggest, the above mentioned version of fglrx should make it into restricted-modules as soon as possible to avoid the manual workaround.

Revision history for this message
H.-R. Oberhage (oberhage) wrote :

I'd like to an observation and a (maybe) workaround for some.

The observation is, that for me, before calling totem for the first time, runs without an error, but (already) returns no values for the attribute starting with "XV_BLENDING_MODE" in the 'client gettable attribute' entry. After launching
totem, experiencing the same problem as formerly describe, xvinfo now fails, too ecactly at the "XV_BLENDING_MODE" entry.

The possible workaround with xine: When I edit 'video.driver' entry in the ~/.xine/config - file and set this to "xshm", xine does run without problem for me. 'totem' still does not! And I've found no file or way to have 'totem' act like 'xine'.

Revision history for this message
H.-R. Oberhage (oberhage) wrote :

Sorry about too many typos in my above posting. To make it more understandable:

I'd like to "add" an observation ...

It should read: ... first time, "xvinfo" runs without an error ...

and: ...xvinfo now fails, too, exactly at ...

Revision history for this message
ScislaC (scislac) wrote :

My testing...

On Gutsy using stock 8.37 fglrx w/ xserver-xgl and installing xine fresh from the repo, everything works fine.

One thing I noticed is that with xineinfo it returns:
screen #0
  Adaptor #0: "Xgl Generic Texture Video"

Everything on xine-check comes back as good as well.

Revision history for this message
lasse (lasselassi) wrote :

Okay, my situation is actually different from ScislaC's because I have removed xserver-xgl because I don't use compiz and just having xgl enabled makes 2D very slow for some reason (I've got a ATI FireGL V5200, so the new fglrx 8.42 isn't working for me).

So that's why I was using "xv" as video output and not "Xgl Generic Texture Video" and that's what has failed with the stock fglrx driver, but was fixed when I installed the 8.40.

Revision history for this message
peter76 (pf-moll) wrote :

Same here with the stock Gutsy fglrx; totem-xine crashes with above errors on xv, but not when using xserver-xgl

Revision history for this message
Vasily (prantzos) wrote :
Download full text (4.6 KiB)

I had the same errors (OUCHES) and i installed the libxine-dev and the OUCHES disappeared, but the overlay problems continued. No xv in Kaffeine or VLC. xvinfo also showed an error (i do not remember what it said-something about overlays) so i searched for options to enable in the section "Device" of my xorg.conf. I found-out that all i needed to do for the overlay problems to go away was to add these lines:
 Option "DRI" "true"
 Option "VideoOverlay" "on"
 Option "OpenGLOverlay" "off"

BUT still no video. Kaffeine does not complain about xv not VLC (thay don't use xshm anymore), BUT video is completely black! No image is displayed!!! Anyone have an idea of what to do next?

If it helps this is my complete section "Device":

Section "Device"
 Identifier "ATI Technologies, Inc. Radeon Mobility X700 (RV410 PCIE)"
 Driver "fglrx"
########-----------------------------------------------------------------------------------------------------------------------------------------------------------
######## Used by both drivers (radeon and fgrlx)
 Busid "PCI:1:0:0"
 Option "MonitorLayout" "LVDS,Auto" # For Ferrari secondary display bug (NONE,CRT,TMDS,LVDS)
## Option "CRT2Position" "Clone" # For Ferrari secondary display bug:No need
 Option "BusType" "PCIE"
 Option "RingSize" "8"
 Option "EnableDepthMoves" "true"
 Option "DPMS" "true"
 Option "mtrr" "on"
########-----------------------------------------------------------------------------------------------------------------------------------------------------------
######## Used by radeon driver (man radeon for more...)
 Option "AGPMode" "8"
 Option "EnablePageFlip" "false" # Enable page flipping for 3D apps (tends to cause a LOT of instability)
 Option "AccelMethod" "XAA" # or EXA (newer-faster but here slower??)
 Option "XAANoOffscreenPixmaps" "true" # if AccelMethod=XAA use this (USED BY FGLRX DRIVER ALSO)
# Option "EXANoOffscreenPixmaps" "true" # if AccelMethod=EXA use this
 Option "ColorTiling" "on"
 Option "RenderAccel" "true" # Enable the hardware render acceleration
 Option "AGPFastWrite" "false" # frequently the cause of instability. Used only when DRI is enabled.
 Option "AccelDFS" "true" # false for AGP due to issues with GPU->host transfers with some AGP bridges
 Option "GARTSize" "64"
 Option "BufferSize" "2"
 Option "UseFBDev" "false"
 Option "DynamicClocks" "off" # This is for laptop users, it saves energy when in battery mode, but reduces performance.
 Option "AGPSize" "128" # default: 8
 Option "DMAForXv" "true" # DMA for Xv transfers (for large videos)
 Option "SubPixelOrder" "none" # RGB is default for digital panels and NONE for CRT
# # Get better performance with Render acceleration on digital panels (use NONE setting).
## Option "BackingStore" "true" # DO NOT USE. DOES NOT RESUME AFTER STAND-BY.
########-----------------------------------------------------------------------------------------------------------------------------------------------------------
######## Not used by X server (probably for Nvidia cards)
# Option "DisableGLXRootClipping""true" # Not used by X server
# Option "AddARGBGLXV...

Read more...

Revision history for this message
H.-R. Oberhage (oberhage) wrote :

I'd like to add to my remarks dated 2007-10-23, that I've now found the config file for 'totem' alias "Movie Player" under gnome. Activating the 'video.driver' entry and setting it to "xshm" in "~/.gnome2/Totem/xine_config" now allows me to use totem like it used to be in version 7.04 alias feisty - and quite similar to 'xine' after "adjusting" its file.

It still is a kludge/workaround/'patch' at best and does not solve the basic problem described.

Revision history for this message
Mario Vukelic (kreuzsakra) wrote :

Re H.-R. Oberhage: as I have remarked earlier, using opengl as video output works too and seems to me to give better results (less CPU usage). Also note that your way to set the video-out only works for totem-xine. For totem-gstreamer, you have to use the "Multimedia System" config applet that sets video-out for all gstreamer applications; though I have failed so far trying to make it use opengl.

Revision history for this message
Florin Andrei (florin-andrei) wrote :

ThinkPad T60, using the restricted ATI drivers. Gutsy 32 bit.

Without xserver-glx, xine -V xv does not work at all.
With that package, xine -V xv does not crash, but the colors are smeared like a double image.
xine -V xshm appears to work fine, but the blue is too saturated. Only the blue.
The problem appears to be the same for any player based on libxine.

Totem or any Gstreamer-based player are worse - the green is fine but any other colors are very bad, like the blue and red channels replaced each other - skin is painted blue. But the Gstreamer problem is old, back since 7.04. However, xine worked fine on 7.04

Revision history for this message
Ludovico Fischer (ludovicofischer) wrote :

About the inverted channels, the bug is well-known and has been fixed in more recent releases of the Ati driver . Meanwhile, see http://bugzilla.gnome.org/show_bug.cgi?id=357741, and go to comment #33 for a workaround.

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

You can see in the error message, "The program 'totem' received an X Window System error. This probably reflects a bug in the program." In other words, it's probably a bug in the program (totem).

The way the error messages are worded, it sounds like an X bug, but actually those are error messages returned to programs making bad X calls.

The reason that the issue shows up with -fglrx with 3D but not in other drivers, is likely more due to totem being unable to use its 3D code with those drivers and thus is not making the same calls. The workarounds/troubleshooting folks have done so far seems to support this hypothesis, since the things they're disabling are 3D specific and may not work anyway in the other drivers.

Further, I'm wondering if some of the people saying they have the "same" issue are actually seeing separate issues that simply share the same symptoms. If your error messages and symptoms don't 100% match the original poster, please submit a new bug.

Revision history for this message
Sebastien Bacher (seb128) wrote :

seems to be a xine issue rather than an totem one

Changed in totem:
status: New → Invalid
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi phantom007,

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with the latest development release of Ubuntu? (ISOs are available from cdimage.ubuntu.com)

If it remains an issue, could you also attach a new /var/log/Xorg.0.log?
Thanks in advance.

The output of lspci -vvnn would also be worth having.

Changed in linux-restricted-modules-2.6.22:
status: New → Incomplete
Revision history for this message
Mario Vukelic (kreuzsakra) wrote :

It's fine in Intrepid (and was in Hardy, actually)

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

[This is an automated message]

As of Intrepid (8.10), we have a dedicated package 'fglrx-installer' for fglrx bugs, which now includes a process for upstreaming bugs to AMD.

  http://bugs.launchpad.net/ubuntu/+source/fglrx-installer

To transition your bug into the new fglrx-package, we need your help. Please do the following:

 a. Verify the bug occurs in Intrepid.
     (Intrepid ISOs: http://cdimage.ubuntu.com)
 b. If you haven't already, please include in the bug:
     * Your /var/log/Xorg.0.log
     * The output of `lspci -vvnn`
     * Steps to reproduce the issue
 c. Click 'Also affects distribution'
 d. Set 'Source Package Name' to 'fglrx-installer'
 e. Click Continue

Thank you. This will assist us in reviewing and upstreaming your fglrx bug, as appropriate.

[We'll expire the fglrx bugs in l-r-m-* in a month or so.]

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Closing since this was reported fixed.

Changed in linux-restricted-modules-2.6.22 (Ubuntu):
status: Incomplete → Fix Released
Changed in xine-lib (Ubuntu):
status: New → 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.