RX 580 Supported?

pestslent1

Member

Reaction score: 2
Messages: 55

I have FreeBSD 11.1 p10 running kde4 desktop on a ryzen 7 1700. I was using a hd 7970 for my video card, and everything worked fine, i upgraded to a rx580 and now x fails to start. I could not find anything that said it is a supported card. I did not want to "-configure" because of "Video cards, monitors, and input devices are automatically detected and do not require any manual configuration. Do not create xorg.conf or run a -configure step unless automatic configuration fails. ". Is the RX580 supported or do I need to adjust something else.
Any and all assistance would be appreciated.
 

abishai

Aspiring Daemon

Reaction score: 141
Messages: 630

No, but you can upgrade your system to 11.2-BETA1 as I did. It works without any observable issues on my laptop with intel. BTW, kde5 is awesome.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 6,958
Messages: 28,918

Yep, you can give the BETA release a try. It will not work on 11.1-RELEASE. The beta release will be upgradable using freebsd-update(8) to the full release when the time comes.
 
OP
OP
pestslent1

pestslent1

Member

Reaction score: 2
Messages: 55

Sorry, derailing the point a bit; ignoring the video card, how is the OS on the Ryzen otherwise? Any issues with stability?
If you are referring to 11.1 p10, It works fine, my only complainet is I can't get bhyve to show more than 1 cpu in my windows vm's.
 
OP
OP
pestslent1

pestslent1

Member

Reaction score: 2
Messages: 55

I was pointed to "Upcoming 11.2 has graphics/drm-stable-kmod" to use my rx580. I am now on beta3 of11.2, I installed "gpu-firmware-kmod" and "drm-stable-kmod" changed my rc.conf to "kld_list="amdgpu"" on reboot x fails.
Below is my dmesg.boot from the video failing:
Code:
[drm:amdgpu_atombios_init] Unable to find PCI I/O BAR; using MMIO for ATOM IIO
ATOM BIOS: 67DFHB.15.50.2.1.AS22
[drm] GPU post is not needed
amdgpu/polaris10_mc.bin: could not load firmware image, error 2
amdgpu/polaris10_mc.bin: could not load firmware image, error 2
Zone  kernel: Available graphics memory: 16728762 kiB
Zone   dma32: Available graphics memory: 2097152 kiB
[TTM] Initializing pool allocator
drmn0: VRAM: 8192M 0x0000000000000000 - 0x00000001FFFFFFFF (8192M used)
drmn0: GTT: 16336M 0x0000000200000000 - 0x00000005FD0AE7FF
[drm] Detected VRAM RAM=8192M, BAR=256M
[drm] RAM width 256bits GDDR5
[drm] amdgpu: 8192M of VRAM memory ready
[drm] amdgpu: 16336M of GTT memory ready.
[drm] GART: num cpu pages 4182190, num gpu pages 4182190
[drm] PCIE GART of 16336M enabled (table at 0x0000000000040000).
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] amdgpu: irq initialized.
Can't find requested voltage id in vdd_dep_on_sclk table!
amdgpu: powerplay initialized
[drm] Connector DP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-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 HDMI-A-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-2
[drm]   - kern.vt.fb.default_mode
[drm] Connector DVI-D-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DVI-D-1
[drm]   - kern.vt.fb.default_mode
[drm] AMDGPU Display Connectors
[drm] Connector 0:
[drm]   DP-1
[drm]   HPD1
[drm]   DDC: 0x486c 0x486c 0x486d 0x486d 0x486e 0x486e 0x486f 0x486f
[drm]   Encoders:
[drm]     DFP1: INTERNAL_UNIPHY1
[drm] Connector 1:
[drm]   DP-2
[drm]   HPD5
[drm]   DDC: 0x4874 0x4874 0x4875 0x4875 0x4876 0x4876 0x4877 0x4877
[drm]   Encoders:
[drm]     DFP2: INTERNAL_UNIPHY1
[drm] Connector 2:
[drm]   HDMI-A-1
[drm]   HPD6
[drm]   DDC: 0x4868 0x4868 0x4869 0x4869 0x486a 0x486a 0x486b 0x486b
[drm]   Encoders:
[drm]     DFP3: INTERNAL_UNIPHY2
[drm] Connector 3:
[drm]   HDMI-A-2
[drm]   HPD4
[drm]   DDC: 0x4870 0x4870 0x4871 0x4871 0x4872 0x4872 0x4873 0x4873
[drm]   Encoders:
[drm]     DFP4: INTERNAL_UNIPHY2
[drm] Connector 4:
[drm]   DVI-D-1
[drm]   HPD3
[drm]   DDC: 0x487c 0x487c 0x487d 0x487d 0x487e 0x487e 0x487f 0x487f
[drm]   Encoders:
[drm]     DFP5: INTERNAL_UNIPHY
amdgpu/polaris10_pfp.bin: could not load firmware image, error 2
amdgpu/polaris10_pfp.bin: could not load firmware image, error 2
amdgpu/polaris10_me.bin: could not load firmware image, error 2
amdgpu/polaris10_me.bin: could not load firmware image, error 2
amdgpu/polaris10_ce.bin: could not load firmware image, error 2
amdgpu/polaris10_ce.bin: could not load firmware image, error 2
amdgpu/polaris10_rlc.bin: could not load firmware image, error 2
amdgpu/polaris10_rlc.bin: could not load firmware image, error 2
amdgpu/polaris10_mec.bin: could not load firmware image, error 2
amdgpu/polaris10_mec.bin: could not load firmware image, error 2
amdgpu/polaris10_mec2.bin: could not load firmware image, error 2
amdgpu/polaris10_mec2.bin: could not load firmware image, error 2
drmn0: fence driver on ring 0 use gpu addr 0x0000000200000008, cpu addr 0x0xfffff80074106008
drmn0: fence driver on ring 1 use gpu addr 0x0000000200000018, cpu addr 0x0xfffff80074106018
drmn0: fence driver on ring 2 use gpu addr 0x0000000200000028, cpu addr 0x0xfffff80074106028
drmn0: fence driver on ring 3 use gpu addr 0x0000000200000038, cpu addr 0x0xfffff80074106038
drmn0: fence driver on ring 4 use gpu addr 0x0000000200000048, cpu addr 0x0xfffff80074106048
drmn0: fence driver on ring 5 use gpu addr 0x0000000200000058, cpu addr 0x0xfffff80074106058
drmn0: fence driver on ring 6 use gpu addr 0x0000000200000068, cpu addr 0x0xfffff80074106068
drmn0: fence driver on ring 7 use gpu addr 0x0000000200000078, cpu addr 0x0xfffff80074106078
drmn0: fence driver on ring 8 use gpu addr 0x0000000200000088, cpu addr 0x0xfffff80074106088
amdgpu/polaris10_sdma.bin: could not load firmware image, error 2
amdgpu/polaris10_sdma.bin: could not load firmware image, error 2
amdgpu/polaris10_sdma1.bin: could not load firmware image, error 2
amdgpu/polaris10_sdma1.bin: could not load firmware image, error 2
drmn0: fence driver on ring 9 use gpu addr 0x0000000200000098, cpu addr 0x0xfffff80074106098
drmn0: fence driver on ring 10 use gpu addr 0x00000002000000a8, cpu addr 0x0xfffff800741060a8
amdgpu/polaris10_uvd.bin: could not load firmware image, error 2
amdgpu/polaris10_uvd.bin: could not load firmware image, error 2
[drm] Found UVD firmware Version: 1.130 Family ID: 16
drmn0: fence driver on ring 11 use gpu addr 0x0000000002086a80, cpu addr 0x0xfffff800e2086a80
amdgpu/polaris10_vce.bin: could not load firmware image, error 2
amdgpu/polaris10_vce.bin: could not load firmware image, error 2
[drm] Found VCE firmware Version: 52.4 Binary ID: 3
drmn0: fence driver on ring 12 use gpu addr 0x00000002000000c8, cpu addr 0x0xfffff800741060c8
drmn0: fence driver on ring 13 use gpu addr 0x00000002000000d8, cpu addr 0x0xfffff800741060d8
amdgpu/polaris10_smc.bin: could not load firmware image, error 2
amdgpu/polaris10_smc.bin: could not load firmware image, error 2
[AVFS] Something is broken. See log!
failed to send message 254 ret is 0 
VDDCI is larger than max VDDCI in VDDCI Voltage Table!

