LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Radeon 7500 & OpenGL (https://www.linuxquestions.org/questions/linux-hardware-18/radeon-7500-and-opengl-51614/)

nukkel 03-25-2003 04:49 AM

Radeon 7500 & OpenGL
 
Hi all,

I hope this hasn't been asked before and overlooked by me.
I used to have an ATI Rage128 AGP and no problems using OpenGL. I just changed it for an ATI Radeon 7500 QW and now XFree reverts to software GL (mesa). What could be wrong? I haven't upgraded any software since!

Thanks in advance !
nukkel

--- My setup:
linux 2.4.20, agpgart and all compiled in as module
XFree86 4.2.99.901 (4.3.0 Release Candidate 1) (from cvs)

for example:
$ glinfo
libGL error: InitDriver failed
(...)
GL_RENDERER: Mesa GLX Indirect

Here's an annotated selection from the XFree86 log:
(my comments start with >>>)

... PCI scan etc etc ...
(--) RADEON(0): Chipset: "ATI Radeon 7500 QW (AGP)" (ChipID = 0x5157)
(--) RADEON(0): Linear framebuffer at 0xe0000000
(--) RADEON(0): MMIO registers at 0xed000000
(--) RADEON(0): VideoRAM: 65536 kByte (64-bit DDR SDRAM)
(II) RADEON(0): CloneDisplay option not set -- defaulting to auto-detect
(II) RADEON(0): Primary Display == Type 1

... DCC ...

(II) RADEON(0): Page flipping disabled
(!!) RADEON(0): For information on using the multimedia capabilities
of this adapter, please see http://gatos.sf.net.
...
(WW) RADEON(0): Cannot read colourmap from VGA. Will restore with default
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: Open failed
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: Open failed
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 7, (OK)
>>> Is this OK?

drmGetBusid returned ''
(II) RADEON(0): [drm] loaded kernel module for "radeon" driver
(II) RADEON(0): [drm] created "radeon" driver at busid "PCI:1:0:0"
(II) RADEON(0): [drm] added 8192 byte SAREA at 0xf4d4c000
(II) RADEON(0): [drm] mapped SAREA 0xf4d4c000 to 0x40026000
(II) RADEON(0): [drm] framebuffer handle = 0xe0000000
(II) RADEON(0): [drm] added 1 reserved context for kernel
(WW) RADEON(0): [dri] Some DRI features disabled because of version mismatch.
[dri] radeon.o kernel module version is 1.1.1 but 1.3.1 or later is preferred.

>>> I use the 2.4.20 kernel! Where should I get even newer drm kernel module sources? I also tried the (experimental) 4.3.0 drm-kernel from http://gatos.sf.net but it panics the kernel at X startup (hard lockup!)

(II) RADEON(0): [agp] Mode 0x1f000207 [AGP 0x8086/0x1a30; Card 0x1002/0x5157]
... more [agp] messages...
(II) RADEON(0): [agp] AGP Texture map mapped at 0x44576000
(II) RADEON(0): [drm] register handle = 0xed000000
(II) RADEON(0): [dri] Visual configs initialized
...
(II) RADEON(0): Using XFree86 Acceleration Architecture (XAA)
...
(II) RADEON(0): Acceleration enabled
...dpms...
(II) RADEON(0): X context handle = 0x00000001
(II) RADEON(0): [drm] installed DRM signal handler
(II) RADEON(0): [DRI] installation complete
(II) RADEON(0): [drm] Added 32 65536 byte vertex/indirect buffers
(II) RADEON(0): [drm] Mapped 32 vertex/indirect buffers
(II) RADEON(0): [drm] failure adding irq handler, there is a device already using that irq
[drm] falling back to irq-free operation

>>>I had this irq thing with my Rage128 too, without problems though

(II) RADEON(0): [drm] Kernel module too old (1.1) for agp heap manager
(II) RADEON(0): Direct rendering enabled
(II) Initializing built-in extension MIT-SHM
...other extensions...
(II) Initializing built-in extension RANDR
...keyboard & mouse
EOF

nukkel 03-26-2003 12:23 PM

OK, I fixed it: Apparently every time I recompile the kernel, make modules_install overwrites the /lib/.../drivers/char/drm/radeon.o with the kernel's (older) version, my XFree86 CVS tree had the newer kernel module sources in it, manual make + copy by hand + insmod did the trick!

See ya all, I'm gonna fire up my Frames per Second :)

TheDot 05-10-2003 03:44 AM

Hi there,

I hope you're still registered on this board, and hope you will respond, because I have almost the exact same setup (Radeon 7200 is only diff, basically same card) on the machine I'm writing from, and getting the same problem, same messages, and have tried everything except for upgrading XFree86 to the latest CVS tree.

I just recently upgraded to Slackware9, a little after it came out, and was able to use (any)GL on Slack8 & 8.1 just fine, but now I'm getting the same thing you had.

So, if I'm reading your post correctly, you're saying to upgrade the driver sources from the CVS tree? Are you referring to the drm driver sources or the card driver sources? or both?

If you can recall what you did, and post it (doesn't have to be exact, but more specific than what you had), I would be very greatful.

Thanks a lot in advance!! :D

-TheDot :jawa:

nukkel 05-10-2003 06:26 AM

Hi there,

First of all, about the cvs I used: well the reason I used CVS back then was that XFree86 version 4.3.0 was _about_ to be released and I didn't want to wait, so I got a prerelease from cvs.

Now that 4.3.0 is out, it's _alot_ less fuss to just get the binaries from the xfree86.org site.

Note that if you don't care about 3D acceleration or XVideo, you could just as well use the 'ati' driver in your XF86Config, AFAIK. But if you want full support this is how I got it to work:

The linux kernel contains a specific radeon driver; I don't know if in the Slackware kernel it's included by default but it probably will be. In that case you should have /lib/modules/<kernel-version>/kernel/drivers/char/drm/radeon.o
[ If you don't have this file you will need to recompile your kernel so that this module is compiled; post a reply here if you never done that before and I'll guide you through it ]

Now this kernel driver favours stability over features so it doesn't support 3D. But XFree86 supplies its own radeon.o which does support 3D. So basically you need to copy XFree's radeon.o over the existing one (I suggest backup to old one).

So, it's possible that your XFree86 version already contains it and you don't even have to upgrade. In that case the radeon.o file should be somewhere under /usr/X11R6 [ I forgot the exact path and I'm not working on my linux box right now, I can tell you tomorrow ]. If you find it, see if it differs from /lib/modules/<kernel-version>/kernel/drivers/char/drm/radeon.o and if it does, replace the latter (back up the existing one, you never know :-) Then do a "depmod" (you may get some unresolved symbol errors, never mind). Change the driver to 'radeon' in XF86Config, startup X and keep your fingers crossed

A good way to see if OpenGL works is to use /usr/X11R6/bin/gears, it shows 3D rotating gears and a FPS counter which should be at least about 60fps depending on your system [ you still need the openGL libraries but virtually all distros have 'em ].

Let me know if this works for you!

Good luck,
nukkel

TheDot 05-10-2003 11:51 AM

Awesome!! I appreciate the help. I also appreciate the fact you read deeper into my post, and replied to me back on my level, instead of treating me like a n00b, like I would have gotten in some other mailing list or board, and since I wasn't more specific (which I just now realized), you did the best you could.

I've actually been using Slack since a little after 7.0 got released (about 3 years ago or so), and playing with Linux long before that. So yeah, I do have quite a bit experience, but every once in a while, I'll over-look something and that's where I like to consult others. :)

Anywho, getting back to the subject at hand, I have done just about everything you've suggested already, short of copying the driver from XFree to my module path. I wouldn't have normally overlooked this, but that's the thing about XFree86 that I wasn't sure about, where it pulled it's drivers from when it starts up.

So, it's safe for me to assume that XFree86 pulls it's video drivers from /lib/modules/2.4.20/kernel/drivers/char/drm/ then?

And let me get this straight, you're saying copy this one:
Code:

@gamestation:/usr/X11R6/lib/modules/drivers$ ls -al radeon_drv.o
-r--r--r--    1 root    root      134559 Mar  2 02:49 radeon_drv.o

over this one, right?:
Code:

@gamestation:/lib/modules/2.4.20/kernel/drivers/char/drm$ ls -al radeon.o
-rw-r--r--    1 root    root      103999 May 10 03:21 radeon.o

And keep in mind, the latter only has a latter date due to kernel recompile.

I'm going to kick myself for not trying that sooner, lol.

Thanks. :D
-TheDot :jawa:

TheDot 05-10-2003 12:27 PM

UPDATE
 
Ok, I tried what you said. I did get the unresolved symbol error you mentioned.

However, I'm still stuck. Still getting:
Code:

libGL error: InitDriver failed
And /var/log/XFree86.0.log backs that up with messages such as:
Code:

(WW) RADEON(0): [dri] Some DRI features disabled because of version mismatch.
[dri] radeon.o kernel module version is 1.1.1 but 1.3.1 or later is preferred.

and while running glxinfo:

Code:

libGL error: InitDriver failed
display: :0  screen: 0
direct rendering: No
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
client glx vendor string: SGI
client glx version string: 1.2
client glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
GLX extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
OpenGL vendor string: Mesa project: www.mesa3d.org
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.3 Mesa 4.0.4
OpenGL extensions:
    GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_texture_border_clamp,
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add,
    GL_ARB_texture_env_combine, GL_ARB_texture_env_dot3,
    GL_ARB_transpose_matrix, GL_EXT_abgr, GL_EXT_blend_color,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_texture_env_add,
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,
    GL_EXT_texture_lod_bias
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 24 tc  0 24  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x24 24 tc  0 24  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x25 24 tc  0 24  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  0 0 Slow
0x26 24 tc  0 24  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
0x27 24 tc  0 24  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x28 24 tc  0 24  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x29 24 tc  0 24  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  0 0 Slow
0x2a 24 tc  0 24  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
0x2b 24 dc  0 24  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x2c 24 dc  0 24  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x2d 24 dc  0 24  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  0 0 Slow
0x2e 24 dc  0 24  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
0x2f 24 dc  0 24  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
0x30 24 dc  0 24  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x31 24 dc  0 24  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  0 0 Slow
0x32 24 dc  0 24  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow

Also, glxgears is the only gears thing I can find, and that always works because the glx extension gets loaded.

I'm running out of ideas....:( any other help is greatly appreciate. :)
-TheDot:Pengy:

nukkel 05-10-2003 02:08 PM

Hi The_Dot,

it's always nice to help out folks :-) It's just not always as easy to determine the amount of experience someone has based on his/her postings... Hence people getting frustrated sometimes...

Anyway to get to the point:

I think you copied the wrong file over: see, radeon_drv.o is the XFree86 driver (XFree86 4.x.x is modular, as you'll know, whereas XFree86 3 used different binaries for different video adapters) So /usr/X11R6/lib/modules/drivers/radeon_drv.o is the actual video driver...

The /lib/modules/.../drm/radeon.o on the other hand is actually doing all the AGP related stuff; it's more low-level than the radeon_drv.o; in fact the radeon_drv.o is not a kernel module, radeon.o _is_ (sorry for the confusing filenames ! ;-). [ Just try "insmod /usr/X11R6/lib/modules/drivers/radeon_drv.o" :it'll fail ].
The /lib/modules/.../drm/radeon.o module is usually loaded when some direct rendering is needed (hence the dr in drm). So for OpenGL or XVideo (=video hardware scaling).

Problem is, I can't remember exactly where in the /usr/X11R6 it was located... It was a directory which had "linux" in it since it's a OS-dependent thing of course. Now that I think of it, it was probably somewhere in my source tree after I did "make" on the cvs source, if I remember well. But it was in any case "radeon.o", _not_ radeon_drv.o. The install did not however put this module in /lib/modules automatically, I had to figure that out myself

About glxgears: I meant that, not gears, sorry. I'm at home now with only a Windows XP (yuck) box at my disposal... As I can see from the output, you're stuck on mesasoft software 3Drendering, same problem I had

So I see 3 possible things you could do:

* get new binary packages for XFree86 and see if radeon.o is somewhere in there (they're tar.gz's so you can see manually)

* I can email it to you (i686, linux 2.4.20) but to be honest you should never accept binaries which run as root from strangers

* Best option IMHO: Get the ftp://ftp.xfree86.org/pub/XFree86/4..../X430src-*.tgz files, there's a directory xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/ in it, but to compile it you'll need to unpack the whole source tree to get it to create the Makefiles. You may even need to compile the whole thing, because it's not your everyday configure/make/make install thing - just read the instructions. IMPORTANT: IMHO it's not necessary for you to actually install the new version if you don't want to disturb your system too much, just get it compiled and you should be able to grab the radeon.o file somewhere in the tree! I guess it works fine with earlier X versions like 4.2.0.

Hope you have a fast internet connection and some time to spare: my machine compiles a kernel in 15 min. but took 5 hours (!) to build XFree86 4.3.0

Good luck,
nukkel

P.S. How does one insert those smileys the forums?

nukkel 05-10-2003 02:14 PM

That stuff I wrote about radeon_drv.o versus radeon.o is mighty confusing now that I re-read it. Actually it's just this:

radeon_drv.o is the driver for the VGA card chipset which is, say, "common" to all architectures, where radeon.o is specific to the OS to communicate with the card over the bus.

So e.g. a FreeBSD system with X and the same graphics card would also use the exact same radeon_drv.o but not radeon.o which is specific to the linux kernel...

TheDot 05-10-2003 06:38 PM

Ahhhhh, the picture becomes clearer, and yes, I did have the module fail upon loading of X after copying radeon_drv.o over to /lib/modules/.../drm/.

The odd part is glxgears ran smoother, even had a higher FPS readout... *raises an eyebrow* even though it completely disabled DRI because of the module failing insertion. But I'm guessing that's because it's still accelerating 3D but without full support for GL.

Well, whenever I upgrade Slack, I download the entire directory tree for the version I'm downloading, so I do have the source for xfree86 on one of the cds I burnt, and I guess I'm going to be going back and compiling it from source. I'm going to see if the source has that driver already built or not first, and if worse comes to worse, well... I probably won't be back on this box until later tonight anyway, lol, since I usually spend Saturday eves with the wife. :)

It sounds like we have almost the same system as it only takes about 15 - 20 mins to completely recompile a kernel on my system as well (it wouldn't happen to be a Dell you were working on, would it? lol). So I think it's pretty safe to assume that the 5 hours you mentioned is around how long it's going to take to recompile XFree86 on here as well.

And about the smilies, you can either just text them in....
Code:

: )
: jawa : (the hooded one)
: Pengy : for tux
: newbie : for the newbie graphic
: D is the big smile
(just take out the extra spaces in stuff, of course,
and make it like :example: or for the other ones :X )"

or you can hit Post Reply near the end of the bottom of the thread as opposed to just the quick reply button at the very end. Then you have a bunch of nice features open to you. :D

Anyway, I'm off for now, going to try what you suggested, and I'll post either later tonight or tomorrow to let you know how it went.

Later,
The Dot :jawa:

P.S. You can always email me that driver so I can try it out. Just gzip it and ship it off via the address in my profile. I'm not too worried about this system. This is sort of my test system anyway, and I have very good security measures in place. ;)

TheDot 05-11-2003 12:03 AM

WOOOHOOO!!!
 
IT'S WORKING!! :D

Ok, so here's what I did.

I found the cd that had the source for XFree86. The guys over at Slack actually had a build script all ready to go, so that made things easier. As any good compiler knows though, anything you get from anyone else, you always check out, which I did, and everything seemed ok, because it didn't actually install it, it just built it and put the build in /tmp.

Nonetheless, it still took a little over 4 hours to build. Thank goodness I had other stuff to do during that time. Actually, the timing couldn't have been better.

So, when all was done and built, I searched through the build down the path you said /tmp/xc/programs/.../drm/ Low and behold, the header files, and c files are sitting there for the making of the driver you mentioned. So I ran make -f Makefile.linux, and less than 30 seconds later, the driver was built. I then copied that over to my normal module path /lib/modules/.../drm/ (after backing up what was there, of course), ran insmod radeon, and fired up XFree86 w/KDE.

I'm happy to report that glxgears gave me an FPS rating of 800+ FPS over 5 seconds (where it was 130+ before) in the little window, and 140+ in the expanded window (where it was 20-30 before), and glxinfo gave me the line I was happy to see:
Direct Rendering: Yes :cool:

Thank you for all the help getting that fixed!! :)

Now, I just have one last concern.... A lot of my screensavers, GL and non, even though they are moving faster due to the driver working, they are blinking. It's as if I'm able to see each frame being written to the screen. Would that be just a matter of adjusting my XF86Config file for clock speeds for either the card or the monitor, or am I missing something else? What's the best thing to use for making that file? I've already merged 2 together to get the one I have, but I feel I'm missing something... Did you get that too after getting the driver working right?

Thanks again,
The Dot :jawa:

nukkel 05-11-2003 03:50 AM

Hi! I'm glad to hear it worked out. Seems your system beat mine to it (Anyway it's not a Dell :) )

