rage 128 m3 startup crash (r128_dri driver)

Problems with the Linux version of Darwinia

Moderators: jelco, bert_the_turtle, Chris, andy, John

chris.pickett
level0
Posts: 4
Joined: Wed Feb 22, 2006 4:53 pm

rage 128 m3 startup crash (r128_dri driver)

Postby chris.pickett » Wed Feb 22, 2006 5:12 pm

Hi,

The linux demo seems to have problems with my video card. It doesn't work at all with RenderLandscapeMode = 2 (no graphics, just a window pops up), but it does work with RenderLandscapeMode = 1. However, it then runs extremely slowly (less than 10 FPS), even if I set all the graphics options to the lowest quality and change the resolution to 640x480. I am quite sure that my computer can handle the graphics requirements for Darwinia, even though it's old (e.g., I could play Black and White, Warcraft III, etc. under W2K). I thought the 24-bit colour depth might have something to do with it, since it's not accelerated on my system, but even when I set it to 16-bit colour, it's really slow.

The error messages seem to indicate some problem with a stub function in Mesa 6.4.1.

750 MHz PIII
16 MB ATI Rage 128 Mobility M3
384 MB RAM

Debugging info follows, let me know if I can do more or if you have a different build of the demo I can try. r128 is a fairly popular driver, so it's worth supporting better IMO.

Cheers,
Chris

miumiu ~ $ glxgears
5471 frames in 5.0 seconds = 1094.115 FPS
5591 frames in 5.0 seconds = 1118.119 FPS
5622 frames in 5.0 seconds = 1124.346 FPS
5642 frames in 5.0 seconds = 1128.399 FPS

miumiu ~ $ glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_EXT_import_context, GLX_OML_swap_method, GLX_SGI_make_current_read,
GLX_SGIS_multisample, GLX_SGIX_hyperpipe, GLX_SGIX_swap_barrier,
GLX_SGIX_fbconfig
client glx vendor string: SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_OML_swap_method,
GLX_OML_sync_control, GLX_SGI_make_current_read, GLX_SGI_swap_control,
GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group
GLX extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_swap_control,
GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_SGI_video_sync,
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_visual_select_group
OpenGL vendor string: VA Linux Systems, Inc.
OpenGL renderer string: Mesa DRI Rage 128 Mobility 20041026 AGP 2x x86/MMX/SSE
OpenGL version string: 1.2 Mesa 6.4.1
OpenGL extensions:
GL_ARB_imaging, GL_ARB_multisample, GL_ARB_multitexture,
GL_ARB_texture_compression, GL_ARB_texture_env_add,
GL_ARB_texture_mirrored_repeat, GL_ARB_transpose_matrix,
GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
GL_EXT_compiled_vertex_array, GL_EXT_convolution, GL_EXT_copy_texture,
GL_EXT_draw_range_elements, GL_EXT_histogram, GL_EXT_packed_pixels,
GL_EXT_polygon_offset, GL_EXT_rescale_normal,
GL_EXT_separate_specular_color, GL_EXT_subtexture, GL_EXT_texture,
GL_EXT_texture3D, GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,
GL_EXT_texture_object, GL_EXT_vertex_array, GL_APPLE_packed_pixels,
GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat,
GL_MESA_ycbcr_texture, GL_MESA_window_pos, GL_NV_blend_square,
GL_NV_light_max_exponent, GL_NV_texgen_reflection, GL_OES_read_format,
GL_SGI_color_matrix, GL_SGI_color_table, GL_SGIS_generate_mipmap,
GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod
glu version: 1.3
glu extensions:
GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
----------------------------------------------------------------------
0x23 16 tc 0 16 0 r . . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0x24 16 tc 0 16 0 r . . 5 6 5 0 0 16 8 0 0 0 0 0 0 Slow
0x25 16 tc 0 16 0 r . . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
0x26 16 tc 0 16 0 r . . 5 6 5 0 0 16 8 16 16 16 0 0 0 Slow
0x27 16 tc 0 16 0 r y . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0x28 16 tc 0 16 0 r y . 5 6 5 0 0 16 8 0 0 0 0 0 0 Slow
0x29 16 tc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
0x2a 16 tc 0 16 0 r y . 5 6 5 0 0 16 8 16 16 16 0 0 0 Slow
0x2b 16 dc 0 16 0 r . . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0x2c 16 dc 0 16 0 r . . 5 6 5 0 0 16 8 0 0 0 0 0 0 Slow
0x2d 16 dc 0 16 0 r . . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
0x2e 16 dc 0 16 0 r . . 5 6 5 0 0 16 8 16 16 16 0 0 0 Slow
0x2f 16 dc 0 16 0 r y . 5 6 5 0 0 16 0 0 0 0 0 0 0 None
0x30 16 dc 0 16 0 r y . 5 6 5 0 0 16 8 0 0 0 0 0 0 Slow
0x31 16 dc 0 16 0 r y . 5 6 5 0 0 16 0 16 16 16 0 0 0 Slow
0x32 16 dc 0 16 0 r y . 5 6 5 0 0 16 8 16 16 16 0 0 0 Slow