failed to send pre message 14a ret is 0 

failed to send message 14a ret is 0 

failed to send pre message 5d ret is 0 

failed to send message 5d ret is 0 

failed to send pre message 109 ret is 0 

failed to send message 109 ret is 0 

failed to send pre message 62 ret is 0 

failed to send message 62 ret is 0 

failed to send pre message 18f ret is 0 

failed to send message 18f ret is 0 

failed to send pre message 301 ret is 0 

failed to send message 301 ret is 0 

failed to send pre message 109 ret is 0 

failed to send message 109 ret is 0 

failed to send pre message 14e ret is 0 

failed to send message 14e ret is 0 

failed to send pre message 150 ret is 0 

failed to send message 150 ret is 0 

failed to send pre message 136 ret is 0 

failed to send message 136 ret is 0 

failed to send pre message 53 ret is 0 

failed to send message 53 ret is 0 

failed to send pre message 169 ret is 0 

failed to send message 169 ret is 0 

failed to send pre message 185 ret is 0 

failed to send message 185 ret is 0 

failed to send pre message 187 ret is 0 

failed to send message 187 ret is 0 

failed to send pre message 188 ret is 0 

failed to send message 188 ret is 0 

failed to send pre message 10a ret is 0 

failed to send message 10a ret is 0 

failed to send pre message 305 ret is 0 

failed to send message 305 ret is 0 

failed to send pre message 26a ret is 0 

failed to send message 26a ret is 0 

failed to send pre message 209 ret is 0 

failed to send message 209 ret is 0 

failed to send pre message 206 ret is 0 

failed to send message 206 ret is 0 

failed to send pre message 5b ret is 0 

failed to send message 5b ret is 0 

failed to send pre message 205 ret is 0 

failed to send message 205 ret is 0 

failed to send pre message 20a ret is 0 

failed to send message 20a ret is 0 
[drm:gfx_v8_0_ring_test_ring] amdgpu: ring 0 test failed (scratch(0xC040)=0xCAFEDEAD)
[drm:amdgpu_init] hw_init of IP block <gfx_v8_0> failed -22
drmn0: amdgpu_init failed

failed to send pre message 133 ret is 0 

failed to send message 133 ret is 0 
DPM is not running right now, no need to disable DPM!

failed to send pre message 261 ret is 0 

failed to send message 261 ret is 0 

failed to send pre message 261 ret is 0 

failed to send message 261 ret is 0 

failed to send pre message 261 ret is 0 

failed to send message 261 ret is 0 

failed to send pre message 261 ret is 0 

failed to send message 261 ret is 0 

failed to send pre message 261 ret is 0 

failed to send message 261 ret is 0 

failed to send pre message 261 ret is 0 

failed to send message 261 ret is 0 

failed to send pre message 261 ret is 0 

failed to send message 261 ret is 0 

failed to send pre message 261 ret is 0 

failed to send message 261 ret is 0 

failed to send pre message 261 ret is 0 

failed to send message 261 ret is 0 

failed to send pre message 261 ret is 0 

failed to send message 261 ret is 0 
[TTM] Finalizing pool allocator
Zone  kernel: Used memory at exit: 816 kiB
Zone   dma32: Used memory at exit: 816 kiB
[drm] amdgpu: ttm finalized
drmn0: Fatal error during GPU init
[drm] amdgpu: finishing device.
[TTM] Memory type 2 has not been initialized
device_attach: drmn0 attach returned 22
 

abishai

Aspiring Daemon

Reaction score: 141
Messages: 630

I believe, the correct driver location is /boot/modules/amdgpu.ko
 

slackz

New Member

Reaction score: 1
Messages: 2

pestslent1 Fantastic! Thanks for opening this thread; and thanks others for your responses.
Just want to confirm this worked nicely for me. AMD Radeon RX 580, on FreeBSD 11.2-BETA3 now, installed drm-stable-kmod port, and added the following lines:

Code:
# /etc/rc.conf
kld_list="amdgpu"

# /boot/loader.conf
hw.syscons.disable="1"
rebooted and startx worked like a charm!
Thanks jmd and other FreeBSD maintainers for all your work. So excited to get FreeBSD rolling as my main desktop system!
 

cabriofahrer

Active Member

Reaction score: 8
Messages: 138

Although I am an Nvidia user, I am always interested in knowing about support for the latest AMD cards, so thanks for this thread! Still got a few questions, though:

What version of Opengl are you getting with this?
Can you run the unigine benchmark?
Can you run a game like Crysis (works fine with wine/nvidia)?
Does hardware video decoding work now with the new drm?
 
OP
OP
pestslent1

pestslent1

Member

Reaction score: 2
Messages: 55

