# Radeon HD 6770 problems trying to get it to work

## AbsoluteZ3r0

Hello,

I have been following the ati and various other documentation pages and have been trying to get my graphics card to work with all Open Source software.

The exact name of what I have is: MSI r6770-md1gd5 radeon HD 6770

I have been following the KMS guide, then moved on to the ati opensource guide and thats where I got to the issues.

I typed in

```
X -configure
```

and my screen went black.

So I'm not sure what happened.

Can someone give me any guidance please, I'm really lost.

If I restart the computer it seems that it reverts back as I can then type in startx and get back to my desktop.

Thank you for your help ahead of time,

Abs0

----------

## NeddySeagoon

AbsoluteZ3r0,

With all open source drivers, you don't need an xorg.conf to get you going.

If you are happy with a USA keyboard and right handed mouse, you don't need an xorg.conf at all.

If you do have an xorg.conf somewhere, rename it to say xorg.conf_broken, on the off chance you might need it again.

Now, as a normal user run startx.  Xorg should just work.

If you are nervous, run 

```
startx &; sleep 20 && killall X
```

this kills X after 20 seconds in case it doesn't work.

If you are still having problems, make friends with wgetpaste and do 

```
wgetpaste /var/log/Xorg.0.log
```

and tell us the URL, so we can see what Xorg actually did when it started.

----------

## Kaso_da_Zmok

my guess is that the ati firmware might not be kosher. 

post your kernel config to pastebin for review.

----------

## AbsoluteZ3r0

 *Quote:*   

> If you do have an xorg.conf somewhere, rename it to say xorg.conf_broken, on the off chance you might need it again.  

 

Ok, I went into /etc and found that there was no xorg.conf but I still tried:

```
startx &; sleep 20 && killall X
```

and it came up fine. Which makes me wonder, have I been on the right track this entire time?

I ended up doing wgetpaste just-in-case there was an issue I was missing. Here is the link:

http://paste.pocoo.org/show/576232/

--Some other info I forgot to add (not sure if it matters or not) but I was trying to get dual screens to work off of it. When I was going through everything the link had in it above, it kept relaying something about VGA. The monitor that is connected through to the graphics card with the VGA connection and is actually off because I just get a duplicate(clone)of the DVI monitor I am currently viewing everything from.

--Also (not sure if this matters, but I thought I should add it just in case) I originally tried to install Openbox to work with as a gui but had some issues so I opted for xfce instead. I wasn't sure if any of the files I was messing with prior to changing to xfce effected any of the graphics files that corresponded with the graphics card its self.

Thank you all very much for the time you have taken thus far to help me, it is appreciated   :Smile: 

Thank you,

Abs0

----------

## NeddySeagoon

AbsoluteZ3r0,

The modesetting not being suppoted is worth poking at.  Do you have Kernel Moesetting enabled in your your kernel? 

```
[   927.637] (--) using VT number 7

[   927.641] (II) Loading /usr/lib64/xorg/modules/drivers/radeon_drv.so

[   927.641] (II) [KMS] drm report modesetting isn't supported.

[   927.641] (II) RADEON(0): TOTO SAYS 00000000fea20000
```

Your two (EE) lines about being unabale to load modules are to be expected. Xorg tries all of the open source drivers.

You will need an xorg.conf for a multi display set up as you must describe how your displays are arramged.

Now you have Xorg working normally, write it a minimal xorg.conf that works without doing Xorg any damage. You will need the following sections

Section "Monitor"

Section "Device"

Section "Screen"

Section "ServerLayout"

Once you have a single display xorg.conf, you can add more displays to it. 

```
man xorg.conf
```

is excellent reading.

----------

## AbsoluteZ3r0

I started looking around to check if I did have KMS enabled in my kernel and found that it looked like I hadn't so I followed (for anyone in the future reading this thread)

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

I set it up as a module and then went on my way to try and find "[ ] Enable PCI quirk workarounds" in the "General setup" tab that it tells to activate. This is where I reached an issue, I couldn't find it. I thought that it might not be a problem if it wasn't there so I continued further down the page to the part where it tells to 

```
modprobe radeon modeset=1
```

And this is where another issue came up.

Its a bit long but this is how the first error part comes up:

```
WARNING: Error inserting cfbimgblt (/lib/modules/3.2.1-gentoo-r2/kernel/drivers/video/cfbimgblt.ko): Invalid modules format
```

The "Invalid modules format" was at the end of all of the other errors that follow it.

I'm a bit confused on what exactly is happening now. When executing "startx" I still get xfce to come up and can still do everything I had done before. Did I get KMS set? I'm imagining I didn't but I'm just not sure...

----------

## BillWho

AbsoluteZ3r0,

 *Quote:*   

> Did I get KMS set?

 

Check it with:

```
grep "CONFIG_DRM_RADEON_KMS\|CONFIG_DRM_RADEON\|CONFIG_DRM" /usr/src/linux/.config
```

If it returns # CONFIG_DRM is not set then no  :Sad: 

----------

## NeddySeagoon

AbsoluteZ3r0,

```
Invalid modules format
```

has several causes.

a gcc upgrade between the last build of your kernel and this one - the kernel won't work if parts are built with different versions of gcc.

you messed up installing either the kernel, or its modules - so you have a mismatch between the kernel you are running and the modules you are trying to load.

mod-init-tools is broken.  This ould affect all modules, no matter how they were loaded.  If 

```
lsmod
```

 lists any modules at all, this can be ruled out.

Look at the output of 

```
uname -a
```

 The date/time is the build date of the running kernel.  Does that look right?

If not, you messed up the kernel install into /boot. Repeat that step.

To fix the gcc issue, rebuild and reinstall your kernel starting with 

```
cd /usr/src/linux

make clean
```

Hmm, I suppose your /usr/src/linuc symlink is pointing to the kernel you think its is?

Compare 

```
uname -r 
```

and readlink 

```
/usr/src/linux
```

----------

## AbsoluteZ3r0

Billwho,

This is what I got once I typed in

```
grep "CONFIG_DRM_RADEON_KMS\|CONFIG_DRM_RADEON\|CONFIG_DRM" /usr/src/linux/.config
```

```
CONFIG_DRM=y

CONFIG_DRM_KMS_HELPER=m

CONFIG_DRM_TTM=m

# CONFIG_DRM_TDFX is not set

# CONFIG_DRM_R128 is not set

CONFIG_DRM_RADEON=m

CONFIG_DRM_RADEON_KMS=y

# CONFIG_DRM_I810 is not set

# CONFIG_DRM_I915 is not set

# CONFIG_DRM_MGA is not set

# CONFIG_DRM_SIS is not set

# CONFIG_DRM_VIA is not set

# CONFIG_DRM_SAVAGE is not set

# CONFIG_DRM_VMWGFX is not set

```

I am not completely sure on what this is saying but I think I'm reading it as my Radeon is loading as a module and it is set for KMS. Is there validity to this?

NeddySeagoon,

There was a lot of output from lsmod so I went on to the next part.

uname -a does look right for when I did initial compiling.

I went on then to the next part with 'make clean' and all of this came out with no errors or problems.

When typing in 'uname -r' I get: 3.2.1-gentoo-r2

And from the readlink I get: linux-3.2.12-gentoo

Does this mean my graphics card is ready (from the output above)? Or is there more work to be done?

Thank you both,

Abs0

----------

## NeddySeagoon

AbsoluteZ3r0,

If readlink returns 

```
linux-3.2.12-gentoo 
```

then thats the kernel you build, and search when you do cd /usr/src/linux.

This is not the same kernel as you are running as 'uname -r' shows 3.2.1-gentoo-r2 

If you used BillWhos 

```
grep "CONFIG_DRM_RADEON_KMS\|CONFIG_DRM_RADEON\|CONFIG_DRM" /usr/src/linux/.config
```

then that looks in your linux-3.2.12-gentoo kernel, which we have established is not the running kernel.  It looks good.  You just need to install it and boot into it to test.

We don't know what is in your running kernel so we can't tell if its right or not.  If you have .config support in your kernel,

```
zgrep "CONFIG_DRM_RADEON_KMS\|CONFIG_DRM_RADEON\|CONFIG_DRM" /proc/config.gz
```

 will tell about your runnig kernel.

We have extablished that you are not running the kernel you are building though.

----------

## AbsoluteZ3r0

Ok,

(Please bare with me for a moment as I try to understand this.   :Very Happy:   )

--What I am understanding is that when I turn on my computer and go through LILO, that it is looking for a certain kernel.

The problem is that when it is trying to boot this specified kernel it can't, so it runs the other one.

The way to fix this problem is to go through and change which kernel I am actually building so that everything else will work.

--

Is this right? Sorry, I'm just trying to visualize it.

To try and fix this problem (how I understand it, as above) I went and changed the kernel with

```
eselect kernel list
```

and changed which one it was on.

Did I do it right?

Thank you again for all of your help thus far with helping me.   :Very Happy: 

----------

## NeddySeagoon

AbsoluteZ3r0,

Oh dear - lilo.  With lilo, its not a simple as you make out.

By default, you build your kernels in /usr/src/linux.  Thats just a symlink to the real kernel so that packages that need to find a kernel to build against don't need to know the kernel version number.

Pointing the symlink at the 'right' kernel is a user problem.  Indeed if you don't run any packages that build kernel modules, you don't need the symlink at all.

So strictly spealing your build the kernel in /usr/src/<somekernel>

Once its built, you install the modles.  

