No luck with an RX 580

Thank you. The 5.0 driver allows my RX590 to work! I am only having problems now with the fan speed, as it appears the GPU fans are spinning at near full speed, creating too much noise.

A little clean-up for the instructions is needed, as there are some problems with the link. The direct download for the file is:
https://github.com/FreeBSDDesktop/kms-drm/archive/drm-v5.0-fbsd12.1.zip

You will also need to download the firmware and install it.
https://github.com/FreeBSDDesktop/kms-firmware/archive/master.zip

A problem with following the instructions above, about installing drm-kmod from packages is that if you later on simply run pkg upgrade, it will overwright the updated drivers.

Original posting thread:https://forums.freebsd.org/threads/...for-freebsd-12-1-tutorial-for-beginner.73901/

Check up on this thread, you can make your card work with the data provided there.
 
Where precisely did you get stuck, following his thread? Does DRM v5 load properly (screen switching resolution to native)?
 
I have a system running with RX 550. Assume with RX 580 the set-up is similar.

Good news is that now I have tested with RX570. With the configuration I have described here it was plug and play. Just replaced the RX550 with RX570 and everything is working. Only the speed gain is insignificant for most graphics.
 
The RX570 works on my system with only the graphics/drm-kmod entry in /etc/rc.conf and no xorg configuration. I am not sure if I installed any other packages - I think maybe one, but zero xorg configuration was required.

I'll double-check my configuration after work to be sure that was all I did.
 
Earlier in this thread I uploaded part of my dmesg and the xorg.0.log
Have you tried adding linprocfs_load="YES" to your /etc/rc.conf KLD_LIST line as per this thread?
The threads mentioned in here all hint at linux compatibility being used ( compat.linuxkpi.amdgpu_dpm=1 etc in Raffeale's thread). But does your system mount linproc filesystem? This may be the root of your problem.
I mean, if you don't have it in /etc/rc.conf KLD_LIST line, then at least you need it in /etc/fstab:
Code:
linproc /compat/linux/proc linprocfs rw,late 0 0
I guess, it's enough to have it in /etc/fstab though, becuase that will both load the module AND mount linprocfs.
 
[EDIT] This DOES NOT work! it was loading the vesa driver instead of amdgpu and it gave me a very faulty graphical environment.

I posted this on a different thread, but I'll post here too in case it helps.

I built:

- xf86-video-amdgpu-19.0.1
- drm-kmod-g20190710
- drm-fbsd12.0-kmod-4.16.g20191120

from ports as per SirDice's instructions on another post and that solved it for me, but I did have to add hw.syscons.disable=1 to boot/loader.conf for it to work. Otherwise, it never loaded and X said that there were no screens found.
Did not work for me. I run into some sort of ring 10 error on 12.2-RELEASE. I had the same with 12.1-RELEASE, but it managed to resolve it somehow and booted up KDE. For that I used pkg binaries. Looks like there is a bug somewhere in the kernel module. It is a SAPPHIRE Radeon RX 580 Pulse btw. I'll check 12.2-STABLE too, but I doubt it will work. The bad part that I need 12.2, because my keyboard does not work with 12.1-RELEASE. It worked only with 12.1-STABLE, but I no longer have an img file for that.
 

Attachments

  • dmesg.log.txt
    65.3 KB · Views: 85
  • Xorg.0.log.txt
    4 KB · Views: 86
hmm.... this comes from dmesg.

If the suggestions below doesn't help, i would like to encourage you to create a issue at: https://github.com/freebsd/drm-kmod

Code:
[drm] amdgpu: ttm finalized
drmn0: Fatal error during GPU init
[drm] amdgpu: finishing device.

but what do you have configured for xorg?

[ 81.311] (EE) Device(s) detected, but none match those in the config file.

This is my /usr/local/share/X11/xorg.conf.d/amdgpu.conf for amdgpu using RX 570 with TearFree enabled:

Code:
Section "Device"

Identifier "Card0"

Driver "amdgpu"

Option "TearFree" "True"

EndSection
 
hmm.... this comes from dmesg.

If the suggestions below doesn't help, i would like to encourage you to create a issue at: https://github.com/freebsd/drm-kmod

Code:
[drm] amdgpu: ttm finalized
drmn0: Fatal error during GPU init
[drm] amdgpu: finishing device.

but what do you have configured for xorg?

[ 81.311] (EE) Device(s) detected, but none match those in the config file.

This is my /usr/local/share/X11/xorg.conf.d/amdgpu.conf for amdgpu using RX 570 with TearFree enabled:

Code:
Section "Device"

Identifier "Card0"

Driver "amdgpu"

Option "TearFree" "True"

EndSection
The same without the tear free option, but I guess that does not matter.

Code:
Section "Device"
    Identifier "Card0"
    Driver "amdgpu"
EndSection

I think this is the key part.
Code:
[drm:sdma_v3_0_ring_test_ring] amdgpu: ring 10 test failed (0xCAFEDEAD)
[drm:amdgpu_device_ip_init] hw_init of IP block <sdma_v3_0> failed -22
drmn0: amdgpu_device_ip_init failed
drmn0: Fatal error during GPU init
[drm] amdgpu: finishing device.
device_attach: drmn0 attach returned 22

I have no idea how it goes with video cards, but this feels similar to mounting a HDD. The kernel module is loaded, but it cannot attach the video card to it, so it gives up. But it is just a guess, I have really no idea how these drivers work or if this error is really relevant. It worked with 12.1-RELEASE with the pkg binary and I think I saw the same error in dmesg. What is weird that I haven't installed xf86-video-amdgpu as far as I remember. I haven't had a config file at all, it just loaded something with auto detect. Weird. I'll reinstall 12.1 just to check again.
 
I have a system running with RX 550. Assume with RX 580 the set-up is similar.

To get it running:

1) in /etc/make.conf

WITHOUT_MODULES=drm drm2

then recompiled the kernel.

2) from ports installed:

drm-fbsd12.0-kmod-4.16.g20200221

3) /etc/rc.conf

kld_list="amdgpu"

4) ... also with UEFI boot - in /boot/loader.conf

hw.syscons.disable=1


Works like charm...

P.S. attached 'Xorg.0.log', 'kldstat' and 'grep drm /var/log/messages.0'
Why do you need to recompile the kernel?. I’m gonna change my Radeon Pitcairn for a RX 580.
 
Why do you need to recompile the kernel?. I’m gonna change my Radeon Pitcairn for a RX 580.
You need to compile only the kernel module, not necessarily the whole kernel. The pkg version is compatible only with 12.1 currently, so if you want to use 12.2, then you need to do it. And you need hw.syscons.disable=1 too if you want to use this amdgpu driver, otherwise it won't work. Further info here: https://forums.freebsd.org/threads/...-amd-drivers-for-rx-580-on-stable-12-2.78148/
 
Why do you need to recompile the kernel?. I’m gonna change my Radeon Pitcairn for a RX 580.
It may not be needed, but I am building my own kernels anyway. With DRM in base, the system complains in messages that the base DRM will be deprecated. To get rid of these messages, I removed the base DRM and installed it from ports. I think this will be the future practice anyway.
 
Back
Top