# Video card, radeon.

## caaarlos

Hello, how can I know if my system installed my video card firmware. And how can I configure it?

----------

## DONAHUE

boot cd, enter chroot, nominally:

```
mount /dev/sda3 /mnt/gentoo

mount /dev/sda1 /mnt/gentoo/boot

cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

mount -t proc none /mnt/gentoo/proc

mount -o bind /dev /mnt/gentoo/dev

chroot /mnt/gentoo /bin/bash

env-update

source /etc/profile

export PS1="(chroot) $PS1"
```

then emerge 

```
pciutils wgetpaste

lspci -k | wgetpaste

wgetpaste /usr/src/linux/.config

emerge --info | wgetpaste

wgetpaste /etc/X11/Sessions
```

and post the url's returned

lspci -k will tell you if a driver has attached to vga card.

Are you wishing to use the open source radeon driver or the manufacturer's fglrx driver? In either case

```
 emerge radeon-ucode
```

 should be run to install firmware for hd series cards.

references:

open source

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

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

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

manufacturer:

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

http://wiki.gentoo.org/wiki/Fglrx

----------

## chithanh

The radeon firmware is part of the linux-firmware and radeon-ucode packages (you need only one of these).

Once you installed the firmware, add it to CONFIG_EXTRA_FIRMWARE in your kernel configuration. The exact values are shown in the xorg-config guide linked above.

----------

## caaarlos

Thanks for the help!

caaarlos-pc linux # lspci -k | wgetpaste

Your paste can be seen here: http://bpaste.net/show/43542/

caaarlos-pc linux # wgetpaste /usr/src/linux/.config 

Your paste can be seen here: http://bpaste.net/show/43543/

caaarlos-pc linux # emerge --info | wgetpaste 

Your paste can be seen here: http://bpaste.net/show/43545/

caaarlos-pc linux # wgetpaste /etc/X11/Sessions

/usr/bin/wgetpaste: /etc/X11/Sessions No such file found.

**But I have this, 

caaarlos-pc linux # ls /etc/X11/

Sessions  chooser.sh  startDM.sh  xinit  xorg.conf

At the beginning of my instalation I installed linux firmware, it's means that my video card's driver is alright? And all I have to do is configure it using this link, "http://en.gentoo-wiki.com/wiki/Radeon" ?

----------

## DONAHUE

CONFIG_EXTRA_FIRMWARE="" tells that you have not configured the kernel to build in needed radeon firmware. The radeon driver and kms will not work without it.

http://www.gentoo.org/doc/en/xorg-config.xml is the reference for the steps below. You can build in all radeon firmware shown in the reference but lspci says your card is  RV710 [Mobility Radeon HD 4500/5100 Series] which needs only radeon/R700_rlc.bin.

boot cd, enter chroot,

```
emerge linux-firmware

cd /usr/src/linux;make menuconfig

```

edit menuconfig: *Quote:*   

> Device Drivers  --->
> 
> Generic Driver Options  --->
> 
> [*]   Include in-kernel firmware blobs in kernel binary

 

then select:  *Quote:*   

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

 

in the dialog box that appears enter:

 *Quote:*   

> radeon/R700_rlc.bin

 

enter will cause 

 *Quote:*   

>  (radeon/R700_rlc.bin) External firmware blobs to build into the kernel binary
> 
> (firmware) Firmware blobs root directory (NEW) 

 

to appear. Select

 *Quote:*   

> (firmware) Firmware blobs root directory (NEW)

 

Edit the dialog box that appears to 

 *Quote:*   

> /lib/firmware

 

enter will cause 

 *Quote:*   

> (/lib/firmware) Firmware blobs root directory

 

to appear. When the kernel is recompiled, the firmware will be buit in.

edit graphics support section of menuconfig to:

 *Quote:*   

> Graphics support  --->
> 
> <*> /dev/agpgart (AGP Support)  ---> 
> 
>  --- /dev/agpgart (AGP Support) 
> ...

 

exit menuconfig saving the configuration then recompile and recopy the kernel

```
make && make modules_install

cp arch/x86/boot/bzImage /boot/your kernel name 
```

----------

## caaarlos

Thanks DONAHUE, you give a great help!