3.1 Mesa 18.1.0 (mentions DRM 3.8.0)
no unigine (pkg and ports seem to be removed) glmark2 score at 1920 x 1080 =4954 (11.2 rc1 and kde5)
I do not play games, so I can't help there
I use handbrake (I think that uses cpu though) What is available in fresh ports, I am willing to try it out ( I do not know what the "new drm" is ( I know it's digital right management))
The glmark2 info shows DRM 3.8.0
 

cabriofahrer

Active Member

Reaction score: 8
Messages: 138

3.1 Mesa 18.1.0 (mentions DRM 3.8.0)
Thanks for the info. I also found this:

https://mesa3d.org/relnotes/18.1.0.html

So in theory OpenGL 4.5 should be possible, depending on the driver. So it looks like in spite of drm-next there is no point in buying an amd-card capable of doing more than OpenGL 3.1 when using FreeBSD, what a pity. Thank god there is official support by Nvidia for FreeBSD...
 

roccobaroccoSC

Member

Reaction score: 5
Messages: 40

I have an AMD RX580 card and I got the same problem like pestslent1, the amdgpu driver cannot load its firmware.
I am able to start X, however, the graphic is rendered through the modesetting driver and it's really slow. Videos are impossible to watch.
I installed FreeBSD 11.2-RC3, amdx64.
xf86-video-amdgpu and drm-stable-kmod are installed, also lang/clover for OpenCL support.

I also added as suggested above:
# /boot/loader.conf
hw.syscons.disable=1
# /etc/rc.conf
kld_list="amdgpu"

While it helps that I can start X and KDE4, X uses the wrong driver and amdgpu still has the firmware problem.

Any suggestions?

Here is the dmesg log:
Code:
# dmesg
...
[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 (POLARIS10 0x1002:0x67DF 0x1DA2:0xE366 0xE7).
[drm] register mmio base: 0xED600000
[drm] register mmio size: 262144
[drm] doorbell mmio base: 0xE0000000
[drm] doorbell mmio size: 2097152
[drm] PCI I/O BAR is not found.
[drm] probing gen 2 caps for device 1022:1453 = 733903/e
[drm] probing mlw for device 1002:67df = 440903
[drm] UVD is enabled in VM mode
[drm] VCE enabled in VM mode
[drm] BIOS signature incorrect 0 0
[drm] PCI I/O BAR is not found. Using MMIO to access ATOM BIOS
ATOM BIOS: E366
[drm] GPU post is not needed
amdgpu/polaris10_mc.bin: could not load firmware image, error 2
ugen3.4: <vendor 0x046d Gaming Keyboard> at usbus3 (disconnected)
ukbd2: at uhub4, port 1, addr 3 (disconnected)
ukbd2: detached
amdgpu/polaris10_mc.bin: could not load firmware image, error 2
drmn0: VRAM: 8192M 0x0000000000000000 - 0x00000001FFFFFFFF (8192M used)
drmn0: GTT: 8192M 0x0000000200000000 - 0x00000003FFFFFFFF
[drm] Detected VRAM RAM=8192M, BAR=256M
[drm] RAM width 256bits GDDR5
[TTM] Zone  kernel: Available graphics memory: 33469468 kiB
[TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[TTM] Initializing pool allocator
[drm] amdgpu: 8192M of VRAM memory ready
[drm] amdgpu: 8192M of GTT memory ready.
i_size_write unimplemented
[drm] GART: num cpu pages 2097152, num gpu pages 2097152
[drm] PCIE GART of 8192M enabled (table at 0x0000000000040000).
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] amdgpu: irq initialized.
amdgpu: [powerplay] amdgpu: powerplay sw initialized
[drm] Connector DP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-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 HDMI-A-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-2
[drm]   - kern.vt.fb.default_mode
[drm] Connector DVI-D-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DVI-D-1
[drm]   - kern.vt.fb.default_mode
[drm] AMDGPU Display Connectors
[drm] Connector 0:
[drm]   DP-1
[drm]   HPD6
[drm]   DDC: 0x4868 0x4868 0x4869 0x4869 0x486a 0x486a 0x486b 0x486b
[drm]   Encoders:
[drm]     DFP1: INTERNAL_UNIPHY2
[drm] Connector 1:
[drm]   DP-2
[drm]   HPD4
[drm]   DDC: 0x4870 0x4870 0x4871 0x4871 0x4872 0x4872 0x4873 0x4873
[drm]   Encoders:
[drm]     DFP2: INTERNAL_UNIPHY2
[drm] Connector 2:
[drm]   HDMI-A-1
[drm]   HPD1
[drm]   DDC: 0x486c 0x486c 0x486d 0x486d 0x486e 0x486e 0x486f 0x486f
[drm]   Encoders:
[drm]     DFP3: INTERNAL_UNIPHY1
[drm] Connector 3:
[drm]   HDMI-A-2
[drm]   HPD5
[drm]   DDC: 0x4874 0x4874 0x4875 0x4875 0x4876 0x4876 0x4877 0x4877
[drm]   Encoders:
[drm]     DFP4: INTERNAL_UNIPHY1
[drm] Connector 4:
[drm]   DVI-D-1
[drm]   HPD3
[drm]   DDC: 0x487c 0x487c 0x487d 0x487d 0x487e 0x487e 0x487f 0x487f
[drm]   Encoders:
[drm]     DFP5: INTERNAL_UNIPHY
amdgpu/polaris10_pfp.bin: could not load firmware image, error 2
ugen3.5: <vendor 0x046d G11 Keyboard> at usbus3 (disconnected)
uhub4: detached
uhub1: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus3
amdgpu/polaris10_pfp.bin: could not load firmware image, error 2
uhub1: 8 ports with 8 removable, self powered
amdgpu/polaris10_me.bin: could not load firmware image, error 2
amdgpu/polaris10_me.bin: could not load firmware image, error 2
ugen3.2: <Razer Razer DeathAdder 2013> at usbus3
ukbd0 on uhub1
ukbd0: <Razer Razer DeathAdder 2013, class 0/0, rev 2.00/2.00, addr 1> on usbus3
kbd2 at ukbd0
ukbd1 on uhub1
ukbd1: <Razer Razer DeathAdder 2013, class 0/0, rev 2.00/2.00, addr 1> on usbus3
kbd3 at ukbd1
amdgpu/polaris10_ce.bin: could not load firmware image, error 2
amdgpu/polaris10_ce.bin: could not load firmware image, error 2
ugen3.3: <vendor 0x046d G11 Keyboard> at usbus3
uhub4 on uhub1
uhub4: <vendor 0x046d G11 Keyboard, class 9/0, rev 1.10/1.71, addr 2> on usbus3
amdgpu/polaris10_rlc.bin: could not load firmware image, error 2
uhub4: 4 ports with 2 removable, bus powered
amdgpu/polaris10_rlc.bin: could not load firmware image, error 2
amdgpu/polaris10_mec.bin: could not load firmware image, error 2
ugen3.4: <vendor 0x046d Gaming Keyboard> at usbus3
ukbd2 on uhub4
ukbd2: <vendor 0x046d Gaming Keyboard, class 0/0, rev 2.00/1.90, addr 3> on usbus3
kbd4 at ukbd2
amdgpu/polaris10_mec.bin: could not load firmware image, error 2
amdgpu/polaris10_mec2.bin: could not load firmware image, error 2
ugen3.5: <vendor 0x046d G11 Keyboard> at usbus3
amdgpu/polaris10_mec2.bin: could not load firmware image, error 2
drmn0: fence driver on ring 0 use gpu addr 0x0000000200000008, cpu addr 0x0xfffff8005175b008
i_size_write unimplemented
drmn0: fence driver on ring 1 use gpu addr 0x0000000200000018, cpu addr 0x0xfffff8005175b018
i_size_write unimplemented
drmn0: fence driver on ring 2 use gpu addr 0x0000000200000028, cpu addr 0x0xfffff8005175b028
i_size_write unimplemented
drmn0: fence driver on ring 3 use gpu addr 0x0000000200000038, cpu addr 0x0xfffff8005175b038
i_size_write unimplemented
drmn0: fence driver on ring 4 use gpu addr 0x0000000200000048, cpu addr 0x0xfffff8005175b048
i_size_write unimplemented
drmn0: fence driver on ring 5 use gpu addr 0x0000000200000058, cpu addr 0x0xfffff8005175b058
i_size_write unimplemented
drmn0: fence driver on ring 6 use gpu addr 0x0000000200000068, cpu addr 0x0xfffff8005175b068
i_size_write unimplemented
drmn0: fence driver on ring 7 use gpu addr 0x0000000200000078, cpu addr 0x0xfffff8005175b078
i_size_write unimplemented
drmn0: fence driver on ring 8 use gpu addr 0x0000000200000088, cpu addr 0x0xfffff8005175b088
i_size_write unimplemented
drmn0: fence driver on ring 9 use gpu addr 0x0000000200000098, cpu addr 0x0xfffff8005175b098
i_size_write unimplemented
amdgpu/polaris10_sdma.bin: could not load firmware image, error 2
amdgpu/polaris10_sdma.bin: could not load firmware image, error 2
amdgpu/polaris10_sdma1.bin: could not load firmware image, error 2
amdgpu/polaris10_sdma1.bin: could not load firmware image, error 2
drmn0: fence driver on ring 10 use gpu addr 0x00000002000000a8, cpu addr 0x0xfffff8005175b0a8
i_size_write unimplemented
drmn0: fence driver on ring 11 use gpu addr 0x00000002000000b8, cpu addr 0x0xfffff8005175b0b8
i_size_write unimplemented
amdgpu/polaris10_uvd.bin: could not load firmware image, error 2
amdgpu/polaris10_uvd.bin: could not load firmware image, error 2
[drm] Found UVD firmware Version: 1.130 Family ID: 16
drmn0: fence driver on ring 12 use gpu addr 0x0000000001166a80, cpu addr 0x0xfffff800d1166a80
i_size_write unimplemented
amdgpu/polaris10_vce.bin: could not load firmware image, error 2
amdgpu/polaris10_vce.bin: could not load firmware image, error 2
[drm] Found VCE firmware Version: 52.4 Binary ID: 3
drmn0: fence driver on ring 13 use gpu addr 0x00000002000000d8, cpu addr 0x0xfffff8005175b0d8
i_size_write unimplemented
drmn0: fence driver on ring 14 use gpu addr 0x00000002000000e8, cpu addr 0x0xfffff8005175b0e8
i_size_write unimplemented
amdgpu/polaris10_k_smc.bin: could not load firmware image, error 2
amdgpu/polaris10_k_smc.bin: could not load firmware image, error 2
amdgpu: [powerplay] [AVFS] Something is broken. See log!
amdgpu: [powerplay] Can't find requested voltage id in vdd_dep_on_sclk table!
[drm] ring test on 1 succeeded in 22 usecs
[drm] ring test on 2 succeeded in 48 usecs
[drm] ring test on 3 succeeded in 38 usecs
[drm] ring test on 4 succeeded in 15 usecs
[drm] ring test on 5 succeeded in 15 usecs
[drm] ring test on 6 succeeded in 15 usecs
[drm] ring test on 7 succeeded in 14 usecs
[drm] ring test on 8 succeeded in 15 usecs
[drm] ring test on 9 succeeded in 15 usecs
[drm] ring test on 10 succeeded in 7 usecs
[drm] ring test on 11 succeeded in 7 usecs
[drm] ring test on 12 succeeded in 1 usecs
[drm] UVD initialized successfully.
[drm] ring test on 13 succeeded in 10 usecs
[drm] ring test on 14 succeeded in 5 usecs
[drm] VCE initialized successfully.
[drm] fb mappable at 0xD14E7000
[drm] vram apper at 0xD0000000
[drm] size 14745600
[drm] fb depth is 24
[drm]    pitch is 10240
VT: Replacing driver "vga" with new "fb".
start FB_INFO:
type=11 height=1440 width=2560 depth=32
cmsize=16 size=14745600
pbase=0xd14e7000 vbase=0xfffff800d14e7000
name=drmn0 flags=0x0 stride=10240 bpp=32
cmap[0]=0 cmap[1]=7f0000 cmap[2]=7f00 cmap[3]=c4a000
end FB_INFO
drmn0: fb0: amdgpudrmfb frame buffer device
[drm] ib test on ring 1 succeeded
[drm] ib test on ring 2 succeeded
[drm] ib test on ring 3 succeeded
[drm] ib test on ring 4 succeeded
[drm] ib test on ring 5 succeeded
[drm] ib test on ring 6 succeeded
[drm] ib test on ring 7 succeeded
[drm] ib test on ring 8 succeeded
[drm] ib test on ring 9 succeeded
[drm] ib test on ring 10 succeeded
[drm] ib test on ring 11 succeeded
[drm] ib test on ring 12 succeeded
[drm] ib test on ring 13 succeeded
[drm] registered fictitious range 0xd0000000-0xe0000000
i_size_write unimplemented
[drm] Initialized amdgpu 3.10.0 20150101 for drmn0 on minor 0
Inside Xorg log:
Code:
[    24.017] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[    24.017] (II) The server relies on devd to provide the list of input devices.
        If no devices become available, reconfigure devd or disable AutoAddDevices.
[    24.017] (II) Loader magic: 0x80fe80
[    24.017] (II) Module ABI versions:
[    24.017]    X.Org ANSI C Emulation: 0.4
[    24.017]    X.Org Video Driver: 20.0
[    24.017]    X.Org XInput driver : 22.1
[    24.017]    X.Org Server Extension : 9.0
[    24.017] (--) PCI:*(0:66:0:0) 1002:67df:1da2:e366 rev 231, Mem @ 0xd0000000/268435456, 0xe0000000/2097152, 0xed600000/262144, I/O @ 0x0000e000/256, BIOS @ 0x????????/65536
[    24.017] (II) LoadModule: "glx"
[    24.017] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    24.025] (II) Module glx: vendor="X.Org Foundation"
[    24.025]    compiled for 1.18.4, module version = 1.0.0
[    24.025]    ABI class: X.Org Server Extension, version 9.0
[    24.025] (==) AIGLX enabled
[    24.025] (==) Matched ati as autoconfigured driver 0
[    24.025] (==) Matched modesetting as autoconfigured driver 1
[    24.025] (==) Matched scfb as autoconfigured driver 2
[    24.025] (==) Matched vesa as autoconfigured driver 3
[    24.025] (==) Assigned the driver to the xf86ConfigLayout
[    24.025] (II) LoadModule: "ati"
[    24.025] (WW) Warning, couldn't open module ati
[    24.025] (II) UnloadModule: "ati"
[    24.025] (II) Unloading ati
[    24.025] (EE) Failed to load module "ati" (module does not exist, 0)
[    24.025] (II) LoadModule: "modesetting"
[    24.025] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[    24.026] (II) Module modesetting: vendor="X.Org Foundation"
[    24.026]    compiled for 1.18.4, module version = 1.18.4
[    24.026]    Module class: X.Org Video Driver
[    24.026]    ABI class: X.Org Video Driver, version 20.0
[    24.026] (II) LoadModule: "scfb"
[    24.026] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
[    24.026] (II) Module scfb: vendor="X.Org Foundation"
[    24.026]    compiled for 1.18.4, module version = 0.0.4
[    24.026]    ABI class: X.Org Video Driver, version 20.0
[    24.026] (II) LoadModule: "vesa"
[    24.026] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
[    24.027] (II) Module vesa: vendor="X.Org Foundation"
[    24.027]    compiled for 1.18.4, module version = 2.4.0
[    24.027]    Module class: X.Org Video Driver
[    24.027]    ABI class: X.Org Video Driver, version 20.0
[    24.027] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    24.027] (II) scfb: driver for wsdisplay framebuffer: scfb
[    24.027] (II) VESA: driver for VESA chipsets: vesa
[    24.027] (--) Using syscons driver with X support (version 2.0)
[    24.027] (--) using VT number 9

[    24.031] (**) modeset(0): claimed PCI slot 66@0:0:0
[    24.031] (II) modeset(0): using default device
[    24.031] (WW) Falling back to old probe method for scfb
[    24.031] scfb trace: probe start
[    24.031] scfb trace: probe done
[    24.031] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    24.033] (II) modeset(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[    24.033] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[    24.033] (==) modeset(0): RGB weight 888
[    24.033] (==) modeset(0): Default visual is TrueColor
[    24.033] (II) Loading sub module "glamoregl"
[    24.033] (II) LoadModule: "glamoregl"
[    24.034] (II) Loading /usr/local/lib/xorg/modules/libglamoregl.so
[    24.042] (II) Module glamoregl: vendor="X.Org Foundation"
[    24.042]    compiled for 1.18.4, module version = 1.0.0
[    24.042]    ABI class: X.Org ANSI C Emulation, version 0.4
[    24.042] (II) glamor: OpenGL accelerated X.org driver based.
[    24.269] (II) glamor: EGL version 1.5 (DRI2):
[    24.276] (II) modeset(0): glamor initialized
clinfo:
Code:
# clinfo
amdgpu_device_initialize: amdgpu_get_auth (1) failed (-1)
amdgpu: amdgpu_device_initialize failed.
do_winsys_init: DRM version is 3.10.0 but this driver is only compatible with 2.12.0 (kernel 3.2) or later.
Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 17.3.9
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   Clover
Number of devices                                 0

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Clover
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Clover
  clCreateContext(NULL, ...) [default]            No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No devices found in platform

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.11
  ICD loader Profile                              OpenCL 2.1
Code:
# find /boot/modules | grep -i polaris   
/boot/modules/amdgpu_polaris10_smc_sk_bin.ko
/boot/modules/amdgpu_polaris11_ce_2_bin.ko
/boot/modules/amdgpu_polaris11_uvd_bin.ko
/boot/modules/amdgpu_polaris11_mec_2_bin.ko
/boot/modules/amdgpu_polaris10_mec_2_bin.ko
/boot/modules/amdgpu_polaris12_mec_2_bin.ko
/boot/modules/amdgpu_polaris11_ce_bin.ko
/boot/modules/amdgpu_polaris11_sdma_bin.ko
/boot/modules/amdgpu_polaris11_rlc_bin.ko
/boot/modules/amdgpu_polaris10_ce_bin.ko
/boot/modules/amdgpu_polaris11_vce_bin.ko
/boot/modules/amdgpu_polaris12_ce_bin.ko
/boot/modules/amdgpu_polaris10_k_smc_bin.ko
/boot/modules/amdgpu_polaris11_mec2_2_bin.ko
/boot/modules/amdgpu_polaris11_k_smc_bin.ko
/boot/modules/amdgpu_polaris11_mec2_bin.ko
/boot/modules/amdgpu_polaris11_pfp_bin.ko
/boot/modules/amdgpu_polaris11_smc_bin.ko
/boot/modules/amdgpu_polaris11_me_2_bin.ko
/boot/modules/amdgpu_polaris11_mec_bin.ko
/boot/modules/amdgpu_polaris10_me_bin.ko
/boot/modules/amdgpu_polaris12_me_2_bin.ko
/boot/modules/amdgpu_polaris11_me_bin.ko
/boot/modules/amdgpu_polaris12_me_bin.ko
/boot/modules/amdgpu_polaris10_mec2_2_bin.ko
/boot/modules/amdgpu_polaris10_mec_bin.ko
/boot/modules/amdgpu_polaris10_sdma_bin.ko
/boot/modules/amdgpu_polaris10_smc_bin.ko
/boot/modules/amdgpu_polaris10_pfp_bin.ko
/boot/modules/amdgpu_polaris12_mec2_bin.ko
/boot/modules/amdgpu_polaris10_rlc_bin.ko
/boot/modules/amdgpu_polaris10_me_2_bin.ko
/boot/modules/amdgpu_polaris12_pfp_2_bin.ko
/boot/modules/amdgpu_polaris10_mec2_bin.ko
/boot/modules/amdgpu_polaris10_pfp_2_bin.ko
/boot/modules/amdgpu_polaris12_uvd_bin.ko
/boot/modules/amdgpu_polaris12_sdma_bin.ko
/boot/modules/amdgpu_polaris10_vce_bin.ko
/boot/modules/amdgpu_polaris11_pfp_2_bin.ko
/boot/modules/amdgpu_polaris12_sdma1_bin.ko
/boot/modules/amdgpu_polaris12_pfp_bin.ko
/boot/modules/amdgpu_polaris10_sdma1_bin.ko
/boot/modules/amdgpu_polaris12_mec_bin.ko
/boot/modules/amdgpu_polaris10_ce_2_bin.ko
/boot/modules/amdgpu_polaris11_sdma1_bin.ko
/boot/modules/amdgpu_polaris12_smc_bin.ko
/boot/modules/amdgpu_polaris11_mc_bin.ko
/boot/modules/amdgpu_polaris12_mec2_2_bin.ko
/boot/modules/amdgpu_polaris10_mc_bin.ko
/boot/modules/amdgpu_polaris12_rlc_bin.ko
/boot/modules/amdgpu_polaris12_ce_2_bin.ko
/boot/modules/amdgpu_polaris11_smc_sk_bin.ko
/boot/modules/amdgpu_polaris12_vce_bin.ko
/boot/modules/amdgpu_polaris12_mc_bin.ko
/boot/modules/amdgpu_polaris10_uvd_bin.ko
 

roccobaroccoSC

Member

Reaction score: 5
Messages: 40

Hm, I have an idea. It seems amdgpu.ko is searching for firmware files looking like this:
amdgpu/polaris10_mc.bin: could not load firmware image, error 2

However, the modules I can find look more like this:
/boot/modules/amdgpu_polaris10_ce_bin.ko

So instead of amdgpu/polaris10_mc.bin, the driver should be trying to load amdgpu_polaris10_mc_bin, shouldn't it?
 
OP
OP
pestslent1

pestslent1

Member

Reaction score: 2
Messages: 55

Will "hw.syscons.disable="1" in loader.conf still be necessary when the release version of 11.2 is released?
 

roccobaroccoSC

Member

Reaction score: 5
Messages: 40

Hello pestslent1,

Could you please post your configuration? It seems you were able to resolve the issue and start Xorg with amdgpu. I tried copying your configuration but I am unable to load amdgpu. It shows errors about missing firmware (see above).
I would be very thankful if you could post the configuration that worked for you, including:
- version of amdgpu
- version of drm-stable-kmod (or drm-next-kmod)
- FreeBSD version (I believe you use 11.2-RC3, correct?)
- /boot/loader.conf
- /etc/rc.conf
- any Xorg configuration files.

If there is interest, I could post mine, but as written above - they do not work at the moment. I followed the instructions as described above and I use FreeBSD 11.2-RC3.

Thanks in advance for taking the time to share your experience.
 

MYXOMOP

New Member

Reaction score: 2
Messages: 12

I really like the idea of having a relatively powerful card in a completely open system like FreeBSD without having to install any proprietary binary blob to make it work. So I tried my luck with my RX580 and the newly released 11.2.

I'm having a comparable problem as roccobaroccoSC. A fresh install of 11.2 and using amgdpu on RX 580. Also tried an older radeon card - RX 460 with the same results. All installed from ports. Loading a plasma desktop using SDDM works fine and relatively out of the box. I modified /boot/loader.conf and /etc/rc.conf according to this thread. KDE starts, however there are no animations and moving windows around is unbearably slow. Is it a driver issue or is it a compositing issue?
Any ideas and help greatly appreciated!

PS: This machine is for experimenting purposes currently so I can provide/tweak any info/setting if required.
 

MYXOMOP

New Member

Reaction score: 2
Messages: 12

While experimenting further, I stumbled upon the following errors in dmesg:


dmesg | grep amd -s3
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018
root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
VT(vga): resolution 640x480
CPU: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz (2593.81-MHz K8-class CPU)
--
[drm] Initialized
[drm] amdgpu kernel modesetting enabled.
drmn0: <drmn> numa-domain 0 on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
--
[drm] register mmio size: 262144
[drm] doorbell mmio base: 0xE0000000
[drm] doorbell mmio size: 2097152
[drm:amdgpu_device_init] Unable to find PCI I/O BAR
[drm] probing gen 2 caps for device 8086:3c08 = 7a7103/e
[drm] probing mlw for device 1002:67ef = 400883
[drm] UVD is enabled in VM mode
[drm] VCE enabled in VM mode
[drm:amdgpu_atombios_init] Unable to find PCI I/O BAR; using MMIO for ATOM IIO
ATOM BIOS: C99401
[drm] GPU post is not needed
amdgpu/polaris11_mc.bin: could not load firmware image, error 2
amdgpu/polaris11_mc.bin: could not load firmware image, error 2
Zone kernel: Available graphics memory: 16718558 kiB
Zone dma32: Available graphics memory: 2097152 kiB
[TTM] Initializing pool allocator
--
drmn0: GTT: 16326M 0x0000000100000000 - 0x00000004FC6B77FF
[drm] Detected VRAM RAM=4096M, BAR=256M
[drm] RAM width 128bits GDDR5
[drm] amdgpu: 4096M of VRAM memory ready
[drm] amdgpu: 16326M of GTT memory ready.
[drm] GART: num cpu pages 4179639, num gpu pages 4179639
[drm] PCIE GART of 16326M enabled (table at 0x0000000000040000).
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] amdgpu: irq initialized.
Can't find requested voltage id in vdd_dep_on_sclk table!
amdgpu: powerplay initialized
[drm] Connector DP-1: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-1
[drm] - kern.vt.fb.default_mode
--
[drm] DDC: 0x4878 0x4878 0x4879 0x4879 0x487a 0x487a 0x487b 0x487b
[drm] Encoders:
[drm] DFP3: INTERNAL_UNIPHY
amdgpu/polaris11_pfp.bin: could not load firmware image, error 2
amdgpu/polaris11_pfp.bin: could not load firmware image, error 2
amdgpu/polaris11_me.bin: could not load firmware image, error 2
amdgpu/polaris11_me.bin: could not load firmware image, error 2
amdgpu/polaris11_ce.bin: could not load firmware image, error 2
amdgpu/polaris11_ce.bin: could not load firmware image, error 2
amdgpu/polaris11_rlc.bin: could not load firmware image, error 2
amdgpu/polaris11_rlc.bin: could not load firmware image, error 2
amdgpu/polaris11_mec.bin: could not load firmware image, error 2
amdgpu/polaris11_mec.bin: could not load firmware image, error 2
amdgpu/polaris11_mec2.bin: could not load firmware image, error 2
amdgpu/polaris11_mec2.bin: could not load firmware image, error 2
drmn0: fence driver on ring 0 use gpu addr 0x0000000100000008, cpu addr 0x0xfffff80064ca7008
drmn0: fence driver on ring 1 use gpu addr 0x0000000100000018, cpu addr 0x0xfffff80064ca7018
drmn0: fence driver on ring 2 use gpu addr 0x0000000100000028, cpu addr 0x0xfffff80064ca7028
--
drmn0: fence driver on ring 6 use gpu addr 0x0000000100000068, cpu addr 0x0xfffff80064ca7068
drmn0: fence driver on ring 7 use gpu addr 0x0000000100000078, cpu addr 0x0xfffff80064ca7078
drmn0: fence driver on ring 8 use gpu addr 0x0000000100000088, cpu addr 0x0xfffff80064ca7088
amdgpu/polaris11_sdma.bin: could not load firmware image, error 2
amdgpu/polaris11_sdma.bin: could not load firmware image, error 2
amdgpu/polaris11_sdma1.bin: could not load firmware image, error 2
amdgpu/polaris11_sdma1.bin: could not load firmware image, error 2
drmn0: fence driver on ring 9 use gpu addr 0x0000000100000098, cpu addr 0x0xfffff80064ca7098
drmn0: fence driver on ring 10 use gpu addr 0x00000001000000a8, cpu addr 0x0xfffff80064ca70a8
amdgpu/polaris11_uvd.bin: could not load firmware image, error 2
amdgpu/polaris11_uvd.bin: could not load firmware image, error 2
[drm] Found UVD firmware Version: 1.130 Family ID: 16
drmn0: fence driver on ring 11 use gpu addr 0x0000000002081a80, cpu addr 0x0xfffff800d2081a80
amdgpu/polaris11_vce.bin: could not load firmware image, error 2
amdgpu/polaris11_vce.bin: could not load firmware image, error 2
[drm] Found VCE firmware Version: 52.4 Binary ID: 3
drmn0: fence driver on ring 12 use gpu addr 0x00000001000000c8, cpu addr 0x0xfffff80064ca70c8
drmn0: fence driver on ring 13 use gpu addr 0x00000001000000d8, cpu addr 0x0xfffff80064ca70d8
amdgpu/polaris11_smc.bin: could not load firmware image, error 2
amdgpu/polaris11_smc.bin: could not load firmware image, error 2
[AVFS] Something is broken. See log!<6>[drm] ring test on 0 succeeded in 21 usecs
[drm] ring test on 1 succeeded in 62 usecs
[drm] ring test on 2 succeeded in 32 usecs
--
name=drmn0 flags=0x0 stride=7680 bpp=32
cmap[0]=0 cmap[1]=7f0000 cmap[2]=7f00 cmap[3]=c4a000
end FB_INFO
drmn0: fb0: amdgpudrmfb frame buffer device
[drm] ib test on ring 0 succeeded
[drm] ib test on ring 1 succeeded
[drm] ib test on ring 2 succeeded
--
[drm] ib test on ring 11 succeeded
[drm] ib test on ring 12 succeeded
[drm] registered fictitious range 0xd0000000-0xe0000000
[drm] Initialized amdgpu 3.8.0 20150101 for drmn on minor 0