Weird thig is, I didn't have to compile my radeon.o separately like you did, but that's probably due to the script, I've never used Slack myself to be honest.

It's true, in the little window glxgears can do some awesome fps'ing, so that looks OK.

About the blinking: I get a little blinking around the cursor when in windowed mode when moving the cursor over the window, not in fullscreen. It's because of the "hardware cursor", so maybe try to add the line
Option "SWcursor" "on"
to the "Device" section of your card in XF86Config.
It's strange that also the non-GL ones suffer...
If you use xscreensaver, try to run them separately to see if it's not the xscreensaver daemon's fault (they're in /usr/X11R6/lib/xscreensaver; add -root for fullscreen (=root-window)
If that doesn't help I don't see what could be the cause :(
Video card timings are a delicate thing so it may well be the cause... Try if the problem persists in an "easier" mode like 800x600 (you can switch in X with CTRL-ALT-KEYPADPLUS and -MINUS)

Hey, you can do some additional tuning, by default the radeon driver runs in AGP x1 mode so if your mitherboard supports it you can boost it up to AGP x2 or x4 by adding
Option "AGPMode" "4"
to the "Device" section of the card, there's other options too, try http://www.xfree86.org/current/radeon.4.html

To make a new XF86Config file: do "X -configure" (not while running X) as root and you'll end up with a /root/XF86Config.new file you can use as a starting point. Note that it will use the 'ati' driver by default, not 'radeon' and only some VESA modes so you may want to do some tuning afterwards. Note that you can impress friends by making your own video modes (1000x750 or so :) there's a good howto for this (XFree video timings howto)

Have fun,
nukkel :Pengy:

nukkel 05-11-2003 08:49 AM

Get a load of this: apparenlty the driver could be downloaded separately from http://www.xfree86.org/~alanh/
If I'de know this earlier.....
<slap on the forehead>
...

martinman 05-11-2003 09:04 AM

hey nukkel, i searched /usr/X11R6/lib/modules/drivers/linux far amd wide to see that, well, it only has one file, called v4l_drv.o

??? should i still copy it over to /lib/modules/2.4.20-9/kernel/drivers/char/drm ??? and what would i put in my X config anyways?

nukkel 05-11-2003 10:15 AM

Well, appears it is only in the source tree of X, after compilation, not in the installed dir. tree /usr/X11R6 :(

Luckily the XFree folks have put it separately in a tarball,
see the link in my previous post in this thread, go there and get linux-drm-4.3.0-kernelsource.tar.gz , extract, cd to it and "make -f Makefile.linux". If all is well you should end up with the radeon.o file which is the one that shoud be put in /lib/modules/.../drm/

All the previous rambling is because I didn't know they had it available separately at www.xfree86.org

In XF86Config you should simply put
Driver "radeon"
in the "Device" section of your video card.
The aforementioned radeon.o kernel module will then automatically be loaded when you start X.

Feel free to ask if this doesn't work for you!
nukkel.

martinman 05-11-2003 10:49 AM

in the other thread (which you replied to), I showed you the error message i got when trying to run the makefile.linux ...

hey, i trust you, would it be a problem to email me the file? just click the button
:newbie:


All times are GMT -5. The time now is 08:34 AM.