# How do I install the latest Radeon drivers?

## yutt

The 3.9.0 Radeon drivers were just release, and I would like to try them out. What is the simplest way to do this? Can I just install the rpm as you would in Redhat?

Or is there some way to do this using Portage?

----------

## furkan

i think you can find in portage try to looking latest version while making

emerge -Up ati-drivers 

.......

----------

## Admiral LSD

I think they're marked ~x86 initially for testing. If you want them and you're keywords are x86 (which is the Gentoo default) then what you've got to do is put:

```
media-video/ati-drivers ~x86

media-video/ati-drivers-extra ~x86
```

into /etc/portage/package.keywords and then emerge as normal (emerge ati-drivers). You'll most likely have to create both the file and the directory as neither are created automatically yet.

----------

## furkan

or you can install them while making

emerge /usr/portage/media-video/ati-drivers/ati-drivers-3.9.0.ebuild

.....

----------

## teedog

http://odin.prohosting.com/wedge01/gentoo-radeon-faq.html

----------

## Sugarat

I have a Radeon 9600, and kernel 2.6.5.  I tried the instructions on that website but when trying xinit, X does not run.  There are no errors in the Xfree86.log,  but when doing a dmesg and looking in the system log, it contains this:

[fglrx:drm_ioremapfree] *ERROR* [mappings] Attempt to free NULL pointer

Debug: sleeping function called from invalid context at mm/slab.c:1931

in_atomic():1, irqs_disabled():0

Call Trace:

 [<c011655b>] __might_sleep+0xab/0xd0

 [<c013852c>] kmem_cache_alloc+0x6c/0x70

 [<fa9edc48>] __ke_alloc_wait_queue_head_struct+0x18/0x30 [fglrx]

 [<fa9fff5f>] firegl_open_helper+0x15f/0x190 [fglrx]

 [<fa9f1486>] firegl_setup_dev+0x126/0x1d0 [fglrx]

 [<fa9f0a94>] firegl_open+0x194/0x260 [fglrx]

 [<c015626f>] exact_lock+0xf/0x20

 [<fa9ed9c2>] firegl_stub_open+0x102/0x1b0 [fglrx]

 [<fa9ed8c0>] firegl_stub_open+0x0/0x1b0 [fglrx]

 [<c0156056>] chrdev_open+0xe6/0x210

 [<c014bd52>] dentry_open+0x142/0x210

 [<c014bc02>] filp_open+0x62/0x70

 [<c014c09b>] sys_open+0x5b/0x90

 [<c0106f77>] syscall_call+0x7/0xb

[fglrx] free  AGP = 54800384

[fglrx] max   AGP = 54800384

[fglrx] free  LFB = 108978176

[fglrx] max   LFB = 108978176

[fglrx] free  Inv = 0

[fglrx] max   Inv = 0

[fglrx] total Inv = 0

[fglrx] total TIM = 0

[fglrx] total FB  = 0

[fglrx] total AGP = 16384

Debug: sleeping function called from invalid context at include/asm/semaphore.h:119

in_atomic():1, irqs_disabled():0

Call Trace:

 [<c011655b>] __might_sleep+0xab/0xd0

 [<fa9fca77>] drm_free+0xb7/0x150 [fglrx]

 [<fa9ee14a>] __ke_down_struct_sem+0x2a/0x50 [fglrx]

 [<fa9fe81f>] firegl_remove_all_drawables+0x3f/0x100 [fglrx]

 [<faa004d6>] firegl_release_helper+0x546/0x750 [fglrx]

 [<fa9f1562>] firegl_takedown+0x32/0xaa0 [fglrx]

 [<c0121246>] update_process_times+0x46/0x60

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

 [<c014db8a>] __fput+0x10a/0x120

 [<c014c159>] filp_close+0x59/0x90

 [<c014c1f1>] sys_close+0x61/0xa0

 [<c0106f77>] syscall_call+0x7/0xb

[fglrx:drm_ioremapfree] *ERROR* [mappings] Attempt to free NULL pointer

 I'm not a C programmer...  whats wrong here?

----------

## Wedge_

If X doesn't run, there should be some errors in the log - can you post it here? 

As for the dmesg stuff, the lines like this: 

```
[fglrx:drm_ioremapfree] *ERROR* [mappings] Attempt to free NULL pointer 
```

are probably down to whatever is stopping X from working properly. The rest of it: 

```
Debug: sleeping function called from invalid context at mm/slab.c:1931

in_atomic():1, irqs_disabled():0

Call Trace:

[<c011655b>] __might_sleep+0xab/0xd0

[<c013852c>] kmem_cache_alloc+0x6c/0x70

...

[<c0106f77>] syscall_call+0x7/0xb
```

you should be able to get rid of by disabling the "Sleep inside spinlock checking" option in the kernel config (Kernel hacking section).

----------

## Sugarat

Ok thanks.  I just recompiled the kernel without that option but still no joy. 

The X log doesnt show any errors, but dmesg says this:

[fglrx:drm_ioremapfree] *ERROR* [mappings] Attempt to free NULL pointer

[fglrx] free  AGP = 54800384

[fglrx] max   AGP = 54800384

[fglrx] free  LFB = 108978176

[fglrx] max   LFB = 108978176

[fglrx] free  Inv = 0

[fglrx] max   Inv = 0

[fglrx] total Inv = 0

[fglrx] total TIM = 0

[fglrx] total FB  = 0

[fglrx] total AGP = 16384

