AsRock A300 with Ryzen 5 2400G graphics supported on FreeBSD

Hi people,

i have bought last week the Asrock A300 barebone with the ryzen 5 2400 cpu. I use the Bios version 1.10. I try to use drm-fbsd12.0-kmod with FreeBSD 12. I try ever solution what i found in the Internet, but everytime when i try kld_list="amdgpu" the screen stands black and i have no more ssh access on this pc.

Have anyone a solution for me or have a tip.

Thanks
 
Would you mind describing your setup in more detail?

i

Does it ever display anything on boot?

I read this documentation https://wiki.freebsd.org/Graphics and set in /boot/loader.conf hw.syscons.disable=1. When i did this there is no console output when i start the pc. When i did load amdgpu drivers, the screen goes black and i have no more access per ssh on this pc. So i cant see any log files. :-(
 
kld_list="amdgpu"
You need to be more precise. Generally speaking, you should mention exactly what commands you executed and exactly what configuration you put in any relevant config files.
If you'd take a look at the Formatting Guidelines you would also improve the readability of your posts, which in turn gives you a better chance that people take the time you read through your stuff.
FreeBSD 12
If you are running Release then it's called FreeBSD 12.0-RELEASE.

Sorry. Enough with that (but it's for your own benefit)

To the topic.
When i use https://wiki.freebsd.org/GraphicsOld/SCFB, i can use it, but without 2d and 3d acceleration.
That's no more then a fallback option.

I don't own any AMD graphics myself, but you where on the right track with graphics/drm-fbsd12.0-kmod and amdgpu is right, too.
(but as long as you don't know exactly what you are doing, the meta port graphics/drm-kmod is recommended)
The modules from the port are located in /boot/modules, whereas all native FreeBSD modules are in /boot/kernel (which is the default when you omit the path to a module).
So what you did is, you loaded the old kernel module, included in the FreeBSD kernel. That one is no longer updated and will likely will not work well with new graphics hardware.

So to actually load the module installed with the port, you have to specify the path in /etc/rc.conf like
kld_list="/boot/modules/amdgpu.ko"
For testing purposes, you could also remove amdgpu from kld_list and test manually (after reboot) with # kldload /boot/modules/amdgpu.ko

A little sad thing is, that looking at Wikipedia your APU seems to have Vega11 graphics, but in /boot/modules is no module for exactly that one % ls /boot/modules | grep -i vega
Anyway, I'm not very familiar with the differences, between the various versions of Vega, so the driver would either attach or not.

Since you followed the Wiki, I guess you have created a xorg.conf or xorg.conf.d/whatever file.
Xorg usually auto-configures very well with the kms drivers, so I'd remove that (or at least everything graphics and monitor related) and try again.
Not to long ago, I installed FreeBSD for a friend on an older APU, using the kms drivers and Xorg figured everything out by itself.
 
You need to be more precise. Generally speaking, you should mention exactly what commands you executed and exactly what configuration you put in any relevant config files.
If you'd take a look at the Formatting Guidelines you would also improve the readability of your posts, which in turn gives you a better chance that people take the time you read through your stuff.

If you are running Release then it's called FreeBSD 12.0-RELEASE.

Sorry. Enough with that (but it's for your own benefit)

To the topic.

That's no more then a fallback option.

I don't own any AMD graphics myself, but you where on the right track with graphics/drm-fbsd12.0-kmod and amdgpu is right, too.
(but as long as you don't know exactly what you are doing, the meta port graphics/drm-kmod is recommended)
The modules from the port are located in /boot/modules, whereas all native FreeBSD modules are in /boot/kernel (which is the default when you omit the path to a module).
So what you did is, you loaded the old kernel module, included in the FreeBSD kernel. That one is no longer updated and will likely will not work well with new graphics hardware.

So to actually load the module installed with the port, you have to specify the path in /etc/rc.conf like
kld_list="/boot/modules/amdgpu.ko"
For testing purposes, you could also remove amdgpu from kld_list and test manually (after reboot) with # kldload /boot/modules/amdgpu.ko

A little sad thing is, that looking at Wikipedia your APU seems to have Vega11 graphics, but in /boot/modules is no module for exactly that one % ls /boot/modules | grep -i vega
Anyway, I'm not very familiar with the differences, between the various versions of Vega, so the driver would either attach or not.

Since you followed the Wiki, I guess you have created a xorg.conf or xorg.conf.d/whatever file.
Xorg usually auto-configures very well with the kms drivers, so I'd remove that (or at least everything graphics and monitor related) and try again.
Not to long ago, I installed FreeBSD for a friend on an older APU, using the kms drivers and Xorg figured everything out by itself.

Thanks for your response. I tried that. But it doesnt work. Only the fallback with the scfb driver works, but is okay for now, i just wait so long the vega 11 chip is supported.

What i tried too is to set
Code:
hw.syscons.disable=1
in the file
Code:
/boot/loader.conf
, but is the same problem that the screen goes black and i lost the ssh access.
 
What you are trying to do with ssh, just checking if your machine has crashed?

If I'm not totally wrong, I recall that there was a problem with AMD graphics/driver and booting in EFI mode.
Could you do gpart show and see if the first partition on your drive is EFI or freebsd-boot.
 
I get following output:

Code:
 gpart show
=>       40  488397088  nvd0  GPT  (233G)
         40     409600     1  efi  (200M)
     409640  479838208     2  freebsd-ufs  (229G)                                                                                                                                       
  480247848    8149280     3  freebsd-swap  (3.9G)

=>        40  3907029088  ada0  GPT  (1.8T)       
          40  3906994176     1  freebsd-ufs  (1.8T)
  3906994216       34912        - free -  (17M)                                                                                                                                         

=>        40  3907029088  ada1  GPT  (1.8T)   
          40  3906994176     1  freebsd-ufs  (1.8T)
  3906994216       34912        - free -  (17M)
 
Code:
% pkg info drm-fbsd12.0-kmod
drm-fbsd12.0-kmod-4.16.g20190424
Name           : drm-fbsd12.0-kmod
Version        : 4.16.g20190424
Installed on   : Thu Apr 25 18:13:23 2019 CEST
Origin         : graphics/drm-fbsd12.0-kmod
Architecture   : FreeBSD:12:amd64
Prefix         : /usr/local
Categories     : graphics kld
Licenses       : BSD2CLAUSE, MIT, GPLv2
Maintainer     : jmd@FreeBSD.org
WWW            : https://github.com/FreeBSDDesktop/kms-drm
Comment        : DRM modules for the linuxkpi-based KMS components
Options        :
    DEBUG          : off
Annotations    :
    FreeBSD_version: 1200086
    repo_type      : binary
    repository     : FreeBSD
Flat size      : 9.89MiB
Description    :
amdgpu, i915, and radeon DRM modules for the linuxkpi-based KMS components.
Currently corresponding to Linux 4.16 DRM.
This version is for FreeBSD 12.0.
amdgpu and radeonkms are known to fail with EFI boot.
Look at the last line. You could try to replace EFI bootcode with legacy bootcode.
That requires that you enter your computers BIOS and disable booting in UEFI mode, often called CSM mode enabled.
Then remove the partiton called EFI and replace it with a freebsd-boot partition and installing a MBR.
# gpart delete -i1 nvd0
# gpart add -t freebsd-boot -s 512k nvd0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 nvd0
Careful. Please don't blindly execute destructive commands.
Running this on the wrong disk or typos could destroy important data.

After you disabled UEFI booting/enabled CSM in the BIOS you should be able to boot in legacy mode and hopefully have some more luck with
the driver.

Edit: I was a bit unclear. You actually have to change the bootcode first, before you change the mode in your BIOS, or you wouldn't be able to boot.
But I wanted to suggest, that you take a look at your BIOS settings first and see if you can find the right settings there.
 
I enable CSM now,thanks for the tip, have access with ssh now, but the screen goes black when i do kldload amdgpu :-(
dmesg gives me following now:

Code:
[drm] amdgpu kernel modesetting enabled.
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] initializing kernel modesetting (RAVEN 0x1002:0x15DD 0x1002:0x15DD 0xC6).
[drm] register mmio base: 0xFCB00000
[drm] register mmio size: 524288
[drm] PCI I/O BAR is not found.
drmn0: successfully loaded firmware image with name: amdgpu/raven_gpu_info.bin
[drm] probing gen 2 caps for device 1022:15db = 700d03/e
[drm] probing mlw for device 1002:15dd = 400d03
[drm] VCN decode is enabled in VM mode
[drm] VCN encode is enabled in VM mode
[drm] BIOS signature incorrect 0 0
ATOM BIOS: 113-RAVEN-113
[drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit
drmn0: VRAM: 2048M 0x000000F400000000 - 0x000000F47FFFFFFF (2048M used)
drmn0: GTT: 1024M 0x000000F500000000 - 0x000000F53FFFFFFF
Successfully added WC MTRR for [0xe0000000-0xefffffff]: 0;
[drm] Detected VRAM RAM=2048M, BAR=256M
[drm] RAM width 128bits UNKNOWN
[TTM] Zone  kernel: Available graphics memory: 15675500 kiB
[TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[TTM] Initializing pool allocator
[drm] amdgpu: 2048M of VRAM memory ready
[drm] amdgpu: 3072M of GTT memory ready.
i_size_write unimplemented
[drm] GART: num cpu pages 262144, num gpu pages 262144
[drm] PCIE GART of 1024M enabled (table at 0x000000F400800000).
drmn0: successfully loaded firmware image with name: amdgpu/raven_asd.bin
drmn0: successfully loaded firmware image with name: amdgpu/raven_pfp.bin
drmn0: successfully loaded firmware image with name: amdgpu/raven_me.bin
drmn0: successfully loaded firmware image with name: amdgpu/raven_ce.bin
drmn0: successfully loaded firmware image with name: amdgpu/raven_rlc.bin
drmn0: successfully loaded firmware image with name: amdgpu/raven_mec.bin
drmn0: successfully loaded firmware image with name: amdgpu/raven_mec2.bin
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
drmn0: successfully loaded firmware image with name: amdgpu/raven_sdma.bin
[drm] use_doorbell being set to: [true]
i_size_write unimplemented
drmn0: successfully loaded firmware image with name: amdgpu/raven_vcn.bin
[drm] Found VCN firmware Version: 1.73 Family ID: 18
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
[drm] Display Core initialized with v3.1.27!
[drm] Connector DP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-2
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-3: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-3
[drm]   - kern.vt.fb.default_mode
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm:amdgpu_ring_write] amdgpu: writing more dwords to the ring than expected!
 
Good, then you know at least what's going on.
If you want to try STABLE, you have to upgrade from source. freebsd-update can't do that.
Updating from source
Keep in mind that questions about STABLE or RELEASE are not supported on the forum.
You could later go back to a RELEASE version, when the updates have landed there.
 
Thanks for your try to help me. I can live in the moment with the scfb fallback solution. I can watch youtube and tutorial videos and can do web development stuff.
 
Back
Top