# HowTo install proprietary ATI drivers?

## Horus107

Hello,

I have a:

VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]

I know there are proprietary ATI drivers for X around. But what is the best way to install them into a Gentoo system? Are there ebuilds for that?

Thanks,

Florian

----------

## niskel

```
emerge ati-drivers
```

 and http://www.gentoo.org/doc/en/ati-faq.xml

----------

## Horus107

And what options do I need to change in my X11 configuration (xorg.conf)?

----------

## niskel

just use "fglrxconfig" to build a new xorg.conf

----------

## wjb

Also HOWTO ATI Drivers (Gentoo Wiki) came in handy for me the other day.

----------

## Horus107

The HowTo writes:

Warning: Very important: opengl-update is deprecated, don't use it

But the eselect tools are all masked and xorg and ati-drives depend on opengl-update. So what should I use?

Florian

----------

## Horus107

Ok, it seems to work now. Everything is fine besides that all letters are huge now. The icons and everything else is normal, just the letters in the window bar of KDE, or the menu, .... are too huge. The letters in the textfield I'm just typing in or in Konsole are normal. What could this be?

The font size of everything is 12.

Thanks,

Florian

----------

## elestedt

 *Horus107 wrote:*   

> Ok, it seems to work now. Everything is fine besides that all letters are huge now. The icons and everything else is normal, just the letters in the window bar of KDE, or the menu, .... are too huge. The letters in the textfield I'm just typing in or in Konsole are normal. What could this be?
> 
> The font size of everything is 12.
> 
> Thanks,
> ...

 

This is a quite common problem, had it myself quite a few times. (and there are plenty of topics on this on the forum)

Try adding

```
Xft.dpi: 96
```

to ~/.Xdefaults and restart X

----------

## Horus107

Ok, thanks are normal now with 75dpi.

The ATI driver seem to crash my system as soon as I leave X. Switching between consoles work. syslog give that message:

 *Quote:*   

> 
> 
> Mar  9 21:35:27 horus mtrr: no MTRR for d0000000,800000 found
> 
> Mar  9 21:35:27 horus mtrr: no MTRR for d0800000,200000 found
> ...

 

Any idea?

----------

## niskel

Are you using the radeonfb framebuffer? If so, use vesafb of vesafb-tng. The ATi propriataty drivers don't play nice with radeonfb.Last edited by niskel on Thu Mar 09, 2006 9:05 pm; edited 1 time in total

----------

## elestedt

Not really, it's probably something in your X configuration though - if it's not you should find someone else who has the same problem (perhaps not on these forums).

Have you told the X not to use mtrr? the ATI-driver has it's own code for this - if one is to believe the comments in my old fglrxconfig-generated file.

----------

## Horus107

Now I use, but the problem was also there before, when I have not even used any framebuffer.

I think the problem is that the ATI driver is not yet supporting the 2.6.15 kernel which I'm running. I will retry it in some days when I hope is the 8.23 ati-drivers version in portage.

One more question: Do I need to recompile applications in order to make opengl work. The opengl useflag was set since ever, but I used just the radeon X11 driver.

----------

## niskel

No need to recompile OpenGL apps, as long as you used opengl-update/eselect to tell the system to use the ATi implementation of OpenGL.

----------

## Horus107

I've tried to add:

        Option      "UseInternalAGPGART" "no

to the Devices section of the ATI driver. That makes the driver not crashing anymore, but it also don't work anymore:

horus bin # ./fglrxinfo

display: :0.0  screen: 0

OpenGL vendor string: Mesa project: www.mesa3d.org

OpenGL renderer string: Mesa GLX Indirect

OpenGL version string: 1.2 (1.5 Mesa 6.2.1)

So, I think I'll have to wait for the 8.23 driver to be in portage. Thanks for your help!

Florian

----------

## elestedt

 *Horus107 wrote:*   

> I think the problem is that the ATI driver is not yet supporting the 2.6.15 kernel which I'm running. I will retry it in some days when I hope is the 8.23 ati-drivers version in portage.

 