miumiu ~ $ lspci -vv

[... skip irrelevant stuff ...]

0000:01:00.0 VGA compatible controller: ATI Technologies Inc Rage Mobility M3 AGP 2x (rev 02) (prog-if 00 [VGA])
Subsystem: IBM: Unknown device 0155
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B+
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 66 (2000ns min), Cache Line Size: 0x08 (32 bytes)
Interrupt: pin A routed to IRQ 11
Region 0: Memory at f8000000 (32-bit, prefetchable) [size=64M]
Region 1: I/O ports at 2000 [size=256]
Region 2: Memory at f0200000 (32-bit, non-prefetchable) [size=16K]
Capabilities: <available only to root>

miumiu ~ $ darwinia-demo2
/home/chris/darwinia-demo2
SDL Version: Compiled against 1.2.8, running with 1.2.8
Initialising SDL Audio
Frequency: 22050
Format: 32784
Channels: 2
Samples: 512
Size of Stereo Sample: 4
Loading profile DemoUser

CLIENT : Attempting connection...

Mesa 6.4.1 implementation error: User called no-op dispatch function (an unsupported extension function?)
Please report at bugzilla.freedesktop.org
Mesa 6.4.1 implementation error: User called no-op dispatch function (an unsupported extension function?)
Please report at bugzilla.freedesktop.org
Mesa 6.4.1 implementation error: User called no-op dispatch function (an unsupported extension function?)
Please report at bugzilla.freedesktop.org
Mesa 6.4.1 implementation error: User called no-op dispatch function (an unsupported extension function?)
Please report at bugzilla.freedesktop.org
Water lightmap generation took 35ms

Tree generated in 11ms

Tree generated in 31ms

Tree generated in 22ms

Tree generated in 22ms

EntityGrid max neighbours set to 100 (time taken 0.01ms)

ObstructionGrid took 6ms to generate

CLIENT : Requesting Team...

CLIENT : Requesting Team...

CLIENT : Requesting Team...

Mesa 6.4.1 implementation error: User called no-op dispatch function (an unsupported extension function?)
Please report at bugzilla.freedesktop.org


Darwinia has unexpectedly encountered a fatal error.
A full description of the error can be found in the file
blackbox.txt in the current working directory

Segmentation fault (core dumped)

miumiu ~ $ cat blackbox.txt
=========================
DARWINIA BLACK BOX REPORT
=========================

VERSION : linux-demo2-1.3.0
ERROR : 'Got a fatal signal: 11
'

=========================
====== PREFERENCES ======
=========================