mtrr: no MTRR for c0000000,800000 found

mtrr: no MTRR for c0800000,100000 found

mtrr: no MTRR for c0900000,40000 found

mtrr: no MTRR for c0940000,10000 found

mtrr: no MTRR for c0950000,2000 found

mtrr: no MTRR for c0952000,1000 found

[fglrx:drm_ioremapfree] *ERROR* [mappings] Attempt to free NULL pointer

Here is the driver section of my X config file:

```

Section "Device"

    Identifier                          "ATI Graphics Adapter"

    Driver                              "fglrx"

# ### generic DRI settings ###

# === disable PnP Monitor  ===

    #Option                              "NoDDC"

# === disable/enable XAA/DRI ===

    Option "no_accel"                   "no"

    Option "no_dri"                     "no"

# === misc DRI settings ===

    Option "mtrr"                       "yes" # disable DRI mtrr mapper, driver has its own code for mtrr

# ### FireGL DDX driver module specific settings ###

# === Screen Management ===

    Option "DesktopSetup"               "0x00000000"

    Option "MonitorLayout"              "AUTO, AUTO"

    Option "IgnoreEDID"                 "off"

    Option "HSync2"                     "unspecified"

    Option "VRefresh2"                  "unspecified"

    Option "ScreenOverlap"              "0"

# === TV-out Management ===

    Option "NoTV"                       "yes"

    Option "TVStandard"                 "NTSC-M"

    Option "TVHSizeAdj"                 "0"

    Option "TVVSizeAdj"                 "0"

    Option "TVHPosAdj"                  "0"

    Option "TVVPosAdj"                  "0"

    Option "TVHStartAdj"                "0"

    Option "TVColorAdj"                 "0"

    Option "GammaCorrectionI"           "0x00000000"

    Option "GammaCorrectionII"          "0x00000000"

# === OpenGL specific profiles/settings ===

    Option "Capabilities"               "0x00000000"

# === Video Overlay for the Xv extension ===

    Option "VideoOverlay"               "on"

# === OpenGL Overlay ===

# Note: When OpenGL Overlay is enabled, Video Overlay

#       will be disabled automatically

    Option "OpenGLOverlay"              "off"

# === Center Mode (Laptops only) ===

    Option "CenterMode"                 "off"

# === Pseudo Color Visuals (8-bit visuals) ===

    Option "PseudoColorVisuals"         "off"

# === QBS Management ===

    Option "Stereo"                     "off"

    Option "StereoSyncEnable"           "1"

# === FSAA Management ===

    Option "FSAAEnable"                 "no"

    Option "FSAAScale"                  "1"

    Option "FSAADisableGamma"           "no"

    Option "FSAACustomizeMSPos"         "no"

    Option "FSAAMSPosX0"                "0.000000"

    Option "FSAAMSPosY0"                "0.000000"

    Option "FSAAMSPosX1"                "0.000000"

    Option "FSAAMSPosY1"                "0.000000"

    Option "FSAAMSPosX2"                "0.000000"

    Option "FSAAMSPosY2"                "0.000000"

    Option "FSAAMSPosX3"                "0.000000"

    Option "FSAAMSPosY3"                "0.000000"

    Option "FSAAMSPosX4"                "0.000000"

    Option "FSAAMSPosY4"                "0.000000"

    Option "FSAAMSPosX5"                "0.000000"

    Option "FSAAMSPosY5"                "0.000000"

# === Misc Options ===

    Option "UseFastTLS"                 "0"

    Option "BlockSignalsOnLock"         "on"

    Option "UseInternalAGPGART"         "yes"

    Option "ForceGenericCPU"            "no"

    BusID "PCI:1:0:0"    # vendor=1002, device=4150

    Screen 0

EndSection

```

 Me no get it?![/code]

----------

## Wedge_

OK, so is X actually starting but you aren't getting 3D acceleration?

----------

## Sugarat

No, its not loading at all I'm afraid. 

 I type  $xinit, the screen goes blank, and about 4 seconds later i'm back at the shell.

----------

## Sugarat

Its just started working - problem solved!

----------

## Sugarat

Arrgh... arse. 

 I just replaced Xfree86 with X.org and its gone tits up again. 

Xorg runs fine with the same config file as Xfree86 had (with GL working ok).

I have re-emerged the ati-drivers and loaded the fglrx module, but when I load X and do glxinfo I get:

```

levity X11 # glxinfo

name of display: :0.0

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Error: couldn't find RGB GLX visual

 

   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

----------------------------------------------------------------------

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

0x21 24 tc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

0x22 24 dc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None

```

I notice that when I emerged the ati-drivers-extra,  the gears program doesnt compile.

----------

## Wedge_

With Xorg, you usually need to do "opengl-update xorg-x11" before starting it or else 3D acceleration doesn't work. You can switch back to "opengl-update ati" afterwards. Someone also posted a different method for fixing this in Docs, Tips, and Tricks somewhere.

----------

## Sugarat

Ah yes that did the trick.  Many thanks for your help!

 Xorg is now looking good!

----------

## Admiral LSD

 *furkan wrote:*   

> or you can install them while making
> 
> emerge /usr/portage/media-video/ati-drivers/ati-drivers-3.9.0.ebuild
> 
> .....

 

no, No, NO, NO!

emerging with /path/to/ebuild is [n]not[/b] a good idea as it has the potention to reall fuck up the guts of Portage. Using the package.* files is the best way to unmask as package and make sure it stays unmasked.

----------