Incorrect:

```
Linux nw8240 2.6.15.5 #1 PREEMPT Thu Mar 2 15:15:56 CET 2006 i686 Intel(R) Pentium(R) M processor 2.13GHz GenuineIntel GNU/Linux
```

```
* x11-drivers/ati-drivers 

     Available versions:  8.14.13-r2 8.14.13-r3 ~8.14.13-r4 ~8.14.13-r5 *8.16.20 *8.16.20-r1 ~8.18.6 ~8.18.6-r1 ~8.18.8 ~8.18.8-r1 !8.18.8-r2 ~8.19.10 ~8.20.8 ~8.21.7 8.21.7-r1 8.22.5

     Installed:           8.22.5

     Homepage:            http://www.ati.com

     Description:         Ati precompiled drivers for r350, r300, r250 and r200 chipsets

```

Something is probably misconfigured somewhere.

----------

## elestedt

 *Horus107 wrote:*   

> I've tried to add:
> 
>         Option      "UseInternalAGPGART" "no
> 
> to the Devices section of the ATI driver. That makes the driver not crashing anymore, but it also don't work anymore:
> ...

 

Perhaps if you post the relevant parts of your xorg.conf so that we don't have to guess on what might be wrong (at least not as much)? The xorg log might be helpful as well.

----------

## wjb

Also any agp/ATI related bits of dmesg would be useful.

----------

## Horus107

Ok, here is what I've done:

- Compiled kernel 2.6.15.1 with:

	* no framebuffer support

	* MTRR as module

	* /dev/agpgart as module

	* ATI chipset support as module

- Emerged ati-drivers 8.21.7-r1

- Created a new config with aticonfig --initial

```

Section "ServerLayout"

        Identifier     "Simple Layout"

        Screen      0  "aticonfig Screen 0" 0 0

        InputDevice    "Mouse1" "CorePointer"

        InputDevice    "TouchPad" "AlwaysCore"

        InputDevice    "Keyboard1" "CoreKeyboard"

EndSection

Section "Monitor"

        Identifier   "aticonfig Monitor 0"

EndSection

Section "Device"

        Identifier  "ATI Graphics Adapter 0"

        Driver      "fglrx"

        BusID       "PCI:1:0:0"

EndSection

Section "Screen"

        Identifier "aticonfig Screen 0"

        Device     "ATI Graphics Adapter 0"

        Monitor    "aticonfig Monitor 0"

        DefaultDepth     24

        SubSection "Display"

                Viewport   0 0

                Depth     24

        EndSubSection

EndSection

```

- Changed OpenGL implementation with opengl-update ati

- Even did a reboot, executed startx

- Messages from dmesg:

```

Linux agpgart interface v0.101 (c) Dave Jones

fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.

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

ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11

[fglrx] module loaded - fglrx 8.21.7 [Jan 14 2006] on minor 0

[fglrx] Failed to load fglrx_agp module

[fglrx] Error code  256

[fglrx] Failed to load ATI module agpgart

[fglrx] Fallback to internal agpgart module

Fire GL built-in AGP-support

Based on agpgart interface v0.99 (c) Jeff Hartmann

agpgart: Maximum main memory to use for agp memory: 439M

agpgart: Detected an Intel 855PM Chipset, no integrated grapics found.

agpgart: Detected Intel i855PM chipset

agpgart: AGP aperture is 128M @ 0xe0000000

Power management callback for AGP chipset installed

[fglrx] Initialization of built-in AGP-support successful.

[fglrx] AGP detected, AgpState   = 0x1f000217 (hardware caps of chipset)

AGP: Found 2 AGPv2 devices

AGP: Doing enable for AGPv2

[fglrx] AGP enabled,  AgpCommand = 0x1f000314 (selected caps)

[fglrx] free  AGP = 121909248

[fglrx] max   AGP = 121909248

[fglrx] free  LFB = 104345600

[fglrx] max   LFB = 104345600

[fglrx] free  Inv = 0

[fglrx] max   Inv = 0

[fglrx] total Inv = 0

[fglrx] total TIM = 0

[fglrx] total FB  = 0

[fglrx] total AGP = 32768

```

