[RV530] [M56GL] xbmc not working with opensource radeon driver in jaunty

Bug #363139 reported by Dominic Evans
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kodi
Fix Released
Undecided
Unassigned
xserver-xorg-driver-ati
Won't Fix
Medium
xserver-xorg-video-ati (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-ati

already raised upstream with xbmc at http://trac.xbmc.org/ticket/6382

Ubuntu 9.04

xbmc 9.04~alpha1svn19419-jaunty1
xserver-xorg 7.4~5ubuntu18

tested with xserver-xorg-video-radeon, including the default 1:6.12.1-0ubuntu2 shipped with jaunty and a git compiled version 6.12.2.99+git20090415.5abcea88-0ubuntu0tormod2, both fail with the same problem:

$ xbmc
X Error of failed request: BadMatch (invalid parameter attributes)

    Major opcode of failed request: 1 (X_CreateWindow)
    Serial number of failed request: 28
    Current serial number in output stream: 29

CRITSEC[0x8bea684]: Trying to enter destroyed section.
CRITSEC[0x8bea684]: Trying to leave destroyed section.

I don't know if this backtrace is useful but if I try the following workaround (which was suggested elsewhere) I get a segfault:

$ XLIB_SKIP_ARGB_VISUALS=1 gdb /usr/share/xbmc/xbmc.bin
...
(gdb) bt
#0 0xb777ce26 in glClearColor () from /usr/lib/libGL.so.1
#1 0x0821075b in CGraphicContext::SetVideoResolution (this=0x8bea680, res=@0x8beb7a0, NeedZ=1, forceClear=true) at GraphicContext.cpp:792
#2 0x082e4a05 in CApplication::Create (this=0x8bec4a0, hWnd=0x0) at Application.cpp:849
#3 0x0853e5ee in main (argc=1, argv=0xbfd7a8d4) at xbmc.cpp:125

full xbmc debug log is here http://paste.ubuntu.com/152489/

nothing much interesting in it though apart from these lines:

01:31:38 T:3066156912 M:1433460736 INFO: XRANDR: /usr/share/xbmc/xbmc-xrandr --output LVDS --mode 0x4e
01:31:38 T:3066156912 M:1434112000 DEBUG: Constructing surface 1280x720, shared=(nil), fullscreen=0
01:31:38 T:3066156912 M:1434112000 INFO: GLX Info: NOT Using destination window
01:31:38 T:3066156912 M:1433858048 INFO: GLX Info: Using parent window
01:31:38 T:3066156912 M:1433513984 ERROR: (pthread_mutex_destroy(&m_mutex)): [XCriticalSection.cpp:86] 16

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: xserver-xorg-video-radeon 1:6.12.2.99+git20090415.5abcea88-0ubuntu0tormod2
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_GB.UTF-8
ProcVersion: Linux version 2.6.28-11-generic (buildd@rothera) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #41-Ubuntu SMP Wed Apr 8 04:38:53 UTC 2009
SourcePackage: xserver-xorg-video-ati
Uname: Linux 2.6.28-11-generic i686
UnreportableReason: This is not a genuine Ubuntu package

[lspci]
00:00.0 Host bridge [0600]: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub [8086:27a0] (rev 03)
     Subsystem: Lenovo Device [17aa:2015]
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc M56GL [Mobility FireGL V5200] [1002:71c4]
     Subsystem: Lenovo Device [17aa:2007]

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

> X Error of failed request: BadMatch (invalid parameter attributes)
> Major opcode of failed request: 1 (X_CreateWindow)
> Serial number of failed request: 29
> Current serial number in output stream: 30

This is most likely an application / toolkit bug.

> I have searched the web and it seems that this is happening since radeon 9.11.
> According to this topic it worked with version 9.10:

If the xbmc developers have trouble fixing the problem, this information should help narrow down the radeon driver change which supposedly exposed the client side bug, e.g. using git bisect.

> http://forum.boxee.tv/showthread.php?t=6794

In the future, please provide all relevant information in a bug report directly, not linked externally.

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

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

Revision history for this message
Dominic Evans (oldmanuk) wrote : xbmc not working with opensource radeon driver in jaunty

Binary package hint: xserver-xorg-video-ati

already raised upstream with xbmc at http://trac.xbmc.org/ticket/6382

Ubuntu 9.04

xbmc 9.04~alpha1svn19419-jaunty1
xserver-xorg 7.4~5ubuntu18

tested with xserver-xorg-video-radeon, including the default 1:6.12.1-0ubuntu2 shipped with jaunty and a git compiled version 6.12.2.99+git20090415.5abcea88-0ubuntu0tormod2, both fail with the same problem:

$ xbmc
X Error of failed request: BadMatch (invalid parameter attributes)

    Major opcode of failed request: 1 (X_CreateWindow)
    Serial number of failed request: 28
    Current serial number in output stream: 29

CRITSEC[0x8bea684]: Trying to enter destroyed section.
CRITSEC[0x8bea684]: Trying to leave destroyed section.

I don't know if this backtrace is useful but if I try the following workaround (which was suggested elsewhere) I get a segfault:

$ XLIB_SKIP_ARGB_VISUALS=1 gdb /usr/share/xbmc/xbmc.bin
...
(gdb) bt
#0 0xb777ce26 in glClearColor () from /usr/lib/libGL.so.1
#1 0x0821075b in CGraphicContext::SetVideoResolution (this=0x8bea680, res=@0x8beb7a0, NeedZ=1, forceClear=true) at GraphicContext.cpp:792
#2 0x082e4a05 in CApplication::Create (this=0x8bec4a0, hWnd=0x0) at Application.cpp:849
#3 0x0853e5ee in main (argc=1, argv=0xbfd7a8d4) at xbmc.cpp:125

full xbmc debug log is here http://paste.ubuntu.com/152489/

nothing much interesting in it though apart from these lines:

01:31:38 T:3066156912 M:1433460736 INFO: XRANDR: /usr/share/xbmc/xbmc-xrandr --output LVDS --mode 0x4e
01:31:38 T:3066156912 M:1434112000 DEBUG: Constructing surface 1280x720, shared=(nil), fullscreen=0
01:31:38 T:3066156912 M:1434112000 INFO: GLX Info: NOT Using destination window
01:31:38 T:3066156912 M:1433858048 INFO: GLX Info: Using parent window
01:31:38 T:3066156912 M:1433513984 ERROR: (pthread_mutex_destroy(&m_mutex)): [XCriticalSection.cpp:86] 16

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: xserver-xorg-video-radeon 1:6.12.2.99+git20090415.5abcea88-0ubuntu0tormod2
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_GB.UTF-8
ProcVersion: Linux version 2.6.28-11-generic (buildd@rothera) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #41-Ubuntu SMP Wed Apr 8 04:38:53 UTC 2009
SourcePackage: xserver-xorg-video-ati
Uname: Linux 2.6.28-11-generic i686
UnreportableReason: This is not a genuine Ubuntu package

Revision history for this message
Dominic Evans (oldmanuk) wrote :
Revision history for this message
Dominic Evans (oldmanuk) wrote :

also raised upstream

Changed in xserver-xorg-driver-ati:
status: Unknown → Confirmed
Changed in xbmc:
status: Unknown → New
Revision history for this message
Dominic Evans (oldmanuk) wrote :

my freedesktop bug has been duped against http://bugs.freedesktop.org/show_bug.cgi?id=21145 in which they suggest this is an xbmc client-side bug that needs to be fixed

Changed in xserver-xorg-driver-ati:
status: Confirmed → Invalid
Revision history for this message
In , Andreas Setterlind (gamester17) wrote :

FYI; XBMC not working with the open source radeon driver is not a bug in the XBMC application software; the fact is that XBMC just requires full 3D OpenGL 1.4 with GLSL and ARB support, to this date the open source radeon driver does simply not support that yet.

Read:
http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#XBMC_for_Linux_minimum_requirements
and:
http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#Why_is_a_OpenGL_2.0_compatible_graphic-controller_the_recommended_minimum_for_XBMC.3F
as well as:
http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#Currently_OpenGL_2.0_hardware_is_only_needed_for.../

So until the open source radeon driver supports full 3D OpenGL 1.4 with GLSL and ARB support, you need to use the latest ATI restricted driver (meaning the closed source binary driver from ATI). You can follow these instructions for help on installing the latest restricted drivers:
http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#How_can_I_sort_out_graphic.2Fvideo_issues_in_XBMC_for_Linux

Revision history for this message
Andreas Setterlind (gamester17) wrote : Re: xbmc not working with opensource radeon driver in jaunty

This is not a XBMC bug; XBMC requires full 3D OpenGL 1.4 with GLSL and ARB support, the open source radeon driver does simply not support that yet.

Read:
http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#XBMC_for_Linux_minimum_requirements
and:
http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#Why_is_a_OpenGL_2.0_compatible_graphic-controller_the_recommended_minimum_for_XBMC.3F
as well as:
http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#Currently_OpenGL_2.0_hardware_is_only_needed_for.../

So until the open source radeon driver supports full 3D OpenGL 1.4 with GLSL and ARB support, you need to use the latest ATI restricted driver (meaning the closed source binary driver from ATI). You can follow these instructions for help on installing the latest restricted drivers:
http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#How_can_I_sort_out_graphic.2Fvideo_issues_in_XBMC_for_Linux

Revision history for this message
In , Corbin Simpson (mostawesomedude) wrote :

(In reply to comment #3)
> FYI; XBMC not working with the open source radeon driver is not a bug in the
> XBMC application software; the fact is that XBMC just requires full 3D OpenGL
> 1.4 with GLSL and ARB support, to this date the open source radeon driver does
> simply not support that yet.
>
> Read:
> http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#XBMC_for_Linux_minimum_requirements
> and:
> http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#Why_is_a_OpenGL_2.0_compatible_graphic-controller_the_recommended_minimum_for_XBMC.3F
> as well as:
> http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#Currently_OpenGL_2.0_hardware_is_only_needed_for.../
>
> So until the open source radeon driver supports full 3D OpenGL 1.4 with GLSL
> and ARB support, you need to use the latest ATI restricted driver (meaning the
> closed source binary driver from ATI). You can follow these instructions for
> help on installing the latest restricted drivers:
> http://xbmc.org/wiki/?title=XBMC_for_Linux_specific_FAQ#How_can_I_sort_out_graphic.2Fvideo_issues_in_XBMC_for_Linux
>

Please use the OGL extensions and versioning system to correctly detect OGL capabilities and fallback or exit gracefully as needed.

On a personal note, please don't recommend Envy; it makes everybody sad. :C

Revision history for this message
In , Dominic Evans (oldmanuk) wrote :

re-opening as radeon bug

Revision history for this message
In , Dominic Evans (oldmanuk) wrote :

bug 21262 has additional trace / version info etc. (if needed)

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

This is not a radeon bug. xbmc apparently requires GLSL which is not supported in the open source radeon 3D drivers yet. However, xbmc should, as Corbin noted, use the GL extensions and versioning system to correctly detect the supported GL capabilities and fallback or exit gracefully rather than doing what it currently does.

Changed in xbmc:
status: New → Unknown
Bryce Harrington (bryce)
Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
Bryce Harrington (bryce)
description: updated
Revision history for this message
Dominic Evans (oldmanuk) wrote : Re: xbmc not working with opensource radeon driver in jaunty

this is a jaunty regression, xbmc was previously working fine on intrepid using the opensource radeon driver, and now no longer works after the jaunty upgrade

tags: added: regression-release
Changed in xbmc:
status: Unknown → New
Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

Indeed, however note for the record that the error from this report can't really be directly related to the version or any extension of OpenGL itself but is more likely related to GLX visuals or something like that.

Revision history for this message
In , Carlos Bessa (carlos-bessa) wrote :

...so, i'm just curious, in light of this how come xbmc worked with previous versions of the radeon driver?

regards,
Carlos

Revision history for this message
In , Dominic Evans (oldmanuk) wrote :

Comment 16 on the XBMC trac seems to suggest its a framebuffer bpp reporting issue and nothing to do with GLSL at all. A simple XBMC patch fixes the problem, but is this a regression in Driver/Radeon or has some incorrect behaviour been fixed, and XBMC breakage is just a side effect?

http://trac.xbmc.org/ticket/6382#comment:16

Revision history for this message
Dominic Evans (oldmanuk) wrote : Re: xbmc not working with opensource radeon driver in jaunty

comment 16 on the XBMC trac (http://trac.xbmc.org/ticket/6382#comment:16) offers a patch that seems to be working well. Waiting to hear more from upstream on when this might be resolved / whether its worth adding a .deb patch in the meantime.

Revision history for this message
Dominic Evans (oldmanuk) wrote :

switching remote freedesktop-bugs to track the 'duplicate of' bug

Changed in xserver-xorg-driver-ati:
status: Invalid → Unknown
Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

(In reply to comment #10)
> A simple XBMC patch fixes the problem,

Without the patch, does running xbmc with XLIB_SKIP_ARGB_VISUALS=1 work around the problem?

Revision history for this message
In , Dominic Evans (oldmanuk) wrote :

Sadly not. I tried that in my original bug 21262.

$ XLIB_SKIP_ARGB_VISUALS=1 gdb /usr/share/xbmc/xbmc.bin
...
(gdb) bt
#0 0xb777ce26 in glClearColor () from /usr/lib/libGL.so.1
#1 0x0821075b in CGraphicContext::SetVideoResolution (this=0x8bea680,
res=@0x8beb7a0, NeedZ=1, forceClear=true) at GraphicContext.cpp:792
#2 0x082e4a05 in CApplication::Create (this=0x8bec4a0, hWnd=0x0) at
Application.cpp:849
#3 0x0853e5ee in main (argc=1, argv=0xbfd7a8d4) at xbmc.cpp:125

full xbmc debug log is here http://paste.ubuntu.com/152489/

nothing much interesting in it though apart from these lines:

01:31:38 T:3066156912 M:1433460736 INFO: XRANDR: /usr/share/xbmc/xbmc-xrandr
--output LVDS --mode 0x4e
01:31:38 T:3066156912 M:1434112000 DEBUG: Constructing surface 1280x720,
shared=(nil), fullscreen=0
01:31:38 T:3066156912 M:1434112000 INFO: GLX Info: NOT Using destination window
01:31:38 T:3066156912 M:1433858048 INFO: GLX Info: Using parent window
01:31:38 T:3066156912 M:1433513984 ERROR: (pthread_mutex_destroy(&m_mutex)):
[XCriticalSection.cpp:86] 16

Changed in xserver-xorg-driver-ati:
status: Unknown → Confirmed
Revision history for this message
Carlos Sánchez Mateo (chukysoria) wrote : Re: xbmc not working with opensource radeon driver in jaunty

A patch has been implemented and it works in Jauny with Ati driver. It's available through the svn build

Revision history for this message
Trent Nelson (althekiller) wrote :

The "patch" is just a work around for our upcoming release. The plan is to remove it once ATI/Xorg fix the real problem.

Revision history for this message
In , Dominic Evans (oldmanuk) wrote :

OK. XBMC team have implemented a workaround in preparation for their forthcoming release. The upstream patch svn changeset that was committed is browsable here:

http://xbmc.org/trac/changeset/19781

They consider this to be a temporary workaround for the release, and are expecting the xorg-driver-ati team to 'fix' the change in behaviour that caused this problem.

Revision history for this message
Dominic Evans (oldmanuk) wrote : Re: xbmc not working with opensource radeon driver in jaunty

FYI the upstream patch svn changeset is browsable here:

http://xbmc.org/trac/changeset/19781

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

(In reply to comment #13)
> OK. XBMC team have implemented a workaround in preparation for their
> forthcoming release. The upstream patch svn changeset that was committed is
> browsable here:
>
> http://xbmc.org/trac/changeset/19781
>
> They consider this to be a temporary workaround for the release, and are
> expecting the xorg-driver-ati team to 'fix' the change in behaviour that caused
> this problem.

I do think something like that is the correct solution however, although I wouldn't check for depth == 24 (probably won't work for X servers running in depth 16) but for depth == (red + green + blue) (so there's no alpha).

Anyway, the X video driver no longer has any influence on the GLX visuals or fbconfigs, it's all between the X server and the Mesa driver now. As this problem was probably triggered by an X server change I'm reassigning there, but be prepared for a NOTOURBUG resolution.

Revision history for this message
Dominic Evans (oldmanuk) wrote : Re: xbmc not working with opensource radeon driver in jaunty

FYI, thanks to ~wattazoum, this can now be verified via the PPA as svn r19838 has now been dput and built

https://edge.launchpad.net/~team-xbmc-svn/+archive/ppa

Revision history for this message
Dominic Evans (oldmanuk) wrote :

FYI, xbmc - 9.04~beta1svn19838-jaunty1 tested and working on my system

Bryce Harrington (bryce)
summary: - xbmc not working with opensource radeon driver in jaunty
+ [M56GL] xbmc not working with opensource radeon driver in jaunty
Bryce Harrington (bryce)
summary: - [M56GL] xbmc not working with opensource radeon driver in jaunty
+ [M56GL] [M56GL] xbmc not working with opensource radeon driver in jaunty
Bryce Harrington (bryce)
summary: - [M56GL] [M56GL] xbmc not working with opensource radeon driver in jaunty
+ [M56GL] xbmc not working with opensource radeon driver in jaunty
Bryce Harrington (bryce)
tags: added: jaunty
Andres Mejia (amejia1)
Changed in xbmc:
status: New → Unknown
status: Unknown → Fix Released
Changed in xbmc:
status: Fix Released → Unknown
Bryce Harrington (bryce)
Changed in xserver-xorg-video-ati (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
Changed in xbmc:
status: Unknown → New
Robert Hooker (sarvatt)
summary: - [M56GL] xbmc not working with opensource radeon driver in jaunty
+ [RV530] [M56GL] xbmc not working with opensource radeon driver in jaunty
Revision history for this message
In , Corbin Simpson (mostawesomedude) wrote :

Closing as NOTOURBUG. XBMC fixed it on their side, so there's no reason to keep this open any longer.

Changed in xserver-xorg-driver-ati:
status: Confirmed → Invalid
Revision history for this message
Bryce Harrington (bryce) wrote :

On the upstream bug report it's indicated this was fixed in XBMC so no need for carrying a bug report against -ati any further on it.

Changed in xserver-xorg-video-ati (Ubuntu):
status: Triaged → Fix Released
Changed in xserver-xorg-driver-ati:
importance: Unknown → Medium
status: Invalid → Won't Fix
Changed in xserver-xorg-driver-ati:
importance: Medium → Unknown
Changed in xserver-xorg-driver-ati:
importance: Unknown → Medium
Revision history for this message
Andres Mejia (amejia1) wrote :
Changed in xbmc:
importance: Unknown → Undecided
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.