Bug 7774 - Warcraft III crashes Xorg with R300
Summary: Warcraft III crashes Xorg with R300
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: General (show other bugs)
Version: XOrg git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-04 17:42 UTC by Lukáš Turek
Modified: 2006-10-23 00:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Backtrace (GDB 6.4) (1.29 KB, text/plain)
2006-08-04 17:44 UTC, Lukáš Turek
no flags Details
XOrg log (47.77 KB, text/plain)
2006-08-04 17:47 UTC, Lukáš Turek
no flags Details
xorg.conf (2.90 KB, text/plain)
2006-08-04 17:50 UTC, Lukáš Turek
no flags Details
strace log (gzipped, 2MB uncompressed) (113.90 KB, application/x-tar)
2006-08-21 14:02 UTC, Lukáš Turek
no flags Details

Description Lukáš Turek 2006-08-04 17:42:44 UTC
I'm using xorg-server-1.1.0, xf86-video-ati-6.6.1 and DRM, libdrm and mesa from
CVS (currently 2006-08-02) on Gentoo. 2D is completely stable, glxgears are fine
too, but running Warcraft III in Wine causes X server to crash.

This happens only when I start Xorg from console with "X". When i run the game
in KDE session, it starts, but after a few minutes the screen freezes and X
servers starts to use 100% CPU. I can SSH to the box, I can reboot it, but I
can't kill the server or chvt to console.
Comment 1 Lukáš Turek 2006-08-04 17:44:02 UTC
Created attachment 6462 [details]
Backtrace (GDB 6.4)
Comment 2 Lukáš Turek 2006-08-04 17:47:09 UTC
Created attachment 6463 [details]
XOrg log

For some reason XOrg initializes DRM twice - is it normal?
Comment 3 Lukáš Turek 2006-08-04 17:50:27 UTC
Created attachment 6464 [details]
xorg.conf

I tried some tweaks, but it crashes without them too. The card is Radeon X600
PCIE, so I AGP tweaks does not apply here.
Comment 4 Michel Dänzer 2006-08-06 13:01:40 UTC
The log file looks like there's a second server generation (i.e. some client
connects and disconnects again before the window manager starts) and there's
confusion about whether direct rendering is enabled or not in the second server
generation. The freeze could be fixed in current xf86-video-ati git, otherwise
it's most likely an r300 DRI driver issue.
Comment 5 Lukáš Turek 2006-08-06 14:36:34 UTC
(In reply to comment #4)
> The log file looks like there's a second server generation (i.e. some client
> connects and disconnects again before the window manager starts) and there's
> confusion about whether direct rendering is enabled or not in the second server
> generation. The freeze could be fixed in current xf86-video-ati git, otherwise
> it's most likely an r300 DRI driver issue.
In the test I did not use a window manager, I just started X from console and
then run "DISPLAY=:0 wine war3.exe" via SSH. Maybe it was a bad idea, but other
programs (glxgears and Half-life in wine including) work fine this way. And I
think it shouldn't crash X server.

I tried xorg-server-1.1.1, it's the same. I will try xf86-video-ati from git.