- Quit KDE, computer hangs, SSH still working

- dmesg:

```

mtrr: no MTRR for d0000000,800000 found

mtrr: no MTRR for d0800000,200000 found

mtrr: no MTRR for d0a00000,80000 found

mtrr: no MTRR for d0a80000,40000 found

mtrr: no MTRR for d0ac0000,8000 found

mtrr: no MTRR for d0ac8000,2000 found

mtrr: no MTRR for d0aca000,1000 found

------------[ cut here ]------------

kernel BUG at arch/i386/mm/pageattr.c:137!

invalid operand: 0000 [#1]

PREEMPT

Modules linked in: fglrx agpgart sd_mod rfcomm l2cap hci_usb bluetooth usb_storage scsi_mod ohci1394 ieee1394 ipw2200

CPU:    0

EIP:    0060:[<c010daea>]    Tainted: P      VLI

EFLAGS: 00213082   (2.6.15.1)

EIP is at __change_page_attr+0xba/0x15a

eax: 1cc001e3   ebx: 1cf40000   ecx: c1007040   edx: dcf40000

esi: c0382dcc   edi: c1000000   ebp: 00000163   esp: de3b1e74

ds: 007b   es: 007b   ss: 0068

Process X (pid: 9867, threadinfo=de3b0000 task=df74e0f0)

Stack: dcf40000 c139e800 00000020 00000000 00203246 c010dbb3 c139e800 00000163

       df36ab40 e0a80000 e0b28b20 00000000 c010d869 c139e400 00000021 00000163

       e0b28b20 00000005 e0ac2d53 e0a80000 c139e400 00000020 00000163 e0b28b20

Call Trace:

 [<c010dbb3>] change_page_attr+0x29/0x5a

 [<c010d869>] iounmap+0xb2/0xe9

 [<e0ac2d53>] agp_generic_free_gatt_table+0x62/0xce [fglrx]

 [<e0ac8dc4>] agp_backend_cleanup+0xc/0x4a [fglrx]

 [<e0acc059>] __ke_agp_uninit+0xe/0x24 [fglrx]

 [<e0ae3f35>] _firegl_release_agp+0x15/0x140 [fglrx]

 [<e0ad1515>] firegl_takedown+0x335/0xb80 [fglrx]

 [<e0ad08bf>] firegl_release+0x12f/0x190 [fglrx]

 [<e0ac91b7>] ip_firegl_release+0xd/0x10 [fglrx]

 [<c01447b5>] __fput+0x83/0x123

 [<c0143387>] filp_close+0x4c/0x55

 [<c01433f1>] sys_close+0x61/0x84

 [<c0102537>] sysenter_past_esp+0x54/0x75

Code: 24 04 56 e8 03 ff ff ff 83 c4 0c 89 d9 8b 01 89 ca f6 c4 40 74 03 8b 51 0c ff 42 04 eb 15 84 c0 78 09 09 eb 89 1e ff 49 04 eb 08 <0f> 0b 89 00 0c 31 2d c0 8b 01 f6 c4 04 0f 85 85 00 00 00 8b 01

 <6>note: X[9867] exited with preempt_count 2

```

Anyone any ideas?

If you need more info, I'll be happy to give it to you.

Thanks,

Florian

----------

## wingrunr21

I think that you have to load agpgart BEFORE fglrx in your modules.autoload.d/kernel-2.6 file.  Also, you have to have something for your chipset.  Is there an ati_gart or something?

I have done the exact same thing as Horus.  I followed the wiki guide and have agpgart, then intel_gart, then fglrx loading.  Only X won't start.  Here is the output of startx:

```
X Window System Version 7.0.0

Release Date: 21 December 2005

X Protocol Version 11, Revision 0, Release 7.0

Build Operating System:Linux 2.6.15-gentoo-r1 i686

Current Operating System: Linux wings 2.6.15-gentoo-r1 #3 SMP Wed Mar 8 20:57:20 Local time zone must be set--see zic m i686

Build Date: 04 March 2006

        Before reporting problems, check http://wiki.x.org

        to make sure that you have the latest version.

Module Loader present

Markers: (--) probed, (**) from config file, (==) default setting,

        (++) from command line, (!!) notice, (II) informational,

        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(==) Log file: "/var/log/Xorg.0.log", Time: Fri Mar 10 06:06:20 2006

(==) Using config file: "/etc/X11/xorg.conf"

(EE) Failed to load module "glx" (module does not exist, 0)

dlopen: /usr/lib/xorg/modules/drivers/fglrx_drv.so: undefined symbol: __glXActiveScreens

(EE) Failed to load /usr/lib/xorg/modules/drivers/fglrx_drv.so

(EE) Failed to load module "fglrx" (loader failed, 7)

(EE) No drivers available.

Fatal server error:

no screens found

XIO:  fatal IO error 104 (Connection reset by peer) on X server ":0.0"

      after 0 requests (0 known processed) with 0 events remaining.

```

Here is dmsg:

```
ACPI: PCI Interrupt 0000:00:1d.7[D] -> GSI 23 (level, low) -> IRQ 19

PCI: Setting latency timer of device 0000:00:1d.7 to 64

ehci_hcd 0000:00:1d.7: EHCI Host Controller

PCI: cache line size of 128 is not supported by device 0000:00:1d.7

ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 5

ehci_hcd 0000:00:1d.7: irq 19, io mem 0xf6100000

ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004

hub 5-0:1.0: USB hub found

hub 5-0:1.0: 8 ports detected

ACPI: PCI Interrupt 0000:03:07.0[A] -> GSI 22 (level, low) -> IRQ 20

fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.

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

ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 18

[fglrx] module loaded - fglrx 8.21.7 [Jan 14 2006] on minor 0

e1000: eth0: e1000_watchdog_task: NIC Link is Up 1000 Mbps Full Duplex

```

Here is the xorg.conf:

```

Section "ServerLayout"

        Identifier     "X.org Configured"

        Screen      0  "aticonfig Screen 0" 0 0

        InputDevice    "Mouse0" "CorePointer"

        InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

        FontPath     "/usr/share/fonts/misc"

        FontPath     "/usr/share/fonts/75dpi"

        FontPath     "/usr/share/fonts/100dpi"

        FontPath     "/usr/share/fonts/TTF"

        FontPath     "/usr/share/fonts/Type1"

EndSection

Section "Module"

        Load  "extmod"

        Load  "xtrap"

        Load  "record"

        Load  "dbe"

        Load  "dri"

        Load  "freetype"

        Load  "type1"

        Load  "glx"

EndSection

Section "InputDevice"

        Identifier  "Keyboard0"

        Driver      "kbd"

EndSection

Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "mouse"

        Option      "Protocol" "auto"

        Option      "Buttons" "7"

        Option      "Device" "/dev//input/mice"

        Option      "ZAxisMapping" "6 7"

        Option      "Resolution" "800"

EndSection

Section "Monitor"

        #DisplaySize      370   270     # mm

 ### Comment all HorizSync and VertSync values to use DDC:

        Identifier   "aticonfig Monitor0"

        VendorName   "MAG"

        ModelName    "986FS"

        HorizSync    30.0 - 86.0

        VertRefresh  50.0 - 160.0

        Option      "DPMS"

EndSection

Section "Device"

        Identifier  "ATI Graphics Adapter 0"

        Driver      "fglrx"

        BoardName   "Radeon R300 ND [Radeon 9700 Pro]"

        VendorName  "ATI Technologies Inc"

        BusID       "PCI:1:0:0"

EndSection

Section "Screen"

        Identifier "aticonfig Screen 0"

        Device     "ATI Graphics Adapter 0"

        Monitor    "aticonfig Monitor 0"

        DefaultDepth     24

        SubSection "Display"

                Viewport   0 0

                Depth     24

                Modes "1280x1024" "1024x768" "800x600"

        EndSubSection

EndSection

```

