Re: [PATCH v5 2/2] console: Add persistent scrollback buffers for all VGA consoles

Adam Borowski
2016-11-23T17:33:40Z

On Tue, Nov 22, 2016 at 05:56:42PM +0100, Manuel Schölling wrote:
> On Mo, 2016-11-21 at 21:17 +0100, Adam Borowski wrote:
> > On Sun, Nov 20, 2016 at 10:58:08PM +0100, Manuel Schölling wrote:
> > > Add a scrollback buffers for each VGA console. The benefit is that
> > > the scrollback history is not flushed when switching between consoles
> > > but is persistent.
>
> > But alas, this commit breaks that very \e[3J. It does only a \e[2J, leaving
> > the scrollback uncleared. For comparison, both mainline and with just your
> > preparatory commit, \e[3J works as expected.
> Really? All my tests worked fine: I compiled the kernel with the latest patches, started the kernel in QEMU and then did
>
> $ openvt /bin/sh
> $ echo -e '\e[3J' # scrollback buffer was flushed correctly
> $ chvt 2
> $ echo -e '\e[3J' # scrollback buffer was flushed correctly
>
> Can you tell me how you tested it? Maybe I can reproduce the bug.

(Re-tested on v6 of the patch.)

On bare metal: boot, log in on tty1, printf '\e[3J', screen clears but when
I scroll back, it still has bootup messages. Switching to another tty then
back obviously doesn't clear it either. Same on any other tty (after
putting something into the scrollback of). Graphics card is nvidia GT240,
neither proprietary driver nor nouveau loaded; nouveau forces fbdev and your
patch is vgacon specific (hopefully just for now).

But then, I just reproduced this on qemu (-vga qxl) too, so it might be due
to a difference between our setups somehow. In case it's something related
to .config, mine's at https://angband.pl/tmp/config-4.9.0-rc6-debug2+.xz

Meow!
--
An imaginary friend squared is a real enemy.