# [SOLVED] Setting up KMS on Radeon ATI 3450

## coletonodonnell

I successfully installed gentoo onto my system, and I realized afterwards how many mistakes I truly made in the kernel configuration, but luckily I was able to remedy those. I have a very old ATI card on this computer, my other computer had some technical difficulties so I am using this in place for a bit. This has an ATI 3450 RV620 LE, and thus I have to use radeon drivers. I set VIDEO_CARDS="radeon" in make.conf and then ran 

```
emerge --ask --changed-use --deep @world
```

 I installed sys-kernel/linux-firmware and x11-drivers/xf86-video-ati, configured Device Drivers --> Generic Driver Options --> Firmware Loader --> Build named firmware blobs into the kernel binary, set that as "radeon/R600_rlc.bin radeon/R600_uvd.bin" and left the default Firmware blobs root directory. Next, I headed back to Device Drivers, then to Graphics Support. I enabled ATI Radeon, and Enabled "Always enable userptr support." On everything I see, it says there should be "Enable modesetting on radeon by default." But there just isn't, anywhere. I can't boot into my PC without nomodeset enabled in my grub configuration, and I can't launch anything without it being in what I believe is vesa mode. I don't know If this is an issue with how I've configured it or it's an issue with how I've installed the packages, I am pretty noob to this so I can't really determine it.

Edit:

Changed title from "No Kernel Option for Radeon Modesetting" to "[SOLVED] Setting up KMS on Radeon ATI 3450"

TL;DR Solution for ATI (should work for others as well:)

Radeon modesetting was deprecated long ago, instead you must setup KMS. To do this, you must have all of your firmware installed, either modularized or installed directly to the kernel. To setup KMS, follow this wiki entry. Once you do that, either modularize your drivers, or build them directly into the kernel. If you choose the latter option, in my case this is what I had to use:

```
Device Drivers  --->

  Generic Driver Options  --->

    Firmware loader --->

       -*- Firmware loading facility

       (radeon/R600_rlc.bin radeon/R600_uvd.bin radeon/RV620_pfp.bin radeon/RV620_me.bin) Build named firmware blobs into the kernel binary

       (/lib/firmware) Firmware blobs root directory

```

Obviously, that doesn't work for everyone, you can check your dmesg for any drivers you may need to manually add. From there, if you are sure all of the necessary blobs are added, and you still can't boot into your console, see this for a possible solution. Thanks to Buffoon for their help with this!Last edited by coletonodonnell on Sat Jan 02, 2021 4:29 am; edited 2 times in total

----------

## apiaio

Hi coletonodonnell

and wellcome in Gentoo forums. 

Have you installed xorg-server? And please try set in make.conf

```
VIDEO_CARDS="radeon radeonsi"
```

----------

## Buffoon

coletonodonnell,

I believe since KMS is no longer optional it is always on. The guides you are referring to may be slightly outdated.

----------

## coletonodonnell

 *apiaio wrote:*   

> Hi coletonodonnell
> 
> and wellcome in Gentoo forums. 
> 
> Have you installed xorg-server? And please try set in make.conf
> ...

 

I installed xorg-server, for good measure I rebuilt. I added radeonsi and ran:

```
emerge --ask --changed-use --deep @world
```

I rebooted, and attempted to run without nomodeset, no luck, I rebooted once more, and then checked the makemenu, and no such luck it still isn't there.

----------

## coletonodonnell

 *Buffoon wrote:*   

> coletonodonnell,
> 
> I believe since KMS is no longer optional it is always on. The guides you are referring to may be slightly outdated.

 

Interesting, that would make sense, but why does the system not boot without nomodeset?

Here is the error it throws on boot, where it freezes:

```
[drm] radeon kernel modesetting enabled.

radeon 0000:01:00.0: remove_conflicting_pci_framebuffer: bar 0: 0xe0000000 -> 0xefffffff

radeon 0000:01:00.0: remove_conflicting_pci_framebuffer: bar 2: 0xf7e2000 -> 0xf7e2ffff

fb0: switching to radeondrmfb from EFI VGA

```

I am on mobile so I typed this by hand, there may be a few mistakes but I think I did ok. The only solution I could find online for this is to set nomodeset in GRUB config, which I did, but now it's in vesa mode I think? I am not extremely familiar with how this works but I believe having nomodeset is the reason why my X server isn't using my radeon drivers for Xorg, but I might be wrong there.

