I was using Lumina as my DE till this morning on my FreeBSD 12.0 box, and things worked fine. My box has a Radeon R5 230 (Caicos) graphics card.
In the afternoon, I installed kde5 + xorg + xf86-video-ati + drm-kmod (after 'pkg delete -a -f'), and suddenly upon reboot I have lost the ability to start X. The error message on the console is "drmn0: error: No GEM object associated to handle 0x00000384, can't create framebuffer".
kldstat shows radeonkms.ko and drm2.ko loaded. (radeonkms get loaded in my box from /etc/rc.local).
I tried uninstalling xf86-video-ati/drm-kmod and swapping in the legacy ports drm-legacy-kmod and xf86-video-ati-legacy. With the legacy ports, X starts up but the desktop behaves weird, streaking and flashing all over. So I reverted to xf86-video-ati/drm-kmod, and now am unable to start X again.
A couple of interesting lines from Xorg log are as under:
[ 105.562] failed to add FB for modeset
[ 105.562] (WW) RADEON(0): Failed to set mode on CRTC 0
[ 105.593] (EE) RADEON(0): Failed to enable any CRTC
Can you verify which kernel driver you are loading, and if it attaches to your hardware? Please provide kldstat -v | grep drm, and provide your kld_list from /etc/rc.conf.
Do you have any xorg configuration settings?
Can you provide your entire Xorg.log.0?
Have you tried using modesetting? The easiest way to do this is to simply remove xf86-video-ati.
Thanks for taking this up.
My /etc/X11/xorg.conf mandates the Driver for X. Usually, I use "radeon". But since I am having problems starting X with radeon, I am for the moment starting X using vesa as the driver.
As a nice idea, I saved my Xorg session log with radeon, and it is attached in its entirety. This is the log for the session when I ran into the framebuffer error.
Is there any other information you would like me to provide ?
Created attachment 200798 [details]
Xorg log with radeon driver
You never provided the information about which kernel driver you are using.
Can you try running Xorg without any configuration, so that it uses the default.
Have you tried using amdgpu?
I do not quite understand what is meant by kernel driver - the only driver I know of is the graphics driver (which I flip between radeon and vesa). If you need something else by 'kernel driver', kindly tell me how to get it.
As for the command output, I have the following when I use radeon as the driver in xorg.conf.
a) kldstat -v | grep drm:
30 1 0xffffffff83014000 45070 drm2.ko (/boot/kernel/drm2.ko)
b) kldstat -v | grep radeon:
29 1 0xffffffff82f3f000 d4e68 radeonkms.ko (/boot/kernel/radeonkms.ko)
34 1 0xffffffff83060000 12f9 radeonkmsfw_CAICOS_pfp.ko (/boot/kernel/radeonkmsfw_CAICOS_pfp.ko)
35 1 0xffffffff83062000 16f7 radeonkmsfw_CAICOS_me.ko (/boot/kernel/radeonkmsfw_CAICOS_me.ko)
36 1 0xffffffff83064000 d73 radeonkmsfw_BTC_rlc.ko (/boot/kernel/radeonkmsfw_BTC_rlc.ko)
37 1 0xffffffff83065000 5f97 radeonkmsfw_CAICOS_mc.ko (/boot/kernel/radeonkmsfw_CAICOS_mc.ko)
I do not use rc.conf::kld_list - I load kld via rc.local. My rc.local loads radeonkms
I tried running X without xorg.conf. It appears to take radeon on its own, and the results are the same - X refuses to start with the Xorg log mentioning the 3 "Failed" lines referred in the original post.
I also tried running X with amdgpu as the driver (after kldloading amdgpu). X refuses to start, complaining of No Screens Found
You are not using the driver from the drm-kmod port, you are still using the legacy base driver. Please add kld_list="/boot/modules/radeonkms.ko" or kld_list="/boot/modules/amdgpu.ko" to /etc/rc.conf, and reboot.
Make sure you have drm-kmod installed.
(In reply to Niclas Zeising from comment #6)
If you are using UEFI boot, you might also want to add hw.syscons.disable=1 to /boot/loader.conf, howerver, that will give you a broken console until the gpu driver is loaded.
I am as glad as surprised. Yes, adding kld_list to /etc/rc.conf does solve the problem ! Now everything works fine !!
So radeonkms is important not just for loading, but also for the manner of loading. rc.local hook does not work any longer.
Thanks so much for persisting with this one. I am much the wiser for your efforts.
Am leaving this PR for you to close out as FIXED.
A quick question:
Does kld_list use colon (:) or space between multiple kld's ?
(In reply to firstname.lastname@example.org from comment #8)
Good to see that the issue is solved.
You can use spaces (' ') to separate between kmods in kld_list.
Closing this as it's reported solved by the original submitter.
This message is also being emailed to you.
I think you can offer great help to me on one additional count. A minute from you can save me immense troubleshooting later.
I have a port mkdesktop, which is a one-stop solution for desktop installation under FreeBSD.
For my port to work cleanly, I need to load the right kld's for 11.2 as well as 12.0 for amdgpu / radeon / nvidia / intel.
Following my experience with the ATI issue today, I have revised my kld lists as below (my main list is called drmkld; any extras go into drmkld_opt):
1) AMD GPU (both 11.2 and 12.0):
2) ATI Radeon:
drmkld_opt="/boot/kernel/radeon.ko" # For 11.2
drmkld_opt="" # For 12.0
Are you satisfied with the set of lists above ? Your confirmation would be much appreciated.