# [Solved] Radeon problem

## Mephistorium

Hello everyone!

Here's my problem I have ATI 3470 HD Mobility , did an update to my gentoo system and it went wrong. easy enough; the new ati driver 12.6-beta only supports Radeon HD 5600+ so I tried reverting back to the 12.4 version and downgrading my xorg server to 1.11.x (and then 1.10) but all I got was a black screen.

So I wanted to try the radeon (open source driver) did everything as mentioned in the wiki, things were looking better but then when I startx I get this error:

```
error setting MTRR (base 0 x d0000000, size = à x 10 000 000, type = 1) Invalid argument (22)
```

I've followed the instructions in http://en.gentoo-wiki.com/wiki/MTRR  but still no luck

Important Notes:

I did 

```
- emerge -C x11-drivers/ati-drivers

- eselect opengl set xorg-x11 

- removed the fglrx.ko module

- rebuild the kernel so it would support KMS, the direct rendering manager (built-in not as module), support for frame buffer devices and the radeon firmwares (I installed the R600, R620, RV620 and the RV635 just to make sure )

- run emerge -avDN world after changing the "VIDEO_CARDS" to "radeon" in my /etc/make.conf

- deleted the /etc/xorg.conf

```

when I run X -configure, only the mouse is detected even thought synaptics keyboard mouse udev are in the INPUT_DEVICES

At this point I've tried many things, I only wish to get a working desktop environment whether it's fglrx or radeon as the driver.

I would like to thank you very much for your time and consideration   :Very Happy: Last edited by Mephistorium on Thu Jun 28, 2012 8:49 am; edited 1 time in total

----------

## BillWho

Mephistorium,

I migrated to radeon about six weeks ago when I caught wind of ati dropping support for my video adapter   :Sad: 

Here's my mtrr settings - I don't remember changing them.

```
CONFIG_MTRR=y

CONFIG_MTRR_SANITIZER=y

CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0

CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1

```

and /proc/mtrr

```
reg00: base=0x000000000 (    0MB), size= 2048MB, count=1: write-back

reg01: base=0x080000000 ( 2048MB), size= 1024MB, count=1: write-back

reg02: base=0x0c0000000 ( 3072MB), size=  256MB, count=1: write-back

reg03: base=0x0d0000000 ( 3328MB), size=  256MB, count=1: write-combining

```

I don't have a xorg.conf, however I have a radeon.conf in /etc/X11/xorg.conf.d

```
Section "Device"

  Identifier  "radeon"

  Driver      "radeon"

  Option "AccelMethod" "EXA"

  Option "AccelDFS"    "True"

EndSection

Section "dri"

  Mode 0666

EndSection

```

If you want my .config, let me know   :Wink: 

----------

## Mephistorium

Dear BillWho

Thank you very much for replying, turns out I have the same settings as you for the MTRR part there, I've added the radeon.conf I would highly appreciate if you could provide me with a howto: 

Here I used three articles:

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

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

-http://en.gentoo-wiki.com/wiki/Radeon

I don't know maybe mixing some infos from these broke something.

Also what kernel version are u using? I'm on 3.2.16

Thanks a lot!

----------

## BillWho

Mephistorium,

I primarily used this site http://wiki.gentoo.org/wiki/Radeon and followed the instructions for RadeonHD 2000, 3000, and 4000 series 

I also looked over this page https://wiki.archlinux.org/index.php/ATI

This is my card:

```
01:05.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RS780 [Radeon HD 3200]

   Subsystem: Acer Incorporated [ALI] Device 0155

   Kernel driver in use: radeon

```

The kernel version is now 3.5.0-rc4. I made the changes with either 3.4.0 or 3.4.2. The ati-drivers wouldn't compile correctly with git-sources

In brief I made the necessary .config modifications, changed /etc/make.conf VIDEO_CARDS="fbdev vesa radeon"

removed x11-drivers/ati-drivers and emerged x11-drivers/xf86-video-ati

moved /etx/X11/xorg.conf to /etx/X11/xorg.conf.save

emerge -uavDN @world

revdep-rebuild

emerge --depclean

set opengl to xorg-x11 ( I think it was the only selection available )

set mesa to gallium

These are the modules related to radeon

```
root@gentoo-gateway Documents # lsmod|grep radeon

radeon                714005  3 

drm_kms_helper         20916  1 radeon

ttm                    51155  1 radeon

drm                   181993  5 ttm,drm_kms_helper,radeon

i2c_algo_bit            4401  1 radeon

```

Everything has been working fine except for google earth. The globe is just some rectangular boxes.

This is all I can recall that would have any relevance to the radeon setup. 

There was a texture package I later installed as per a message from another package, but I can't remember it and it didn't seem to help google earth any   :Sad: 