```
make modules_install
```

 does that.  The modules are installed into /lib/modules/`uname -r`/  to keep modes with the same name but for different kernels separate. Do you have modules installed for 3.2.12 ?

That would show that you did build and install the kernel modules, which would be a good thing.

Do you have a separate /boot partition or is /boot just a directory on your (root) / flilesystem?

It matters because /boot (the partition) is not mounted by default. This means that when the kernel binary file is copied to /boot it will go to the wrong place. It will go into the mount point for /boot.

Thats not an error.

If you have separate /boot partition, 

```
ls /boot 
```

should show nothing until you run 

```
mount /boot
```

now all of your kernels will appear and lilos files too.

If you have a separate  /boot, do that check.  Don't delete anything yet though.

Once you get the right kernel into the right place, you have to tell lilo about it.  This normally means editing /etc/lilo.conf and running /sbin/lilo.

When you run /sbin/lilo lilo reads its config file and makes up block lists for all the kernels it finds there. These block lists are used at boot time.

When you boot using lilo, it blindly loads the disk blocks it made a list for when you ran /sbin/lilo last, and just hopes that the kernel is still there.

If you update a kernel and don't run /sbin/lilo, lilo won't know that the kernel is moved.  It will still load the blocklist it had.  The space will be marked free in the filesystem but its not erased, so most of the time it still works.  When some of the space gets reused and you still haven't run /sbin/lilo, things get ugly as the kernel lilo is now trying to load has been destroyed.

Check your /boot,  check your /etc/lilo.conf and run /sbin/lilo anyway.

----------

## AbsoluteZ3r0

Ahhhh alright now I'm getting it!

Yeah running

```
ls boot
```

gives me

```
System.map-genkernel-x86_64-3.2.1-gentoo-r2

boot.0800

initramfs-genkernel-x86_64-3.2.1-gentoo-r2

kernel-genkernel-x86_64-3.2.1-gentoo-r2

map
```

And then I did

```
mount /boot
```

just to see what it would tell me and it gave me

```
mount: special device /dev/BOOT does not exist
```

Then looking into /sbin/lilo

I get what looks to be a corrupted file. I have solid white rectangles and '^' '@' '$' and other various characters all over the file.

Running /sbin/lilo I get:

```
Warning: LBA32 addressing assumed

Added gentoo *

One warning was issued.
```

I was wondering, would it be much of a hassle for me to emerge grub and switch it with lilo for my boot loader?

----------

## BillWho

AbsoluteZ3r0,

 *Quote:*   

> I was wondering, would it be much of a hassle for me to emerge grub and switch it with lilo for my boot loader?

 

I would strongly recommend it   :Exclamation:   Just follow the grub installation instructions in the handbook and you'll be fine.  

 *Quote:*   

> To try and fix this problem (how I understand it, as above) I went and changed the kernel with
> 
> Code:
> 
> eselect kernel list
> ...

 

Just to clarify the eselect from your last post:

eselect list will just list the installed kernel sources - here's mine:

```
root@gentoo-gateway local.d # eselect kernel list

Available kernel symlink targets:

  [1]   linux-3.3-rc7

  [2]   linux-3.3.0-gentoo

  [3]   linux-3.3.1-gentoo

  [4]   linux-3.4-rc1

  [5]   linux-3.4-rc2 *

```

Notice the '*' on the last line. I just tried to build this, but x11-drivers/ati-drivers failed to compile so I can't use it.

To set the kernel to the one I'm running now which is  3.3.0-rc7 I would enter

```
 eselect kernel set 2
```

Now if I run eselect kernel list I get:

```
root@gentoo-gateway local.d # eselect kernel list

Available kernel symlink targets:

  [1]   linux-3.3-rc7

  [2]   linux-3.3.0-gentoo *

  [3]   linux-3.3.1-gentoo

  [4]   linux-3.4-rc1

  [5]   linux-3.4-rc2

```

Hope that helps   :Wink: 

----------

## NeddySeagoon

AbsoluteZ3r0,

```
mount: special device /dev/BOOT does not exist
```

tells that your /etc/fstab is a bitt odd.

You either don't have a separate boot partition or if you do, you are not using it.

```
initramfs-genkernel-x86_64-3.2.1-gentoo-r2 

kernel-genkernel-x86_64-3.2.1-gentoo-r2
```

shows a single kernel and initrd in /boot along with some odds and ends of lilo.

Thats clearly not the kernel you are booting.

So, either, you real kernel has been deleted from the filesystem but lilo will keep loading it anyway (until the space where it was is reallocated), or its on the real /boot partition, which you can't show us yet.

Please post 

```
fdisk -l
```

and /etc/fstab.  Tell us what each of your partitions is for. 

Looking into /sbin/lilo, isn't very useful its a binary file, that is, its the output of gcc.  If you want to see what goes into it, look in /usr/portage/distfiles/lilo*

