# kernel config Radeon RS780 KMS setting ? [Solved]

## wrc1944

In Graphics support-->Direct rendering manager->ATI Radeon, there's a box for modesetting on  radeon by default-NEW DRIVER.

 *Quote:*   

> Enable modesetting on radeon by default - NEW DRIVER (DRM_RADEON_KMS)
> 
> CONFIG_DRM_RADEON_KMS:
> 
> Choose this option if you want kernel modesetting enabled by default.
> ...

 

Since I'm using ATI Radeon HD 3300 (RS780), I haven't been checking that KSM box, and dmesg reports (as expected) 

```
[drm] Initialized drm 1.1.0 20060810

[drm] radeon defaulting to userspace modesetting.

pci 0000:01:05.0: setting latency timer to 64

[drm] Initialized radeon 1.33.0 20080528 for 0000:01:05.0 on minor 0

[drm] Setting GART location based on new memory map

[drm] Loading RS780 CP Microcode

platform r600_cp.0: firmware: requesting radeon/RS780_pfp.bin

platform r600_cp.0: firmware: requesting radeon/RS780_me.bin

[drm] Resetting GPU

[drm] writeback test succeeded in 1 usecs

[drm] Resetting GPU

[drm] Setting GART location based on new memory map

[drm] Loading RS780 CP Microcode

platform r600_cp.0: firmware: requesting radeon/RS780_pfp.bin

platform r600_cp.0: firmware: requesting radeon/RS780_me.bin

[drm] Resetting GPU

[drm] writeback test succeeded in 1 usecs
```

Among others, I'm using latest kernel 2.6.34.1-ck1 (I renamed and edited the 2.6.34-ck1 patch to 2.6.34.1, and manually fixed one little mm/filemap.c reject).  Seems to work fine.

Anyway, I'm wondering since 2.6.34.1 had some radeon udates if I can now try enabling KMS with this hardware.

Is there any info on this, like if/when the kernel will support RS780/KMS, or if there's a patch?  I looked on the LWN patches page, and didn't find one, but that doesn't mean there isn't one out there somewhere.   :Wink: 

----------

## VoidMage

My radeon is bit too old to need it, but yours might need x11-drivers/radeon-ucode.

----------

## wrc1944

VoidMage,

Thanks!  I didn't even know radeon-ucode existed.   :Rolling Eyes:    Googled it, and there's lots of info I'll need to read up on first.

The http://en.gentoo-wiki.com/wiki/Radeon page seems to infer you don't substitute radeon-ucode for xf86-video-ati, but that they work together.

Not sure on any of this yet- must be pretty simple though.

Any tips/insights on usage?  Do I need to add it to make.config along with "radeon," or is it just an "emerge x11-drivers/radeon-ucode," and the ati driver uses the microcode automatically- no configuration needed?

The Wiki article says:  *Quote:*   

> If you use a kernel version of >=2.6.33 and have a R6XX, R7XX or Evergreen card you'll also need the microcode provided by: 
> 
> x11-drivers/radeon-ucode. 
> 
> Make sure that you read the post-build instructions about which extra kernel options you need.

 

This applies to me, so I guess all will be explained after emerging it.

----------

## maltinator

I've been using KMS for some time on a HD4350(RV710)/HD4200(RV620) for some time and it works fine with recent kernel and X. I didn't know about the ucode package but I put some files manually in /lib/firmware. So radeon-ucode is just a more convenient way to do that. You're kernel should automatically look for the requiered files when loading the radeon module. 

So: enable KMS emerge radeon-ucode and everything should work.

malte

----------

## wrc1944

Thanks guys,

I did so, and now have KMS working on both ~x86 and ~amd64 Gentoo install, and my ~amd64 Arch Linux installation.

While KMS did seem to resolve some serious X crashes when restoring a minimized window while using >=xorg-server-1.8.1, it's intoduced one minor annoyance.

When booting, the console font is at first normal size, but then at the loading udev stage it resets to a very, very small unreadable font. I assume it's the default 8x16, but rendered by KMS at the "native" 1600x1200@70 resolution of my old crt Gateway ev910 monitor.  Once X starts, everything is back to normal.

I've read up on this, and it's a known result, and you must disable all other frame buffer devices and then can't specify on the grub.conf kernel line the desired console font size anymore with KMS enabled.

I've tried using other fonts from the /etc/conf.d/CONSOLEFONT= file, including terminus (largest sizes), with mixed results- still very unsatifactory for my old eyes.

The ter-132n or ter-132b font seemed the best (still very small in 1600x1200) but if I could get it in "bold" I could at least barely read it.

Is there a switch/workaround or some other setting to add that forces a bold console font? 

Otherwise, I don't know what I was expecting out of KMS (other than hopefully a little performance boost, and the ability to use xorg-server-1.8.1.902), but if anything, it seems slightly less responsive in general than without KMS enabled.  But my dmesg and Xorg.0.log output sure looks great!   :Laughing: 

Any feedback/experiences/tips on KMS usage and results?  

Currently I'm using kernels 2.6.34-ck1 and 2.6.35-rc4.

----------

## VoidMage

AFAIK, console font size is based on resolution, not the other way around (or rather it's only as big as the font is

- in pixels).

You may try your chances with 'video=' kernel option.

A noticeable that I've seen on an earlier radeon was a minor (but significant) performance gain

in firefox and faster switching to/from console. Perhaps with time gallium will offer a bit more.

----------

## wrc1944

From what I read on this, and if I understood correctly, at present when KMS is enabled,  your console font size will be set by your native monitor resolution.  So far, that seems the case on my systems.  I guess the (any?) grub.conf kernel line option no longer works because vesa, vga, radeon FB's must be disabled for KMS to function correctly?  Not sure on all this....   :Confused: 

----------

## VoidMage

 *wrc1944 wrote:*   

> because vesa, vga, radeon FB's must be disabled for KMS to function correctly

 

...however 'video=' is neither of those. See kernel docs.

Granted, I haven't tested it myself, but IIRC I've seen such hint about intel and

the part that matters (CONSOLE_FB) is the same.

----------

## wrc1944

Thanks VoidMage,

I'll give that a try, and read the kernel docs again- haven't done so in a while.   :Rolling Eyes: 

Will post back if it works out, or if it doesn't.

----------

## wrc1944

VoidMage,

Many thanks for pointing me towards the solution!   :Very Happy: 

After reading the kernel FB doc again, I re-read http://en.gentoo-wiki.com/wiki/Framebuffer and I apparently had missed this section:  *Quote:*   

> With Kernel Mode Setting
> 
> Forcing a Resolution
> 
> If you get a black screen instead of console or an incorrect resolution, you can force a resolution on the kernel command-line. This tends to happen when KMS auto detection fails with rare/incorrect EDID from the monitor.
> ...

 

So I edited my grub.conf like this:  *Quote:*   

> title Gentoo Linux 2.6.34-ck1 KMS-enabled  amd64
> 
> root (hd0,11)
> 
> kernel /boot/2.6.34-ck1 root=/dev/sda12 video=1024x768-24@75 

 

and now it's a nice readable size using the terminus font I specified in /etc/conf.d/consolefont.  Great!   :Very Happy:   My dmesg  output still reports KMS enabled by default, after booting into X/kde-4.4.5 it's back at my native 1600x1200@70,  and all seems normal.  

Thanks again!.  

Hope this helps others when they adopt KMS, which supposedly is heading toward default status at some point. Maybe this will be addressed automatically in the KMS code, but if not at least a mention about maybe having to set the video= grub.conf kernel line in the kernel config KMS item.  Took me a few hours to figure this out (of course I stupidly missed that section in the Gentoo KMS guide, thus it was my own fault)   :Embarassed: 

----------

## tipp98

Pardon my "solved" bump, but I am trying to get this working with a 2.6.37 kernel. Seems it should be easy by now. I have an RS780 (HD3200) in an HP laptop purchased as a tx2000z, bios says its a tx2500. Anyway, when the radeon module is loaded the screen goes black. The following is what I use as a boot command.

```
kernel /boot/fbImage root=/dev/sda9 radeon.modeset=1 video=1280x800-24@60 softlevel=console
```

Actually, with my current kernel config it doesn't load automatically anymore, I've tried so many different config methods my head is spinning. Nevertheless, if I modprobe radeon the screen goes black and I get the following dmesg output

```
[drm] Initialized drm 1.1.0 20060810

[drm] radeon kernel modesetting enabled.

radeon 0000:01:05.0: power state changed by ACPI to D0

radeon 0000:01:05.0: power state changed by ACPI to D0

radeon 0000:01:05.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18

radeon 0000:01:05.0: setting latency timer to 64

[drm] initializing kernel modesetting (RS780 0x1002:0x9612).

[drm] register mmio base: 0xD2300000

[drm] register mmio size: 65536

ATOM BIOS: HP_Soyuz20

radeon 0000:01:05.0: VRAM: 320M 0x00000000C0000000 - 0x00000000D3FFFFFF (320M used)

radeon 0000:01:05.0: GTT: 512M 0x00000000A0000000 - 0x00000000BFFFFFFF

[drm] Detected VRAM RAM=320M, BAR=256M

[drm] RAM width 32bits DDR

[TTM] Zone  kernel: Available graphics memory: 1412284 kiB.

[TTM] Initializing pool allocator.

[drm] radeon: 320M of VRAM memory ready

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

[drm] radeon: irq initialized.

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

[drm] Loading RS780 Microcode

radeon 0000:01:05.0: WB enabled

[drm] ring test succeeded in 1 usecs

[drm] radeon: ib pool ready.

[drm] ib test succeeded in 0 usecs

[drm] Enabling audio support

[drm] Radeon Display Connectors

[drm] Connector 0:

[drm]   VGA

[drm]   DDC: 0x7e40 0x7e40 0x7e44 0x7e44 0x7e48 0x7e48 0x7e4c 0x7e4c

[drm]   Encoders:

[drm]     CRT1: INTERNAL_KLDSCP_DAC1

[drm] Connector 1:

[drm]   DIN

[drm]   Encoders:

[drm]     TV1: INTERNAL_KLDSCP_DAC1

[drm] Connector 2:

[drm]   LVDS

[drm]   DDC: 0x7e50 0x7e50 0x7e54 0x7e54 0x7e58 0x7e58 0x7e5c 0x7e5c

[drm]   Encoders:

[drm]     LCD1: INTERNAL_KLDSCP_LVTMA

[drm] radeon: power management initialized

[drm] fb mappable at 0xC0141000

[drm] vram apper at 0xC0000000

[drm] size 4096000

[drm] fb depth is 24

[drm]    pitch is 5120

fb0: radeondrmfb frame buffer device

drm: registered panic notifier

[drm] Initialized radeon 2.7.0 20080528 for 0000:01:05.0 on minor 0

```

