From owner-freebsd-hackers@freebsd.org Mon Jul 15 21:26:19 2019 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 3B250C432E for ; Mon, 15 Jul 2019 21:26:19 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB1E480029 for ; Mon, 15 Jul 2019 21:26:18 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1563225976; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=PKoitZGFcZ6roq7koL8sLqrp93g2FY8ASc3smbs9brxtje7AtS6CLovTBqrQaGzeMvAPNrnLRTlFP WysRYYPlHUbubD4XM37apeuN/etIOHPOrR7PIJmj4xtMeJ2Cg5ncJht6R4YOAgx8KE83SPH+S6N/H9 PYlQKJhCfNh5p//4GHGUtHTYuhbim/3GHz6QgbJ8e6MrTpilP5MMnWQIITJHH57HLcopneJN+msMqH mQJX/MvSOA/R2U5ENC94j5x3lxMrp2uogSkJgFLk0Zcl8KHWsLcaA2ICpPZxAp0eI/miQ8VhEC3OFO bzDvo7moJ2Nwe7t45q+cf/SLq+5oS0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=VWrWpox1KQdbvgsnViex0fOlWNyrIlASAqblreCwzms=; b=JtepGHxqwrSVv4EFzjuYMXC9sKORXa/rSX4FdLwY/VnsHbz+NuZWnY/YdvoGLg+ZEBpKvL05IUtGC dq2Hn0qA2r8mnJekAo0NMmRveCY4Xeqf/PP7a0XVCzxbRw5IWlg1cpfMpH+kOaO5i/8sXVZlRa/oeX CaTyZ4o5wq2dNH7bCl7CZYYPat8+6TtABmQhSL8WhPWcbuvs6T1FNQGVOTkgIwlYWxG9Xhw+UI2aIs PUX0mIQjfu5rKuJAN25mH/o8fkKrktE+j/SxYHTTwf+Qblb1v1NfjZA9xcybcKkO6A7wwqeVEwG9nK AHT4X/7srhwEFeznv5MKqIzPet2qLEA== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=VWrWpox1KQdbvgsnViex0fOlWNyrIlASAqblreCwzms=; b=cOoHq8Dpi1vU5DvPZJpcBZWZn/sFKQLqTYQQa/jECqlEEETzqMvn/liV8VhTQM7IgE6uYVDRNuff1 kxKdmti98l7bNDmrlm0lzDdSDM49Ly1FgvPaQX/r2w0KtPnJAGqCi+iDwPVKJAtKrSOeJjFuwXmBqx 2UvQqNkAB72DKS+6foj4rddz6cvmh3Q+tC7ihgGUtBFJEk4bshJHdrfB1vyCl3YI3cxGgJAlDRGLM7 0TCEHkD5bVH7VjvS6aVmF3iflzNK5IDVavs22l1X5egkofrBp6P2OsYmy+fjvKKmjSZ/TtScibUXYQ cPRmVYeoJh77BlsED0iXcExfQ8Xg2pg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 2c541381-a747-11e9-907a-1ba68abff17b X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 2c541381-a747-11e9-907a-1ba68abff17b; Mon, 15 Jul 2019 21:26:15 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x6FLQDql033488; Mon, 15 Jul 2019 15:26:13 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1eab7d6a8ab3bb3670402ea888f223023841b98a.camel@freebsd.org> Subject: Re: Resetting console on boot From: Ian Lepore To: Ryan Moeller , freebsd-hackers@freebsd.org Date: Mon, 15 Jul 2019 15:26:13 -0600 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: BB1E480029 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.99)[-0.990,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2019 21:26:19 -0000 On Mon, 2019-07-15 at 16:29 -0400, Ryan Moeller wrote: > Hello, > > What do people think about having an early boot stage send some escape > sequence to reset terminals to some sane default terminal settings? Often > firmware or other causes will leave an unreadable font color or break line > feeds, and the terminal tends to stay that way until a shell clears and > resets the screen. If a shell can do it, surely loader could do it (or even > earlier, if it is not too complex). To my knowledge it should be just a > matter of printing some escape codes before starting the normal boot menus > when using a serial console. I believe this is already done when the > console is set to vidconsole or efi. > > Thoughts? Suggestions? > Your "sane" is my "who f*cked with my terminal setup?", so it needs to be optional. In my experience, the modern lua loader does send a reset and other control commands, for both serial and video consoles, unless you set beastie_disable=YES and loader_color=NO in loader.conf. Before I discovered the loader_color=NO, I hated that loader would always reset my serial terminal to white-on-black. -- Ian