From owner-freebsd-questions@freebsd.org Thu May 24 08:28:01 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D515F6D087 for ; Thu, 24 May 2018 08:28:01 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A2107D398 for ; Thu, 24 May 2018 08:28:00 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: by mail-io0-x22e.google.com with SMTP id p124-v6so1310233iod.1 for ; Thu, 24 May 2018 01:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cordula-ws.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=K4z7IFNAsC/8kzdzLx9nfvXbDujQFcXoZWJt3+Nr4NU=; b=ONgsNDHE1zJxjfVmU7F9Io5SBXv/2m/7cUtDRAYH/ZOU2Oz6pdCzuAtaIVOFLPdAVI hUykpr8bJzoV7XxMgX6jduvrBa7AGF/1TzLwSugykJiLscdv8jCNM16fUZW/VAcqY7RD 2Hq6NyP092xf4OJSiNA2V/XYhBNH69kHjTgsUVSO3bBJ4QDTYi5UxLZPFi9AFlowxTPf StLXUT5MpeENwkQzFSXtwKuAV+15c43E3pZagE4vtCV236DcFXyYNOXCBdj/H3F7Wy7t g4K9Qdy7Fq40yhNg8+91c5IFXwZQTwsSB+A2hDnii+0AMKxU4IkbAa2uxN1+2ehPGjM+ 0WLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=K4z7IFNAsC/8kzdzLx9nfvXbDujQFcXoZWJt3+Nr4NU=; b=Myn6GPOov+e2lEx1olS00WFgm12CSNSN/Krc2cSGkC66l0RQRIsafRrcLoS1PgrBPq 91hNSlnF80MT+iE95fM+7MVNlPuyv1eC23PHisBobvaWu1Fb38Epr9K5GFSFx5pN3ezF HK3bRnbppWw9GHfa5gOX3BCCzJr7rAlXnwMkgBzthc5XLRN77bq6PoTFZsUnHG8OxvXX E1OKaiTOQAnfqiDZ/Rx481vGJULmLWTzWcq1OcniJJ5liaFmHq+/MjpJe4sw5R8BTADK uWxyHcZ0PiVT/048W4Lq9srMq/gyi4ElLvzdcCM6CjqG5WfYUoVsZYFCrIEBKSuhmjmN 7UZg== X-Gm-Message-State: ALKqPwe6TZKeoCOP0ArhC3GlgxXpqlwFMZq3QNaYxQtlFAitJbhFcHge XrqeXi9xD3Mkqa7pxbGNaSYYizNs X-Google-Smtp-Source: AB8JxZrj/KS7UgXlyD1QAfjSZ4ik2438n48owjOazzuZRhL660AegmG70V8M+zdA2Q6HcDsFQ5hZdw== X-Received: by 2002:a6b:87d2:: with SMTP id r79-v6mr5502849ioi.275.1527150479905; Thu, 24 May 2018 01:27:59 -0700 (PDT) Received: from [192.168.76.84] ([174.128.236.102]) by smtp.gmail.com with ESMTPSA id y202-v6sm2102943itc.21.2018.05.24.01.27.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 01:27:58 -0700 (PDT) To: FreeBSD Questions From: cpghost Subject: Partial success with Radeon RX580, but no HDMI sound yet Message-ID: Date: Thu, 24 May 2018 10:28:58 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 08:28:01 -0000 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@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: (play) default pcm1: (play) pcm2: (play) pcm3: (play) pcm4: (play) pcm5: (play) pcm6: (play/rec) pcm7: (play) pcm8: (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.