It definitely appears that the direction of roccobaroccoSC is correct and that the firmware cannot be loaded.

I also installed graphics/mesa-demos for the kicks of it.

The output of glxinfo:

LIBGL_DEBUG=verbose glxinfo | grep ren
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/local/lib/dri/swrast_dri.so
libGL: Can't open configuration file /home/nick/.drirc: No such file or directory.
libGL: Can't open configuration file /home/nick/.drirc: No such file or directory.
direct rendering: Yes
GLX_SGIX_visual_select_group, GLX_SGI_make_current_read
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
GLX_SGIX_visual_select_group, GLX_SGI_make_current_read,
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_make_current_read
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: llvmpipe (LLVM 6.0, 256 bits)
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_packed_depth_stencil,
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_NV_blend_square, GL_NV_conditional_render, GL_NV_depth_clamp,
GL_OES_element_index_uint, GL_OES_fbo_render_mipmap,


As one can see there is no mention of radeon/amd.

The output of glxgears:

glxgears
1122 frames in 5.0 seconds = 224.270 FPS
254 frames in 5.0 seconds = 50.766 FPS
246 frames in 5.0 seconds = 49.118 FPS
245 frames in 5.0 seconds = 48.915 FPS
229 frames in 5.0 seconds = 45.588 FPS
248 frames in 5.0 seconds = 49.589 FPS
243 frames in 5.0 seconds = 48.596 FPS
246 frames in 5.0 seconds = 49.100 FPS
247 frames in 5.0 seconds = 49.373 FPS
244 frames in 5.0 seconds = 48.615 FPS


