# No luck with an RX 580



## jcpollman (Feb 19, 2020)

I can not get a usable graphical desktop going with Ghost/Freebsd

Hardware: Ryzen cpu, RX580 video card, plenty of ram, UEFI. I have tried the latest official release of Ghostbsd (20.01) and Freebsd (12.1).

Linux and Windows have no problems with this setup

I have been able to kind of get a graphical desktop 2 ways:

1) Using SCFB. Works fine, but can only display 1024x768. Maybe when I get old, this will be fine, but on a 27 inch screen it is unusable. Is there anyway to change this? Xrandr only gives 1024x768.

2) Using VESA, I can get a full 2550x1440 screen, but the screen refreshes at about every 2 seconds – videos are completely unwatchable

From the command line I have typed: X -configure. And I get: AMDGPU [KMS] drm report modesetting isn’t supported.  The Xorg log file shows: No screens found

I have added hw.syscons.disable=1 to my loader.conf.  It completely locks up my computer.

I have been using Linux as my desktop for about 30 years, so the unix-like environment is not an issue. I even have Ghostbsd running nicely in a virtualbox in linux – complete with KDE.

I would like to switch to Ghost/Freebsd, but without a usable desktop I can not. I even upgraded my video card as several folks online have been able to make it work – but not me.

Thoughts?
JC


----------



## shkhln (Feb 20, 2020)

jcpollman said:


> From the command line I have typed: X -configure. And I get: AMDGPU [KMS] drm report modesetting isn’t supported.  The Xorg log file shows: No screens found



Remove whatever configuration you have, start X (without -configure) and attach the log file here.


----------



## SirDice (Feb 20, 2020)

Graphics - FreeBSD Wiki
		


Build graphics/drm-kmod from ports, the official packages are still built for 12.0 and will crash the system if you try to load them on 12.1.


----------



## jcpollman (Feb 20, 2020)

A completely clean install - Xorg.log attached. So, looking at it, the 12.0 drivers are being used, and not the 12.1.


----------



## jcpollman (Feb 20, 2020)

Compiled and installed  drm-kmod. Same issues. I checked in the /boot/modules/graphics directory and they all showed today's date, but the log file shows the old files. Not sure why.


----------



## shkhln (Feb 21, 2020)

`kldstat`?



jcpollman said:


> Compiled and installed  drm-kmod.



That should be drm-whatever-kmod, not just drm-kmod.



jcpollman said:


> /boot/modules/graphics



I'm not aware of any /boot/modules/graphics directories…


----------



## Raffeale (Mar 4, 2020)

Look at this thread ,it will help you.








						amd vega and radeon series vga card driver for FreeBSD 12.1 and 12.2 tutorial for beginner[update 2020-12-16]
					

amd apu vga card driver for FreeBSD 12.1  tutorial for beginner  I’m a newbie for freebsd and have some experience for linux. I have just installed FreeBSD for one week, I met a lot of trouble when I use it. I just want to tell everyone that how to solve this problem  then you could  save you...




					forums.freebsd.org


----------



## wxsabi (Mar 6, 2020)

Were you able to get this resolved? I'm in the exact same boat as you and I was gonna start a thread but you beat me to it, which is good, because I thought it was just me with this issue. If anyone has a clue on what to do it will be greatly appreciated.

This is what I typically do to install the drivers:

1. Install the drm-kmod package and the AMD driver

# pkg install drm-kmod xf86-video-amdgpu 

2. Add "kld_list=/boot/modules/amdgpu.ko" to /etc/rc.conf 



Here are my specs, just FYI:

Asus Crosshair VIII Hero(WiFi) X570 
AMD Ryzen 5 3600 6C-12T@3.6GHz 
16Gb RAM @3200MHz 
XFX RX 580 8Gb DDR5 

Thnx


----------



## jardows (Mar 6, 2020)

I'd highly recommend trying the 5.0 driver for 12.1 as outlined by *Raffeale*
This worked for me on my RX590 without any difficulties.


----------



## Argentum (Mar 7, 2020)

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'


----------



## jcpollman (Mar 18, 2020)

Alright, I followed Raffeale's instructions. I checked with dmesg: grep drm to ensure the amdgpu module was loaded. I still get:
AMDGPU KMS drm report modesetting isn't supported
When I try just X, or sub scfb for vesa I get a blank screen
thoughts?


----------



## blackhaz (Mar 18, 2020)

Are we still building drm-kmod for 12.0? Jesus Christ. That's, like, as if someone in FreeBSD deliberately wants to piss off all newcomers.


----------



## SirDice (Mar 18, 2020)

blackhaz said:


> Are we still building drm-kmod for 12.0?


No. FreeBSD 12.0 is now end-of-life so the packages in the repositories are being built for 12.1.


----------



## Raffeale (Mar 18, 2020)

jcpollman said:


> Alright, I followed Raffeale's instructions. I checked with dmesg: grep drm to ensure the amdgpu module was loaded. I still get:
> AMDGPU KMS drm report modesetting isn't supported
> When I try just X, or sub scfb for vesa I get a blank screen
> thoughts?


