# radeon 5700 vary laggy -maybe not

## twobit

amd64 quad core, radeon 5700,  have tried different driver methods, kernel support/removing everything from the kernel.  fgl_gears runs vary laggy, i only see 1 or 2 frames pr second, but its reading out 5000+ frames in 5 seconds.   

not sure what i'm missing here but whats the proper setup now? most wiki's seem to be outdated. several hours trying things is getting me irritated.

video_cards="fglrx" in make.conf

fglrxinfo says Opengl vendor string  : advanced micro devices

                    opengl renderer string : ATI radeon HD 5700 seres

xorg.conf  

```
Section "ServerLayout"

        Identifier     "aticonfig Layout"

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

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

```

Last edited by twobit on Mon Aug 13, 2012 6:22 pm; edited 2 times in total

----------

## audiodef

Is it any better if you try VIDEO_CARDS="radeon"?

----------

## gorkypl

VIDEO_CARDS="radeon r600" would be even better (mesa), you should also enable KMS support in kernel (there is info on wiki about it).

And of course start without xorg.conf

----------

## eccerr0r

My RadeonHD 5770 with fglrx (Intel Core2 Q9550S, P43 M/B, PCIe) reports 17000 frames in 5 seconds = 3400 FPS or so ... so it really looks like it does not appear to be rendering properly.  The data you say appears about correct however... so it remains a mystery...

