Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760484AbcLAVD7 convert rfc822-to-8bit (ORCPT ); Thu, 1 Dec 2016 16:03:59 -0500 Received: from mout.gmx.net ([212.227.15.19]:62034 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755399AbcLAVD5 (ORCPT ); Thu, 1 Dec 2016 16:03:57 -0500 Message-ID: <1480626203.7664.7.camel@gmx.de> Subject: Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for all VGA consoles From: Manuel =?ISO-8859-1?Q?Sch=F6lling?= To: Andrey Utkin Cc: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, jslaby@suse.cz, gregkh@linuxfoundation.org, kilobyte@angband.pl, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 01 Dec 2016 22:03:23 +0100 In-Reply-To: <20161129100115.GA20034@stationary.pb.com> References: <20161123173340.GA24872@angband.pl> <1480265509-20922-1-git-send-email-manuel.schoelling@gmx.de> <20161127213730.GO11418@dell-m4800.home> <1480368499.29156.12.camel@gmx.de> <20161129100115.GA20034@stationary.pb.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 8BIT X-Provags-ID: V03:K0:62yeotJ5bcXrZdLUvk323upconJThxQ7chCVRqdasJ+wJUhuTd0 +4Mxcffh7raBotTWzP2mM2AKWNRTtOeizTU56IzfGnDcE/u/m6eByy0cVB7yeod1VzQ90F7 n1IqzPR2Iuf7HYAu7tMWk5tJA9TsRbhH5uvhfs7K21vyMk3p1PyQPEYUDXEQj3a0iCcLnCT fd+OckzUK29ri2KmO+jYQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:BR7e0f/TjUI=:8gnqWLPSxVDEMqkueYENeG MRPmW6kpWaeZEu+EouAI958Z1uVBLln/db/vZ9RmMe59odwutZBdEgtGHVmKR9rvRjvrB2Wr4 JM8FvkEtBxam9Fi0/u6L5Nag2KPbxxRH7ofuaM1IXH5MyDJB/9/3rjEOEMRBGJoielD3O/ORC dIgcw6lAo9UA2RdFzy7oEYOKTaGz4NJN/9Bu126WzRbU4K1tHJgwkb2PkAZuDT79oIYguYrK+ bWNUudpYwdDeJI5Cy9D2wUQb1sd/5HJGPDoiiFENcMb0ngLnsC24T7vGaF0F0yaeawKbo1jpR GUzQg0n+lRce5kixEg00On4sGDlGSbJ1TnzA/nw/uPr8EWw3OpyR+KRIH9eJQOyGWPbE64QP2 HtDCiSwiGACsHciYAq+qpY2gdUMEGhnh72J6VQQ83pIolAy6rzNv5ziC03txb/fZVNv5L7Cxb Z6AW7e+mEuwY9PRXalYl1Ze871TVPnru8edo8PpWWLA7nnexrJ1k4jgOwM0ZhUwlETTF/Ph/+ Hfxx9eYtTaFAMxuPZeFE9WfOul20nOLdxHdRNeZLSnMa1yYoGWNh8UldGEELoLZ0HvU3SRARO K9sGV/2DaHtdvXO2KlqLl4uuX/4guYdHTpLrGviSYMriWIB6LK0QjGZguTw7I2biqsgQeRQTT o4xKPl6K5rnowm55YxA8r1U6e7eBrjyNI2RORNu+QhjLNRrAi5BUkGA1gCxsc4A7cEEc0gT4R zlUe5dcjppeqEHbzp+/wYGR+X2tgy+tGDUrJa/vcELU9T0oKDklucdhsCzywfRlDFcbR9rRSn UMdfzKFWnW9xfighgmB34hEEZH+Uw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1334 Lines: 37 Hi Andrey, On Di, 2016-11-29 at 10:01 +0000, Andrey Utkin wrote: > On Mon, Nov 28, 2016 at 10:28:19PM +0100, Manuel Schölling wrote: > Regarding logout scrollback clearing not working for me. ncurses-6.0-rc1 > which I tested it with is the latest available in Gentoo portage, please > confirm whether I need any newer version, or should I tune something > else. I'd appreciate if you also tested your patch with gentoo setup. I finally setup gentoo running agetty (util-linux-2.26.2) and patching the file term-utils/agetty.c with static void termio_clear(int fd) { /* * Do not write a full reset (ESC c) because this destroys * the unicode mode again if the terminal was in unicode * mode. Also it clears the CONSOLE_MAGIC features which * are required for some languages/console-fonts. * Just put the cursor to the home position (ESC [ H), * erase everything below the cursor (ESC [ J), and set the * scrolling region to the full window (ESC [ r) */ - write_all(fd, "\033[r\033[H\033[J", 9); + write_all(fd, "\033[3J\033[r\033[H\033[J", 13); } solves the issue with the scrollback buffer after log out. Let me know if you agree that this is the right way to go and I will send a patch to the maintainer of util-linux. Thanks again for spending all this time to test the patch! Have a good weekend! Manuel