From owner-freebsd-ports@freebsd.org Sun Apr 5 12:18:31 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94C782B5406 for ; Sun, 5 Apr 2020 12:18:31 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from msa1.earth.yoonka.com (yoonka.com [88.98.225.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "msa1.earth.yoonka.com", Issuer "msa1.earth.yoonka.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48wCPS3dCTz4mQl for ; Sun, 5 Apr 2020 12:18:19 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from crayon2.yoonka.com (crayon2.yoonka.com [10.70.7.20]) (authenticated bits=0) by msa1.earth.yoonka.com (8.15.2/8.15.2) with ESMTPSA id 035CI8XV034091 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sun, 5 Apr 2020 12:18:09 GMT (envelope-from list1@gjunka.com) Subject: Re: amdgpu panics To: freebsd-ports@freebsd.org References: <6b0092f3-8d90-f1bc-b2ae-cf2fa2f029e0@gjunka.com> <47774b7a-0a6d-8806-6dee-4f0036651ace@gjunka.com> <20200312163447.GB42880@phouka1.phouka.net> <8d8ae2c8-1ecd-5c8c-2437-4e47cf48bd60@gmx.de> From: Grzegorz Junka Message-ID: <96c03c59-b28e-3af1-e98b-e95517c20010@gjunka.com> Date: Sun, 5 Apr 2020 12:18:08 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <8d8ae2c8-1ecd-5c8c-2437-4e47cf48bd60@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 48wCPS3dCTz4mQl X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of list1@gjunka.com designates 88.98.225.149 as permitted sender) smtp.mailfrom=list1@gjunka.com X-Spamd-Result: default: False [-5.85 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:88.98.225.149]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; DMARC_NA(0.00)[gjunka.com]; IP_SCORE(-3.55)[ip: (-9.31), ipnet: 88.98.192.0/18(-4.65), asn: 56478(-3.72), country: GB(-0.07)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:56478, ipnet:88.98.192.0/18, country:GB]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2020 12:18:31 -0000 On 04/04/2020 10:27, Matthias Andree wrote: > Thank you John for the comprehensive explanation. It took me a while to > go through all the details, then again to recompile the ports and try to > reinstall all packages. >> What i discovered in the meantime is that it's not an isolated problem: >> >> >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241787 >> >> https://forums.freebsd.org/threads/upgrading-to-freebsd-12-1-release-resolving-an-issue-with-drm-fbsd12-0-kmod.72895/ >> >> >> >> On my system I indeed had the jail at a different patch level than the >> host system, although they were all running 12.1-RELEASE. I updated >> the host and the jail to 12.1-RELEASE-p3. Poudriere noticed the >> updated jail and deleted and recompiled all 2000+ packages. Then I >> upgraded the system on which I wanted to install the packages to >> 12.1-RELEASE-p3 too. Then I deleted drm-fbsd12.0-kmod and installed >> drm-kmod. It reinstalled drm-fbsd12.0-kmod. >> >> The result? Blank screen!!! >> >> I start as single or normal user then do: >> >> kldload amdgpu >> >> I see the driver is loading various graphics kernel modules then the >> screen goes blank and the whole system hangs. No panic is shown, no >> restart, just hungs. Any SSH sessions to the system become stale. Only >> hard reset is able to restart it. >> >> This is really frustrating and a really bad user experience. I >> wouldn't be surprised if the remained desktop users moved to Linux or >> other FreeBSD forks if they haven't already. >> >> The only option left I see is to also compile the kernel myself from >> sources. > Compared to 2,000 packages that seams a reasonable approach, and then IN > THAT SAME LIVE SYSTEM also rebuild the graphics modules. > > I understand that the poudriere/pkg proponents have aggressively lobbied > users to use pkg and poudriere for clean-room builds, but I wonder if it > isn't easier to forgo poudriere for drivers and instead: > > obtain/update to 12.1-RELEASE-p3 sources in /usr/src (with svn, for > instance) > make buildworld buildkernel > make installkernel > edit your loader.conf[.local] so it doesn't load b0rked graphics modules, > reboot into single-user > mergemaster -Fp > make installworld > mergemaster -Fi > make delete-old # important - there may be 12.0 parts that need removal, > 12.1 for instance updated LLVM > rebuild your kmods and drivers IN THIS LIVE SYSTEM RIGHT FROM PORTS (not > poudriere) > install kmods and drivers > reboot and then gradually manually load kernel drivers such as amdgpu > one by one so you know which work (enable them in the loader) and which > won't. > > I am not sure if it helps for amdgpu, since I am using nvidia- which > sort-of works (but GNOME frequently flakes out for my user but not other > users)... but I'd think this approach forgoes any potential difference > between the build jail and live system kernel sources > > Of course this rules out freebsd-update for kernel/system patching then, > you'd update /usr/src and then make -DNOCLEAN buildworld buildkernel and > install again once -p4 or newer come out. > I reinstalled the whole system from a newly compiled kernel and world. It didn't help. When I do "kldload amdgpu" the screen goes blank after loading one of the driver modules. I have compiled the base on another system and firstly just unpacked the kernel files. When that didn't work I used FreeBSD-base packages to reinstall everything from the build server. It worked pretty well but didn't change a thing. The build system has an NVidia card and an AMD (Phenom) process. The system on which I install has AMD Vega 64 card and another AMD (Ryzen) processor. I don't use any configuration to build for a specific architecture and I hope "drm-fbsd12.0-kmod" doesn't do any optimizations based on the architecture on which it's compiled. How can I debug what's wrong? Grzegorz J