I have radeon-ucode installed but see no reference to it in the dmesg. I did notice that it is included in the kernel tree @ firmware/radeon. Maybe the ucode is no longer needed externally?...

So my question for you wrc is could you post your kernel config?

And questions for anyone else in the know,

1) Do I really need to build the binary blobs into the kernel like the wiki suggests, or can I build everything as a module?

2) I see there are 3 connectors CRT, TV, & LCD. Is it the case that my stuff is just being sent to the wrong place?

Thanks, 

Kyle

----------

## tipp98

Just realized everything worked in my fedora install using the 2.6.35 kernel. Pulled that config from the /boot directory and and ran make oldnoconfig and viola, it works. I took a quick peak to see what I might have done wrong and the only thing that stood out was that I never had a vesa fb compiled. 

On a separate note, I guess I was blind and according to my old dmesg it was loading the microcode. Oh well, works now.

----------

## wrc1944

FWIW, here's my Gentoo 2.6.37 grub stanza (works on several xf86 and amd64 installs, with radeon HD3300 and HD4670 GPUs). 

```
title=[2.6.37-ck1 KMS-enabled Gentoo kde-4.5.5]

root (hd0,0)

kernel /boot/2.6.37-ck1 root=/dev/sda3 video=1280x1024-24@75 rootflags=commit=5
```

I have these enabled in my kernel config:

# Graphics support

#

CONFIG_DRM=m

CONFIG_DRM_KMS_HELPER=m

CONFIG_DRM_TTM=m

CONFIG_DRM_RADEON=m

But especially this one, for defaulting to KMS>

CONFIG_DRM_RADEON_KMS=y

From make xconfig. under Direct Rendering Manager-> ATI Radeon:

 *Quote:*   

> Enable modesetting on radeon by default - NEW DRIVER (DRM_RADEON_KMS)
> 
> CONFIG_DRM_RADEON_KMS:
> 
> Choose this option if you want kernel modesetting enabled by default.
> ...

 

My relevant dmesg output: 

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

[drm] radeon kernel modesetting enabled.

radeon 0000:01:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18

radeon 0000:01:00.0: setting latency timer to 64

[drm] initializing kernel modesetting (RV730 0x1002:0x9490).

[drm] register mmio base: 0xFE9F0000

[drm] register mmio size: 65536

ATOM BIOS: RV730XT

radeon 0000:01:00.0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used)

radeon 0000:01:00.0: GTT: 512M 0x0000000040000000 - 0x000000005FFFFFFF

[drm] Detected VRAM RAM=1024M, BAR=256Mfirewire_core: created device fw0: GUID 008f1300ef220600, S400

hda_codec: ALC889A: BIOS auto-probing.

radeon 0000:01:00.0: WB enabled

[drm] ring test succeeded in 1 usecs

[drm] radeon: ib pool ready.

[drm] ib test succeeded in 0 usecs

[drm] Enabling audio support

failed to evaluate ATIF got AE_BAD_PARAMETER

[drm] Radeon Display Connectors

[drm] Connector 0:

[drm]   HDMI-A

[drm]   HPD2

[drm]   DDC: 0x7f10 0x7f10 0x7f14 0x7f14 0x7f18 0x7f18 0x7f1c 0x7f1c

[drm]   Encoders:

[drm]     DFP2: INTERNAL_UNIPHY1[drm] radeon defaulting to kernel modesetting.

[drm] radeon kernel modesetting enabled.

radeon 0000:01:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18

radeon 0000:01:00.0: setting latency timer to 64

[drm] initializing kernel modesetting (RV730 0x1002:0x9490).

[drm] register mmio base: 0xFE9F0000

[drm] register mmio size: 65536

ATOM BIOS: RV730XT

radeon 0000:01:00.0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used)

radeon 0000:01:00.0: GTT: 512M 0x0000000040000000 - 0x000000005FFFFFFF

[drm] Detected VRAM RAM=1024M, BAR=256M

[drm] RAM width 128bits DDR

[TTM] Zone  kernel: Available graphics memory: 418288 kiB.

[TTM] Zone highmem: Available graphics memory: 4155732 kiB.

[TTM] Initializing pool allocator.

[drm] radeon: 1024M of VRAM memory ready

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

[drm] radeon: irq initialized.

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

[drm] Loading RV730 Microcode
```

----------

## tipp98

cool, thanks for the reply

----------