So all points to a wrong/fallback driver being loaded. My current setup:
- graphics/drm-stable-kmod
- graphics/gpu-firmware-kmod
- x11/xorg
- x11/kde5
- x11/sddm
- sysutils/hal
- graphics/mesa-demos

It seems that there is only a small piece of the puzzle missing... Any help is greatly appreciated! Thanks in advance :)
 
OP
OP
pestslent1

pestslent1

Member

Reaction score: 2
Messages: 55

Hello pestslent1,

Could you please post your configuration? It seems you were able to resolve the issue and start Xorg with amdgpu. I tried copying your configuration but I am unable to load amdgpu. It shows errors about missing firmware (see above).
I would be very thankful if you could post the configuration that worked for you, including:
- version of amdgpu
- version of drm-stable-kmod (or drm-next-kmod)
- FreeBSD version (I believe you use 11.2-RC3, correct?)
- /boot/loader.conf
- /etc/rc.conf
- any Xorg configuration files.

If there is interest, I could post mine, but as written above - they do not work at the moment. I followed the instructions as described above and I use FreeBSD 11.2-RC3.

Thanks in advance for taking the time to share your experience.
now on FreeBSD 11.2-RELEASE
Sadly I do not know how to find out :version of amdgpu"
No: drm-next-kmod