could you post your dmesg and xorg.log , if you can find drm messages in your dmesg ,I think  you forgot to install xorg video driver.


----------



## jcpollman (Mar 18, 2020)

as requested.


----------



## Raffeale (Mar 19, 2020)

Dmes said your gpu driver has been loaded,but Xorg  amdgpu driver didn’t reconize your gpu, you can try to add your device Id to pcids file. Look at my tutorial .


----------



## Raffeale (Mar 19, 2020)

xorg said amdgpu has not probed your device,that means your device_id not in pcids.


----------



## shkhln (Mar 19, 2020)

Raffeale said:


> xorg said amdgpu has not probed your device,that means your device_id not in pcids.



Please, it's a 3 years old card.


----------



## shkhln (Mar 19, 2020)

jcpollman said:


> X -configure





jcpollman said:


> as requested.





> Your xorg.conf file is /root/xorg.conf.new



You are not supposed to use -configure. Start Xorg with an empty config or make a simple one by hand with a single Device section. Something like that: 
	
	



```
Section "Device"
     Identifier "AMD"
     Driver "amdgpu"
EndSection
```


----------



## Raffeale (Mar 19, 2020)

[   137.914] (II) AMDGPU(1): [KMS] drm report modesetting isn't supported.

his xorg said this , so that mean xorg's admgpu video driver not reconigize ,  some time you can try add your device_id into ids file into amd group , i think it will work


----------



## wxsabi (Mar 19, 2020)

[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.


----------



## Raffeale (Mar 19, 2020)

you could try drm5.0 amdgpu driver , it works fine on my laptop , my cpu is amd ryzen 3500u , it could boot without hw.syscons.disable option .


----------



## wxsabi (Mar 19, 2020)

is that drm-devel-kmod?


----------



## aht0 (Mar 19, 2020)

Drm v5 works. Had same bs with discrete Vega. There even exists github repo with Drm v5 for FreeBSD 12.X


----------



## jcpollman (Mar 19, 2020)

Raffeale said:


> xorg said amdgpu has not probed your device,that means your device_id not in pcids.



RX580 is listed in the pcids  :-(


----------



## aht0 (Mar 19, 2020)

jardows said:


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



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.


----------



## jcpollman (Mar 19, 2020)

aht0 said:


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



I followed the  instructions in the thread - no luck


----------



## aht0 (Mar 19, 2020)

Where precisely did you get stuck, following his thread? Does DRM v5 load properly (screen switching resolution to native)?


----------



## jcpollman (Mar 19, 2020)

aht0 said:


> Where precisely did you get stuck, following his thread? Does DRM v5 load properly (screen switching resolution to native)?



Earlier in this thread I uploaded part of my dmesg and the xorg.0.log


----------



## Argentum (Apr 22, 2020)

jcpollman said:


> Earlier in this thread I uploaded part of my dmesg and the xorg.0.log



Do you have in your /boot/loader.conf


```
hw.syscons.disable=1
```

?


----------



## Argentum (Apr 27, 2020)

Argentum said:


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


----------



## Sevendogsbsd (Apr 27, 2020)

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.


----------



## free-and-bsd (Apr 27, 2020)

jcpollman said:


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

```
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.


----------



## Sevendogsbsd (Apr 28, 2020)

Linprocfs is not needed at all.


----------



## free-and-bsd (Apr 28, 2020)

Sevendogsbsd said:


> Linprocfs is not needed at all.


Sorry, my mistake . That refers to linux code ported to FreeBSD.


----------



## inf3rno (Jan 2, 2021)

wxsabi said:


> [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.
> 
> ...


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.


----------



## Alexander88207 (Jan 2, 2021)

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


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


```
Section "Device"

Identifier "Card0"

Driver "amdgpu"

Option "TearFree" "True"

EndSection
```


----------



## inf3rno (Jan 2, 2021)

Alexander88207 said:


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


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


```
Section "Device"
    Identifier "Card0"
    Driver "amdgpu"
EndSection
```

I think this is the key part.

```
[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.


----------



## s0undsp4c3 (Jan 10, 2021)

Argentum said:


> I have a system running with RX 550. Assume with RX 580 the set-up is similar.
> 
> To get it running:
> 
> ...


Why do you need to recompile the kernel?. I’m gonna change my Radeon Pitcairn for a RX 580.


----------



## inf3rno (Jan 10, 2021)

s0undsp4c3 said:


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


----------



## Alexander88207 (Jan 10, 2021)

inf3rno said:


> And you need hw.syscons.disable=1 too if you want to use this amdgpu driver, otherwise it won't work.


Only with UEFI boot.


----------



## inf3rno (Jan 10, 2021)

Alexander88207 said:


> Only with UEFI boot.


I don't know, I use only UEFI.


----------



## Argentum (Jan 10, 2021)

s0undsp4c3 said:


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


----------

