# Anyone got Radeon 9550 working? [resolved]

## torklingberg

Note: This issue has been resolved, scroll down here

Has anyone got 3D acceleration with an ATI Radeon 9550 card? I want to know if it is worth trying any more. 

The 9550 is actually just an underclocked 9600, so there should be no problem, but maybe the driver refuses just because the card is not in its list.[/b]Last edited by torklingberg on Sun Jun 27, 2004 11:13 pm; edited 1 time in total

----------

## pandaxiongmao

Are you using AMD 64? AFAIK, ATI hasn't released any driver for AMD 64 based CPU yet.

----------

## torklingberg

No, I'm not that brave yet. I have an Athlon64 and an Asus K8V motherboard, but I run it in 32-nit mode so far. If I can't even get 32-bit to work properly, I'm probably not ready for 64-bit yet.

----------

## Wedge_

If it doesn't recognise the card, but the chipset is supported, try specifying an ID yourself. Pick a 9500/9600 ID from the list here, then add a line to your XF86Config in the "Driver" section like this: 

```
ChipdID 0x1234
```

Replace "1234" with the ID from the list (try more than one if you have to).

----------

## torklingberg

My specific problem is that I cannot load the fglrx kernel module, and I doubt an X setting can change that. Should I skip the kernel module and try with X settings anyway? Will X load the module for me?

Also I have no "Driver" section in my xorg.conf, and if I create one X says it is an invalid section name.

----------

## Wedge_

Ah, I didn't realise that you didn't have the module loaded. In that case, you're right, the ChipID setting won't alter anything. What is the output from "modprobe" when you try to load it? Also have a look at the last few lines of "dmesg" output after doing that. 

 *Quote:*   

> Also I have no "Driver" section in my xorg.conf, and if I create one X says it is an invalid section name.

 

How exactly did you create it? Maybe you just used the wrong syntax. If you run the "fglrxconfig" utility that comes with the ati-drivers, then it should create a config file for you with all the necessary sections. It defaults to creating an XF86Config, but you can just copy it over to xorg.conf, the two are identical.

----------

## torklingberg

 *Wedge_ wrote:*   

> Ah, I didn't realise that you didn't have the module loaded. In that case, you're right, the ChipID setting won't alter anything. What is the output from "modprobe" when you try to load it? Also have a look at the last few lines of "dmesg" output after doing that. 

 

```

# modprobe fglrx

FATAL: Error inserting fglrx (/lib/modules/2.6.7-gentoo-r1/video/fglrx.ko): No such device

# dmesg

[...]

[fglrx] Maximum main memory to use for locked dma buffers: 431 MBytes.

[fglrx:firegl_init] *ERROR* Device not found!

```

X did not start with the conf file created by glrxconfig. However, if I added ChipID  0x4150 to the "Device" section, just under the line Driver                          "fglrx" it does start!

