From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-user+bounces-196991-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id B7530158012
	for <garchives@archives.gentoo.org>; Wed, 22 Sep 2021 20:29:07 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0571BE093D;
	Wed, 22 Sep 2021 20:29:02 +0000 (UTC)
Received: from mail.muc.de (colin.muc.de [193.149.48.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 3E7F0E087E
	for <gentoo-user@lists.gentoo.org>; Wed, 22 Sep 2021 20:29:00 +0000 (UTC)
Received: (qmail 57979 invoked by uid 3782); 22 Sep 2021 20:29:00 -0000
Received: from acm.muc.de (p4fe15bbe.dip0.t-ipconnect.de [79.225.91.190])
 (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Wed, 22 Sep 2021 22:28:59 +0200
Received: (qmail 1512 invoked by uid 1000); 22 Sep 2021 20:28:59 -0000
Date: Wed, 22 Sep 2021 20:28:59 +0000
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] console scrollback (kernel 5.14)
Message-ID: <YUuSCwpAfk/yZaII@ACM>
References: 
 <CAKpSnpKQx=5K7OQzQCjCi7b25taN59-c7rbcn06WdgBBv_iGTg@mail.gmail.com>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: 
 <CAKpSnpKQx=5K7OQzQCjCi7b25taN59-c7rbcn06WdgBBv_iGTg@mail.gmail.com>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@muc.de>
X-Primary-Address: acm@muc.de
X-Archives-Salt: ce464e95-e92f-4736-abef-423d79b7f92d
X-Archives-Hash: b73ae1d42715cf34b0c1a17effe4b8fa

Hello, Jorge.

On Sat, Sep 18, 2021 at 21:40:46 +0100, Jorge Almeida wrote:
> Hello, gentooers in general and Alan in particular

> I've been using Alan Mackenzie's patch until kernel 5.13, with
> success. It failed with 5.14.4 --yes, I know, but it doesn't hurt to
> try :)

I'm happy to know my patch is still useful.

I must confess that somebody told me by private email that it fails on
systems which change their screen geometry during boot-up.  For example,
a system which first boots into 80x25, then changes to a frame buffer.
I know why this is happening, but I don't have a machine to debug it on,
so the debugging is happening slowly, with the help of my correspondent.

It also doesn't seem to work on machines with kernel parameters such as
vga=791.

That said, I'm hoping that the failure of the patch on 5.14.4 is just a
simple struct change in 5.14, which I hope to have corrected (but in
5.14.5).  What used to be

    while (!tty->stopped ...

has now become

    while (!tty->flow.stopped ...

I'm assuming that the patch you tried to apply was
5.10.49-scroll.20210715.diff.  If so, please leave it applied (with the
one failed hunk), and additionally apply this:



--- ./drivers/tty/vt/vt.c.orig	2020-12-13 22:41:30.000000000 +0000
+++ ./drivers/tty/vt/vt.c	2021-04-05 16:20:32.624563241 +0000
@@ -3208,6 +3208,12 @@
 
 	param.vc = vc;
 
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+	/* Undo any soft scrolling - <Alt><Fn> and <Shift><PgUp/Down> do
+	   not pass through this function.  */
+	concon_set_origin (vc);
+#endif
+
 	while (!tty->flow.stopped && count) {
 		int orig = *buf;
 		buf++;


As always, there are no guarantees.  Please let me know whether or not
the above hunk applies, and if so, whether or not the scrolling still
works.  (Also, feel free to send me private email if there're any
problems with the mechanics of applying the patch.)

Thanks!

> Jorge Almeida

> Just in case it is useful:

It was, thanks!

[ .... ]

>         param.vc = vc;

> +       /* NEW STOUGH, 2021-04-03 */
> +#ifdef CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
> +       /* Undo any soft scrolling - <Alt><Fn> and <Shift><PgUp/Down> do
> +          not pass through this function.  */
> +       concon_set_origin (vc);
> +#endif
> +       /* END OF NEW STOUGH */
> +
>         while (!tty->stopped && count) {  <==========================
>                 int orig = *buf;
>                 buf++;

-- 
Alan Mackenzie (Nuremberg, Germany).