Questions: Which version of fglrx and kernel are you running?  (I'm using 12.6 currently)

What does "eselect opengl list" report?

Does "glxlinfo|grep render" report anything unusual (using OSS version of glxinfo)?

You may need to post the contents of /var/log/Xorg.0.log somewhere to inspect...

----------

## olek

 *gorkypl wrote:*   

> VIDEO_CARDS="radeon r600" would be even better (mesa), you should also enable KMS support in kernel (there is info on wiki about it).
> 
> And of course start without xorg.conf

 

Why R600? R600 is the codename for Radeon 4XXX, 5XXX are called Evergreen.

----------

## gorkypl

 *olek wrote:*   

>  *gorkypl wrote:*   VIDEO_CARDS="radeon r600" would be even better (mesa), you should also enable KMS support in kernel (there is info on wiki about it).
> 
> And of course start without xorg.conf 
> 
> Why R600? R600 is the codename for Radeon 4XXX, 5XXX are called Evergreen.

 

```

video_cards_r600     : VIDEO_CARDS setting to build only r600, r700, Evergreen and Northern Islands based chips code for radeon

```

----------

## olek

 *Quote:*   

> video_cards_r600     : VIDEO_CARDS setting to build only r600, r700, Evergreen and Northern Islands based chips code for radeon 

 

Where is this from?

----------

## twobit

eselect opengl list:  gives me ATi and xorg-x11

have tried both...  have tried video_cards="radeon"  

Who has this working on a radeon 5000+ ? whats your setup..  anyone give me a basic walkthrew on kms support?  

I went threw the KMS walkthrew and now startx cant find any screens.

----------

## olek

I've got a 5700 and just followed the official docs.

http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml

http://www.gentoo.org/doc/en/xorg-config.xml

I'm using the open source radeon driver.

----------

## twobit

going threw those links again... no screen detected .. can you post your xorg.conf?

how can i build a new xorg.conf ??

```
Xorg -configure

X.Org X Server 1.12.2

Release Date: 2012-05-29

X Protocol Version 11, Revision 0

Build Operating System: Linux 3.2.12-gentoo x86_64 Gentoo

Current Operating System: Linux RedRum_Box 3.2.12-gentoo #1 SMP Sun Aug 12 17:29:25 PDT 2012 x86_64

Kernel command line: root=/dev/sda3 

Build Date: 12 August 2012  06:32:11PM

 

Current version of pixman: 0.24.0

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

        to make sure that you have the latest version.

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: Sun Aug 12 19:06:55 2012

List of video drivers:

        radeon

        ati

(EE) module ABI major version (11) doesn't match the server's version (12)

(EE) module ABI major version (11) doesn't match the server's version (12)

No devices to configure.  Configuration failed.

Server terminated with error (2). Closing log file.

```

```

X.Org X Server 1.12.2

Release Date: 2012-05-29

X Protocol Version 11, Revision 0

Build Operating System: Linux 3.2.12-gentoo x86_64 Gentoo

Current Operating System: Linux RedRum_Box 3.2.12-gentoo #1 SMP Sun Aug 12 17:29:25 PDT 2012 x86_64

Kernel command line: root=/dev/sda3 

Build Date: 12 August 2012  06:32:11PM

 

Current version of pixman: 0.24.0

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

        to make sure that you have the latest version.

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: Sun Aug 12 19:07:34 2012

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

(==) Using system config directory "/usr/share/X11/xorg.conf.d"

Fatal server error:

no screens found

Please consult the The X.Org Foundation support 

         at http://wiki.x.org

 for help. 

Please also check the log file at "/var/log/Xorg.0.log" for additional information.

Server terminated with error (1). Closing log file.

xinit: giving up

xinit: unable to connect to X server: No such file or directory

xinit: server error

```

----------

## jasn

This is what I learned when building ATI GPU driver support for the Radeon 6970M, (Clevo P150HM). My current config is;

```
sys-kernel/gentoo-sources-3.5.1

x11-drivers/xf86-video-ati-6.14.6-r1

media-libs/mesa-8.1_rc1_pre20120724

x11-libs/libdrm-2.4.38

sys-kernel/linux-firmware-20120719
```

There's two AMD/ATI GPU Linux drivers, the proprietary driver, called fglrx (acronym for "FireGL and Radeon for X"), and the open source driver, called radeon.  You can choose either, but you have to be very careful that both drivers aren't present on your system at the same time, because they have a tendency to both get autloaded and clobber each other. If you use the proprietary driver, fglrx, you can read the Unofficial Gentoo fglrx installation guide here, which is pretty current, (and for some additional older information, the Gentoo wiki page here), and remember the following;

```
1) You need to make sure that your kernel configurations does not have any DRI or KMS Graphics drivers options selected and the kernel is recompiled.

2) Make sure the VIDEO_CARDS entry in your /etc/make.conf is VIDEO_CARDS="fglrx" and you sync your tree and rebuild your world.

3) You need an xorg.conf file to load the correct driver for your X server. This is described in the Unofficial installation guide above.
```

If you use the open source driver, radeon, there are two methods for installing the driver. One is to do it by configuring the drivers as built into the kernel, (as opposed to using <M> modules). If you're going to build the drivers in, then you need to make sure you also build into the kernel, the correct radeon firmware blob. This Gentoo wiki page appears to provide the most current built in driver configuration information, (and you can also read this slightly older information as well). If your GPU is one of the RadeonHD 5000 series, then your chipset is Evergreen, and your firmware should be one of either CEDAR, CYPRESS, JUNIPER or REDWOOD.

The other method is to configure the drivers as <M> modules. In that case the system will autoload everything, including the firmware blob, which I would suggest is easier since you don't need know which firmware blob is the correct one for your GPU. As a matter of fact, when you configure your kernel for radeon drivers as modules, you need to make sure to not configure firmware blobs built into the kernel. The system will correctly autoload both drivers and firmware blob when it boots. This is the configuration that I use, and I'm not sure why the wiki pages don't offer the instructions as well, but here are the basic steps of switching from the fglrx driver to the radeon driver (modules version);

```
1) Make sure you have removed the proprietary driver from your system by doing an `emerge -C ati-drivers`

2) Make sure your /etc/make.conf VIDEO_CARDS="radeon"  (and not fglrx)

3) If you changed your /etc/make.conf make sure you resync portage and do an update of your world

4) Delete your /lib/modules/[version]-gentoo directory completely
```

This is to ensure you have removed all traces of the fglrx driver from your system.

Configure your kernel with;

```
1) Device Drivers -> Graphics Support -> <M> /dev/agpgart (AGP Support) --->

1a) and under /dev/agpgart (AGP Support) ---> <M> AMD Opteron/Athlon64 on-CPU GART support

2) Device Drivers -> Graphics Support -> <M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> 

2a) and under Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> <M> ATI Radeon

                                                                                   [*]   Enable modesetting on radeon by default - NEW DRIVER
```

UPDATE: My previous configuration of using the ATI framebuffer driver gave me a blank console screen, on my recent system installation. In order to get my framebuffer working correctly I configured my kernel with these settings;

```
3) Device Drivers -> Graphics Support -> {*} Support for frame buffer devices --->

3a) and under Support for frame buffer devices ---> [*]   Enable firmware EDID

                                                    [ ]   Framebuffer foreign endianness support  --->

                                                    [*]   Enable Video Mode Handling Helpers

                                                    [*]   Enable Tile Blitting Support

and do not select any framebuffer drivers.
```

Then continue configuring your kernel and do not include the radeon device firmware blob;

```
4) Device Drivers -> Generic Driver Options ---> -*- Userspace firmware loading support

                                                  []    Include in-kernel firmware blobs in kernel binary

                                                  ()    External firmware blobs to build into the kernel binary
```

Then build and install your kernel and modules. You then need to emerge either x11-misc/radeon-ucode (for installing only the Radeon firmware blobs), or linux-firmware (for installing the Radeon firmware blobs along with a bunch of other device firmware, like the Intel WiFi firmware, etc.). Then you don't need to do any additional system configuration, and you don't need an xorg.conf. When you reboot you should see similar radeon dmesg output as the following;

```
[    2.803769] [drm] radeon defaulting to kernel modesetting.

[    2.803774] [drm] radeon kernel modesetting enabled.

[    2.803966] [drm] initializing kernel modesetting (BARTS 0x1002:0x6720 0x1558:0x5102).

[    2.804047] [drm] register mmio base: 0xF7E20000

[    2.804048] [drm] register mmio size: 131072

[    2.804193] radeon 0000:01:00.0: VRAM: 2048M 0x0000000000000000 - 0x000000007FFFFFFF (2048M used)

[    2.804196] radeon 0000:01:00.0: GTT: 512M 0x0000000080000000 - 0x000000009FFFFFFF

[    2.804201] [drm] Detected VRAM RAM=2048M, BAR=256M

[    2.804202] [drm] RAM width 256bits DDR

[    2.804242] [TTM] Zone  kernel: Available graphics memory: 16441362 kiB

[    2.804243] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB

[    2.804244] [TTM] Initializing pool allocator

[    2.804247] [TTM] Initializing DMA pool allocator

[    2.804269] [drm] radeon: 2048M of VRAM memory ready

[    2.804273] [drm] radeon: 512M of GTT memory ready.

[    2.804284] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).

[    2.804285] [drm] Driver supports precise vblank timestamp query.

[    2.804341] radeon 0000:01:00.0: irq 52 for MSI/MSI-X

[    2.804349] radeon 0000:01:00.0: radeon: using MSI.

[    2.804394] [drm] radeon: irq initialized.

[    2.804399] [drm] GART: num cpu pages 131072, num gpu pages 131072

[    2.804784] [drm] Loading BARTS Microcode

[    2.826206] [drm] PCIE GART of 512M enabled (table at 0x0000000000040000).

[    2.826329] radeon 0000:01:00.0: WB enabled

[    2.826332] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0xffff880802203c00

[    2.843325] [drm] ring test on 0 succeeded in 3 usecs

[    2.843528] [drm] ib test on ring 0 succeeded in 0 usecs

[    2.843787] [drm] Radeon Display Connectors

[    2.843788] [drm] Connector 0:

[    2.843789] [drm]   LVDS-1

[    2.843791] [drm]   DDC: 0x6470 0x6470 0x6474 0x6474 0x6478 0x6478 0x647c 0x647c

[    2.843792] [drm]   Encoders:

[    2.843793] [drm]     LCD1: INTERNAL_UNIPHY

[    2.843794] [drm] Connector 1:

[    2.843795] [drm]   HDMI-A-1

[    2.843795] [drm]   HPD3

[    2.843797] [drm]   DDC: 0x6450 0x6450 0x6454 0x6454 0x6458 0x6458 0x645c 0x645c

[    2.843798] [drm]   Encoders:

[    2.843798] [drm]     DFP1: INTERNAL_UNIPHY2

[    2.843799] [drm] Connector 2:

[    2.843800] [drm]   DVI-I-1

[    2.843801] [drm]   HPD1

[    2.843802] [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c

[    2.843803] [drm]   Encoders:

[    2.843804] [drm]     DFP2: INTERNAL_UNIPHY1

[    2.843805] [drm]     CRT1: INTERNAL_KLDSCP_DAC1

[    2.843899] [drm] Internal thermal controller with fan control

[    2.845084] [drm] radeon: power management initialized

[    3.351874] [drm] fb mappable at 0xE0142000

[    3.351876] [drm] vram apper at 0xE0000000

[    3.351877] [drm] size 9216000

[    3.351878] [drm] fb depth is 24

[    3.351879] [drm]    pitch is 7680

[    3.351909] fb0: radeondrmfb frame buffer device

[    3.351910] drm: registered panic notifier
```

And when you load your X server, the correct driver, (xf86-video-ati), will get autloaded as well.

Finally, as previously pointed out, if your GPU is one of the RadeonHD 5000 series, then you could have the VIDEO_CARDS line in your /etc/make.conf be VIDEO_CARDS="r600". I would actually recommend you do a VIDEO_CARDS="r600 radeon" line in your /etc/make.conf, because some packages don't understand VIDEO_CARDS="r600". You could then remove the radeon VIDEO_CARD USE flag from mesa by setting the following;

```
media-libs/mesa -video_cards_radeon
```

Good Luck..

UPDATE: I recently performed a clean install of the latest Gentoo ~amd64, (gentoo-sources-3.5.4), on my Clevo P150HM/ATI 6970M laptop and found out that I could not now get the framebubuffer console display to work correctly with the instructions I had previously used above. I'm updating my post in case with what did work.Last edited by jasn on Wed Oct 03, 2012 5:13 pm; edited 2 times in total

----------

## twobit

seemed to be working after another round... not sure why.. i'm just glad it is.

----------

## eccerr0r

 *twobit wrote:*   

> 
> 
> ```
> Xorg -configure
> 
> ...

 

Did you end up using fglrx or the open source radeon driver?  I was wondering about the speed impact using the OSS driver, fglrx was reported to be faster.

Anyway this above quoted error message is very common.  It usually means you upgraded the xorg kernel without updating the drivers.  Perhaps after the first attempt you emerged those drivers again which would fix this issue?

----------

## gorkypl

 *olek wrote:*   

>  *Quote:*   video_cards_r600     : VIDEO_CARDS setting to build only r600, r700, Evergreen and Northern Islands based chips code for radeon  
> 
> Where is this from?

 

equery uses mesa

It is also the nomenclature used by xorg developers.

----------

## twobit

Went with the Open source driver ... cant give you a speed difference because the fglrx was never working well enough to play anything.

Open source driver runs 3d games vary nicely.

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

so the open source driver conflict with some software i am using.  so now i need to try the fglrx route, before destroying the ATI and getting a Nvidia card. 

followed the fglrx instructions , removed all from kernel, removed old xf86-video-ati, set fglrx flags,  emerged ati-drivers,xorg-server,xorg-drivers, set all the eselect, I have been threw this several times now.  

fgl_glxgears runs VARY slowly 1 or 2 frames that i see but the output says othwise.

seems the Direct Rendering is not working. 

added the "DRI" section to xorg, modprobe fglrx and no errors (even though /lib/modules/fglrx doesn't exist)  

How do i get the hardware acceleration working???

----------

## eccerr0r

What software? I'm surprised, the API should be the same (opengl) to use either the OSS or the proprietary driver...  I've even run wine 3d apps through the OSS driver and it works...

fglrx should automatically be loading the kernel module.  You should see indications of when the module gets loaded in dmesg, as well as any errors it encountered.  So again, are there any errors in Xorg.0.log?

----------

## gorkypl

I am also not aware of any software conflicting with open driver. Maybe you have misconfigured something?

http://wiki.gentoo.org/wiki/Radeon

----------

## energyman76b

ok, remove all crap from kernel.

build new kernel

reboot

install fglrx

now, make sure that /usr/src/linux points to the right sources!

also: check all the symlinks that eselect opengl and the ebuild should have created. Sometimes there is a screwup. Resulting in a half working driver. With glxinfo reporting conflicting info (pro tip: don't use grep on glxinfo, read all of it).

Reboot again (just to make sure).

I have a 5770 and performance is great..

----------

## anyNiXwilldo

 *jasn wrote:*   

> 
> 
> If you're going to build the drivers in, then you need to make sure you also build into the kernel, the correct radeon firmware blob.

 

This isn't necessary. I have the radeon driver built-in, but no firmware built into the kernel, nor installed anywhere on this system. Module auto-loading is disabled in my kernel config, which means the firmware wouldn't load even if it was installed. The free radeon driver works beautifully without the firmware. I don't have all desktop effects, like the desktop cube, but many of the desktop animation effects work perfectly fine without the firmware. Not only that, but I have no issues watching videos full screen, on a 22 or 23 inch wide monitor at 1600x900 resolution, and this on a low grade radeon 5450 video card. It's easily acheivable with: 

ACCEPT_LICENSE="-* @FREE"    (in /etc/make.conf)

and

sys-kernel/hardened-sources deblob  (in /etc/portage/package.use)

which means the radeon driver without firmware also works on hardened:

uname -a = 3.5.4-hardened-r1-gnu

It's not 'laggy' either.

----------

