[xorg-edgers] after rebuilding, Wine doesn't get same results with DRI R600 as glxinfo

Bug #515933 reported by ppanon
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mesa (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: xorg

I'm trying to rebuild Wine to develop a patch to better handle Mesa DRI R3/600 drivers from the xorg-edgers PPA.
What happens is that the glx data Wine retrieves after recompilation doesn't match what I see in glxinfo. For more info, see
http://bugs.winehq.org/show_bug.cgi?id=21515
where the attachment named "running wine initialization with +wgl,+winediag" shows the results Wine gets. At minimum, the GL version, Client GLX vendor, and Direct Rendering enabled values seem to be incorrect compared to what glxinfo returns (which appears to be correct).

trace:wgl:X11DRV_WineGL_InitOpenglInfo GL version : 1.4 (2.0 Mesa 7.8-devel).
trace:wgl:X11DRV_WineGL_InitOpenglInfo GL renderer : Mesa DRI R600 (RV670 9505) 20090101 TCL DRI2.
trace:wgl:X11DRV_WineGL_InitOpenglInfo GLX version : 1.2.
trace:wgl:X11DRV_WineGL_InitOpenglInfo Server GLX version : 1.2.
trace:wgl:X11DRV_WineGL_InitOpenglInfo Server GLX vendor: : SGI.
trace:wgl:X11DRV_WineGL_InitOpenglInfo Client GLX version : 1.4.
trace:wgl:X11DRV_WineGL_InitOpenglInfo Client GLX vendor: : SGI.
trace:wgl:X11DRV_WineGL_InitOpenglInfo Direct rendering enabled: False

I'm not sure what could be causing this. I grabbed the wine sources using
apt-get source wine
That also installed a whole bunch of dev package dependencies, and I eventually noticed they were grabbed from the main inventory. I since tried to update the xorg dev packages to the git versions from the PPA but it hasn't made any difference when running subsequent rebuilds.

ProblemType: Bug
Architecture: amd64
Date: Tue Feb 2 00:57:58 2010
DistroRelease: Ubuntu 9.10
MachineType: MICRO-STAR INTERNATIONAL CO.,LTD MS-7388
Package: xorg 1:7.4+3ubuntu10
ProcCmdLine: root=/dev/mapper/Raid1Group-RootVol ro quiet splash
ProcEnviron:
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-10.14-generic
RelatedPackageVersions:
 xserver-xorg 1:7.4+3ubuntu10
 libgl1-mesa-glx 7.8.0~git20100130.996fd614-0ubuntu0sarvatt~karmic
 libdrm2 2.4.17+git20100120.9de34e2d-0ubuntu0sarvatt6~karmic
 xserver-xorg-video-intel 2:2.10.0+git20100127.918151a7-0ubuntu0sarvatt~karmic
 xserver-xorg-video-ati 1:6.12.99+git20100129.5c112645-0ubuntu0sarvatt~karmic
SourcePackage: xorg
Uname: Linux 2.6.32-10-generic x86_64
dmi.bios.date: 12/01/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: V1.11
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: MS-7388
dmi.board.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
dmi.board.version: 1.0
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrV1.11:bd12/01/2009:svnMICRO-STARINTERNATIONALCO.,LTD:pnMS-7388:pvr1.0:rvnMICRO-STARINTERNATIONALCO.,LTD:rnMS-7388:rvr1.0:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: MS-7388
dmi.product.version: 1.0
dmi.sys.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
fglrx: Not loaded
system:
 distro: Ubuntu
 architecture: x86_64kernel: 2.6.32-10-generic

Revision history for this message
ppanon (ppanon) wrote :
Bryce Harrington (bryce)
affects: xorg (Ubuntu) → xserver-xorg-video-ati (Ubuntu)
Revision history for this message
ppanon (ppanon) wrote :

Note that the referenced WineHQ bug report contains wine debug traces by other users of the R600 and R300 drivers which show the correct values for Client GLX vendor and Direct rendering enabled, but who probably aren't running Ubuntu w/ PPA updates. So either this is a problem with the Ubuntu PPA or with my installation thereof. However the fact that I get the correct values from glxinfo would seem to make the latter less likely.

Revision history for this message
Robert Hooker (sarvatt) wrote :

Well you are running into a few issues here. you're using 64 bit, we don't build ia32-libs with updated mesa packages in xorg-edgers. wine is using the 32 bit mesa libs which come from the distro in the ia32-libs package. r600 is not built for mesa 7.6.1 in karmic so it is using swrast even though you have the updated 64 bit mesa libs that do have r600. If you upgrade to lucid this will be alleviated somewhat as mesa 7.7 in lucid is built with r600 support, but there is still a difference between the 7.7 r600_dri.so and the 7.8 r600_dri.so which has glsl support enabled so there might still be problems you run in to. When you use glxinfo, you are seeing the 64 bit results and native 64 bit programs will have no problems using those libs. The only way I'm aware of to fix it is to build your own ia32-libs package with newer mesa packages built it but that is something I'm not doing in xorg-edgers because the package is huge, there is not enough space in the PPA to do it, and updating that is way too complex to be a daily routine for every update like I do with mesa.

affects: xserver-xorg-video-ati (Ubuntu) → mesa (Ubuntu)
Revision history for this message
Robert Hooker (sarvatt) wrote :

This is fixed in lucid so I'm setting it as fix released. it will not be fixed in karmic and is a PPA specific problem because r600_dri.so does not exist and will not exist in karmic.

Changed in mesa (Ubuntu):
status: New → Fix Released
Revision history for this message
ppanon (ppanon) wrote :

Thanks. I was starting to wonder if it might be something specific to the Karmic PPA and was getting ready to try to upgrade to Lucid when I saw your post. I've just finished upgrading to Lucid and will now try to rebuild Wine packages from the PPA source since the Wine PPA doesn't have support for Lucid yet.

Revision history for this message
ppanon (ppanon) wrote :

I don't know, I still seem to be having problems with wine1.2 after upgrading to Lucid.

fixme:mixer:ALSA_MixerInit No master control found on USB Device 0x46d:0x8c2, disabling mixer
fixme:mixer:ALSA_MixerInit No master control found on HDA ATI HDMI, disabling mixer
trace:d3d:DllMain WineD3D DLLMain Reason=1
trace:d3d:wined3d_init appname = [terran.exe\Direct3D]
trace:d3d:wined3d_init Allow HW vertex shaders
trace:d3d:wined3d_init If supported by your system, GL Shading Language will be used
trace:d3d:InitAdapters Initializing adapters
trace:wgl:wglGetProcAddress func: 'glAccum'
err:wgl:has_opengl Failed to load libGL: libGL.so.1: cannot open shared object file: No such file or directory
err:wgl:has_opengl OpenGL support is disabled.

...

This seems to be either with the stock Lucid packages or rebuilding from the Lucid package source with my patch.

Revision history for this message
Robert Hooker (sarvatt) wrote :

Sounds like you still have xorg-edgers karmic packages installed which have higher version numbers than the lucid ones? mesa had quite a bit of restructuring in lucid (libgl is provided as an alternative and is located at /usr/lib/mesa/ now) so that will not work. Does dpkg -l | grep "~karmic" return anything? you want to make sure none of the karmic packages from xorg-edgers are remaining.

Revision history for this message
ppanon (ppanon) wrote :

Yeah there's quite a few

ii libdrm-intel1 2.4.17+git20100204.1802e1a4-0ubuntu0sarvatt~karmic
ii libdrm-radeon1 2.4.17+git20100204.1802e1a4-0ubuntu0sarvatt~karmic
ii libdrm2 2.4.17+git20100204.1802e1a4-0ubuntu0sarvatt~karmic
ii libgl1-mesa-dev 7.8.0~git20100203.64da2aee-0ubuntu0sarvatt~karmic
ii libgl1-mesa-dri 7.8.0~git20100203.64da2aee-0ubuntu0sarvatt~karmic
ii libgl1-mesa-glx 7.8.0~git20100203.64da2aee-0ubuntu0sarvatt~karmic
ii libglu1-mesa 7.8.0~git20100203.64da2aee-0ubuntu0sarvatt~karmic
ii libglu1-mesa-dev 7.8.0~git20100203.64da2aee-0ubuntu0sarvatt~karmic
ii mesa-common-dev 7.8.0~git20100203.64da2aee-0ubuntu0sarvatt~karmic
ii mesa-utils 7.8.0~git20100203.64da2aee-0ubuntu0sarvatt~karmic
ii x11proto-dri2-dev 2.2~git20100111.bd6f2584-0ubuntu0sarvatt~karmic
ii x11proto-gl-dev 1.4.11~git20100111.2c7f76a1-0ubuntu0sarvatt~karmic
rc xserver-xorg-video-intel 2:2.10.0+git20100127.918151a7-0ubuntu0sarvatt~karmic

It had ripped out xorg-xserver-video-ati and forced me to reinstall it manually after the isntalaltion, so I was hoping it had done it with the other packages, but that doesn't seem to be the case. Not sure how I would get the proper lucid packages loaded because they don't seem to be an Synaptic seems to show the loaded versions and if I try to remove them for re-installation, it wants to remove a lot of dependent packages as well. I thought about downloading the packages from the repository manually and reinstalling them but I'm not sure which ones to get.

Revision history for this message
Robert Hooker (sarvatt) wrote :

Easiest way would be to add the xorg-edgers lucid PPA to your sources, install ppa-purge, then sudo ppa-purge xorg-edgers to go back to stock lucid. the lucid packages are all higher version numbers than the karmic ones and are built correctly for lucid so you can just use that if you want to. Alternatively, remove xorg-edgers from your sources, sudo apt-get update and then for every package listed there add it to this -

sudo apt-get install libdrm-intel1/lucid libdrm2/lucid ..etc

adding /lucid to the end of the package name like that. You might want to dpkg -l | grep sarvatt and dpkg -l | grep tormod just to be sure you got everything if you do it that way.

Revision history for this message
ppanon (ppanon) wrote :

That totally cleaned up my machine and Wine now returns the expected glinfo values. Thank you very much!

Revision history for this message
ppanon (ppanon) wrote :

Looks like I spoke/posted too soon.

trace:wgl:X11DRV_WineGL_InitOpenglInfo GL version : 1.4 (1.5 Mesa 7.7).
trace:wgl:X11DRV_WineGL_InitOpenglInfo GL renderer : Mesa DRI R600 (RV670 9505) 20090101 TCL DRI2.
trace:wgl:X11DRV_WineGL_InitOpenglInfo GLX version : 1.4.
trace:wgl:X11DRV_WineGL_InitOpenglInfo Server GLX version : 1.4.
trace:wgl:X11DRV_WineGL_InitOpenglInfo Server GLX vendor: : SGI.
trace:wgl:X11DRV_WineGL_InitOpenglInfo Client GLX version : 1.4.
trace:wgl:X11DRV_WineGL_InitOpenglInfo Client GLX vendor: : Mesa Project and SGI.
trace:wgl:X11DRV_WineGL_InitOpenglInfo Direct rendering enabled: False
err:winediag:X11DRV_WineGL_InitOpenglInfo Direct rendering is disabled, most likely your OpenGL drivers haven't been installed correctly
trace:wgl:has_opengl GLX is up and running error_base = 165

glxinfo shows direct rendering enabled but the mesa trace reports otherwise. Other GL info values appear OK. I get the same results with either the stock wine package or rebuilt with my Mesa ATI patch

Revision history for this message
ppanon (ppanon) wrote :

I've been working pretty hard trying to add Mesa support to Wine for the Feb. 18 feature freeze, so it would be really nice if this could work in Lucid x64

Revision history for this message
ppanon (ppanon) wrote :

Looks like I may be running into issues related to bug #506437 (and perhaps bug #506435) because the workaround of setting
export LIBGL_DRIVERS_PATH=/usr/lib32/dri
suggested in bug #248392 seems to allow wine to properly detect/use Direct rendering.

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.