# ati-drivers not working on new install

## g0del

I have an imac 27 inch with Ati Radeon Mobility and 4 i3 cpus running both Arch linux and Gentoo. The Ati proprietary driver is working on the Arch linux setup, however on Gentoo when I issue startx the screen goes black and I must hard reset to get it back up. Xorg is working on gentoo with the vesa driver and I have this using either VESA or fglrx

```

 genix # eselect opengl list

Available OpenGL implementations:

  [1]   ati *

  [2]   xorg-x11

```

On Gentoo I have 

```

*  x11-base/xorg-server

      Latest version available: 1.10.2

*  x11-drivers/ati-drivers

      Latest version available: 11.6

*  sys-kernel/gentoo-sources

      Latest version available: 2.6.39-r3

```

On Arch linux

```

extra/xorg-server 1.10.3-1 (xorg) [installed]

core/kernel26 2.6.39.3-1 (base) [installed]

catalyst 11.6-1

```

This is taken from the error log Xorg.log.0.old on gentoo, where fglrx does get loaded, however fails on dri initialization.

```

[    66.954] (II) fglrx(0): Kernel Module Version Information:

[    66.955] (II) fglrx(0):     Name: fglrx

[    66.955] (II) fglrx(0):     Version: 8.86.5

[    66.955] (II) fglrx(0):     Date: May 24 2011

[    66.955] (II) fglrx(0):     Desc: ATI FireGL DRM kernel module

[    66.955] (II) fglrx(0): Kernel Module version matches driver.

[    66.955] (II) fglrx(0): Kernel Module Build Time Information:

[    66.955] (II) fglrx(0):     Build-Kernel UTS_RELEASE:        2.6.39-gentoo-r3-ARCH

[    66.955] (II) fglrx(0):     Build-Kernel MODVERSIONS:        no

[    66.955] (II) fglrx(0):     Build-Kernel __SMP__:            yes

[    66.955] (II) fglrx(0):     Build-Kernel PAGE_SIZE:          0x1000

[    66.955] (II) fglrx(0): [uki] register handle = 0x00004000

[    66.969] (EE) fglrx(0): Not enough video memory to allocate primary surface (frame buffer).

[    66.969] (II) fglrx(0): Shutdown CMMQS

[    66.969] (II) fglrx(0): [uki] removed 1 reserved context for kernel

[    66.969] (II) fglrx(0): [uki] unmapping 8192 bytes of SAREA 0x2000 at 0x7f6fcf2ca000

[    66.969] (WW) fglrx(0): ***********************************************************

[    66.969] (WW) fglrx(0): * DRI initialization failed                               *

[    66.969] (WW) fglrx(0): * kernel module (fglrx.ko) may be missing or incompatible *

[    66.969] (WW) fglrx(0): * 2D and 3D acceleration disabled                         *

[    66.969] (WW) fglrx(0): ***********************************************************

[    66.969]

Fatal server error:

[    66.969] AddScreen/ScreenInit failed for driver 0

[    66.969]

[    66.969]

Please consult the The X.Org Foundation support

         at http://wiki.x.org

 for help.

```

and just above this where it cannot load the dri modules

```

(II) LoadModule: "dri"

[    66.309] (WW) Warning, couldn't open module dri

[    66.310] (II) UnloadModule: "dri"

[    66.310] (II) Unloading dri

[    66.310] (EE) Failed to load module "dri" (module does not exist, 0)

[    66.311] (II) LoadModule: "dri2"

[    66.311] (WW) Warning, couldn't open module dri2

[    66.311] (II) UnloadModule: "dri2"

[    66.311] (II) Unloading dri2

[    66.311] (EE) Failed to load module "dri2" (module does not exist, 0)

```

These modules on Arch linux are loading 

