From owner-freebsd-hackers@freebsd.org Sun Mar 28 16:31:39 2021 Return-Path: Delivered-To: freebsd-hackers@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 0F7B357EB2F for ; Sun, 28 Mar 2021 16:31:39 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4F7h6y67z6z4pQB for ; Sun, 28 Mar 2021 16:31:38 +0000 (UTC) (envelope-from david@catwhisker.org) Received: by mailman.nyi.freebsd.org (Postfix) id D2CA257EAD4; Sun, 28 Mar 2021 16:31:38 +0000 (UTC) Delivered-To: hackers@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 D28FF57EB2E for ; Sun, 28 Mar 2021 16:31:38 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mx.catwhisker.org (mx.catwhisker.org [107.204.234.170]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F7h6x4fQPz4pRW for ; Sun, 28 Mar 2021 16:31:37 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.16.1/8.15.2) with ESMTP id 12SGVauQ002056 for ; Sun, 28 Mar 2021 16:31:36 GMT (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.16.1/8.16.1/Submit) id 12SGVa3V002055 for hackers@freebsd.org; Sun, 28 Mar 2021 09:31:36 -0700 (PDT) (envelope-from david) Date: Sun, 28 Mar 2021 09:31:36 -0700 From: David Wolfskill To: hackers@freebsd.org Subject: Experiments with suspend/resume (amd64; nvidia-driver) Message-ID: Reply-To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="btpbIvfe0ckCnltw" Content-Disposition: inline X-Rspamd-Queue-Id: 4F7h6x4fQPz4pRW X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of david@catwhisker.org designates 107.204.234.170 as permitted sender) smtp.mailfrom=david@catwhisker.org X-Spamd-Result: default: False [-0.12 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[hackers@freebsd.org]; FREEFALL_USER(0.00)[david]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[107.204.234.170:from]; R_SPF_ALLOW(-0.20)[+ip4:107.204.234.170:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[107.204.234.170:from:127.0.2.255]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.72)[-0.715]; DMARC_NA(0.00)[catwhisker.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:7018, ipnet:107.192.0.0/12, country:US]; REPLYTO_EQ_TO_ADDR(5.00)[]; MAILMAN_DEST(0.00)[hackers]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2021 16:31:39 -0000 --btpbIvfe0ckCnltw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I am trying to get a laptop running stable/13 working at least as well as it does under stable/12. At the moment, stable/13 has the advantage that the mouse works (under stable/12, it does not), but the "resume" part of "suspend/resume" works under stable/12, but does not under stable/13. For the specific points at which the behaviors are noted, here are the uname strings in question, for reference: FreeBSD g1-48.catwhisker.org 12.2-STABLE FreeBSD 12.2-STABLE #985 stable/12= -n232904-6008a5fad3c: Sun Mar 28 03:33:20 PDT 2021 root@g1-48.catwhiske= r.org:/common/S1/obj/usr/src/amd64.amd64/sys/CANARY amd64 1202505 1202505 FreeBSD g1-48.catwhisker.org 13.0-STABLE FreeBSD 13.0-STABLE #182 stable/13= -n245050-c7d10e7ec872: Sun Mar 28 04:27:46 PDT 2021 root@g1-48.catwhisk= er.org:/common/S3/obj/usr/src/amd64.amd64/sys/CANARY amd64 1300500 1300500 As I mention behavior under head, as well: FreeBSD g1-48.catwhisker.org 14.0-CURRENT FreeBSD 14.0-CURRENT #191 main-n2= 45702-1c1ff7979571: Sun Mar 28 04:02:23 PDT 2021 root@g1-48.catwhisker.= org:/common/S4/obj/usr/src/amd64.amd64/sys/CANARY amd64 1400006 1400006 For each of the environments, /etc/src.conf contains: PORTS_MODULES+=3Dx11/nvidia-driver and the x11/nvidia-driver modules are rebuilt whenever the kernel is. * Under stable/12, the machine is normally run with kern.vty=3D"sc" in /boot/loader.conf and (as noted) suspend/resume Just Works nearly all the time (based on my experiences with an older laptop that is similarly configured -- from back when I was still commuting to work, and thus had occasion to exercise the suspend/resume code). I note that this machine (Dell Precision 7520) does not cause any lights that I can see to "blink" while suspended -- unlike the Dell Precision M4800. A few minutes ago, I commented that line in /boot/loader.conf out and rebooted the machine and re-tested suspend/resume. I was gratified to note that suspend/resume still worked, even with vt. X11 worked, of course, but vtys are ... not useful for displaying human-readable information. (It looks like some wildly-colored character-cell-sized boxes.) I switched it back to sc. * Under stable/13, after the recent work in loader by tsoome@, I had switched to letting vty default to vt (just before stable/13 was branched, IIRC). Thus, recalling some earlier issues where vt appeared to be implicated in failure of "resume" to (re-?)initialize the video display, I had thought that the use of vt (vs. sc) might be at the root of the failure to resume for stable/13 (and head). However, an experiment showed that after an attempted resume, which casued the power light to come back on (while the screen stayed dark and the machine remained unresponsive to anything but the power button -- well, I suppose unplugging it and removing the battery would probably have caused a reaction, as well, but that's a bit extreme -- I was unable to do as much as ping the machine from another one. That seems to me to indicate something rather more profound than "video did not re-initialize." * Unsurprisingly, behavior under head is as described above for stable/13. How might I proceed to get the above resolved? While I use the M4800 quite heavily, the 7520 spends most of its time powered off, so making use of it seems like a Good Idea. :-) I have dumped some files from the machine at http://www.catwhisker.org/~david/FreeBSD/suspend_resume/; I am happy to supplement those. Peace, david --=20 David H. Wolfskill david@catwhisker.org Describing the 6 Jan 2021 Capitol insurrection as "hugging and kissing the police and the guards, you know, they had great relationships" is what I'd expect from someone who conflates affection with sexual assault. See https://www.catwhisker.org/~david/publickey.gpg for my public key. --btpbIvfe0ckCnltw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE4owz2QxMJyaxAefyQLJg+bY2PckFAmBgr2dfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEUy OEMzM0Q5MEM0QzI3MjZCMTAxRTdGMjQwQjI2MEY5QjYzNjNEQzkACgkQQLJg+bY2 PcmIbQf+KAHwHZ4J8lOQr68gj/xtd5fM8p+AOzRFw1x4x5iBrbsNDL6AdJA9iFSC 4CJIqc0y2tChJ7V87zspYuEpGHxDrYnTil+Or25rmFIQrHRKO5xWJVoiEQ7DdTWB qa+jXb5P1fW0+e3PFlYHo0ZZUyWvWAhq+RVhDT7uCH9WT6/sjEI7St/UeFJZb2oi S7UvRQ2L4C/tjwko890R37N59/cmwhwwva2oZA9zzYl/sZgxXr42vn8FF+g4Isee 1rgyAkslWAvlkbBJUal8kB3RGnSlhJ3hEcbuCIID3XiRuLR3wgNtoiWkU/gWjhWg 8kBCZurnbQDGy/WgwO+KueCbnx3ghA== =E/Mb -----END PGP SIGNATURE----- --btpbIvfe0ckCnltw--