Any help would be appreciated.

----------

## Horus107

I'm loading agpgart and ati-agp before loading fglrx. Changes nothing, still crashing upon X11 exit.

----------

## wjb

 *Quote:*   

> - Compiled kernel 2.6.15.1 with:
> 
> * no framebuffer support
> 
> * MTRR as module
> ...

 

Why have you got ATI chipset support AND ati-drivers? I think you have to choose one method or the other.

----------

## Horus107

Cause http://gentoo-wiki.com/Ati say to do so.

But I'll give it a try removing the chipset support.

----------

## Horus107

Sorry, that changed nothing...

----------

## wjb

Not needing the ATI chipset came from Q2.1 of Wedge Unofficial Gentoo ATI Radeon FAQ. I must have been asleep when I was going through that bit of the wiki.

Any errors reported in the log file (/var/log/Xorg.0.log)?

----------

## elestedt

You should disable MTRR. The driver has it's own which cannot be switched off - so when you switch it off you turn off the kernel version - which only collides with the drivers MTRR.

Put

```
        Option      "mtrr" "off"

```

in the device section for the card

----------

## Horus107

I've uploaded a complete Xorg.log: http://xgm.de/Xorg.0.log

```

 Option      "mtrr" "off" 

```

Sorry, changed nothing. The log file above was created from a run with this option.

Thanks,

Florian

----------

## elestedt

```
(WW) fglrx(0): Bad V_BIOS checksum
```

That does not sound good...

Do you have the kernel mtrr module loaded? If so unload it and try again.

----------

## Horus107

I've MTRR compiled in my kernel (CONFIG_MTRR=y). I did a reboot after testing each configuration which should equal to a module loading/unloading.

Florian

----------

## Horus107

It works now.

You have to activate CONFIG_AGP_INTEL, I was misinterpreting the chipset support as the graphics card chipset.

The fglrx module complains about not being able to use the internal AGP support:

```

Mar 11 15:02:19 horus [fglrx] Internal AGP support requested, but kernel AGP support active.

Mar 11 15:02:19 horus [fglrx] Have to use kernel AGP support to avoid conflicts.

Mar 11 15:02:19 horus [fglrx] AGP detected, AgpState   = 0x1f000217 (hardware caps of chipset)

Mar 11 15:02:19 horus agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.

Mar 11 15:02:19 horus agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode

Mar 11 15:02:19 horus agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode

Mar 11 15:02:19 horus [fglrx] AGP enabled,  AgpCommand = 0x1f000314 (selected caps)

Mar 11 15:02:19 horus [fglrx] free  AGP = 121909248

Mar 11 15:02:19 horus [fglrx] max   AGP = 121909248

Mar 11 15:02:19 horus [fglrx] free  LFB = 104345600

Mar 11 15:02:19 horus [fglrx] max   LFB = 104345600

Mar 11 15:02:19 horus [fglrx] free  Inv = 0

Mar 11 15:02:19 horus [fglrx] max   Inv = 0

Mar 11 15:02:19 horus [fglrx] total Inv = 0

Mar 11 15:02:19 horus [fglrx] total TIM = 0

Mar 11 15:02:19 horus [fglrx] total FB  = 0

Mar 11 15:02:19 horus [fglrx] total AGP = 32768

```

But besides that everything runs fine. I've tried to completely disable AGP support in the kernel (CONFIG_AGP) but than it does not even compile. Now I've disabled the internal AGP support (Option      "UseInternalAGPGART" "off"). Or anyone knows a better way?

Thanks for your help!

Florian

----------

## calavicci

I've been suffering from the same problem, but adding enabling CONFIG_AGP_INTEL did not help. Any time I run a program utilizing the 3D hardware acceleration, the following error is returned: <hostname> kernel: invalid operand: 0000 [<iteration since starting X>], and attempting to stop X still hangs the system. There aren't any errors in /var/log/Xorg.0.log, either.

----------