Good luck   :Wink: 

----------

## VoidMage

Quite a while ago, I went a slightly different route - radeon as module, firmware loaded upon module load.

----------

## gorkypl

And don't use the xorg -configure! I am afraid that the shadow of this command will stay here forever...

Just start without any xorg.conf, and then add sections one by one only if you need them.

I think that the official gentoo wiki ( http://wiki.gentoo.org/wiki/Radeon ) is complete, just remove all .conf files from xorg.conf.d (or the xorg.comf) and try doing the instructions step by step.

Oh, and in case of R600 I think that the open driver is just better, so you should not miss the binary blob.

----------

## Mephistorium

Thank you guys for taking the time to help me  :Smile: 

Well, I scraped everything and started again along with a new kernel 3.3.8 (deleted the xorg.conf file and those inside xorg.conf.d/)

The error has changed now ( You can see it in the first two lines)

```

hostname: Host name lookup failure

xauth:  file /home/mephistorium/.serverauth.2230 does not exist

X.Org X Server 1.10.6

Release Date: 2012-02-10

X Protocol Version 11, Revision 0

Build Operating System: Linux 3.2.16 x86_64 Gentoo

Current Operating System: Linux gb 3.3.8-gentoo #2 SMP Wed Jun 27 11:45:41 CET 2012 x86_64

Kernel command line: root=/dev/sda3

Build Date: 26 June 2012  03:57:12PM

 

Current version of pixman: 0.26.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: Wed Jun 27 13:29:39 2012

(==) Using default built-in configuration (30 lines)

(II) [KMS] Kernel modesetting enabled.

xinit: connection to X server lost

waiting for X server to shut down 
```

A quick search has brought me to this:

http://www.linuxforums.org/forum/gentoo-linux/176201-solved-cannot-start-kde.html

But I wanted to check with you before trying it.

----------

## gorkypl

No, that advice is not correct since neither USE="polkit consolekit" nor xorg-x11 are needed for xserver to run. But it is good that you have started from scratch  :Smile: 

Your X server systems seems to be quite outdated, and I guess the rest of your system may follow it  :Wink:  Can you run 'emerge -avuDN world'?

I'd also like to see your /etc/make.conf and the output of 'emerge -pqv xorg-server' after the world update.

----------

## Mephistorium

Hello gorkypl,

Well I see what your guess is and you're right! actually I masked >x11-base/xorg-server-1.10.6-r1 in /etc/portage/package.mask to downgrade to a xorg server that would match my fglrx 12.4, but now as I'm trying to get radeon to work, I'll unmask it and do an emerve -avuDN world!

/etc/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 threads sse sse2 -acl consolekit embedded dbus pam policekit \

     udev truetype"

CFLAGS="-march=core2 -O2 -pipe"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j2"

GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/"

SYNC="rsync://rsync.fr.gentoo.org/gentoo-portage"

VIDEO_CARDS="radeon"

INPUT_DEVICES="evdev synaptics keyboard mouse"

QEMU_SOFTMMU_TARGETS="arm"

QEMU_USER_TARGETS="arm"

source /var/lib/layman/make.conf

PORTDIR_OVERLAY="/usr/local/portage $PORTDIR_OVERLAY"

PORTAGE_TMPDIR="/mnt/void"

```

EDIT:

Here's the output of emerge -pqv x11-base/xorg-server

```
[ebuild     U ] x11-base/xorg-server-1.12.2 [1.10.6-r1] USE="ipv6 nptl udev xorg -dmx -doc -kdrive -minimal (-selinux) -static-libs -tslib -xnest -xvfb"
```

----------

## gorkypl

OK, it doesn't look bad  :Smile: 

You should add 'r600' to the VIDEO_CARDS section:

```

VIDEO_CARDS="radeon r600"

```

And while we are at it, the USE flag you want in your make.conf is policykit, not policekit, you can sefely set -march=native instead of -march=core2, and you do not need keyboard and mouse in INPUT_DEVICES, but all these things are not relevant to the error you get. You can change them now or later.

Let's see what will happen after the world update... I think you should also run revdep-rebuild after it.

----------

## VoidMage

Chances are that everything was already working correctly when you've got the output with '(II) [KMS] Kernel modesetting enabled. ' line.

----------

## Mephistorium

Hello guys! I did as you've recommended

I've updated my xorg-server, and then proceeded to rebuild my drivers with

```
emerge -1 $(qlist -IC x11-drivers)
```

still I have this error (now with the 1.12.2 xorg server)

```

xauth:  file /home/mephistorium/.serverauth.10056 does not exist

X.Org X Server 1.12.2

Release Date: 2012-05-29

X Protocol Version 11, Revision 0

Build Operating System: Linux 3.2.16 x86_64 Gentoo

Current Operating System: Linux gb 3.3.8-gentoo #2 SMP Wed Jun 27 11:45:41 CET 2012 x86_64

Kernel command line: root=/dev/sda3

Build Date: 27 June 2012  04:14:57PM

 

Current version of pixman: 0.26.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: Wed Jun 27 22:44:05 2012

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

(II) [KMS] Kernel modesetting enabled.

xinit: connection to X server lost

waiting for X server to shut down Server terminated successfully (0). Closing log file.

```

----------

## BillWho

Mephistorium,

Does  Xorg.0.log or Xorg.0.log.old provide any clues   :Question: 

----------

## Mephistorium

Hi BillWho!

That is quite strange bu Xorg.0.log doesn't provide any warning or Errors (omitted some of it due to character limitation)

http://dpaste.com/764578/

----------

## BillWho

Mephistorium,

Yep, that log is a big help  - not even a warning  :Rolling Eyes: 

I might be misinterpreting the output, but it looks like it caught a power button event - that's where all the unloading started  :Question: 

```
[592.376] (II) evdev: Power Button: Close

[   592.376] (II) UnloadModule: "evdev"

```

Is there anything in ~/.xsession-errors   :Question: 

What's in ~/.xinitrc and what desktop do you run   :Question: 

----------

## VoidMage

 *Mephistorium wrote:*   

> Server terminated successfully (0). Closing log file.

 

This means there is no error - server just quits, cause there are no clients.

You're trying to fix a problem that's not really there, so have fun.

----------

## Mephistorium

Zidane Tribal or VoidMage (big FF9 fan btw) you're right, the problem is why no client is able to start? (tried with openbox and kde)

Here's a tip, just like BillWho suggested I looked at .xsession-errors and take a look here: a process genocide, there's even one who committed suicide:

```
/usr/bin/kile: error while loading shared libraries: libattica.so.0: cannot open shared object file: No such file or directory

kdeinit4: Fatal IO error: client killed

klipper: Fatal IO error: client killed

kglobalaccel: Fatal IO error: client killed

plasma-desktop: Fatal IO error: client killed

kuiserver: Fatal IO error: client killed

dolphin: Fatal IO error: client killed

synaptiks: Fatal IO error: client killed

plugin-container: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.

kmix: Fatal IO error: client killed

firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.

krunner: Fatal IO error: client killed

kaccess: Fatal IO error: client killed

kdeinit4: sending SIGHUP to children.

klauncher: Exiting on signal 1

kdeinit4: Fatal IO error: client killed

kdeinit4: sending SIGHUP to children.

kdeinit4: sending SIGTERM to children.

kdeinit4: Exit.

kded4: Fatal IO error: client killed

ksmserver: Fatal IO error: client killed

NepomukServer(2656)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:

Unexpected response from KInit (response = 6303252).

startkde: Could not start ksmserver. Check your installation.

void Akonadi::NotificationSource::serviceUnregistered(const QString&) Notification source "plasma-desktop" now serving: () 

void Akonadi::NotificationSource::unsubscribe() "plasma-desktop" 

Control process died, committing suicide!

terminating service threads 

kdeinit4: sending SIGTERM to children.

kdeinit4: Exit.

kwin: Fatal IO error: client killed

D-Bus session bus went down - quitting

terminating connection threads 

stopping db process 

D-Bus session bus went down - quitting

Application 'akonadiserver' exited normally...
```

Maybe you guys came across this before  :Smile: 

----------

## BillWho

WOW, killings and suicides   :Exclamation:   Sounds like a regular night in the ghetto   :Laughing: 

Well, at least there's a clue as to what's going on. Did you try a revdep-rebuild  :Question: 

I don't use kde so I can't be of much help with it, but maybe reemerging it would cure its ills   :Confused: 

Hopefully a knowledgeable kde user can chime in with suggestions   :Smile: 

Good luck   :Wink: 

----------

## DirtyHairy

If KDE worked before you switched driver, it might be a window manager (compositing?) setting which is playing badly with the new drivers. Try moving away your .kde4 directory; if it works without it (generating a new one), you know that it's somewehere in your settings, and you can start to look more closely at .kde4/share/config .

----------

## Mephistorium

Hello again!

problem solved! and here's how if anyone comes across this:

First I have openbox installed so I added "

```
exec openbox-session
```

" to  ~/.xinitrc and when I typed "startx" it worked this time.

In order to fix kde, I had to modify the /etc/conf.d/xdm and change the value of "DISPLAYMANAGER" from "xdm" to "kdm"

and then added xdm to the default runlevel 

```
rc-update add xdm default
```

BillWho, gorkypl, VoidMage and DirtyHairy, thank you very much for yout time and patience!

----------