```

 44.325] (II) LoadModule: "dri"

[    44.325] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so

[    44.337] (II) Module dri: vendor="X.Org Foundation"

[    44.337]    compiled for 1.10.3, module version = 1.0.0

[    44.337]    ABI class: X.Org Server Extension, version 5.0

[    44.337] (II) Loading extension XFree86-DRI

[    44.337] (II) LoadModule: "dri2"

[    44.337] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so

[    44.337] (II) Module dri2: vendor="X.Org Foundation"

[    44.338]    compiled for 1.10.3, module version = 1.2.0

[    44.338]    ABI class: X.Org Server Extension, version 5.0

[    44.338] (II) Loading extension DRI2

[    44.338] (II) LoadModule: "fglrx"

[    44.338] (II) Loading /usr/lib/xorg/modules/drivers/fglrx_drv.so

[    44.546] (II) Module fglrx: vendor="FireGL - ATI Technologies Inc."

[    44.558]    compiled for 1.4.99.906, module version = 8.86.5

```

Both Arch linux and Gentoo have this in their Xorg logs

```

Module fglrx: vendor="FireGL - ATI Technologies Inc."

[    44.558]    compiled for 1.4.99.906, module version = 8.86.5

```

So, im assuming the xorg-server is the problem here? Arch is using 1.10.3 and Gentoo is using 1.10.2.

Am I assuming correctly and how to proceed? 

Thankyou very much for your consideration.

----------

## hedmo

g0del

post your xorg.conf.lspc and make.conf

black screen is most of the times eselect opengl or a bad xorg.conf

----------

## g0del

lspci

```

00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 18)

00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 18)

00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB Universal Host Controller (rev 06)

00:1a.7 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)

00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)

00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)

00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)

00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 06)

00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB Universal Host Controller (rev 06)

00:1d.7 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a6)

00:1f.0 ISA bridge: Intel Corporation 5 Series Chipset LPC Interface Controller (rev 06)

00:1f.2 IDE interface: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA IDE Controller (rev 06)

00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)

00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 06)

01:00.0 VGA compatible controller: ATI Technologies Inc Device 68c0

01:00.1 Audio device: ATI Technologies Inc Device aa60

02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5764M Gigabit Ethernet PCIe (rev 10)

03:00.0 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)

04:00.0 PCI bridge: Texas Instruments XIO2213A PCI Express to PCI Bridge (rev 01)

05:00.0 FireWire (IEEE 1394): Texas Instruments XIO2213A 1394b OHCI with 3-Port PHY (rev 01)

ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 05)

ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 05)

ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 05)

ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 05)

ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 05)

ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 05)

```

make.conf

```

# These settings were set by the catalyst build script that automatically

# built this stage.

# Please consult /usr/share/portage/config/make.conf.example for a more

# detailed example.

CFLAGS="-O2 -pipe "

CXXFLAGS="${CFLAGS}"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="x86_64-pc-linux-gnu"

# These are the USE flags that were used in addition to what is provided by the

# profile used for building.

USE="mmx sse sse2 dri -cups dvd alsa cdr dvd jpeg mpeg png"

MAKEOPTS="-j5"

VIDEO_CARDS="fglrx mesa"

INPUT_DEVICES="evdev synaptics"

```

Tried NO xorg.conf and this one, but same result

```

  GNU nano 2.2.5                      File: /etc/X11/xorg.conf                                                   

Section "ServerLayout"

        Identifier     "aticonfig Layout"

        Screen      0  "aticonfig-Screen[0]-0" 0 0

EndSection

Section "Module"

EndSection

Section "Monitor"

        Identifier   "aticonfig-Monitor[0]-0"

        Option      "VendorName" "ATI Proprietary Driver"

        Option      "ModelName" "Generic Autodetecting Monitor"

        Option      "DPMS" "true"

EndSection

Section "Device"

        Identifier  "aticonfig-Device[0]-0"

        Driver      "fglrx"

        BusID       "PCI:1:0:0"

EndSection

Section "Screen"

        Identifier "aticonfig-Screen[0]-0"

        Device     "aticonfig-Device[0]-0"

        Monitor    "aticonfig-Monitor[0]-0"

        DefaultDepth     24

        SubSection "Display"

                Viewport   0 0

                Depth     24

        EndSubSection

EndSection

```

That previous one works on Arch linux as well, its just an