ServerAddress = 127.0.0.1
BypassNetwork = 1
IAmAServer = 1
TextLanguage = english
TextSpeed = 15
HelpEnabled = 0
SoundLibrary = software
SoundMixFreq = 22050
SoundMasterVolume = 255
SoundChannels = 32
SoundHW3D = 0
SoundSwapStereo = 0
SoundMemoryUsage = 1
SoundBufferSize = 512
SoundDSP = 0
ScreenWidth = 800
ScreenHeight = 600
ScreenWindowed = 1
ScreenZDepth = 24
ScreenColourDepth = 16
ScreenRefresh = 60
RenderLandscapeDetail = 1
RenderWaterDetail = 1
RenderBuildingDetail = 1
RenderEntityDetail = 1
RenderCloudDetail = 1
RenderPixelShader = 1
ControlMouseButtons = 3
ControlMethod = 1
RenderLandscapeMode = 2
ManuallyScaleTextures = 0
UserProfile = DemoUser
RenderSpecialLighting = 1
StartMap = launchpad

=========================
====== STACKTRACE =======
=========================

retAddress = 0xb77fdb4c
retAddress = 0xb77f5531
retAddress = 0xb77f5d03
retAddress = 0xb7859f06
retAddress = 0xb785943e
retAddress = 0xb77f36a1
retAddress = 0x807f94b
retAddress = 0x807fe8a
retAddress = 0x80ade1b
retAddress = 0x80ba26b
retAddress = 0x80b9dd9
retAddress = 0x80b313a
retAddress = 0x80b333e
retAddress = 0x80b408d
retAddress = 0x80a25b8
retAddress = 0xb7b67ed0
retAddress = 0x804cc91


gdb stack trace:

GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
(gdb) Reading symbols from /home/chris/darwinia-demo2/lib/darwinia.bin.x86...(no debugging symbols found)...done.
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) Attaching to program: /home/chris/darwinia-demo2/lib/darwinia.bin.x86, process 5199
(no debugging symbols found)
Reading symbols from /home/chris/darwinia-demo2/lib/libSDL-1.2.so.0...done.
Loaded symbols for /home/chris/darwinia-demo2/lib/libSDL-1.2.so.0
Reading symbols from /usr/X11R6/lib/libGL.so.1...done.
Loaded symbols for /usr/X11R6/lib/libGL.so.1
Reading symbols from /usr/X11R6/lib/libGLU.so.1...done.
Loaded symbols for /usr/X11R6/lib/libGLU.so.1
Reading symbols from /home/chris/darwinia-demo2/lib/libvorbisfile.so.3...done.
Loaded symbols for /home/chris/darwinia-demo2/lib/libvorbisfile.so.3
Reading symbols from /usr/lib/libstdc++.so.5...done.
Loaded symbols for /usr/lib/libstdc++.so.5
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /home/chris/darwinia-demo2/lib/libgcc_s.so.1...done.
Loaded symbols for /home/chris/darwinia-demo2/lib/libgcc_s.so.1
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/tls/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread -1214961984 (LWP 5199)]
[New Thread -1256768592 (LWP 5200)]
Loaded symbols for /lib/tls/libpthread.so.0
Reading symbols from /lib/tls/libdl.so.2...done.
Loaded symbols for /lib/tls/libdl.so.2
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/X11R6/lib/libXxf86vm.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXxf86vm.so.1
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /home/chris/darwinia-demo2/lib/libvorbis.so.0...done.
Loaded symbols for /home/chris/darwinia-demo2/lib/../lib/libvorbis.so.0
Reading symbols from /home/chris/darwinia-demo2/lib/libogg.so.0...done.
Loaded symbols for /home/chris/darwinia-demo2/lib/../lib/libogg.so.0
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libXcursor.so.1...done.
Loaded symbols for /usr/lib/libXcursor.so.1
Reading symbols from /usr/lib/libXrender.so.1...done.
Loaded symbols for /usr/lib/libXrender.so.1
Reading symbols from /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2...done.
Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
Reading symbols from /usr/X11R6/lib/modules/dri/r128_dri.so...done.
Loaded symbols for /usr/X11R6/lib/modules/dri/r128_dri.so
Reading symbols from /usr/lib/libexpat.so.1...done.
Loaded symbols for /usr/lib/libexpat.so.1
Reading symbols from /usr/lib/libasound.so.2...done.
Loaded symbols for /usr/lib/libasound.so.2
0xb7be4331 in waitpid () from /lib/tls/libc.so.6
(gdb) 2 Thread -1256768592 (LWP 5200) 0xb7c1bcc4 in ioctl ()
from /lib/tls/libc.so.6
1 Thread -1214961984 (LWP 5199) 0xb7be4331 in waitpid ()
from /lib/tls/libc.so.6
(gdb)
Thread 2 (Thread -1256768592 (LWP 5200)):
#0 0xb7c1bcc4 in ioctl () from /lib/tls/libc.so.6
#1 0xb75f8ea3 in _snd_pcm_hw_open () from /usr/lib/libasound.so.2
#2 0xb75e90a0 in snd_pcm_writei () from /usr/lib/libasound.so.2
#3 0xb7e7ed33 in ALSA_PlayAudio (this=0x98b6e60) at SDL_alsa_audio.c:270
#4 0xb7e79137 in SDL_RunAudio (audiop=0x98b6e60) at SDL_audio.c:232
#5 0xb7ec410b in SDL_RunThread (data=0x9939370) at SDL_thread.c:218
#6 0xb7ec431f in RunThread (data=0xfffffe00) at SDL_systhread.c:82
#7 0xb7b46cfd in start_thread () from /lib/tls/libpthread.so.0
#8 0xb7c2413e in clone () from /lib/tls/libc.so.6