Code:
root@vmbsd:/usr/home/pete # pkg info drm-stable-kmod
drm-stable-kmod-g20180505_5
Name           : drm-stable-kmod
Version        : g20180505_5
Installed on   : Tue May 29 06:08:14 2018 EDT
Origin         : graphics/drm-stable-kmod
Architecture   : FreeBSD:11: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: 1101515
Flat size      : 7.64MiB
Description    :
amdgpu, i915, and radeon DRM modules for the linuxkpi-based KMS components.
Currently corresponding to Linux 4.9 DRM. More stable state. amdgpu and
radeonkms are known to fail with EFI boot.

WWW: https://github.com/FreeBSDDesktop/kms-drm
rc.conf
Code:
zfs_enable="YES"
clear_tmp_enable="YES"
hostname="vmbsd"
ifconfig_re0="DHCP"
ifconfig_re0="inet 192.168.1.69 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
sendmail_enable="NONE"
kld_list="/boot/modules/amdgpu.ko"
dbus_enable="YES"
hald_enable="YES"
sddm_enable="YES"
xrdp_enable="YES"
xrdp_sesman_enable="YES"
samba_server_enable="YES"
fuse_enable="YES"
vm_enable="YES"
vm_dir="/mnt/bhyve/HyperV"
vm_list="2012r2 vistadl 7bubsd"
vm_delay="10"
loader.conf
Code:
kern.vty=vt
zfs_load="YES"
fuse_load="YES"
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
vmm_load="YES"
nmdm_load="YES"
if_bridge_load="YES"
if_tap_load="YES"
hw.vmm.amdvi.enable=1
hw.vmm.topology.cores_per_package=4
#hw.vmm.topology.threads_per_core=2
pptdevs="40/0/0"
hw.syscons.disable="1"
not sure if this is relevant due to location
/etc/X11/xrdp//xorg .conf
Code:
Section "ServerLayout"
    Identifier "X11 Server"
    Screen "Screen (xrdpdev)"
    InputDevice "xrdpMouse" "CorePointer"
    InputDevice "xrdpKeyboard" "CoreKeyboard"
