Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Setting up KMS on Radeon ATI 3450
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Fri Jan 01, 2021 6:55 pm    Post subject: [SOLVED] Setting up KMS on Radeon ATI 3450 Reply with quote

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
Code:
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:
Code:
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
Back to top
View user's profile Send private message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 426

PostPosted: Fri Jan 01, 2021 7:28 pm    Post subject: Reply with quote

Hi coletonodonnell

and wellcome in Gentoo forums.
Have you installed xorg-server? And please try set in make.conf
Code:
VIDEO_CARDS="radeon radeonsi"
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Fri Jan 01, 2021 7:40 pm    Post subject: Reply with quote

coletonodonnell,

I believe since KMS is no longer optional it is always on. The guides you are referring to may be slightly outdated.
Back to top
View user's profile Send private message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Fri Jan 01, 2021 7:45 pm    Post subject: Reply with quote

apiaio wrote:
Hi coletonodonnell

and wellcome in Gentoo forums.
Have you installed xorg-server? And please try set in make.conf
Code:
VIDEO_CARDS="radeon radeonsi"

I installed xorg-server, for good measure I rebuilt. I added radeonsi and ran:
Code:
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.
Back to top
View user's profile Send private message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Fri Jan 01, 2021 7:52 pm    Post subject: Reply with quote

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:
Code:
[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.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Fri Jan 01, 2021 8:37 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Fri Jan 01, 2021 8:44 pm    Post subject: Reply with quote

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
_________________
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Fri Jan 01, 2021 8:46 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Fri Jan 01, 2021 9:20 pm    Post subject: Reply with quote

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

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


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.
Back to top
View user's profile Send private message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Fri Jan 01, 2021 9:21 pm    Post subject: Reply with quote

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:
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


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.
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Fri Jan 01, 2021 9:57 pm    Post subject: Reply with quote

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.
_________________
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Fri Jan 01, 2021 10:39 pm    Post subject: Reply with quote

Marlo wrote:
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.


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
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23097

PostPosted: Fri Jan 01, 2021 11:06 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Fri Jan 01, 2021 11:11 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Fri Jan 01, 2021 11:17 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Fri Jan 01, 2021 11:26 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Fri Jan 01, 2021 11:40 pm    Post subject: Reply with quote

Code:
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"
Back to top
View user's profile Send private message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Fri Jan 01, 2021 11:43 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Fri Jan 01, 2021 11:46 pm    Post subject: Reply with quote

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

You do not need initramfs, not at all.
Back to top
View user's profile Send private message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Sat Jan 02, 2021 12:53 am    Post subject: Reply with quote

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:
Code:

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.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Sat Jan 02, 2021 1:47 am    Post subject: Reply with quote

Code:
[   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.
Back to top
View user's profile Send private message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Sat Jan 02, 2021 2:14 am    Post subject: Reply with quote

Buffoon wrote:
Code:
[   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.


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.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Sat Jan 02, 2021 2:35 am    Post subject: Reply with quote

Code:
[    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.
Back to top
View user's profile Send private message
coletonodonnell
n00b
n00b


Joined: 01 Jan 2021
Posts: 22

PostPosted: Sat Jan 02, 2021 2:54 am    Post subject: Reply with quote

Sure thing, thanks for the advice. I SSH'd in without nomodeset enabled. Here is dmesg output:
http://sprunge.us/AzfsBd
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Sat Jan 02, 2021 2:59 am    Post subject: Reply with quote

Code:
[    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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum