From owner-freebsd-current@freebsd.org Thu Nov 12 16:50:45 2020 Return-Path: Delivered-To: freebsd-current@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 A0B972EE4F1 for ; Thu, 12 Nov 2020 16:50:45 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (phouka1.phouka.net [107.170.196.116]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "phouka.net", Issuer "Go Daddy Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CX6zm0Khdz4Vg0 for ; Thu, 12 Nov 2020 16:50:43 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (localhost [127.0.0.1]) by phouka1.phouka.net (8.16.1/8.16.1) with ESMTPS id 0ACGnHdR039227 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 12 Nov 2020 08:49:17 -0800 (PST) (envelope-from warlock@phouka1.phouka.net) Received: (from warlock@localhost) by phouka1.phouka.net (8.16.1/8.16.1/Submit) id 0ACGnHqY039226; Thu, 12 Nov 2020 08:49:17 -0800 (PST) (envelope-from warlock) Date: Thu, 12 Nov 2020 08:49:17 -0800 From: John Kennedy To: David Wolfskill , h v , FreeBSD Current Subject: Re: immediate panic after nvidia load Message-ID: <20201112164917.GA28963@phouka1.phouka.net> References: <20201110121328.GG1450@albert.catwhisker.org> <20201110135815.GI1450@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201110135815.GI1450@albert.catwhisker.org> X-Rspamd-Queue-Id: 4CX6zm0Khdz4Vg0 X-Spamd-Bar: / X-Spamd-Result: default: False [0.20 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[phouka.net]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[107.170.196.116:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[107.170.196.116:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[catwhisker.org,gmail.com,freebsd.org]; FORGED_SENDER(0.30)[warlock@phouka.net,warlock@phouka1.phouka.net]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14061, ipnet:107.170.192.0/18, country:US]; FROM_NEQ_ENVFROM(0.00)[warlock@phouka.net,warlock@phouka1.phouka.net]; MAILMAN_DEST(0.00)[freebsd-current]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2020 16:50:45 -0000 On Tue, Nov 10, 2020 at 05:58:15AM -0800, David Wolfskill wrote: > What I do on my laptop is build FreeBSD from source, with he directive > in /etc/src.conf so the x11/nvidia0driver kmod is rebuilt during "make > buildkernel" (and installed during "make installkernel"). > > That's simple and easy, and it works (at least, for me -- and has done, > for years). That almost always works for me. I've got one box that it freaks out on and hangs the kernel build trying to build the package and I just sync that one by hand. > If you wish to build the kernel on a different machine, I believe you > will need to be a bit more creative to ensure that the kernel and the > port/package are kept in sync. > > A way that *might* work: > > * On the build machine, update FreeBSD sources and ports to some desired > point. > * Build FreeBSD. > * Build (e.g., using poudriere) all of the packages you want to use, > ensuring that the FreeBSD sources that poudriere uses are copies of what > was used to build FreeBSD (so everything stays in sync). > * Install everything (probably the packages from ports first, as any > kmods won't actually be effective until hey're loaded). > * Reboot from the newly-installed FreeBSD. And that is basically what I did when the malloc change freaked out the Nvidia kernel driver. o I already had a built kernel and objects o I "poudriere jail -u -j {jailname}" to update to that tree o I "poudriere bulk"-build just the nvidia bits o I "pkg upgrade -f" just the nvidia bits Now, in practice, a major change that probably bumped the kernel version number so poudriere will want to rebuild everything. I did -driver, -settings and -xconfig which was overkill since the driver was probably the only problem and that ended up rebuilding like 250 packages because X libraries and documentation got dragged in. "Next time" I'll just try -driver.