Thread 1 (Thread -1214961984 (LWP 5199)):
#0 0xb7be4331 in waitpid () from /lib/tls/libc.so.6
#1 0xb7b89db9 in strtold_l () from /lib/tls/libc.so.6
#2 0xb7b8a142 in system () from /lib/tls/libc.so.6
#3 0x08088748 in ?? ()
#4 0x08088a42 in ?? ()
#5 0x08088860 in ?? ()
#6 <signal handler called>
#7 0xb77fa930 in ?? () from /usr/X11R6/lib/modules/dri/r128_dri.so
#8 0xb791ea3c in ?? () from /usr/X11R6/lib/modules/dri/r128_dri.so
#9 0x092a8e98 in ?? ()
#10 0x083cb3e8 in ?? ()
#11 0xbfc2db3c in ?? ()
#12 0xb77fdb4c in ?? () from /usr/X11R6/lib/modules/dri/r128_dri.so
#13 0x092c01d8 in ?? ()
#14 0x0000c228 in ?? ()
#15 0x00000024 in ?? ()
#16 0x00000000 in ?? ()
#0 0xb7be4331 in waitpid () from /lib/tls/libc.so.6
(gdb) Detaching from program: /home/chris/darwinia-demo2/lib/darwinia.bin.x86, process 5199
User avatar
NeoThermic
Introversion Staff
Introversion Staff
Posts: 6256
Joined: Sat Mar 02, 2002 10:55 am
Location: ::1
Contact:

Re: rage 128 m3 startup crash (r128_dri driver)

Postby NeoThermic » Wed Feb 22, 2006 6:25 pm

chris.pickett wrote:750 MHz PIII
16 MB ATI Rage 128 Mobility M3
384 MB RAM


With those specs I wouldn't expect anything more than the 10 FPS max you're getting to be fully honest. Darwinia is fill-rate limited, so the higher the fill rate, the better the performance. A fast CPU can help make up for a slow card, but a P3 750MHz isn't good enough to do that and handle the AI, sound, etc.

Just for info, the fill-rate of a ATi Rage 128 is 250 Mpixels/s

For comparison, the slowest card I've had Darwinia running on, my TNT2 Pro card which has a fill rate of 350 Mpixels/s, but also had a 1GHz P3 to back it up. That only just managed to keep above 10FPS, the average being 14.6 FPS.

NeoThermic
chris.pickett
level0
Posts: 4
Joined: Wed Feb 22, 2006 4:53 pm

Postby chris.pickett » Wed Feb 22, 2006 7:26 pm