----------

## Buffoon

coletonodonnell,

you sure it does not boot? Maybe it boots, you just can't see it. I'm no expert in these matters, but my suspect would be this radeon framebuffer. Try using something more generic for console.

Edit (after searching Gentoo wiki): see here https://wiki.gentoo.org/wiki/Xorg/Guide#Kernel_modesetting

 *Quote:*   

> KMS conflicts with legacy framebuffer drivers, which must remain disabled in the kernel configuration.

 

----------

## Marlo

Hello coletonodonnell,

According to the manual  https://wiki.gentoo.org/wiki/Radeon#Hardware_detection ,

you need this entry in /etc/portage/make.conf:

 *Quote:*   

> 
> 
> VIDEO_CARDS ="radeon r600"

 

Depending on what you want you have to set USE=flags.

 *Quote:*   

> 
> 
> USE="libinput libkms dri X classic dri3 egl gallium gbm gles2 llvm  opencl opengl elogind  udev  xorg"

 

These are optional and depend on the application you are working with.

 *Quote:*   

> 
> 
> USE="virtualbox vmware  ipv6 lm-sensors vaapi vdpau vulkan wayland"

 

After that you should execute: *Quote:*   

> 
> 
>  emerge -uUD @world --with-bdeps=y --complete-graph y --keep-going -av

 

Greetings

----------

## Buffoon

apiaio, Marlo

We are dealing with kernel driver right now, your posts may be helpful later when Xorg configuration comes up, make.conf settings do not affect kernel.

----------

## coletonodonnell

 *Buffoon wrote:*   

> coletonodonnell,
> 
> you sure it does not boot? Maybe it boots, you just can't see it. I'm no expert in these matters, but my suspect would be this radeon framebuffer. Try using something more generic for console.
> 
> Edit (after searching Gentoo wiki): see here https://wiki.gentoo.org/wiki/Xorg/Guide#Kernel_modesetting
> ...

 

Checked that out, disabled the frame buffer and everything, didn't work. I decided to try to modularize the ATI drivers, and it boots without nomodeset enabled. Issue is, it doesn't... look any different? I don't know how to check if I fixed anything other than just the KMS issue, if that was even fixed. Thoughts? This is my first time using a compiled distro and getting my hands dirty so I don't know what "normal" looks like, if you get what I mean.

----------

## coletonodonnell

 *Marlo wrote:*   

> Hello coletonodonnell,
> 
> According to the manual  https://wiki.gentoo.org/wiki/Radeon#Hardware_detection ,
> 
> you need this entry in /etc/portage/make.conf:
> ...

 

Thanks, now that I think the kernel has been fixed, I'll see if that helps my Xorg situation, as it looks pretty awful currently haha.

----------

## Marlo

 *coletonodonnell wrote:*   

> 
> 
> Thanks, now that I think the kernel has been fixed, ...

 

If not, you could also temporarily use our new

 *Quote:*   

> sys-kernel/gentoo-kernel

 

It works great.

After booting into the new kernel, you will see which modules you need. With some time, you can then configure your own kernel.

----------

## coletonodonnell

 *Marlo wrote:*   

>  *coletonodonnell wrote:*   
> 
> Thanks, now that I think the kernel has been fixed, ... 
> 
> If not, you could also temporarily use our new
> ...

 

How would I go about doing that? Would I just install the kernel, then check the menuconfig? Then from there, uninstall Gentoo-Kernel and then compile my own kernel using the gentoo-kernel knowledge I gained? Is there any specific commands I should use/stuff I should know for that? Thanks

----------

## Hu

This suggests to me that the monolithic kernel needs firmware that was not available in time.  When the drivers were built as modules, the driver was not available to load until after the firmware, so everything worked.  You could check the kernel log from a failed kernel for what firmware it tried and failed to load.  You could also choose to just stick with modules for your graphics driver and move on to your next issue.

----------

## coletonodonnell

 *Hu wrote:*   

> This suggests to me that the monolithic kernel needs firmware that was not available in time.  When the drivers were built as modules, the driver was not available to load until after the firmware, so everything worked.  You could check the kernel log from a failed kernel for what firmware it tried and failed to load.  You could also choose to just stick with modules for your graphics driver and move on to your next issue.

 