EndSection

Section "ServerFlags"
    Option "DontVTSwitch" "on"
    Option "AutoAddDevices" "off"
EndSection

Section "Module"
    Load "dbe"
    Load "ddc"
    Load "extmod"
    Load "glx"
    Load "int10"
    Load "record"
    Load "vbe"
    Load "xorgxrdp"
    Load "fb"
EndSection

Section "InputDevice"
    Identifier "xrdpKeyboard"
    Driver "xrdpkeyb"
EndSection

Section "InputDevice"
    Identifier "xrdpMouse"
    Driver "xrdpmouse"
EndSection

Section "Monitor"
    Identifier "Monitor"
    Option "DPMS"
    HorizSync 30-80
    VertRefresh 60-75
    ModeLine "1920x1080" 138.500 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync
    ModeLine "1280x720" 74.25 1280 1720 1760 1980 720 725 730 750 +HSync +VSync
    Modeline "1368x768" 72.25 1368 1416 1448 1528 768 771 781 790 +hsync -vsync
    Modeline "1600x900" 119.00 1600 1696 1864 2128 900 901 904 932 -hsync +vsync
EndSection

Section "Device"
    Identifier "Video Card (xrdpdev)"
    Driver "xrdpdev"
EndSection

Section "Screen"
    Identifier "Screen (xrdpdev)"
    Device "Video Card (xrdpdev)"
    Monitor "Monitor"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "640x480" "800x600" "1024x768" "1280x720" "1280x1024" "1600x900" "1920x1080"
    EndSubSection