I did all you said...

lspci -k

01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV710 [Mobility Radeon HD 4500/5100 Series]

	Subsystem: Sony Corporation Device 9077

	Kernel driver in use: radeon

Now it's allright?

----------

## DONAHUE

http://www.gentoo.org/doc/en/xorg-config.xml is still the reference

if your system is bootable, boot it, else from the chroot:

```
emerge xorg-server

env-update

source /etc/profile
```

To setup X to use an international keyboard, you just have to create the appropriate config file in /etc/X11/xorg.conf.d/. This example features a Czech keyboard layout:

Code Listing 4.3 of the reference: Using an international keyboard

```
 nano -w /etc/X11/xorg.conf.d/30-keyboard.conf
```

 *Quote:*   

> Section "InputClass"
> 
>         Identifier "keyboard-all"
> 
>         Driver "evdev"
> ...

 

The "terminate" command (terminate:ctrl_alt_bksp) lets you kill the X session by using the Ctrl-Alt-Backspace key combination. This will, however, make X exit disgracefully -- something that you might not always want. It can be useful when programs have frozen your display entirely, or when you're configuring and tweaking your Xorg environment. Be careful when killing your desktop with this key combination -- most programs really don't like it when you end them this way, and you may lose some (or all) of what you were working on.

to test:

```
X -retro
```

If you get a black and white stipple screen with a movable mouse cursor, X/xorg works. ctrl-alt-backspace to exit. with x working you are ready to emerge gnome, kde, xfce-4, or some other display manager/window manager/desktop.

----------

## caaarlos

DONAHUE you are a great teacher!!

My system is bootable, I installed xorg and xfce. Now I want to know if my system is really using my video card. When I used the Ubuntu, there was a program that I could configure my video card. Gentoo has one program like that?

----------

## DONAHUE

not sure exactly what you are asking for

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

 *Quote:*   

> 3.  Configuring Xorg
> 
> The X server is designed to work out-of-the-box, with no need to manually edit Xorg's configuration files. It should detect and configure devices such as displays, keyboards, and mice.
> 
> You should first try starting X without editing any configuration files. If Xorg won't start, or there's some other problem, then you'll need to manually configure Xorg as shown in the next section.
> ...

 

Has X -retro proved X runs?

Have you started xfce4?

If so, you are configured.

If you can identify the program you had in ubuntu, you likely can install it in gentoo.

----------

## caaarlos

One programa like this...

http://thiagonalli.files.wordpress.com/2012/07/captura-de-tela-de-2012-07-18-015903.png

----------

## DONAHUE

that is part of the manufacturers closed source drivers called by amd/ati catalyst and known in linux as fglrx.

To change to catalyst is not hard but will involve changes to the kernel configuration and make.conf

references:

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

http://wiki.gentoo.org/wiki/Fglrx

if you wish:

boot to CLI (terminal)

```
cd /usr/src/linux;make menuconfig 
```

edit menuconfig: *Quote:*   

> Device Drivers ---> 
> 
> Generic Driver Options ---> 
> 
> [ ] Include in-kernel firmware blobs in kernel binary

 

then select: *Quote:*   

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

 in the dialog box that appears delete:  *Quote:*   

> radeon/R700_rlc.bin

 

enter will cause: *Quote:*   

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

 to appear and  *Quote:*   

> (/lib/firmware) Firmware blobs root directory

 to disappear.

edit graphics support section of menuconfig to: 

 *Quote:*   

> Graphics support ---> 
> 
> <M> /dev/agpgart (AGP Support) ---> 
> 
> --- /dev/agpgart (AGP Support) 
> ...

 

exit menuconfig saving the configuration then recompile and recopy the kernel 

```
make && make modules_install 

cp arch/x86/boot/bzImage /boot/your kernel name
```

change make.conf to VIDEO_CARDS="fglrx"

```
modprobe -r radeon

emerge --unmerge xorg-server

emerge xorg-server

modprobe -r radeon

modprobe fglrx

reboot
```

----------

## caaarlos

Thanks DONAHUE, you gave me a great help!

Sorry for delay, but I was without internet!

Now my system it's all alright! Thanks a lot!!

----------

