Partial success with Radeon RX580, but no HDMI sound yet
cpghost
cpghost at cordula.ws
Thu May 24 08:28:01 UTC 2018
Hello,
thanks to the heroic efforts of the developers who
ported amdgpu and drm-next-kmod to 11-STABLE, I was
able to get X working on a Radeon RX580 on my system:
FreeBSD monster 11.2-BETA2 FreeBSD 11.2-BETA2 #1 r334062:
Tue May 22 23:46:29 CEST 2018 root at monster:/usr/obj/usr/src/sys/GENERIC amd64
by installing:
x11-drivers/xf86-video-amdgpu
graphics/drm-next-kmod
graphics/gpu-firmware-kmod
then adding to /etc/rc.conf:
kld_list="amdgpu"
and adding myself and root to the group video, as required.
After the reboot, the default VGA console with the big chars
was replaced with a much better-looking vt console, and amdgpu
as well as the firmwares show up in kldstat:
$ kldstat
Id Refs Address Size Name
1 95 0xffffffff80200000 2036448 kernel
2 1 0xffffffff82239000 af98 aesni.ko
3 1 0xffffffff82244000 1e0d8 geom_eli.ko
4 1 0xffffffff82266000 381080 zfs.ko
5 2 0xffffffff825e8000 a380 opensolaris.ko
6 1 0xffffffff825f3000 15da0 fuse.ko
7 1 0xffffffff82609000 89408 vboxdrv.ko
8 1 0xffffffff82821000 15afa8 amdgpu.ko
9 1 0xffffffff8297c000 74b70 drm.ko
10 4 0xffffffff829f1000 edc8 linuxkpi.ko
11 3 0xffffffff82a00000 124a8 linuxkpi_gplv2.ko
12 2 0xffffffff82a13000 6b8 debugfs.ko
13 1 0xffffffff82a14000 8148 amdgpu_polaris10_mc_bin.ko
14 1 0xffffffff82a1d000 4400 amdgpu_polaris10_pfp_bin.ko
15 1 0xffffffff82a22000 4400 amdgpu_polaris10_me_bin.ko
16 1 0xffffffff82a27000 2400 amdgpu_polaris10_ce_bin.ko
17 1 0xffffffff82a2a000 5f30 amdgpu_polaris10_rlc_bin.ko
18 1 0xffffffff82a30000 40400 amdgpu_polaris10_mec_bin.ko
19 1 0xffffffff82a71000 40400 amdgpu_polaris10_mec2_bin.ko
20 1 0xffffffff82ab2000 3318 amdgpu_polaris10_sdma_bin.ko
21 1 0xffffffff82ab6000 3320 amdgpu_polaris10_sdma1_bin.ko
22 1 0xffffffff82aba000 5bc00 amdgpu_polaris10_uvd_bin.ko
23 1 0xffffffff82b16000 28d20 amdgpu_polaris10_vce_bin.ko
24 1 0xffffffff82b3f000 1fe40 amdgpu_polaris10_k_smc_bin.ko
25 1 0xffffffff82b5f000 3698 ng_ubt.ko
26 5 0xffffffff82b63000 9a20 netgraph.ko
27 1 0xffffffff82b6d000 8e78 ng_hci.ko
28 3 0xffffffff82b76000 95c ng_bluetooth.ko
29 1 0xffffffff82b77000 2328 ums.ko
30 1 0xffffffff82b7a000 1780 uhid.ko
31 1 0xffffffff82b7c000 bc0e ng_l2cap.ko
32 1 0xffffffff82b88000 176a8 ng_btsocket.ko
33 1 0xffffffff82ba0000 1d40 ng_socket.ko
To set up X, I deleted my old xorg.conf, and added
/usr/local/etc/X11/xorg.conf.d/10-amdgpu.conf with this:
Section "Device"
Identifier "AMD"
Driver "amdgpu"
Option "DRI" "3"
Option "TearFree" "true"
EndSection
That's it.
glxinfo (from graphics/mesa-demos) reports among others:
Extended renderer info (GLX_MESA_query_renderer):
Vendor: X.Org (0x1002)
Device: Radeon RX 580 Series (POLARIS10 / DRM 3.10.0 / 11.2-BETA2, LLVM 6.0.0) (0x67df)
Version: 18.0.4
Accelerated: yes
Video memory: 8157MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.5
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
Memory info (GL_ATI_meminfo):
VBO free memory - total: 8156 MB, largest block: 8156 MB
VBO free aux. memory - total: 8189 MB, largest block: 8189 MB
Texture free memory - total: 8156 MB, largest block: 8156 MB
Texture free aux. memory - total: 8189 MB, largest block: 8189 MB
Renderbuffer free memory - total: 8156 MB, largest block: 8156 MB
Renderbuffer free aux. memory - total: 8189 MB, largest block: 8189 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 8157 MB
Total available memory: 16347 MB
Currently available dedicated video memory: 8156 MB
OpenGL vendor string: X.Org
OpenGL renderer string: Radeon RX 580 Series (POLARIS10 / DRM 3.10.0 / 11.2-BETA2, LLVM 6.0.0)
and glxgears renders at 60 FPS on my 4K LG TV, which looks about right.
What's still not working is sound output via HDMI:
$ cat /dev/sndstat
Installed devices:
pcm0: <ATI R6xx (HDMI)> (play) default
pcm1: <ATI R6xx (HDMI)> (play)
pcm2: <ATI R6xx (HDMI)> (play)
pcm3: <ATI R6xx (HDMI)> (play)
pcm4: <ATI R6xx (HDMI)> (play)
pcm5: <ATI R6xx (HDMI)> (play)
pcm6: <Realtek ALC1220 (Analog 5.1+HP/2.0)> (play/rec)
pcm7: <Realtek ALC1220 (Rear Digital)> (play)
pcm8: <Realtek ALC1220 (Front Analog Mic)> (rec)
No devices installed from userspace.
I tried setting hw.snd.default_unit from 0 to 8, but no
sound via HDMI (sound is working on the analog device though).
I didn't try switching to another HDMI port.
Any ideas?
Thanks,
-cpghost.
More information about the freebsd-questions
mailing list