```

aticonfig --initial

```

EDIT: Just noticed that lspci is not showing what arch linux does, usually shows the full 

 VGA compatible controller: ATI Technologies Inc Madison [Mobility Radeon HD 5000 Series],

----------

## Goverp

I have the same software levels, and it's working.  The line where the Xorg.0.log changes is:

```
(EE) fglrx(0): Not enough video memory to allocate primary surface (frame buffer). 
```

The later stuff about not loading dri and dri2 modules is normal; the fglrx driver supplies its own.

My guess is your kernel has something that the driver is objecting to.  The usual cause of problems is failing to re-merge ati-drivers after building a new kernel.  The full sequence to get it right is:

```
module-rebuild populate

cd /usr/src/linux-2.6.39-gentoo-r3

make

make modules_install

mount /boot

make install

eselect kernel set linux-2.6.39-gentoo-r3

module-rebuild rebuild
```

Places where it might go wrong are forgetting to do make modules_install or eselect kernel or module-rebuild.  Substitute your own favourites for mount /boot and make install, and you can just emerge ati-drivers instead of module-rebuild if you don't have any other kernel dependencies.

Can you confirm you've done all these?  If so, it may be a kernel configuration option.

----------

## g0del

It must be a kernel config, I built the kernel first using 

```

make -j5 && make -j5 modules_install

```

then copied the kernel to /boot and emerged the ati drivers and xorg server so that confirms the correct steps, I have also re-compiled just to make sure, I did all this all on a fresh install,That and the fact lspci is not showing the ati card correctly????

Arch linux lspci shows this

```

01:00.0 VGA compatible controller: ATI Technologies Inc Madison [Mobility Radeon HD 5000 Series]

```

Gentoo lspci showing this

```

01:00.0 VGA compatible controller: ATI Technologies Inc Device 68c0

```

What did you do in your kernel config? perhaps that will help.

----------

## g0del

Well, I tried creating ebuilds with xorg-server 1.10.3, made and ebuild for ati-drivers 11.7, tried many different configurations of xorg.conf

rebuilt a few kernels, just cant get ati-drivers to work, so I just built a kernel with the radeon module and installed the xf86 ati drivers at least that works and I have the correct DPI and dri is working so it will suffice for now, I rebooted into arch linux and it is using the xorg with ati-drivers however it does manage to use fglrx and so gets a better fps.

----------

## DaggyStyle

I think you've enabled fb in the kernel.

if so, disable it and retry

----------

## g0del

DaggyStyle, ahh ok, thanks ill give that a try

----------

## g0del

I need a little help on removing framebuffer from the kernel, using 2.6.39 or even 3.0 

there is 

```

Device Drivers --> Graphics Support --> Support for frame buffer devices

```

It is either module or built into the kernel, there is no disabling. Inside there, there are alot of support options. Should I just build  Support for frame buffer devices  as a module and then deselect every option within there?

Thankyou again for your time.

----------

## DaggyStyle

 *g0del wrote:*   

> I need a little help on removing framebuffer from the kernel, using 2.6.39 or even 3.0 
> 
> there is 
> 
> ```
> ...

 

disable the DRM config, you can find it at Device Drivers --> Graphics Support --> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

----------

## Goverp

FWIW, on my box lspci shows

```
01:05.0 VGA compatible controller: ATI Technologies Inc Radeon HD 3200 Graphics
```

.

My kernel Device Drivers -> Grahics support has

No /dev/agpgart (AGP  support)

No Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

Support for frame buffer devices -> VESA VGA graphics support

 I was surprised to find my kernel configuration contains no references to fglrx and no selectable options for ATI video drivers.  I'm sure it used to; I guess they vanished over the past few releases.

----------

## DaggyStyle

 *Goverp wrote:*   

> FWIW, on my box lspci shows
> 
> ```
> 01:05.0 VGA compatible controller: ATI Technologies Inc Radeon HD 3200 Graphics
> ```
> ...

 

fglrx is an ATI's module, not kernel, I'd be worried if you've out that in the kernel.

----------