I believe you're right, and this poses an entirely different issue now for me. I realize now that nothing has changed, as I didn't have an initramfs setup nor had modules setup, I planned on compiling everything into the kernel, no modules. When I set it to be a module, it basically just wasn't loading at all. Now, I setup my initramfs, but now the computer refuses to display anything, though I think it's on and running. I am going to chroot into using a live disk and look at the kernel log.

----------

## Buffoon

Check also what version of kernel was running, it is easy to make a mistake and boot another kernel, not the one you just compiled and intended to boot.

 *Quote:*   

> disabled the frame buffer and everything, didn't work.

 

But you need frame buffer to see it boot, as described in wiki.

----------

## coletonodonnell

Alright, so I chroot in and take a look at my kern.log, and as you said Buffoon, it is Indeed booting it seems, just not displaying:

https://pastebin.com/cDxsEnYM

I sent this via pastebin as it is massive, and don't know the etiquette here, as that may be too large. If you do not like pastebin, I will reply to this with the output as well. I am curious to see if I boot this up once more, and plug in the VGA to the Built-In Graphics vs. the GPU, if that will have any difference. If it does I will reply. I am super stumped here.

----------

## Buffoon

```
Jan  1 23:08:32 pasta kernel: [    4.891085] fb0: switching to radeondrmfb from EFI VGA

Jan  1 23:08:32 pasta kernel: [    4.891163] Console: switching to colour dummy device 80x25

Jan  1 23:08:32 pasta kernel: [    4.891186] radeon 0000:01:00.0: vgaarb: deactivate vga console
```

This is from your log. Your kernel does load radeonfb and it conflicts and unloads. My understanding is radeon framebuffer should not be used, as described in wiki - "Disable legacy framebuffer support and enable basic console FB support"

----------

## coletonodonnell

 *Buffoon wrote:*   

> Check also what version of kernel was running, it is easy to make a mistake and boot another kernel, not the one you just compiled and intended to boot.
> 
>  *Quote:*   disabled the frame buffer and everything, didn't work. 
> 
> But you need frame buffer to see it boot, as described in wiki.

 

I think I am booting the correct kernel? There is only the one I compiled and the old kernel. I don't have gentoo-kernel installed yet, though I just might in a moment.

By that I assume you mean the ATI Radeon one? On the wiki it says:

 *Quote:*   

>          ## (Disable all drivers, including VGA, Intel, NVIDIA, and ATI, except EFI-based Framebuffer Support, only if you are using UEFI)

 

Now, after installing initramfs it won't even display anything haha. Ah this is tough but it's been rather fun making some level of progress, except now it seems to have fallen back a bit. I did miss the bit about console framebuffer support, going to check that now.

----------

## Buffoon

https://wiki.gentoo.org/wiki/Xorg/Guide#Verify_legacy_framebuffer_drivers_have_been_disabled

You do not need initramfs, not at all.

----------

## coletonodonnell

 *Buffoon wrote:*   

> https://wiki.gentoo.org/wiki/Xorg/Guide#Verify_legacy_framebuffer_drivers_have_been_disabled
> 
> You do not need initramfs, not at all.

 

Ok noted, so I uninstalled initramfs, did *everything* (I think) the wiki said to do, and now I needed to use nomodeset, again, but it does launch. I am back to square one, and a little bit confused. Do I modularize the drivers now?  Are they working even if they aren't modularized? If so, how do I know they're working? I started my X server, and ran xrandr in it, and it stated this:

```

xrandr: Failed to get size of gamma for output default

Screen 0: minimum 1024 x 768, current 1024 x 768, maximum 1024 x 768

default connected 1024x768+0+0 0mm x 0mm

    1024x768     76.00*
```

This isn't the resolution of my Monitor, mind you 

I think the driver is loading, via my Xorg log:

http://sprunge.us/CMvxBa

Sorry if this is all super noobish, your help is appreciated.

----------

## Buffoon

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

[   220.892] (EE) open /dev/dri/card0: No such file or directory

[   220.892] (WW) Falling back to old probe method for modesetting

[   220.892] (EE) open /dev/dri/card0: No such file or directory

[   220.892] (II) Loading sub module "fbdevhw"

[   220.892] (II) LoadModule: "fbdevhw"

[   220.892] (II) Loading /usr/lib64/xorg/modules/libfbdevhw.so