But without 3D acceleration :-( Here are the interesting parts of my /var/log/Xorg.0.log. The complete one is uploaded here

```

(II) LoadModule: "fglrx"

(II) Loading /usr/X11R6/lib/modules/drivers/fglrx_drv.o

(II) Module fglrx: vendor="Fire GL - ATI Research GmbH, Germany"

   compiled for 4.3.0.1, module version = 3.9.0

   Module class: XFree86 Video Driver

   ABI class: XFree86 Video Driver, version 0.6

...

(II) FireGL8700/8800: Driver for chipset: ATI RV250 Id (R9000),

   ATI RV250 Ie (R9000), ATI RV250 If (R9000), ATI RV250 Ig (R9000),

   ATI RV250 Ld (M9), ATI RV250 Le (M9), ATI RV250 Lf (M9),

   ATI RV250 Lg (M9), ATI RV280 5960 (R9200 PRO),

   ATI RV280 Ya (R9200LE), ATI RV250SE Yd (R9200SE),

   ATI RV250 5C61 (M9+), ATI RV250 5C63 (M9+), ATI R200 QH (R8500),

   ATI R200 QL (R8500), ATI R200 QM (R9100), ATI R200 QT (R8500),

   ATI R200 QU (R9100), ATI R200 BB (R8500), ATI RV350 AP (R9600),

   ATI RV350SE AQ (R9600SE), ATI RV350 AR (R9600 PRO),

   ATI RV350 NP (M10), ATI R300 AD (R9500), ATI R300 AE (R9500),

   ATI R300 AF (R9500), ATI R300 AG (Fire GL Z1/X1),

   ATI R300 ND (R9700 PRO), ATI R300 NE (R9700/R9500 PRO),

   ATI R300 NF (R9600 TX), ATI R300 NG (Fire GL X1),

   ATI R350SE AH (R9800SE), ATI R350 AK (Fire GL unknown),

   ATI RV350 AT (Fire GL T2), ATI RV350 AU (Fire GL T2),

   ATI RV350 AV (Fire GL T2), ATI RV350 AW (Fire GL T2),

   ATI R350 NH (R9800), ATI R350LE NI (R9800LE), ATI R350 NJ (R9800),

   ATI R350 NK (Fire GL X2), ATI RV350 NT (WS/M10)

(II) Primary Device is: PCI 01:00:0

(--) Assigning device section with no busID to primary device

(WW) fglrx: No matching Device section for instance (BusID PCI:1:0:1) found

(**) ChipID override: 0x4150

(**) Chipset ATI RV350 AP (R9600) found

...

(WW) fglrx(0): board is an unknown third party board, chipset is supported

...

(II) fglrx(0): UMM area:     0xe8500000 (size=0x07b00000)

(II) fglrx(0): driver needs XFree86 version: 4.3.x

(WW) fglrx(0): could not detect XFree86 version (query_status=-3)

(II) Loading extension ATIFGLRXDRI

(II) fglrx(0): doing DRIScreenInit

drmOpenDevice: minor is 0

drmOpenDevice: node name is /dev/dri/card0

drmOpenDevice: open result is -1, (Unknown error 999)

drmOpenDevice: open result is -1, (Unknown error 999)

drmOpenDevice: Open failed

drmOpenDevice: minor is 0

drmOpenDevice: node name is /dev/dri/card0

drmOpenDevice: open result is -1, (Unknown error 999)

drmOpenDevice: open result is -1, (Unknown error 999)

drmOpenDevice: Open failed

[drm] failed to load kernel module "fglrx"

(II) fglrx(0): [drm] drmOpen failed

(EE) fglrx(0): DRIScreenInit failed!

(WW) fglrx(0): ***********************************************

(WW) fglrx(0): * DRI initialization failed!                  *

(WW) fglrx(0): * (maybe driver kernel module missing or bad) *

(WW) fglrx(0): * 2D acceleraton available (MMIO)             *

(WW) fglrx(0): * no 3D acceleration available                *

(WW) fglrx(0): ********************************************* 
```

----------

## Wedge_

Right...the reason X starts but you don't get 3D accel is because the fglrx module has to be loaded for that to work. The only thing I can think of to get around the module loading error is to actually edit the binary section of the driver and add the PCI ID of your card manually. Someone posted a procedure for doing this some time ago (see this post), so you might want to give it a shot. It's a pretty nasty fix though, so you could try getting in touch with ATI and asking them to add support themselves in the next driver.

----------

## torklingberg

It worked! I love you man!

For anyone else with a 9550, this is how I did it: Note that when you are reading this, ATI might have included support for the Radeon 9550 in their Linux drivers, which would make this much easier.

In your kernel config, under "Device Drivers" --> "Character Devices" select "Enhanced Real Time Clock Support", "/dev/agpgart (AGP Support)" and support for your chipset as modules. I also selected "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)". Now, in  your module autoload file (/etc/modules.autoload.d/kernel-2.6 for me) put rtc, agpgart and your chipset module (amd64_agp here).

Now the magic comes. emerge ati-drivers. It will look a bit like this:

```

Calculating dependencies ...done!

>>> emerge (1 of 1) media-video/ati-drivers-3.9.0-r1 to /

>>> md5 src_uri ;-) fglrx-4.3.0-3.9.0.i386.rpm

 * X11 implementation is xorg-x11.

>>> Unpacking source...

>>> Unpacking fglrx-4.3.0-3.9.0.i386.rpm

 * Applying fglrx-2.6-vmalloc-vmaddr.patch...                             [ ok ]

 * Applying fglrx-2.6-get-page.patch...                                   [ ok ]

 * Applying fglrx-3.9.0-regparm.patch...                                  [ ok ]

>>> Source unpacked.

 * Building the DRM module...

make: Entering directory `/usr/src/linux-2.6.7-gentoo-r1'

```

Here, hit Ctrl+Z quickly to pause the compile. Make sure you pause before the line where fglrx is compiled.

Now open /var/tmp/portage/ati-drivers-3.9.0-r1/work/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC3 in a hex editor (I used ghex). Search for the hexadecimal code 5241, since 4152 is a code for Radeon 9600 (found here), and the bytes are reversed to 5241. You want the 5241 located closest to the end of the file. Now replace it with 5341, since 4153 is the code for Radeon 9550. If your lspci does not print 4153 for you, but another code, you probably want to enter that one instead. 

If you have the same version of ati-drivers as me (3.9.0-r1), you can probably just replace the file with mine, found here

Now enter 'fg' in the console where you paused the emerge to resume it with the modified file.

At last it's time for the X config. I started with running fglrxconfig. If you use x.org, then rename the created XF86Config-4 file to xorg.conf (backup you old file first). 

Open the X config file in a text editor, and in a "Device" section look for the line 'Driver  "fglrx"', and below it, add this line:

```
ChipID  0x4152
```

That should be it. Restart X (rebooting is fine), and hopefully it works. If not, send me a pm here.

For reference, my hard- and software is: Asus K8V motherboard, Athlon64 CPU, Sapphire Radeon 9550 graphics card, gentoo-dev-sources-2.6.7-r1 kernel, xorg-6.7.0-r1

Now it's time for some tuxracer!

----------

## torklingberg

Actually, it works is I start X with 'startx', but now if I start through gdm. Really strange. Also, if I start gdm from the console using '/etc/init.d/xdm start' from the console as root, the whole system will freeze.

----------

## Wedge_

 *Quote:*   

> Actually, it works is I start X with 'startx', but now if I start through gdm. Really strange. Also, if I start gdm from the console using '/etc/init.d/xdm start' from the console as root, the whole system will freeze.

 

That's weird. Can you get any of the log messages from the failed startups?

----------

## torklingberg

If you feel like checking them out, I put the logs here

What I did is this:

Boot the computer without gdm and log in as root.

I can now run '/etc/init.d/xdm start', and log in, but I get no 3D. This log is the file works_no3d.log

I can start gdm any number of times.

If I start with 'startx' I get 3D. Log is works_3d.log

Now, if I start gdm after X was started with startx, the screen goes black, and after a few seconds the computer is dead. Log is crash.log

----------

## Wedge_

Well, if you look at the "crash.log" and "works_no3d.log" files, you can see that the config file it's using is "//xorg.conf", which is unusual  :Smile:  Those two files also use the "radeon" driver rather than "fglrx" (look for all the lines starting with "RADEON"), and this driver does not support 3D accel on the newer radeon cards. The "works_3d.log" uses the standard config file location and loads the "fglrx" driver, and as you say, everything seems to work in this case.

----------

## torklingberg

The reason was that I had an xorg.conf file in /, moved there as a temporary backup a while ago. Removing it fixed the problem. 

That's a really strange bug. I'll go file it in bugzilla.

----------

## Wedge_

 *Quote:*   

> That's a really strange bug. I'll go file it in bugzilla.

 

It does seem like a bug - if you check "man xorg.conf", it lists the locations that are checked for a config file, and the only way it should use /xorg.conf is if you specify it on the command line or have $XORGCONFIG="/xorg.conf"   :Confused: 

----------

## torklingberg

For the forums searchers, it seems like the current ati-drivers (3.14.1) supports the 9550 chips, so the is no longer any need to hexedit the binaries.

----------

## Wedge_

And it only took them 4 months   :Rolling Eyes: 

----------