looking into /etc/lilo.conf is more useful - that tells you how lilo is configures and where and what kernels it will look for. 

The warning is harmless ... hmm

```
 LBA32 addressing assumed
```

means lilo can only address the first 137G of you drive ... that may or may not be a bad thing.

The message does not say which kernel lilo set up for but /etc/lilo.conf will tell us that.

Switching to grub won't solve your runinning one kernel and building another kernel issue directly.  Once we do solve it, it will be easier to stop it recurring.

By all means switch but fix this problem first.  If you do change to grub and you stillhave this issue, we won't know why.  Thats a complication we can do without.

----------

## AbsoluteZ3r0

Sorry about not responding for a couple of days, I have had a bunch of tests.

I will not be able to get back to gentoo until later this weekend but I will be getting to it   :Very Happy: 

Thanks again for all of your help so far   :Very Happy: 

----------

## NeddySeagoon

AbsoluteZ3r0,

Gentoo is a hobby for everyone involved. Real life comes first for everyone.

----------

## AbsoluteZ3r0

Thank you for your understanding   :Very Happy: 

I typed in fdisk -l and came up with this:

```
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda : 2000.4 GB, 2000398934016 bytes

255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optional): 512 bytes / 512 bytes

Disk identifier: 0x2181f459

Device  Boot                Start                  End               Blocks               Id            System

/dev/sda1                         1     3907029167     1953514583+               ee            GPT
```

/etc/lilo.conf has in it:

```
boot = /dev/sda

prompt

timeout=50

default=gentoo

image=/boot/kernel-genkernel-x86_64-3.2.1-gentoo-r2

 label=gentoo

 read-only

 append="real_root=/dev/sda3"

 initrd=/boot/initramfs-genkernel-x86_64-3.2.1-gentoo-r2
```

----------

## BillWho

AbsoluteZ3r0,

I think I see a glaring problem here  :Exclamation: 

This is your fdisk output:

```
Device  Boot                Start                  End               Blocks               Id            System

/dev/sda1                         1     3907029167     1953514583+               ee            GPT
```

and this is from lilo.conf

```
append="real_root=/dev/sda3" 
```

There's no device /dev/sda3 so the first change would be to set "real_root=/dev/sda1" in lilo.conf.

The reason you're getting 

```
mount: special device /dev/BOOT does not exist
```

is because you don't have a boot partition to mount. Your entire installation is on one partition - /dev/sda1

If you had seperate partition for '/' /boot and /home it would look like this with the blkid command:

```
root@gentoo-gateway linux # blkid|grep gentoo

/dev/sdb1: LABEL="gentoo-boot" UUID="1a808cff-31af-4036-8fa7-380098554f71" TYPE="ext2" 

/dev/sdb14: LABEL="gentoo-root" UUID="b3bfd853-2f66-4946-9a08-428af6f50ba1" TYPE="ext3" 

/dev/sdb15: LABEL="gentoo-home" UUID="13f4d129-3ae3-4ede-813d-0fa36b818332" TYPE="ext4" 

```

I labeled the partition so I know what's what, that's not done automatically   :Smile: 

I noticed that you don't have a swap partition either, but we'll leave that for a later time.

Hopefully this will help clear a couple of things up for you   :Wink: 

----------

## NeddySeagoon

BillWho,

Close but no cigar ...

```
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted. 

/dev/sda1                         1     3907029167     1953514583+               ee            GPT
```

The above shows the protective MSDOS partition table on a device with a GPT partition table.  In this case fdisk shows nothing realated to the partitions on the volume.

Its just a warning maessage and a single partition covering the entire drive, so you can't accidently use fdisk on it and trash the GPT partitions.

We need the partition listing output from parted.

I have no idea how lilo and GPT play nicely together but they must, since a kernel gets loaded.

----------

## AbsoluteZ3r0

Sorry I forgot that I had used parted, here is the output:

```
GNU Parted 3.o

Using /dev/sda

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print

Model: ATA Hitachi (scsi)

Disk /dev/sda: 2000GB

Sector size (logical/physical): 512/512B

Partition Table: gpt

Number      Start         End          Size          File system             Name        Flags

1               17.4kB      32.0MB     32.0MB      ext2                      primary

2               32.5MB     542MB       510MB       linux-swap(v1)       primary

3               542MB      2000GB      2000GB    ext4                       primary

```

How I had the partitions set up was by the way that the Gentoo Handbook went by.

The first partition was for boot.

The second was for swap.

And lastly, the third was for '/'.

----------

## AbsoluteZ3r0

 *Quote:*   

> If you had seperate partition for '/' /boot and /home it would look like this with the blkid command

 

After reading this, I have begun wondering (and tell me if I'm wrong) but isn't '/home' within '/'? What would be the uses of putting '/home' on its own partition? Is it more for a multi-user environment where disk space needs to be kept limited?

----------