[   220.915] (II) Module fbdevhw: vendor="X.Org Foundation"

[   220.915]    compiled for 1.20.10, module version = 0.0.2

[   220.915]    ABI class: X.Org Video Driver, version 24.1

[   220.915] (EE) Unable to find a valid framebuffer device

[   220.915] (WW) Falling back to old probe method for fbdev

[   220.915] (II) Loading sub module "fbdevhw"

[   220.915] (II) LoadModule: "fbdevhw"

[   220.915] (II) Loading /usr/lib64/xorg/modules/libfbdevhw.so

[   220.915] (II) Module fbdevhw: vendor="X.Org Foundation"

[   220.915]    compiled for 1.20.10, module version = 0.0.2

[   220.915]    ABI class: X.Org Video Driver, version 24.1

[   220.915] (II) FBDEV(3): using default device
```

You must boot with KMS enabled, currently it is not and as a result your Xorg falls back to fbdev. Your radeon driver is not used by X, it depends on KMS working. Back to your dmesg, see why framebuffer does not load. You can SSH into your box if needed. Technically you can log in blind and start X with your black screen, but you cannot make typos.

----------

## coletonodonnell

 *Buffoon wrote:*   

> 
> 
> ```
> [   220.892] (II) [KMS] drm report modesetting isn't supported.
> 
> ...

 

Alright, currently it is booting without black screen, I can access everything. This is the output of dmesg:

http://sprunge.us/CQQKzv

I followed that wiki entry to the T, I could send my kernel .config if you'd like, just let me know, that may reveal a problem. But I don't really see how that could be the issue, unless I missed something.

----------

## Buffoon

```
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-5.4.80-gentoo-r1 root=/dev/sda4 ro nomodeset

...

[    0.325957] [drm] VGACON disable radeon kernel modesetting.

[    0.325975] [drm:radeon_init] *ERROR* No UMS support in radeon module!
```

Unfortunately your nomodeset parameter does not let us see what happens in KMS mode. You need to look at the dmesg with KMS enabled.

Hint about posting, there is a reply button at bottom left, please do not quote without need.

----------

## coletonodonnell

Sure thing, thanks for the advice. I SSH'd in without nomodeset enabled. Here is dmesg output:

http://sprunge.us/AzfsBd

----------

## Buffoon

```
[    0.323919] [drm] Loading RV620 Microcode

[    0.323929] radeon 0000:01:00.0: Direct firmware load for radeon/RV620_pfp.bin failed with error -2

[    0.323931] r600_cp: Failed to load firmware "radeon/RV620_pfp.bin"

[    0.323934] [drm:r600_init] *ERROR* Failed to load firmware!

[    0.323936] radeon 0000:01:00.0: Fatal error during GPU init
```

I think you mentioned before you built the firmware into kernel? There is at least one blob missing, 'error -2' means it is not found.

----------

## coletonodonnell

I see, I built it into the kernel as "radeon/RV620_pfp.bin" in the firmware section, then rebuilt the kernel. It still doesn't boot to console, though (dmesg):

http://sprunge.us/DnggpQ

----------

## Buffoon

```
[    40.191] (EE) open /dev/dri/card0: No such file or directory
```

This is Xorg log, means radeon driver in kernel does not load, see your dmesg why. Maybe another piece of firmware is missing.

----------

## coletonodonnell

Oh oops, that's my fault I accidentally used the older command (was going through my history.) Here is the dmesg haha:

http://sprunge.us/HkXt3b

----------

## Buffoon

```
[    0.328444] [drm] Loading RV620 Microcode

[    0.328456] radeon 0000:01:00.0: Direct firmware load for radeon/RV620_me.bin failed with error -2

[    0.328458] r600_cp: Failed to load firmware "radeon/RV620_me.bin"

[    0.328462] [drm:r600_init] *ERROR* Failed to load firmware!

[    0.328463] radeon 0000:01:00.0: Fatal error during GPU init
```

I'm leaving for tonight.

----------

## coletonodonnell

Aight, thank you for your assistance Buffoon, as well as everyone else. It successfully ran my X server with proper resolution, issue was the console still didn't come up. If you run into this issue, see this post to fix that. I am sure this won't be the first noob question I'll have, but this has definitely taught me what to look for while debugging.

----------