EndSection
Not sure if relevant or necessary
Code:
root@vmbsd:/usr/home/pete # pkg info gpu-firmware-kmod
gpu-firmware-kmod-g20180319_1
Name           : gpu-firmware-kmod
Version        : g20180319_1
Installed on   : Tue May 29 06:08:13 2018 EDT
Origin         : graphics/gpu-firmware-kmod
Architecture   : FreeBSD:11:amd64
Prefix         : /usr/local
Categories     : graphics kld
Licenses       : AMD, INTEL
Maintainer     : jmd@FreeBSD.org
WWW            : https://github.com/FreeBSDDesktop/kms-firmware
Comment        : Firmware modules for the linuxkpi-based KMS components
Annotations    :
        FreeBSD_version: 1101515
Flat size      : 22.7MiB
Description    :
Firmware modules for the linuxkpi-based KMS components.

Amdgpu and i915 firmware files encoded in uu format to generate
loadable kernel modules. Firmware binaries originate from the
linux-firmware repository.

WWW: https://github.com/FreeBSDDesktop/kms-firmware
 

drhowarddrfine

Son of Beastie

Reaction score: 1,071
Messages: 2,979

You should be turning to the manufacturer of the device and device driver for support, not FreeBSD. FreeBSD does not write device drivers.
 

MYXOMOP

New Member

Reaction score: 2
Messages: 12

Thanks for the replies.

I managed to get it working. The culprit was that Xorg does not by default load the amdgpu X driver. But re-configuring it solves the problem.

So here the minimal needed setup in order to get 3D acceleration on new AMD Radeon cards in X:

Install the following ports:
* graphics/drm-stable-kmod/
* graphics/gpu-firmware-kmod/
* x11-drivers/xf86-video-amdgpu/

Re-configure X:
* Xorg -configure

Thanks for making this possible.

PS: on the topic about support and all... AMD is currently collaborating with the linux kernel developers, which is admirable. Thanks to the efforts of making that code also available to FreeBSD users, I feel, that we are past turning to the manufacturer, but should help spread the joyful news instead :)
 

roccobaroccoSC

Member

Reaction score: 5
Messages: 40

I succeeded in making RX 580 work with Xorg. There is a minor glitch: From time to time picture (and sound) freezes for half a second or so. It happens occasionally, but otherwise it behaves very well.
I am posting the tutorial here. Make sure to tweak for your processor and desired environment.
The example is for AMD RYZEN Threadripper CPU, RX 580 videocard with KDE 5.
Bash:
# I installed a standard 11.2-RELEASE FreeBSD on ZFS (2 mirrored nvme drives) with encryption

# After install:
# Important: Boot password is always with en_US keyboard layout!

# Support for AMD RYZEN/Threadripper CPU. Do not use on other CPUs!
echo "CPUTYPE=znver1" >> /etc/make.conf

# Workstation configuration with AMDGPU

    portsnap fetch extract update
  
    cd /usr/ports/ports-mgmt/portmaster
    make install clean BATCH=yes
  
    cd /usr/ports/ports-mgmt/portupgrade
    make install clean BATCH=yes
  
    portmaster --list-origins
  
    portsnap fetch update
    portmaster -Da
    # Or alternatively rebuild all ports like this: https://forums.freebsd.org/threads/rebuilding-all-ports-with-portmaster.51210/
    # Important! This takes a very long time!
    
    # Or use your favorite editor here...
    cd /usr/ports/editors/nano
    make install clean BATCH=yes
  

## Graphics driver amdgpu

    # Direct rendering driver DRM, choose one from "next" or "stable". Next has the latest code.
    cd /usr/ports/graphics/drm-next-kmod/
    #cd /usr/ports/graphics/drm-stable-kmod/
    make install clean BATCH=yes
  
    # This should have been installed by the command above but verify!
    cd /usr/ports/graphics/gpu-firmware-kmod/
    make install clean BATCH=yes
  
    # X driver is a must
    cd /usr/ports/x11-drivers/xf86-video-amdgpu/
    make install clean BATCH=yes
  
    # Xorg configuration
    # 1. create (I get segmentation faults, but the config is created properly nevertheless)
    Xorg -configure
    # 2. Verify that the used driver is amdgpu
    cat /root/xorg.conf.new | grep -s8 amdgpu
    # 3. TearFree option needs to be enabled. Otherwise vertical lines are torn badly in videos.
    nano /root/xorg.conf.new
    # (enable it in Device section)
    Option    "TearFree"    "True"
    # 4. Enable the configuration by copying to the etc location.
    mv /root/xorg.conf.new /usr/local/etc/X11/xorg.conf.d/xorg.conf
  
    # Load amdgpu driver in kernel, /etc/rc.conf
    kld_list="amdgpu"
  
    # This is a workaround for a conflict between UEFI video and AMDGPU.
    # AMDGPU will not work without this workaround, at the time of writing.
    # As a side-effect, first part of the boot process results in jumbled pixels on screen (text is not readable) but  don't panic, it starts working after a few seconds.
    #
    # edit /boot/loader.conf
    hw.syscons.disable=1
    kern.vty=vt
  
  
## Install desktop environment (I use KDE 5, but choose your preferred one). Packages are optional, not needed for AMDGPU to work properly with Xorg.
  
    cd /usr/ports/x11/xorg/
    make install clean BATCH=yes
  
    cd /usr/ports/x11/kde5/
    make install clean BATCH=yes
  
    cd /usr/ports/www/falkon/
    make install clean BATCH=yes
  
    cd /usr/ports/x11/sddm/
    make install clean BATCH=yes

    cd /usr/ports/sysutils/hal/
    make install clean BATCH=yes
  
    cd /usr/ports/accessibility/redshift/
    make install clean BATCH=yes
  
    cd /usr/ports/benchmarks/glmark2
    make install clean BATCH=yes
  
    #cd /usr/ports/graphics/mesa-dri
    #make install clean BATCH=yes
  
    #cd /usr/ports/graphics/mesa-libs
    #make install clean BATCH=yes
  
    cd /usr/ports/graphics/mesa-demos
    make install clean BATCH=yes
  
    cd /usr/ports/lang/clover
    make install clean BATCH=yes
  
    #cd /usr/ports/graphics/vulkan-sdk
    #make install clean BATCH=yes
  
    #cd /usr/ports/games/vkquake
    #make install clean BATCH=yes
  
  
    #cd /usr/ports/graphics/krita/
    #make install clean BATCH=yes

    # Start KDE automatically
    sysrc sddm_enable=YES
    sysrc hald_enable=YES
    sysrc dbus_enable=YES
    service sddm start


# drm-next-kmod requires the user to be in group "video". "wheel" group is necessary for su.
pw usermod john -G video,wheel,operator
Special thanks to pestslent1 and MYXOMOP.
 
Top