Ok, I'll accept that my machine is too slow, if you can say so based on experience. I guess I'm just a bit surprised. Maybe I'm underestimating the processing power required for what I see on the screen. It would be interesting to try the Windows version on the same hardware, but unfortunately this machine isn't dual boot.

What's the difference between the render modes? Is it worth trying to fix the startup crash I'm getting?

Cheers,
Chris
chris.pickett
level0
Posts: 4
Joined: Wed Feb 22, 2006 4:53 pm

Postby chris.pickett » Wed Feb 22, 2006 7:56 pm

And, just FYI, I tried and the Mac version works fine on a 800 MHz G4 iBook with a 32 MB Radeon 9200. So, I'm happy to play there. I guess an ATI card listed in the minimum system requirements would help, I'd assumed a GeForce2 was about equivalent to a Rage 128, but it's not.
User avatar
NeoThermic
Introversion Staff
Introversion Staff
Posts: 6256
Joined: Sat Mar 02, 2002 10:55 am
Location: ::1
Contact:

Postby NeoThermic » Wed Feb 22, 2006 8:19 pm

chris.pickett wrote:And, just FYI, I tried and the Mac version works fine on a 800 MHz G4 iBook with a 32 MB Radeon 9200. So, I'm happy to play there. I guess an ATI card listed in the minimum system requirements would help, I'd assumed a GeForce2 was about equivalent to a Rage 128, but it's not.


I'm not too sure how low and decent an ATi card goes, but I would wager a 8500 or higher would be sufficent.

NeoThermic
User avatar
John
Introversion Staff
Introversion Staff
Posts: 511
Joined: Sun Dec 10, 2000 6:22 pm
Location: London, UK

Pixel Effect

Postby John » Wed Feb 22, 2006 9:26 pm

One thing that the stock ATI drivers do not accelerate well is the Pixel Effect. Try turning it off, that may improve things.

Unfortunately, I don't think ATI's proprietary fglrx drivers will work with your card.
chris.pickett
level0
Posts: 4
Joined: Wed Feb 22, 2006 4:53 pm

Postby chris.pickett » Wed Feb 22, 2006 10:26 pm

The Pixel Effect was already turned off when I got 10 fps.

Is there even any point in trying to make RenderLandscapeMode = 2 work? I read that for certain ATI cards it makes things faster. However, if it's the case SDL just won't provide the necessary functions for mode 2, then I guess there's nothing to be done.
User avatar
John
Introversion Staff
Introversion Staff
Posts: 511
Joined: Sun Dec 10, 2000 6:22 pm
Location: London, UK

Postby John » Thu Feb 23, 2006 12:43 am

LandscapeRenderMode 2 uses Vertex Buffer Objects to render the landscape. The effect of this, as I understand it, allows the vertices to be cached in graphics card memory directly, thus speeding things up a bit.

LandscapeRenderMode 1 uses Display Lists, which are good for unchanging sets of vertices. In theory, there shouldn't be much difference between using display lists and using vertex buffers, however, we have noticed a small improvement in speed with vertex buffers.

In my opinion, it is very unlikely that you will be able to get vertex buffers to work with - it's depend on your OpenGL drivers rather than SDL. Even if you did, I think the performance increase would be of the order of 2 or 3 frames per second.
Jengu
level0
Posts: 1
Joined: Sun Jun 25, 2006 7:30 am

Postby Jengu » Sun Jun 25, 2006 7:39 am

I'm hacking on Xorg's rage128 driver as a Google SoC project. It is very safe to say that the rage128 won't run this game. It just doesn't have the raw horsepower. The driver definitely isn't as fast as it could be, but I think the hardware would be lacking even if it were ludicrously optimized.

In order to fix the crash, Vertex Buffer Object support would need to be added to the driver, although technically Darwinia should detect the lack of VBO support and exit or use the lesser render mode gracefully.

I have a laptop with a Mobility M4 and I'd like to see it be able to play Darwinia too, so maybe in the far future I'll try optimizing the hell out of the driver ;)

Return to “Linux Issues”

Who is online

Users browsing this forum: No registered users and 5 guests