Comment 6 Lukáš Turek 2006-08-16 11:06:11 UTC
Recent xf86-video-ati (2006-08-16) from git crashes the same way as
xf86-video-ati-6.6.1.
Comment 7 Jerome Glisse 2006-08-16 11:11:13 UTC
Could you try with recent Mesa, this might have been fixed.
Comment 8 Lukáš Turek 2006-08-17 12:15:29 UTC
(In reply to comment #7)
> Could you try with recent Mesa, this might have been fixed.

Unfortunately not. It still happens with current xf86-video-ati, libdrm, mesa
and drm from git.
Comment 9 Jerome Glisse 2006-08-17 12:36:04 UTC
Could you try with enabling ColorTiling and DynamicClock and disabling SWcursor.
Comment 10 Lukáš Turek 2006-08-17 16:57:45 UTC
(In reply to comment #9)
> Could you try with enabling ColorTiling and DynamicClock and disabling SWcursor.

Thanks for your suggestion, but it didn't help :-(
Comment 11 Lukáš Turek 2006-08-21 14:02:00 UTC
Created attachment 6639 [details]
strace log (gzipped, 2MB uncompressed)

Now I also upgraded xorg-server to current git, the freeze still happens. I
started X server in console via strace and then run Unreal Tournament in Wine.
The game freezed in the opening animation, wine-pthread was taking 100% CPU,
and this was at the end of strace output:
ioctl(8, 0x4008642a, 0xbfd0d958)	= ? ERESTARTSYS (To be restarted)

Then I killed wine-pthread, X server started to take 100% CPU, stuck in a loop
trying some ioctl:
ioctl(8, 0x6444, 0)			= -1 EBUSY (Device or resource busy)

File descriptor 8 is /dev/dri/card0:
open("/dev/dri/card0", O_RDWR)		= 8
Comment 12 Jerome Glisse 2006-08-21 15:25:04 UTC
Your card may need different clock setting than the fix that want in for radeon
9800. May you try to first run a X server with fglrx (no need for 3D only the
2D) and then run X server with r300 dri and see if it solve the lockup.
Comment 13 Lukáš Turek 2006-08-22 10:35:36 UTC
(In reply to comment #12)
> Your card may need different clock setting than the fix that want in for radeon
> 9800. May you try to first run a X server with fglrx (no need for 3D only the
> 2D) and then run X server with r300 dri and see if it solve the lockup.

No, it still freezes :-( I tried it as follows:
* modprobe fglrx
* set 'Driver "radeon"' in xorg.conf
* start X server
* kill X server with Ctrl+Alt+Backspace
* rmmod fgrlx
* modprobe radeon
* start X server
* start Unreal Tournament
* freeze at the end of opening animation :-(

Then I installed also ATI OpenGL, both Unreal Tournament and Warcraft III was
running fine. But when I set OpenGL implementation back to Mesa, r300_dri.so was
missing for some reason and direct rendering was disabled - but UnrealTournament
freezed again. Maybe this will help...
Comment 14 Aapo Tahkola 2006-08-22 14:27:48 UTC
Try these two patches:
http://www.rasterburn.org/~aet/r300_no_depth_test.patch
http://www.rasterburn.org/~aet/r300_no_clears.patch

There might be some hope left if it locks when the first one is applied but
doesn't when both have.
Comment 15 Jerome Glisse 2006-08-22 17:12:14 UTC
By no need for 3d i meaned set driver to fglrx in X.
Start a dumb Xserver (just Xorg) kill it. Set driver
back to radeon and try dri. No need for the kernel
module. Maybe you already do that, report if so.
Comment 16 Lukáš Turek 2006-08-23 14:39:25 UTC
(In reply to comment #14)
> Try these two patches:
> http://www.rasterburn.org/~aet/r300_no_depth_test.patch
> http://www.rasterburn.org/~aet/r300_no_clears.patch
> 
No, they didn't make any change, other than messed up rendering.

(In reply to comment #15)
> By no need for 3d i meaned set driver to fglrx in X.
> Start a dumb Xserver (just Xorg) kill it. Set driver
> back to radeon and try dri. No need for the kernel
> module. Maybe you already do that, report if so.

I first tried it with fglrx.ko, but it's the same without it.

I found out that Warcraft III works when i set all video options to low or off,
at least it passes my testcase (replay of a game of 4 players against 4
computers played at 8x speed). Maybe it's a problem with a lot of polygons or
textures?
Comment 17 Lukáš Turek 2006-09-16 08:37:33 UTC
The freeze is finally gone!
I upgraded to mesa-6.5.1 and xf86-video-ati-6.6.2, and for the first time it
passed my aforementioned testcase at full resolution (1400x1050).
I will try more tests.
Comment 18 Jerome Glisse 2006-09-17 04:29:51 UTC
Closing the bug, reopen if you face again such problem.
Comment 19 Jacek Poplawski 2006-10-17 06:10:29 UTC
I tried to run Warcraft III on Wine, it works, but without hardware
acceleration. Other applications, like Return To Castle Wolfenstein works with
hardware acceleration. Software fallbacks are disabled (Cube also works with
acceleration). Is it working for you with current driver?

Radeon X550, xorg-server-1.1.1, mesa 6.5.1, xf86-video-ati-6.6.3 
Comment 20 Lukáš Turek 2006-10-18 13:15:37 UTC
(In reply to comment #19)
> I tried to run Warcraft III on Wine, it works, but without hardware
> acceleration. Other applications, like Return To Castle Wolfenstein works with
> hardware acceleration. Software fallbacks are disabled (Cube also works with
> acceleration). Is it working for you with current driver?
> 
> Radeon X550, xorg-server-1.1.1, mesa 6.5.1, xf86-video-ati-6.6.3 

Yes, Warcraft III still works with the same versions (now they are stable in
Gentoo) and wine-0.9.22. It must be accelerated, because it runs at 1400x1050
with enough fps. Do you run it in OpenGL mode? It was some registry hack.

But I have Radeon Mobility X600.
 
Comment 21 Jacek Poplawski 2006-10-23 00:15:35 UTC
It works perfectly on X550 with -opengl option. Thanks for help and sorry for
false alarm.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.