* [gentoo-user] Console scrollback
@ 2021-01-13 10:30 Peter Humphrey
2021-01-13 10:38 ` Michael
2021-01-13 18:14 ` Alan Mackenzie
0 siblings, 2 replies; 34+ messages in thread
From: Peter Humphrey @ 2021-01-13 10:30 UTC (permalink / raw
To: gentoo-user
Hello list,
I see that the kernel code to scroll the console has been stripped out [1].
What do people use instead?
This loss is a nuisance while installing a new system, as I am still trying to
do on my old laptop.
1. https://soylentnews.org/article.pl?sid=20/09/15/1824233&from=rss
--
Regards,
Peter.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 10:30 [gentoo-user] Console scrollback Peter Humphrey
@ 2021-01-13 10:38 ` Michael
2021-01-13 10:55 ` Peter Humphrey
2021-01-13 18:14 ` Alan Mackenzie
1 sibling, 1 reply; 34+ messages in thread
From: Michael @ 2021-01-13 10:38 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
On Wednesday, 13 January 2021 10:30:19 GMT Peter Humphrey wrote:
> Hello list,
>
> I see that the kernel code to scroll the console has been stripped out [1].
> What do people use instead?
>
> This loss is a nuisance while installing a new system, as I am still trying
> to do on my old laptop.
>
> 1. https://soylentnews.org/article.pl?sid=20/09/15/1824233&from=rss
A relief to see I'm not alone in experiencing this problem - I thought I had
misconfigured something on my systems. :-)
A way around it would be to use screen or tmux and use their internal buffer.
However, if you're already logged in a console and suddenly want to
Shift+PageUp, then it would be too late. This suggestion won't help if you
want to look at the rc scripts output as the system boots, but you can capture
these separately in syslog.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 10:38 ` Michael
@ 2021-01-13 10:55 ` Peter Humphrey
2021-01-13 11:21 ` Andreas Fink
0 siblings, 1 reply; 34+ messages in thread
From: Peter Humphrey @ 2021-01-13 10:55 UTC (permalink / raw
To: gentoo-user
On Wednesday, 13 January 2021 10:38:01 GMT Michael wrote:
> On Wednesday, 13 January 2021 10:30:19 GMT Peter Humphrey wrote:
> > Hello list,
> >
> > I see that the kernel code to scroll the console has been stripped out
> > [1]. What do people use instead?
> >
> > This loss is a nuisance while installing a new system, as I am still
> > trying to do on my old laptop.
> >
> > 1. https://soylentnews.org/article.pl?sid=20/09/15/1824233&from=rss
>
> A relief to see I'm not alone in experiencing this problem - I thought I had
> misconfigured something on my systems. :-)
>
> A way around it would be to use screen or tmux and use their internal
> buffer. However, if you're already logged in a console and suddenly want to
> Shift+PageUp, then it would be too late. This suggestion won't help if you
> want to look at the rc scripts output as the system boots, but you can
> capture these separately in syslog.
It's a pain in the neck while trying to emerge a base system and being thrown
scores of lines of reasons why it can't be done, with the prime cause long
gone. I tried using "| tee 2>&1 > /tmp/file" and then viewing the file on
another vTTY, but there ought to be a neater way.
--
Regards,
Peter.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 10:55 ` Peter Humphrey
@ 2021-01-13 11:21 ` Andreas Fink
2021-01-13 11:46 ` Peter Humphrey
0 siblings, 1 reply; 34+ messages in thread
From: Andreas Fink @ 2021-01-13 11:21 UTC (permalink / raw
To: gentoo-user
On Wed, 13 Jan 2021 10:55:18 +0000
Peter Humphrey <peter@prh.myzen.co.uk> wrote:
> On Wednesday, 13 January 2021 10:38:01 GMT Michael wrote:
> > On Wednesday, 13 January 2021 10:30:19 GMT Peter Humphrey wrote:
> > > Hello list,
> > >
> > > I see that the kernel code to scroll the console has been stripped out
> > > [1]. What do people use instead?
> > >
> > > This loss is a nuisance while installing a new system, as I am still
> > > trying to do on my old laptop.
> > >
> > > 1. https://soylentnews.org/article.pl?sid=20/09/15/1824233&from=rss
> >
> > A relief to see I'm not alone in experiencing this problem - I thought I had
> > misconfigured something on my systems. :-)
> >
> > A way around it would be to use screen or tmux and use their internal
> > buffer. However, if you're already logged in a console and suddenly want to
> > Shift+PageUp, then it would be too late. This suggestion won't help if you
> > want to look at the rc scripts output as the system boots, but you can
> > capture these separately in syslog.
>
> It's a pain in the neck while trying to emerge a base system and being thrown
> scores of lines of reasons why it can't be done, with the prime cause long
> gone. I tried using "| tee 2>&1 > /tmp/file" and then viewing the file on
> another vTTY, but there ought to be a neater way.
>
How about this (works with bash, not sure about other shells):
emerge |& less
This should work with all shells:
emerge 2>&1 | less
Cheers
Andreas
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 11:21 ` Andreas Fink
@ 2021-01-13 11:46 ` Peter Humphrey
0 siblings, 0 replies; 34+ messages in thread
From: Peter Humphrey @ 2021-01-13 11:46 UTC (permalink / raw
To: gentoo-user
On Wednesday, 13 January 2021 11:21:54 GMT Andreas Fink wrote:
> How about this (works with bash, not sure about other shells):
> emerge |& less
>
> This should work with all shells:
> emerge 2>&1 | less
That's better; thanks Andreas.
--
Regards,
Peter.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 10:30 [gentoo-user] Console scrollback Peter Humphrey
2021-01-13 10:38 ` Michael
@ 2021-01-13 18:14 ` Alan Mackenzie
2021-01-13 18:44 ` Neil Bothwick
` (2 more replies)
1 sibling, 3 replies; 34+ messages in thread
From: Alan Mackenzie @ 2021-01-13 18:14 UTC (permalink / raw
To: gentoo-user
Hello, Peter.
On Wed, Jan 13, 2021 at 10:30:19 +0000, Peter Humphrey wrote:
> Hello list,
> I see that the kernel code to scroll the console has been stripped out
> [1].
This is appalling. I do all my work on the console (apart from web
browsing), and with this development, Linux effectively becomes unusable
to me. I will NOT be bullied into using second rate alternatives like
X-Windows terminals.
Thanks for the heads up!
> What do people use instead?
Well, it looks like I'll have to stop upgrading my kernel at 5.8.n.
That can only be a short term answer, though.
> This loss is a nuisance while installing a new system, as I am still
> trying to do on my old laptop.
> 1. https://soylentnews.org/article.pl?sid=20/09/15/1824233&from=rss
Question: I'm a C hacker; how do I go about getting to restore (and
enhance) this essential facility myself?
> --
> Regards,
> Peter.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 18:14 ` Alan Mackenzie
@ 2021-01-13 18:44 ` Neil Bothwick
2021-01-14 16:00 ` Alan Mackenzie
2021-01-13 19:14 ` Peter Humphrey
2021-01-13 19:32 ` Grant Taylor
2 siblings, 1 reply; 34+ messages in thread
From: Neil Bothwick @ 2021-01-13 18:44 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
On Wed, 13 Jan 2021 18:14:39 +0000, Alan Mackenzie wrote:
> > I see that the kernel code to scroll the console has been stripped out
> > [1].
>
> This is appalling. I do all my work on the console (apart from web
> browsing), and with this development, Linux effectively becomes unusable
> to me. I will NOT be bullied into using second rate alternatives like
> X-Windows terminals.
What about screen/tmux?
--
Neil Bothwick
WinErr 00D: Window closed - Do not look outside
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 18:14 ` Alan Mackenzie
2021-01-13 18:44 ` Neil Bothwick
@ 2021-01-13 19:14 ` Peter Humphrey
2021-01-13 19:32 ` Grant Taylor
2 siblings, 0 replies; 34+ messages in thread
From: Peter Humphrey @ 2021-01-13 19:14 UTC (permalink / raw
To: gentoo-user
On Wednesday, 13 January 2021 18:14:39 GMT Alan Mackenzie wrote:
> Hello, Peter.
>
> On Wed, Jan 13, 2021 at 10:30:19 +0000, Peter Humphrey wrote:
> > Hello list,
> >
> > I see that the kernel code to scroll the console has been stripped out
> > [1].
>
> This is appalling. I do all my work on the console (apart from web
> browsing), and with this development, Linux effectively becomes unusable
> to me. I will NOT be bullied into using second rate alternatives like
> X-Windows terminals.
>
> Thanks for the heads up!
>
> > What do people use instead?
>
> Well, it looks like I'll have to stop upgrading my kernel at 5.8.n.
Actually, the console-scrolling code has gone from 5.4.80 too. Also 5.4.72 I
think.
--
Regards,
Peter.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 18:14 ` Alan Mackenzie
2021-01-13 18:44 ` Neil Bothwick
2021-01-13 19:14 ` Peter Humphrey
@ 2021-01-13 19:32 ` Grant Taylor
2021-01-13 21:56 ` Alan Mackenzie
2 siblings, 1 reply; 34+ messages in thread
From: Grant Taylor @ 2021-01-13 19:32 UTC (permalink / raw
To: gentoo-user
On 1/13/21 11:14 AM, Alan Mackenzie wrote:
> This is appalling. I do all my work on the console (apart from web
> browsing), and with this development, Linux effectively becomes
> unusable to me. I will NOT be bullied into using second rate
> alternatives like X-Windows terminals.
Wow. I don't think I've run into someone that was a devout
{physical,virtual} /console/ user in quite a while.
I'm curious what you do in the Linux console that can't be done in a
terminal emulator.
I know that there is a lot of difference in different terminal
emulators. -- I *strongly* prefer XTerm as it does things that other
terminal emulators have never heard of.
Please share if you do things that /can/ be done in the Linux console
that /can't/ be done in a terminal emulator.
If it's just preference, then hat's off to you.
--
Grant. . . .
unix || die
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 19:32 ` Grant Taylor
@ 2021-01-13 21:56 ` Alan Mackenzie
2021-01-13 22:14 ` Grant Taylor
2021-01-13 22:15 ` [gentoo-user] " Grant Edwards
0 siblings, 2 replies; 34+ messages in thread
From: Alan Mackenzie @ 2021-01-13 21:56 UTC (permalink / raw
To: gentoo-user
Hello, Grant.
On Wed, Jan 13, 2021 at 12:32:28 -0700, Grant Taylor wrote:
> On 1/13/21 11:14 AM, Alan Mackenzie wrote:
> > This is appalling. I do all my work on the console (apart from web
> > browsing), and with this development, Linux effectively becomes
> > unusable to me. I will NOT be bullied into using second rate
> > alternatives like X-Windows terminals.
> Wow. I don't think I've run into someone that was a devout
> {physical,virtual} /console/ user in quite a while.
> I'm curious what you do in the Linux console that can't be done in a
> terminal emulator.
Well, there's really not much that can't be done in a terminal emulator.
But it's the manner of the doing that's important. Doing text work in X
is s l u g g i s h. Changing from one application to another, which
would be achieved by, say Alt-F4 on a console takes more key sequences
in X, and is less than instantaneous. The X terminal emulator tends not
to occupy the whole screen - it tends to have title bars, menu items,
tabs even, which just distract from the task at hand. Maybe it can be
set up to take the whole screen, but that's work. And the fonts used
tend to be less distinct and helpful than the 16 x 8 bitmaps I have on
the console. And X windows steals useful key sequences, such as
Alt-Tab. On an Emacs session, in three columns on a console, I can
display 195 consecutive lines of a source file simultaneously.
I could go on, but ...
That's not to say there aren't problems with the tty console - even
before the screen scrolling was removed altogether, it wasn't exactly
anything to write home about. And it would be nice to have more than 16
colours available. But, on balance, I'll stick with the console.
> I know that there is a lot of difference in different terminal
> emulators. -- I *strongly* prefer XTerm as it does things that other
> terminal emulators have never heard of.
> Please share if you do things that /can/ be done in the Linux console
> that /can't/ be done in a terminal emulator.
I think bringing up a new Gentoo system absolutely requires working in
the console, certainly up to the point where X11 and a Window Manager
have been installed and debugged.
> If it's just preference, then hat's off to you.
> --
> Grant. . . .
> unix || die
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 21:56 ` Alan Mackenzie
@ 2021-01-13 22:14 ` Grant Taylor
2021-01-14 16:39 ` karl
2021-01-13 22:15 ` [gentoo-user] " Grant Edwards
1 sibling, 1 reply; 34+ messages in thread
From: Grant Taylor @ 2021-01-13 22:14 UTC (permalink / raw
To: gentoo-user
On 1/13/21 2:56 PM, Alan Mackenzie wrote:
> Hello, Grant.
Hi Alan,
> Well, there's really not much that can't be done in a terminal
> emulator. But it's the manner of the doing that's important.
Okay. I can appreciate and respect that response.
> Doing text work in X is s l u g g i s h. Changing from one
> application to another, which would be achieved by, say Alt-F4 on a
> console takes more key sequences in X, and is less than instantaneous.
I don't know that I've ever experienced the sluggishness that you're
talking about. But that doesn't mean it doesn't exist. I will admit
that Alt-Tabing through windows is an additional step vs Alt-F# in that
you have the intermediary list that you cycle through vs just jumping
directly to the desired window.
> The X terminal emulator tends not to occupy the whole screen - it tends
> to have title bars, menu items, tabs even, which just distract from
> the task at hand. Maybe it can be set up to take the whole screen,
> but that's work. And the fonts used tend to be less distinct and
> helpful than the 16 x 8 bitmaps I have on the console.
Those seem more like preferences / settings to me. But preferences are
still sufficient to drive decisions.
> And X windows steals useful key sequences, such as Alt-Tab.
True.
> On an Emacs session, in three columns on a console, I can display
> 195 consecutive lines of a source file simultaneously.
I would expect that to be the same possibility in X and on the console.
Or quite close counterparts.
> I could go on, but ...
>
> That's not to say there aren't problems with the tty console - even
> before the screen scrolling was removed altogether, it wasn't exactly
> anything to write home about. And it would be nice to have more than
> 16 colours available. But, on balance, I'll stick with the console.
Fair enough. To each their own.
> I think bringing up a new Gentoo system absolutely requires working
> in the console, certainly up to the point where X11 and a Window
> Manager have been installed and debugged.
True.
Thank you Alan, for enlightening me to your work flow and how the
console is better for you.
--
Grant. . . .
unix || die
^ permalink raw reply [flat|nested] 34+ messages in thread
* [gentoo-user] Re: Console scrollback
2021-01-13 21:56 ` Alan Mackenzie
2021-01-13 22:14 ` Grant Taylor
@ 2021-01-13 22:15 ` Grant Edwards
2021-01-13 23:01 ` Neil Bothwick
2021-01-14 16:06 ` Alan Mackenzie
1 sibling, 2 replies; 34+ messages in thread
From: Grant Edwards @ 2021-01-13 22:15 UTC (permalink / raw
To: gentoo-user
On 2021-01-13, Alan Mackenzie <acm@muc.de> wrote:
> I think bringing up a new Gentoo system absolutely requires working in
> the console, certainly up to the point where X11 and a Window Manager
> have been installed and debugged.
I usually install Gentoo via ssh.
The article I read about the removal of Linux console's backscrolling
feature said it was mostly due to lack of a maintainer for that code,
and that if somebody stepped forward to maintain it, it could be revived.
FWOW, if you really want backscrolling on the console, you can get
that with screen, but doing so would drive me nuts, since I'd have to
break all my fingers to stop them from typeing ctrl-A to move the
start of a line. I've switched screen's meta-character a few times,
but everytime I try that I find my fingers already have something else
assigned to that control character (which I had forgotten about). It
would be nice if I could print out my fingers' assignment table to
find an unused control character, but that doesn't seem to be how it
works.
--
Grant
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Re: Console scrollback
2021-01-13 22:15 ` [gentoo-user] " Grant Edwards
@ 2021-01-13 23:01 ` Neil Bothwick
2021-01-13 23:06 ` Grant Edwards
2021-01-14 16:06 ` Alan Mackenzie
1 sibling, 1 reply; 34+ messages in thread
From: Neil Bothwick @ 2021-01-13 23:01 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 536 bytes --]
On Wed, 13 Jan 2021 22:15:25 -0000 (UTC), Grant Edwards wrote:
> FWOW, if you really want backscrolling on the console, you can get
> that with screen, but doing so would drive me nuts, since I'd have to
> break all my fingers to stop them from typeing ctrl-A to move the
> start of a line.
The decision to use Ctrl-A seems insane as it is such a well used key
combination. I used to change it to Ctrl-B, but now I use tmux, which
uses Ctrl-B by default.
--
Neil Bothwick
Nobody's perfect and since I'm nobody...!
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* [gentoo-user] Re: Console scrollback
2021-01-13 23:01 ` Neil Bothwick
@ 2021-01-13 23:06 ` Grant Edwards
2021-01-14 0:00 ` Grant Taylor
2021-01-14 0:12 ` Neil Bothwick
0 siblings, 2 replies; 34+ messages in thread
From: Grant Edwards @ 2021-01-13 23:06 UTC (permalink / raw
To: gentoo-user
On 2021-01-13, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Wed, 13 Jan 2021 22:15:25 -0000 (UTC), Grant Edwards wrote:
>
>> FWOW, if you really want backscrolling on the console, you can get
>> that with screen, but doing so would drive me nuts, since I'd have to
>> break all my fingers to stop them from typeing ctrl-A to move the
>> start of a line.
>
> The decision to use Ctrl-A seems insane as it is such a well used key
> combination. I used to change it to Ctrl-B, but now I use tmux, which
> uses Ctrl-B by default.
Nope, ctrl-B is move-backwards-one-character. I really should try to
figure out a control-character that's not used by emacs or the tty
driver or ??? and assign that as the meta key in screen. Several times
a week while I'm screen I'll forget about ctrl-A not working and get
puzzled why my command lines are mangled.
--
Grant
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Re: Console scrollback
2021-01-13 23:06 ` Grant Edwards
@ 2021-01-14 0:00 ` Grant Taylor
2021-01-14 1:25 ` Grant Edwards
2021-01-14 0:12 ` Neil Bothwick
1 sibling, 1 reply; 34+ messages in thread
From: Grant Taylor @ 2021-01-14 0:00 UTC (permalink / raw
To: gentoo-user
On 1/13/21 4:06 PM, Grant Edwards wrote:
> I really should try to figure out a control-character that's not used
> by emacs or the tty driver
I think there are very few, if any, keys used by the TTY driver.
I suspect you are thinking of the line editor in the shell, e.g. readline.
I can see how Control-S (XOFF) and Control-Q (XON) might be part of the
TTY driver.
--
Grant. . . .
unix || die
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Re: Console scrollback
2021-01-13 23:06 ` Grant Edwards
2021-01-14 0:00 ` Grant Taylor
@ 2021-01-14 0:12 ` Neil Bothwick
1 sibling, 0 replies; 34+ messages in thread
From: Neil Bothwick @ 2021-01-14 0:12 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
On Wed, 13 Jan 2021 23:06:54 -0000 (UTC), Grant Edwards wrote:
> > The decision to use Ctrl-A seems insane as it is such a well used key
> > combination. I used to change it to Ctrl-B, but now I use tmux, which
> > uses Ctrl-B by default.
>
> Nope, ctrl-B is move-backwards-one-character.
That's why it works for me, I never use Ctrl-B to move like that.
--
Neil Bothwick
Give a man a fish and you feed him for a day; teach him
to use the Net and he won't bother you for weeks.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* [gentoo-user] Re: Console scrollback
2021-01-14 0:00 ` Grant Taylor
@ 2021-01-14 1:25 ` Grant Edwards
2021-01-14 17:10 ` Grant Taylor
0 siblings, 1 reply; 34+ messages in thread
From: Grant Edwards @ 2021-01-14 1:25 UTC (permalink / raw
To: gentoo-user
On 2021-01-14, Grant Taylor <gtaylor@gentoo.tnetconsulting.net> wrote:
> On 1/13/21 4:06 PM, Grant Edwards wrote:
>> I really should try to figure out a control-character that's not used
>> by emacs or the tty driver
>
> I think there are very few, if any, keys used by the TTY driver. I
> suspect you are thinking of the line editor in the shell,
> e.g. readline.
$ stty -a | tr ';' '\n' | fgrep ^
intr = ^C
quit = ^\
erase = ^?
kill = ^U
eof = ^D
start = ^Q
stop = ^S
susp = ^Z
rprnt = ^R
werase = ^W
lnext = ^V
discard = ^O
Some of the above are shadowed by readline or by bash in emacs mode,
but the tty driver uses more than a few control keys.
--
Grant
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 18:44 ` Neil Bothwick
@ 2021-01-14 16:00 ` Alan Mackenzie
0 siblings, 0 replies; 34+ messages in thread
From: Alan Mackenzie @ 2021-01-14 16:00 UTC (permalink / raw
To: gentoo-user
Hello, Neil.
On Wed, Jan 13, 2021 at 18:44:15 +0000, Neil Bothwick wrote:
> On Wed, 13 Jan 2021 18:14:39 +0000, Alan Mackenzie wrote:
> > > I see that the kernel code to scroll the console has been stripped out
> > > [1].
> > This is appalling. I do all my work on the console (apart from web
> > browsing), and with this development, Linux effectively becomes unusable
> > to me. I will NOT be bullied into using second rate alternatives like
> > X-Windows terminals.
> What about screen/tmux?
I suppose they'd do at a pinch, but they're both things which get
between Linux and my applications, and like X-Windows, they offer
"features" which I don't need and don't want, and hijack key sequences.
But I will look into it if I have to. For the moment, I can get by by
not updating my kernel.
> --
> Neil Bothwick
> WinErr 00D: Window closed - Do not look outside
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Re: Console scrollback
2021-01-13 22:15 ` [gentoo-user] " Grant Edwards
2021-01-13 23:01 ` Neil Bothwick
@ 2021-01-14 16:06 ` Alan Mackenzie
2021-01-16 12:01 ` Alan Mackenzie
1 sibling, 1 reply; 34+ messages in thread
From: Alan Mackenzie @ 2021-01-14 16:06 UTC (permalink / raw
To: gentoo-user
Hello, Grant.
On Wed, Jan 13, 2021 at 22:15:25 -0000, Grant Edwards wrote:
> On 2021-01-13, Alan Mackenzie <acm@muc.de> wrote:
> > I think bringing up a new Gentoo system absolutely requires working in
> > the console, certainly up to the point where X11 and a Window Manager
> > have been installed and debugged.
> I usually install Gentoo via ssh.
> The article I read about the removal of Linux console's backscrolling
> feature said it was mostly due to lack of a maintainer for that code,
> and that if somebody stepped forward to maintain it, it could be revived.
I'm doing my best to step forward, but I suspect that will be almost as
difficult as fixing the bugs in it. ;-)
I'm disappointed that the decision to cut out this important feature was
taken without any serious attempt to find a maintainer. I have the
impression (though I may be wrong), that the problem was talked about on
the linux kernel mailing list, but nobody there took it upon himself to
post on any of the more hard-core distributions' mailing lists, such as
gentoo's.
> FWOW, if you really want backscrolling on the console, you can get
> that with screen, but doing so would drive me nuts, since I'd have to
> break all my fingers to stop them from typeing ctrl-A to move the
> start of a line. I've switched screen's meta-character a few times,
> but everytime I try that I find my fingers already have something else
> assigned to that control character (which I had forgotten about). It
> would be nice if I could print out my fingers' assignment table to
> find an unused control character, but that doesn't seem to be how it
> works.
Can one set up a "basic" screen which doesn't use a meta-character?
> --
> Grant
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-13 22:14 ` Grant Taylor
@ 2021-01-14 16:39 ` karl
0 siblings, 0 replies; 34+ messages in thread
From: karl @ 2021-01-14 16:39 UTC (permalink / raw
To: gentoo-user
Grant:
> On 1/13/21 2:56 PM, Alan Mackenzie wrote:
...
> > Doing text work in X is s l u g g i s h. Changing from one
> > application to another, which would be achieved by, say Alt-F4 on a
> > console takes more key sequences in X, and is less than instantaneous.
I'm using fvwm set up with 9 virtual screens and so I can swith between
them with ctr-arrow, fast enought for me.
...
> > On an Emacs session, in three columns on a console, I can display
> > 195 consecutive lines of a source file simultaneously.
...
I get 260x97 chars in emacs on a 1600x1280 display. With three
columns, w82,82,83chars, I get 3x95=285 lines of text.
///
Alan, how do you set up your console (I'd like to try) ?
Regards,
/Karl Hammar
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Re: Console scrollback
2021-01-14 1:25 ` Grant Edwards
@ 2021-01-14 17:10 ` Grant Taylor
0 siblings, 0 replies; 34+ messages in thread
From: Grant Taylor @ 2021-01-14 17:10 UTC (permalink / raw
To: gentoo-user
On 1/13/21 6:25 PM, Grant Edwards wrote:
> Some of the above are shadowed by readline or by bash in emacs mode,
> but the tty driver uses more than a few control keys.
Thank you for the clarification / additional information.
--
Grant. . . .
unix || die
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Re: Console scrollback
2021-01-14 16:06 ` Alan Mackenzie
@ 2021-01-16 12:01 ` Alan Mackenzie
2021-01-17 5:17 ` [gentoo-user] " Thomas Mueller
` (2 more replies)
0 siblings, 3 replies; 34+ messages in thread
From: Alan Mackenzie @ 2021-01-16 12:01 UTC (permalink / raw
To: gentoo-user
Hello, Gentoo.
On Thu, Jan 14, 2021 at 16:06:38 +0000, Alan Mackenzie wrote:
> On Wed, Jan 13, 2021 at 22:15:25 -0000, Grant Edwards wrote:
> > On 2021-01-13, Alan Mackenzie <acm@muc.de> wrote:
> > > I think bringing up a new Gentoo system absolutely requires working in
> > > the console, certainly up to the point where X11 and a Window Manager
> > > have been installed and debugged.
> > I usually install Gentoo via ssh.
> > The article I read about the removal of Linux console's backscrolling
> > feature said it was mostly due to lack of a maintainer for that code,
> > and that if somebody stepped forward to maintain it, it could be revived.
> I'm doing my best to step forward, but I suspect that will be almost as
> difficult as fixing the bugs in it. ;-)
And so it transpired. I subscribed to the linux-kernel list for a short
time, and offered my services in a post. Not one single reply did I get.
That list is not a friendly one. It gets an almost unmanageable ~2000
posts a day, the vast bulk of which are patches, fragmented into,
perhaps, one diff hunk per post.
> I'm disappointed that the decision to cut out this important feature was
> taken without any serious attempt to find a maintainer. I have the
> impression (though I may be wrong), that the problem was talked about on
> the linux kernel mailing list, but nobody there took it upon himself to
> post on any of the more hard-core distributions' mailing lists, such as
> gentoo's.
I've come to realise that Linus Torvalds, who personally took the
decision to remove the scrolling, doesn't care about users, and indeed
regards them with disdain. He cares about _customers_, and Linux's
customers are RedHat, Suse, IBM, Intel, and the other HW manufacturers.
RedHat customers don't use the console, therefore the console isn't
important. It's a bit like Microsoft's attitude towards users.
Sure, Linus went through the motions of pretending to try to find a
maintainer, but didn't put any serious effort into it. He argued that
"nobody" uses it anyway, therefore it is unimportant, which is an ironic
echo of the argument that nobody uses Linux on a desktop PC.
Even if the bugs came to be fixed, I doubt the scrolling would be allowed
back into the kernel, for the above reasons. Exactly what the bugs are
in the scrolling code wasn't gone into on the list, despite more than one
contributor asking.
> > FWOW, if you really want backscrolling on the console, you can get
> > that with screen, but doing so would drive me nuts, since I'd have to
> > break all my fingers to stop them from typeing ctrl-A to move the
> > start of a line. I've switched screen's meta-character a few times,
> > but everytime I try that I find my fingers already have something else
> > assigned to that control character (which I had forgotten about). It
> > would be nice if I could print out my fingers' assignment table to
> > find an unused control character, but that doesn't seem to be how it
> > works.
> Can one set up a "basic" screen which doesn't use a meta-character?
I don't know what I'll be doing, long term. For the moment, I'll be
hanging onto the working kernel I've got, old though it may be (4.19.97).
It might be possible (I'm not sure) to hook up a user space program to
the keys <shift>-<PageUp/Down> which would take care of the scrolling.
This would obviously not work with early kernel messages, but would be
better than nothing. I had a look at the GNU screen source code
yesterday to see how it managed such things, but it is very sparsely
commented, and thus hard work to understand.
Maybe I should just cut my losses, and convert to using one of the BSDs.
> > --
> > Grant
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-16 12:01 ` Alan Mackenzie
@ 2021-01-17 5:17 ` Thomas Mueller
[not found] ` <20210117051748.E3239E0869@pigeon.gentoo.org>
[not found] ` <20210117051748.B8178E0863@pigeon.gentoo.org>
2 siblings, 0 replies; 34+ messages in thread
From: Thomas Mueller @ 2021-01-17 5:17 UTC (permalink / raw
To: gentoo-user
On Sat, 16 Jan 2021 12:01:48 +0000, Alan Mackenzie wrote:
> Hello, Gentoo.
> On Thu, Jan 14, 2021 at 16:06:38 +0000, Alan Mackenzie wrote:
> > On Wed, Jan 13, 2021 at 22:15:25 -0000, Grant Edwards wrote:
> > > On 2021-01-13, Alan Mackenzie <acm@muc.de> wrote:
> > > > I think bringing up a new Gentoo system absolutely requires working in
> > > > the console, certainly up to the point where X11 and a Window Manager
> > > > have been installed and debugged.
> > > I usually install Gentoo via ssh.
> > > The article I read about the removal of Linux console's backscrolling
> > > feature said it was mostly due to lack of a maintainer for that code,
> > > and that if somebody stepped forward to maintain it, it could be revived.
> > I'm doing my best to step forward, but I suspect that will be almost as
> > difficult as fixing the bugs in it. ;-)
> And so it transpired. I subscribed to the linux-kernel list for a short
> time, and offered my services in a post. Not one single reply did I get.
> That list is not a friendly one. It gets an almost unmanageable ~2000
> posts a day, the vast bulk of which are patches, fragmented into,
> perhaps, one diff hunk per post.
> > I'm disappointed that the decision to cut out this important feature was
> > taken without any serious attempt to find a maintainer. I have the
> > impression (though I may be wrong), that the problem was talked about on
> > the linux kernel mailing list, but nobody there took it upon himself to
> > post on any of the more hard-core distributions' mailing lists, such as
> > gentoo's.
> I've come to realise that Linus Torvalds, who personally took the
> decision to remove the scrolling, doesn't care about users, and indeed
> regards them with disdain. He cares about _customers_, and Linux's
> customers are RedHat, Suse, IBM, Intel, and the other HW manufacturers.
> RedHat customers don't use the console, therefore the console isn't
> important. It's a bit like Microsoft's attitude towards users.
> Sure, Linus went through the motions of pretending to try to find a
> maintainer, but didn't put any serious effort into it. He argued that
> "nobody" uses it anyway, therefore it is unimportant, which is an ironic
> echo of the argument that nobody uses Linux on a desktop PC.
> Even if the bugs came to be fixed, I doubt the scrolling would be allowed
> back into the kernel, for the above reasons. Exactly what the bugs are
> in the scrolling code wasn't gone into on the list, despite more than one
> contributor asking.
> > > FWOW, if you really want backscrolling on the console, you can get
> > > that with screen, but doing so would drive me nuts, since I'd have to
> > > break all my fingers to stop them from typeing ctrl-A to move the
> > > start of a line. I've switched screen's meta-character a few times,
> > > but everytime I try that I find my fingers already have something else
> > > assigned to that control character (which I had forgotten about). It
> > > would be nice if I could print out my fingers' assignment table to
> > > find an unused control character, but that doesn't seem to be how it
> > > works.
> > Can one set up a "basic" screen which doesn't use a meta-character?
> I don't know what I'll be doing, long term. For the moment, I'll be
> hanging onto the working kernel I've got, old though it may be (4.19.97).
> It might be possible (I'm not sure) to hook up a user space program to
> the keys <shift>-<PageUp/Down> which would take care of the scrolling.
> This would obviously not work with early kernel messages, but would be
> better than nothing. I had a look at the GNU screen source code
> yesterday to see how it managed such things, but it is very sparsely
> commented, and thus hard work to understand.
> Maybe I should just cut my losses, and convert to using one of the BSDs.
2000 posts per day on Linux kernel list would be more than unmanageable for me! I wouldn't say "almost"!
Is Linus Torvalds' removal of console scrolling the reason why Scroll Lock does not work on the console with System Rescue CD or USB, while with FreeBSD and NetBSD, I can press Scroll Lock and scroll back?
I like that ability but don't think Linus Torvalds is listening or reading this.
Further, with System Rescue console, the lines/text go only partway down.
Using screen, now at v4.8, means having to remember a lot of key functions, you need a separate reference screen to look them up.
There is also tmux, which is part of the base system in NetBSD but not FreeBSD.
If Linus cared about his users, he could make the kernel headers more user-friendly, installing kernel headers should not be any more complicated than copying or downloading.
Console scrolling is especially useful with an OS or distro that is built from the ground up, like Gentoo, Void or Arch, as opposed to being installed all at once.
If more Linux users would go to and try NetBSD or FreeBSD, those OSes would have more users, more ideas, more ability to improve.
You can even cross-compile NetBSD from Linux. You'd need NetBSD source tree, but don't have to do anything special to install kernel headers.
Tom
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
[not found] ` <20210117051748.E3239E0869@pigeon.gentoo.org>
@ 2021-01-17 9:16 ` Philip Webb
0 siblings, 0 replies; 34+ messages in thread
From: Philip Webb @ 2021-01-17 9:16 UTC (permalink / raw
To: gentoo-user
On Sat, 16 Jan 2021 12:01:48 +0000, Alan Mackenzie wrote:
> I usually install Gentoo via ssh.
> The article I read about the removal of Linux console's backscrolling
> feature said it was mostly due to lack of a maintainer for that code,
> and that if somebody stepped forward to maintain it, it could be revived.
> I subscribed to the linux-kernel list for a short time
> and offered my services in a post. Not one single reply did I get.
> Linus Torvalds personally took the decision to remove the scrolling.
> Sure, he went through the motions of pretending to try to find
> a maintainer, but didn't put any serious effort into it.
> He argued that "nobody" uses it anyway, therefore it is unimportant.
> Exactly what the bugs are in the scrolling code
> wasn't gone into on the list, despite more than one contributor asking.
You can't expect Linus to take any time over a minority of users
or for the kernel team generally to reply to someone they don't know.
In order to get attention, you need to come up with a set of patches
which you know work in a modified kernel in your own machine.
For that, you have to put in some work of your own,
searching out the bugs, examining the relevant code,
finding what is needed to fix the bugs & testing patched kernels.
If you try using Screen, you could print yourself a list of commands,
which would make it easier to get used to its features.
It may well be easier to go over to BSD instead.
When I installed this system in 2015, I needed to use raw terminals,
so I wonder whether this is a real problem for a lot of Gentoo users.
If so, an approach by a Gentoo dev to the kernel maintainers
would be likely to get the attention you can't get on your own.
HTH
--
========================,,============================================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatcadotinterdotnet
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
[not found] ` <20210117051748.B8178E0863@pigeon.gentoo.org>
@ 2021-01-19 17:09 ` Laurence Perkins
2021-01-20 19:59 ` Alan Mackenzie
0 siblings, 1 reply; 34+ messages in thread
From: Laurence Perkins @ 2021-01-19 17:09 UTC (permalink / raw
To: gentoo-user@lists.gentoo.org
On Sun, 2021-01-17 at 05:17 +0000, Thomas Mueller wrote:
> On Sat, 16 Jan 2021 12:01:48 +0000, Alan Mackenzie wrote:
>
> > Hello, Gentoo.
> > On Thu, Jan 14, 2021 at 16:06:38 +0000, Alan Mackenzie wrote:
> > > On Wed, Jan 13, 2021 at 22:15:25 -0000, Grant Edwards wrote:
> > > > On 2021-01-13, Alan Mackenzie <acm@muc.de> wrote:
> > > > > I think bringing up a new Gentoo system absolutely requires
> > > > > working in
> > > > > the console, certainly up to the point where X11 and a Window
> > > > > Manager
> > > > > have been installed and debugged.
> > > > I usually install Gentoo via ssh.
> > > > The article I read about the removal of Linux console's
> > > > backscrolling
> > > > feature said it was mostly due to lack of a maintainer for that
> > > > code,
> > > > and that if somebody stepped forward to maintain it, it could
> > > > be revived.
> > > I'm doing my best to step forward, but I suspect that will be
> > > almost as
> > > difficult as fixing the bugs in it. ;-)
> > And so it transpired. I subscribed to the linux-kernel list for a
> > short
> > time, and offered my services in a post. Not one single reply did
> > I get.
> > That list is not a friendly one. It gets an almost unmanageable
> > ~2000
> > posts a day, the vast bulk of which are patches, fragmented into,
> > perhaps, one diff hunk per post.
> > > I'm disappointed that the decision to cut out this important
> > > feature was
> > > taken without any serious attempt to find a maintainer. I have
> > > the
> > > impression (though I may be wrong), that the problem was talked
> > > about on
> > > the linux kernel mailing list, but nobody there took it upon
> > > himself to
> > > post on any of the more hard-core distributions' mailing lists,
> > > such as
> > > gentoo's.
> > I've come to realise that Linus Torvalds, who personally took the
> > decision to remove the scrolling, doesn't care about users, and
> > indeed
> > regards them with disdain. He cares about _customers_, and Linux's
> > customers are RedHat, Suse, IBM, Intel, and the other HW
> > manufacturers.
> > RedHat customers don't use the console, therefore the console isn't
> > important. It's a bit like Microsoft's attitude towards users.
> > Sure, Linus went through the motions of pretending to try to find a
> > maintainer, but didn't put any serious effort into it. He argued
> > that
> > "nobody" uses it anyway, therefore it is unimportant, which is an
> > ironic
> > echo of the argument that nobody uses Linux on a desktop PC.
> > Even if the bugs came to be fixed, I doubt the scrolling would be
> > allowed
> > back into the kernel, for the above reasons. Exactly what the bugs
> > are
> > in the scrolling code wasn't gone into on the list, despite more
> > than one
> > contributor asking.
> > > > FWOW, if you really want backscrolling on the console, you can
> > > > get
> > > > that with screen, but doing so would drive me nuts, since I'd
> > > > have to
> > > > break all my fingers to stop them from typeing ctrl-A to move
> > > > the
> > > > start of a line. I've switched screen's meta-character a few
> > > > times,
> > > > but everytime I try that I find my fingers already have
> > > > something else
> > > > assigned to that control character (which I had forgotten
> > > > about). It
> > > > would be nice if I could print out my fingers' assignment table
> > > > to
> > > > find an unused control character, but that doesn't seem to be
> > > > how it
> > > > works.
> > > Can one set up a "basic" screen which doesn't use a meta-
> > > character?
> > I don't know what I'll be doing, long term. For the moment, I'll
> > be
> > hanging onto the working kernel I've got, old though it may be
> > (4.19.97).
> > It might be possible (I'm not sure) to hook up a user space program
> > to
> > the keys <shift>-<PageUp/Down> which would take care of the
> > scrolling.
> > This would obviously not work with early kernel messages, but would
> > be
> > better than nothing. I had a look at the GNU screen source code
> > yesterday to see how it managed such things, but it is very
> > sparsely
> > commented, and thus hard work to understand.
> > Maybe I should just cut my losses, and convert to using one of the
> > BSDs.
>
> 2000 posts per day on Linux kernel list would be more than
> unmanageable for me! I wouldn't say "almost"!
>
> Is Linus Torvalds' removal of console scrolling the reason why Scroll
> Lock does not work on the console with System Rescue CD or USB, while
> with FreeBSD and NetBSD, I can press Scroll Lock and scroll back?
>
> I like that ability but don't think Linus Torvalds is listening or
> reading this.
>
> Further, with System Rescue console, the lines/text go only partway
> down.
>
> Using screen, now at v4.8, means having to remember a lot of key
> functions, you need a separate reference screen to look them up.
>
> There is also tmux, which is part of the base system in NetBSD but
> not FreeBSD.
>
> If Linus cared about his users, he could make the kernel headers more
> user-friendly, installing kernel headers should not be any more
> complicated than copying or downloading.
>
> Console scrolling is especially useful with an OS or distro that is
> built from the ground up, like Gentoo, Void or Arch, as opposed to
> being installed all at once.
>
> If more Linux users would go to and try NetBSD or FreeBSD, those OSes
> would have more users, more ideas, more ability to improve.
>
> You can even cross-compile NetBSD from Linux. You'd need NetBSD
> source tree, but don't have to do anything special to install kernel
> headers.
>
> Tom
>
>
You're getting this second-hand since it was my brother who actually
looked into it, so pardon anything I misremember, but the big problem
is that adding unicode support to vgacon would need a near total
rewrite, and nobody wants to do that since it's a terrible hackjob to
start with.
kmscon is slated to be the replacement. You might want to see if that
can do what you need.
LMP
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-19 17:09 ` Laurence Perkins
@ 2021-01-20 19:59 ` Alan Mackenzie
2021-01-21 9:32 ` Wols Lists
2021-04-02 18:30 ` Alan Mackenzie
0 siblings, 2 replies; 34+ messages in thread
From: Alan Mackenzie @ 2021-01-20 19:59 UTC (permalink / raw
To: gentoo-user
Hello, Laurence.
On Tue, Jan 19, 2021 at 17:09:03 +0000, Laurence Perkins wrote:
> On Sun, 2021-01-17 at 05:17 +0000, Thomas Mueller wrote:
> > On Sat, 16 Jan 2021 12:01:48 +0000, Alan Mackenzie wrote:
> > > I don't know what I'll be doing, long term. For the moment, I'll
> > > be hanging onto the working kernel I've got, old though it may be
> > > (4.19.97). It might be possible (I'm not sure) to hook up a user
> > > space program to the keys <shift>-<PageUp/Down> which would take
> > > care of the scrolling. This would obviously not work with early
> > > kernel messages, but would be better than nothing. I had a look at
> > > the GNU screen source code yesterday to see how it managed such
> > > things, but it is very sparsely commented, and thus hard work to
> > > understand. Maybe I should just cut my losses, and convert to
> > > using one of the BSDs.
> > 2000 posts per day on Linux kernel list would be more than
> > unmanageable for me! I wouldn't say "almost"!
> > Is Linus Torvalds' removal of console scrolling the reason why Scroll
> > Lock does not work on the console with System Rescue CD or USB, while
> > with FreeBSD and NetBSD, I can press Scroll Lock and scroll back?
> > I like that ability but don't think Linus Torvalds is listening or
> > reading this.
> > Further, with System Rescue console, the lines/text go only partway
> > down.
> > Using screen, now at v4.8, means having to remember a lot of key
> > functions, you need a separate reference screen to look them up.
> > There is also tmux, which is part of the base system in NetBSD but
> > not FreeBSD.
> > If Linus cared about his users, he could make the kernel headers more
> > user-friendly, installing kernel headers should not be any more
> > complicated than copying or downloading.
> > Console scrolling is especially useful with an OS or distro that is
> > built from the ground up, like Gentoo, Void or Arch, as opposed to
> > being installed all at once.
> > If more Linux users would go to and try NetBSD or FreeBSD, those OSes
> > would have more users, more ideas, more ability to improve.
> > You can even cross-compile NetBSD from Linux. You'd need NetBSD
> > source tree, but don't have to do anything special to install kernel
> > headers.
> > Tom
> You're getting this second-hand since it was my brother who actually
> looked into it, so pardon anything I misremember, but the big problem
> is that adding unicode support to vgacon would need a near total
> rewrite, and nobody wants to do that since it's a terrible hackjob to
> start with.
> kmscon is slated to be the replacement. You might want to see if that
> can do what you need.
I looked kmscon up on Wikipedia, and apparently development ceased
several years ago.
What I have in mind now is writing a Linux driver, a small piece of code
which would piggy-back on the existing virtual terminal drivers, and
simply pass everything through to and from the main driver, filtering out
things relevant to scrolling, and processing these in my new driver.
I've spent the last few evenings reading up on drivers, and reading the
relevant source code from 4.19.97. I can understand the kernel
maintainers not being enthusiastic about the existing code. But that
dates from, I believe, the 1990s, when RAM was measured in megabytes, and
processor speeds in megahertz. Optimisation for speed and store usage
just isn't important any more.
> LMP
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-21 9:32 ` Wols Lists
@ 2021-01-21 8:58 ` Jorge Almeida
2021-01-21 12:40 ` Remco Rijnders
2021-01-25 12:42 ` Alan Mackenzie
1 sibling, 1 reply; 34+ messages in thread
From: Jorge Almeida @ 2021-01-21 8:58 UTC (permalink / raw
To: gentoo-user
On Thu, Jan 21, 2021 at 8:53 AM Wols Lists <antlists@youngman.org.uk> wrote:
>
> https://lwn.net/Articles/842415/
>
> Take a read, as it's mentioned in this article.
>
Paywalled... :(
Jorge Almeida
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-20 19:59 ` Alan Mackenzie
@ 2021-01-21 9:32 ` Wols Lists
2021-01-21 8:58 ` Jorge Almeida
2021-01-25 12:42 ` Alan Mackenzie
2021-04-02 18:30 ` Alan Mackenzie
1 sibling, 2 replies; 34+ messages in thread
From: Wols Lists @ 2021-01-21 9:32 UTC (permalink / raw
To: gentoo-user
On 20/01/21 19:59, Alan Mackenzie wrote:
> I can understand the kernel
> maintainers not being enthusiastic about the existing code. But that
> dates from, I believe, the 1990s, when RAM was measured in megabytes, and
> processor speeds in megahertz. Optimisation for speed and store usage
> just isn't important any more.
I thin you're being highly optimistic. Bear in mind that this is the
code that was responsible for Alan Cox ceasing linux development, it's
such a pile of steaming manure ...
Don't ask me why it is, but I think it's got so much stuff wrong with it
that the entire system is marked "beware here be dragons".
https://lwn.net/Articles/842415/
Take a read, as it's mentioned in this article.
Cheers,
Wol
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-21 8:58 ` Jorge Almeida
@ 2021-01-21 12:40 ` Remco Rijnders
2021-01-21 13:00 ` Jorge Almeida
0 siblings, 1 reply; 34+ messages in thread
From: Remco Rijnders @ 2021-01-21 12:40 UTC (permalink / raw
To: gentoo-user
On Thu, Jan 21, 2021 at 08:58:42AM +0000, Jorge wrote in
<CAKpSnpJjZ21+ut8jgEdKBrnREP0Lb_6XQAZ=P63LLTKpJNDgkw@mail.gmail.com>:
>On Thu, Jan 21, 2021 at 8:53 AM Wols Lists <antlists@youngman.org.uk> wrote:
>>
>
>> https://lwn.net/Articles/842415/
>>
>> Take a read, as it's mentioned in this article.
>>
>Paywalled... :(
Try this link: https://lwn.net/SubscriberLink/842415/5bc3e39b4d4f52fe/
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-21 12:40 ` Remco Rijnders
@ 2021-01-21 13:00 ` Jorge Almeida
0 siblings, 0 replies; 34+ messages in thread
From: Jorge Almeida @ 2021-01-21 13:00 UTC (permalink / raw
To: gentoo-user
On Thu, Jan 21, 2021 at 12:40 PM Remco Rijnders <remco@webconquest.com> wrote:
>
> On Thu, Jan 21, 2021 at 08:58:42AM +0000, Jorge wrote in
> <CAKpSnpJjZ21+ut8jgEdKBrnREP0Lb_6XQAZ=P63LLTKpJNDgkw@mail.gmail.com>:
> >On Thu, Jan 21, 2021 at 8:53 AM Wols Lists <antlists@youngman.org.uk> wrote:
> >>
> >
> >> https://lwn.net/Articles/842415/
> >>
> >> Take a read, as it's mentioned in this article.
> >>
> >Paywalled... :(
>
> Try this link: https://lwn.net/SubscriberLink/842415/5bc3e39b4d4f52fe/
>
Works. Thanks.
Jorge Almeida
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-21 9:32 ` Wols Lists
2021-01-21 8:58 ` Jorge Almeida
@ 2021-01-25 12:42 ` Alan Mackenzie
1 sibling, 0 replies; 34+ messages in thread
From: Alan Mackenzie @ 2021-01-25 12:42 UTC (permalink / raw
To: gentoo-user
Hello, Wol.
On Thu, Jan 21, 2021 at 09:32:13 +0000, Wols Lists wrote:
> On 20/01/21 19:59, Alan Mackenzie wrote:
> > I can understand the kernel maintainers not being enthusiastic about
> > the existing code. But that dates from, I believe, the 1990s, when
> > RAM was measured in megabytes, and processor speeds in megahertz.
> > Optimisation for speed and store usage just isn't important any more.
> I think you're being highly optimistic. Bear in mind that this is the
> code that was responsible for Alan Cox ceasing linux development, it's
> such a pile of steaming manure ...
It is indeed a tortuous mess of code, with far too many abstractions, and
far too little overview.
> Don't ask me why it is, but I think it's got so much stuff wrong with it
> that the entire system is marked "beware here be dragons".
Over the weekend, I achieved the first part of my task, getting a
transparent new driver into the kernel, which would merely pass through
to and from /dev/sctty3 to and from /dev/tty3, etc. This works.
Now I have to hook up with the /dev/vcs drivers to buffer the text
written to the screen, so as to be able to output it again in the event
of a <Ctrl>-<PageUp/Down>.
I would guess I'm around 50% through the task (as in the first 50% takes
the first 90% of the time, and the second 50% takes the second 90% of the
time).
> https://lwn.net/Articles/842415/
> Take a read, as it's mentioned in this article.
The website said it would become freely available on 2021-01-28, so I'll
read it then.
> Cheers,
> Wol
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-01-20 19:59 ` Alan Mackenzie
2021-01-21 9:32 ` Wols Lists
@ 2021-04-02 18:30 ` Alan Mackenzie
2021-04-02 19:32 ` karl
1 sibling, 1 reply; 34+ messages in thread
From: Alan Mackenzie @ 2021-04-02 18:30 UTC (permalink / raw
To: gentoo-user
Hello, Gentoo.
On Wed, Jan 20, 2021 at 19:59:09 +0000, Alan Mackenzie wrote:
[Context: Scrolling on the Linux text console using the keys
<shift><PgUp> and <shift><PgDn> has been removed from the kernel. This
is not a Good Thing.]
> What I have in mind now is writing a Linux driver, a small piece of code
> which would piggy-back on the existing virtual terminal drivers, and
> simply pass everything through to and from the main driver, filtering out
> things relevant to scrolling, and processing these in my new driver.
> I've spent the last few evenings reading up on drivers, and reading the
> relevant source code from 4.19.97. I can understand the kernel
> maintainers not being enthusiastic about the existing code. But that
> dates from, I believe, the 1990s, when RAM was measured in megabytes, and
> processor speeds in megahertz. Optimisation for speed and store usage
> just isn't important any more.
I finally got around to looking into this seriously in the last couple
of weeks. The above plan turned out not to be the right thing.
I've now cobbled together a working console scroll on Linux
5.4.80-gentoo-r1. In the end, I reused much of the old machinery which
was still present in 4.19.97. Once I've tidied it up, I hope that the
resulting patch file will apply cleanly also to later versions than
5.4.80-r1.
As a matter of interest, the kernel code for the console is not the
easiest in the world to deal with, having too many abstractions and too
few comments. ;-(
I've enhanced the mechanism so that each tty has its own scrollback
buffer, rather than one buffer being shared between all tty's. The
default size of these buffers is now 128kB, but can be set in make
menuconfig. I'm intending to make sharing a buffer between all tty's be
an option, but haven't implemented that yet.
The code, as yet, is a bit scruffy (in fact, very scruffy), and I have
several technical problems:
(i) The scrolling doesn't work on /dev/tty1 aka the console.
(ii) When, e.g., /dev/tty6 has been scrolled upwards a bit, and then
<Alt><F2> pressed to go to /dev/tty2, on returning to /dev/tty6, the
scrolling has been cancelled and the cursor is no longer visible.
However, the scrollback buffer is still present.
I think I'm fairly likely to be able to solve (ii). However, (i), the
problem with /dev/tty1, has me baffled. I don't know where to start
looking for the problem. If anybody with some kernel knowledge could
make any suggestions, I'd be very grateful.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-04-02 18:30 ` Alan Mackenzie
@ 2021-04-02 19:32 ` karl
2021-04-02 20:49 ` Alan Mackenzie
0 siblings, 1 reply; 34+ messages in thread
From: karl @ 2021-04-02 19:32 UTC (permalink / raw
To: gentoo-user
Alex Mackenzie:
...
> I've now cobbled together a working console scroll on Linux
> 5.4.80-gentoo-r1. In the end, I reused much of the old machinery which
> was still present in 4.19.97. Once I've tidied it up, I hope that the
> resulting patch file will apply cleanly also to later versions than
> 5.4.80-r1.
...
Nice, where is the patch so I can try ?
> (i) The scrolling doesn't work on /dev/tty1 aka the console.
> (ii) When, e.g., /dev/tty6 has been scrolled upwards a bit, and then
> <Alt><F2> pressed to go to /dev/tty2, on returning to /dev/tty6, the
> scrolling has been cancelled and the cursor is no longer visible.
> However, the scrollback buffer is still present.
>
> I think I'm fairly likely to be able to solve (ii). However, (i), the
> problem with /dev/tty1, has me baffled. I don't know where to start
> looking for the problem. If anybody with some kernel knowledge could
> make any suggestions, I'd be very grateful.
What happens if you set /dev/console to be /dev/ttyS0, i.e. make sure
that tty1 is the only one using the first virtual console.
Regards,
/Karl Hammar
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [gentoo-user] Console scrollback
2021-04-02 19:32 ` karl
@ 2021-04-02 20:49 ` Alan Mackenzie
0 siblings, 0 replies; 34+ messages in thread
From: Alan Mackenzie @ 2021-04-02 20:49 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2376 bytes --]
Hello, Karl.
Thanks for the reply.
On Fri, Apr 02, 2021 at 21:32:04 +0200, karl@aspodata.se wrote:
> Alan Mackenzie:
> ...
> > I've now cobbled together a working console scroll on Linux
> > 5.4.80-gentoo-r1. In the end, I reused much of the old machinery which
> > was still present in 4.19.97. Once I've tidied it up, I hope that the
> > resulting patch file will apply cleanly also to later versions than
> > 5.4.80-r1.
> ...
> Nice, where is the patch so I can try ?
I've attached a patch to this post. To apply it, the following seems to
work from the top directory of a kernel source tree, e.g. 5.4.80-r1:
$ patch -p0 < diff.20210402.diff
.. Then you'll need to run make menuconfig (or whatever), going down to
Device Drivers/Graphic support/Console display driver support and there
accepting the defaults for the new config variables. (This is assuming
you've got FRAMEBUFFER support enabled in a neighbouring page.)
Then build the kernel as normal, and put the new version into whatever
boot loader you use. It should (??) run, with a scrollback buffer on
each virtual terminal.
Just a word about the current state of the source - it is rough, with
things unfinished. The "word" STOUGH (pronounced "stuff") is just a
word I use which appears nowhere else and enables me to find changes
quickly and unambiguously.
As I said, I'm not finished with the changes, and swapping from and back
to a scrolled tty isn't completely satisfactory. Nevertheless, I hope
it works for you and you have fun with it.
> > (i) The scrolling doesn't work on /dev/tty1 aka the console.
> > (ii) When, e.g., /dev/tty6 has been scrolled upwards a bit, and then
> > <Alt><F2> pressed to go to /dev/tty2, on returning to /dev/tty6, the
> > scrolling has been cancelled and the cursor is no longer visible.
> > However, the scrollback buffer is still present.
> >
> > I think I'm fairly likely to be able to solve (ii). However, (i), the
> > problem with /dev/tty1, has me baffled. I don't know where to start
> > looking for the problem. If anybody with some kernel knowledge could
> > make any suggestions, I'd be very grateful.
> What happens if you set /dev/console to be /dev/ttyS0, i.e. make sure
> that tty1 is the only one using the first virtual console.
I will try than. Thanks!
> Regards,
> /Karl Hammar
--
Alan Mackenzie (Nuremberg, Germany).
[-- Attachment #2: diff.20210402.diff --]
[-- Type: text/plain, Size: 15009 bytes --]
--- drivers/video/console/Kconfig.orig 2021-03-31 19:14:48.186140856 +0000
+++ drivers/video/console/Kconfig 2021-03-31 12:39:08.090301096 +0000
@@ -79,6 +79,52 @@
help
Low-level framebuffer-based console driver.
+config FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+ bool "Enable Scrollback Buffer in System RAM"
+ depends on FB=y && FRAMEBUFFER_CONSOLE
+ default y
+ help
+ This option creates scrollback buffers for each framebuffer console,
+ or one buffer for them all. These buffers are allocated dynamically
+ during initialisation.
+
+ If you want this feature, say 'Y' here and enter the amount of
+ RAM to allocate for this buffer. If unsure, say 'N'.
+
+config FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK_SIZE
+ int "Scrollback Buffer Size (in KB)"
+ depends on FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+ range 1 1024
+ default "128"
+ help
+ Enter the amount of System RAM to allocate for scrollback buffers of
+ framebuffer consoles. Each character position on the video takes 2
+ bytes of storage. 128k will give you approximately 4 240x67
+ screenfuls of scrollback buffer.
+
+config FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT
+ bool "Persistent Scrollback History for each framebuffer console by default"
+ depends on FB=y && FRAMEBUFFER_CONSOLE && FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+ default y
+ help
+
+ Say Y here if the scrollback history should persist by default when
+ switching between consoles. Otherwise, the scrollback history will
+ be flushed the first time a scroll-up operation occurs on the new
+ console after the console is switched. STOUGH!!! FIXME!!! This
+ feature can also be enabled using the boot command line parameter
+ 'vgacon.scrollback_persistent=1'.
+
+ This feature might break your tool of choice to flush the scrollback
+ buffer, e.g. clear(1) will work fine but Debian's clear_console(1)
+ will be broken, which might cause security issues.
+ You can use the escape sequence \e[3J instead if this feature is
+ activated.
+
+ Note that a buffer of VGACON_SOFT_SCROLLBACK_SIZE is taken for each
+ created tty device.
+ So if you use a RAM-constrained system, say N here.
+
config FRAMEBUFFER_CONSOLE_DETECT_PRIMARY
bool "Map the console to the primary display device"
depends on FRAMEBUFFER_CONSOLE
--- drivers/tty/vt/vt.orig.c 2020-11-28 17:14:38.523649992 +0000
+++ drivers/tty/vt/vt.c 2021-04-02 15:28:53.094607272 +0000
@@ -142,6 +142,13 @@
#define DEFAULT_BELL_DURATION (HZ/8)
#define DEFAULT_CURSOR_BLINK_MS 200
+/* NEW STOUGH, 2021-04-01 */
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+static unsigned int console_soft_scrollback_size =
+ 1024 * CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK_SIZE;
+#endif
+/* END OF NEW STOUGH */
+
struct vc vc_cons [MAX_NR_CONSOLES];
#ifndef VT_SINGLE_DRIVER
@@ -623,6 +630,205 @@
}
}
+/* NEW STOUGH, 2021-03-31 */
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+/* NEW STOUGH, 2021-04-01 */
+static void con_update_softback(struct vc_data *vc)
+{
+ int l = vc->vc_softback_size / vc->vc_size_row;
+
+ if (l > 5)
+ vc->vc_softback_end = vc->vc_softback_buf + l * vc->vc_size_row;
+ else
+ /* Smaller scrollback makes no sense, and 0 would screw
+ the operation totally */
+ vc->vc_softback_top = 0;
+}
+
+static int concon_set_origin(struct vc_data *vc)
+{
+ if (vc->vc_softback_lines)
+ concon_scrolldelta(vc, vc->vc_softback_lines);
+ return 0;
+}
+/* END OF NEW STOUGH */
+
+#define advance_row(p, delta) (unsigned short *)((unsigned long)(p) + (delta) * vc->vc_size_row)
+
+static void con_redraw_softback(struct vc_data *vc, /* struct display *p, */
+ long delta)
+{
+ int count = vc->vc_rows;
+ unsigned short *d, *s;
+ unsigned long n;
+ int line = 0;
+
+ d = (u16 *) vc->vc_softback_curr;
+ if (d == (u16 *) vc->vc_softback_in)
+ d = (u16 *) vc->vc_origin;
+ n = vc->vc_softback_curr + delta * vc->vc_size_row;
+ vc->vc_softback_lines -= delta;
+ if (delta < 0) {
+ if (vc->vc_softback_curr < vc->vc_softback_top
+ && n < vc->vc_softback_buf) {
+ n += vc->vc_softback_end - vc->vc_softback_buf;
+ if (n < vc->vc_softback_top) {
+ vc->vc_softback_lines -=
+ (vc->vc_softback_top - n) / vc->vc_size_row;
+ n = vc->vc_softback_top;
+ }
+ } else if (vc->vc_softback_curr >= vc->vc_softback_top
+ && n < vc->vc_softback_top) {
+ vc->vc_softback_lines -=
+ (vc->vc_softback_top - n) / vc->vc_size_row;
+ n = vc->vc_softback_top;
+ }
+ } else {
+ if (vc->vc_softback_curr > vc->vc_softback_in
+ && n >= vc->vc_softback_end) {
+ n += vc->vc_softback_buf - vc->vc_softback_end;
+ if (n > vc->vc_softback_in) {
+ n = vc->vc_softback_in;
+ vc->vc_softback_lines = 0;
+ }
+ } else if (vc->vc_softback_curr <= vc->vc_softback_in
+ && n > vc->vc_softback_in) {
+ n = vc->vc_softback_in;
+ vc->vc_softback_lines = 0;
+ }
+ }
+ if (n == vc->vc_softback_curr)
+ return;
+ vc->vc_softback_curr = n;
+ s = (u16 *) vc->vc_softback_curr;
+ if (s == (u16 *) vc->vc_softback_in)
+ s = (u16 *) vc->vc_origin;
+ while (count--) {
+ unsigned short *start;
+ unsigned short *le;
+ unsigned short c;
+ int x = 0;
+ unsigned short attr = 1;
+
+ start = s;
+ le = advance_row(s, 1);
+ do {
+ c = scr_readw(s);
+ if (attr != (c & 0xff00)) {
+ attr = c & 0xff00;
+ if (s > start) {
+ vc->vc_sw->con_putcs(
+ vc, start, s - start,
+ line, x);
+ x += s - start;
+ start = s;
+ }
+ }
+ if (c == scr_readw(d)) {
+ if (s > start) {
+ vc->vc_sw->con_putcs(
+ vc, start, s - start,
+ line, x);
+ x += s - start + 1;
+ start = s + 1;
+ } else {
+ x++;
+ start++;
+ }
+ }
+ s++;
+ d++;
+ } while (s < le);
+ if (s > start)
+ vc->vc_sw->con_putcs(vc, start, s - start, line, x);
+ line++;
+ if (d == (u16 *) vc->vc_softback_end)
+ d = (u16 *) vc->vc_softback_buf;
+ if (d == (u16 *) vc->vc_softback_in)
+ d = (u16 *) vc->vc_origin;
+ if (s == (u16 *) vc->vc_softback_end)
+ s = (u16 *) vc->vc_softback_buf;
+ if (s == (u16 *) vc->vc_softback_in)
+ s = (u16 *) vc->vc_origin;
+ }
+}
+/* END OF NEW STOUGH */
+
+/* NEW STOUGH, 2021-04-01 */
+static inline void con_softback_note(struct vc_data *vc, int t,
+ int count)
+{
+ unsigned short *p;
+
+ if (vc->vc_num != fg_console)
+ return;
+ p = (unsigned short *) (vc->vc_origin + t * vc->vc_size_row);
+
+ while (count) {
+ scr_memcpyw((u16 *) vc->vc_softback_in, p, vc->vc_size_row);
+ count--;
+ p = advance_row(p, 1);
+ vc->vc_softback_in += vc->vc_size_row;
+ if (vc->vc_softback_in == vc->vc_softback_end)
+ vc->vc_softback_in = vc->vc_softback_buf;
+ if (vc->vc_softback_in == vc->vc_softback_top) {
+ vc->vc_softback_top += vc->vc_size_row;
+ if (vc->vc_softback_top == vc->vc_softback_end)
+ vc->vc_softback_top = vc->vc_softback_buf;
+ }
+ }
+ vc->vc_softback_curr = vc->vc_softback_in;
+}
+
+void concon_scrolldelta(struct vc_data *vc, int lines)
+{
+ /* struct display *disp = &fb_display[fg_console]; */
+ /* int offset, limit, scrollback_old; */
+
+ if (vc->vc_softback_top) {
+ if (vc->vc_num != fg_console)
+ return;
+ if (vc->vc_mode != KD_TEXT || !lines)
+ return;
+#if 0
+ if (logo_shown >= 0) {
+ struct vc_data *conp2 = vc_cons[logo_shown].d;
+
+ if (conp2->vc_top == logo_lines
+ && conp2->vc_bottom == conp2->vc_rows)
+ conp2->vc_top = 0;
+ if (logo_shown == vc->vc_num) {
+ unsigned long p, q;
+ int i;
+
+ p = vc->vc_softback_in;
+ q = vc->vc_origin +
+ logo_lines * vc->vc_size_row;
+ for (i = 0; i < logo_lines; i++) {
+ if (p == vc->vc_softback_top)
+ break;
+ if (p == vc->vc_softback_buf)
+ p = vc->vc_softback_end;
+ p -= vc->vc_size_row;
+ q -= vc->vc_size_row;
+ scr_memcpyw((u16 *) q, (u16 *) p,
+ vc->vc_size_row);
+ }
+ vc->vc_softback_in = vc->vc_softback_curr = p;
+ update_region(vc, vc->vc_origin,
+ logo_lines * vc->vc_cols);
+ }
+ logo_shown = FBCON_LOGO_CANSHOW;
+ }
+#endif
+ vc->vc_sw->con_cursor(vc, CM_ERASE /* | CM_SOFTBACK */);
+ con_redraw_softback(vc, /* disp, */ lines);
+ vc->vc_sw->con_cursor(vc, CM_DRAW /* | CM_SOFTBACK */);
+ }
+}
+
+/* END OF NEW STOUGH */
+#endif /* CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK */
static void con_scroll(struct vc_data *vc, unsigned int t, unsigned int b,
enum con_scroll dir, unsigned int nr)
@@ -633,6 +839,12 @@
nr = b - t - 1;
if (b > vc->vc_rows || t >= b || nr < 1)
return;
+ /* NEW STOUGH, 2021-04-01 */
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+ if (dir == SM_UP && vc->vc_softback_top)
+ con_softback_note (vc, t, nr);
+#endif
+ /* END OF NEW STOUGH */
vc_uniscr_scroll(vc, t, b, dir, nr);
if (con_is_visible(vc) && vc->vc_sw->con_scroll(vc, t, b, dir, nr))
return;
@@ -900,6 +1112,10 @@
clear_selection();
vc->vc_sw->con_cursor(vc, CM_ERASE);
+ /* NEW STOUGH, 2021-04-01 */
+ /* if (vc->vc_softback_lines) */
+ /* concon_set_origin (vc); */
+ /* END OF NEW STOUGH */
hide_softcursor(vc);
}
@@ -912,7 +1128,15 @@
clear_selection();
add_softcursor(vc);
if ((vc->vc_cursor_type & 0x0f) != 1)
- vc->vc_sw->con_cursor(vc, CM_DRAW);
+ /* NEW STOUGH, 2021-04-01 */
+ {
+ /* if (vc->vc_softback_lines) */
+ /* concon_set_origin (vc); */
+ /* END OF NEW STOUGH */
+ vc->vc_sw->con_cursor(vc, CM_DRAW);
+ /* NEW STOUGH, 2021-04-01 */
+ }
+ /* END OF NEW STOUGH */
} else
hide_cursor(vc);
}
@@ -922,8 +1146,19 @@
WARN_CONSOLE_UNLOCKED();
if (!con_is_visible(vc) ||
- !vc->vc_sw->con_set_origin ||
- !vc->vc_sw->con_set_origin(vc))
+ /* NEW STOUGH, 2021-04-01 */
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+ (
+ !concon_set_origin (vc) &&
+ (
+#endif
+ /* END OF NEW STOUGH */
+ !vc->vc_sw->con_set_origin ||
+ !vc->vc_sw->con_set_origin(vc)
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+ ))
+#endif
+ )
vc->vc_origin = (unsigned long)vc->vc_screenbuf;
vc->vc_visible_origin = vc->vc_origin;
vc->vc_scr_end = vc->vc_origin + vc->vc_screenbuf_size;
@@ -998,7 +1233,9 @@
hide_cursor(old_vc);
if (!con_is_visible(old_vc)) {
save_screen(old_vc);
- set_origin(old_vc);
+ /* OLD STOUGH, 2021-04-02 */
+ /* set_origin(old_vc); */
+ /* END OF OLD STOUGH */
}
if (tty0dev)
sysfs_notify(&tty0dev->kobj, NULL, "active");
@@ -1011,7 +1248,9 @@
int update;
int old_was_color = vc->vc_can_do_color;
- set_origin(vc);
+ /* OLD STOUGH, 2021-04-02 */
+ /* set_origin(vc); */
+ /* END OF OLD STOUGH */
update = vc->vc_sw->con_switch(vc);
set_palette(vc);
/*
@@ -1152,6 +1391,20 @@
vcs_make_sysfs(currcons);
atomic_notifier_call_chain(&vt_notifier_list, VT_ALLOCATE, ¶m);
+ /* NEW STOUGH, 2021-04-01 */
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+ vc->vc_softback_size = console_soft_scrollback_size;
+ err = -ENOMEM;
+ vc->vc_softback_buf =
+ (unsigned long)kzalloc(vc->vc_softback_size, GFP_KERNEL);
+ if (!vc->vc_softback_buf)
+ goto err_free;
+ vc->vc_softback_in = vc->vc_softback_top = vc->vc_softback_curr =
+ vc->vc_softback_buf;
+ vc->vc_softback_lines = 0;
+ con_update_softback(vc);
+#endif
+ /* END OF NEW STOUGH */
return 0;
err_free:
visual_deinit(vc);
--- include/linux/console_struct.h.orig 2021-04-02 19:55:52.696177657 +0000
+++ include/linux/console_struct.h 2021-04-02 14:30:20.792800814 +0000
@@ -70,6 +70,18 @@
unsigned short *vc_screenbuf; /* In-memory character/attribute buffer */
unsigned int vc_screenbuf_size;
unsigned char vc_mode; /* KD_TEXT, ... */
+ /* NEW STOUGH, 2021-03-31 */
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+ unsigned int vc_softback_size; /* Size in bytes of scrollback buffer. */
+ unsigned long vc_softback_buf; /* Address of scrollback buffer. */
+ unsigned long vc_softback_end; /* (Just past) end of buffer. */
+ unsigned long vc_softback_in; /* Head pointer into circular buffer. */
+ unsigned long vc_softback_top; /* Tail pointer into circular buffer. */
+ unsigned long vc_softback_curr; /* Pos in vc_screenbuf or vc_softback_buf
+ corresponding to visible screen. */
+ int vc_softback_lines; /* Number of lines currently scrolled. */
+#endif
+ /* END OF NEW STOUGH */
/* attributes for all characters on screen */
unsigned char vc_attr; /* Current attributes */
unsigned char vc_def_color; /* Default colors */
--- drivers/video/fbdev/core/fbcon.c.orig 2021-04-02 19:58:46.332168089 +0000
+++ drivers/video/fbdev/core/fbcon.c 2021-04-02 00:11:10.090444550 +0000
@@ -1337,6 +1337,11 @@
else
fbcon_add_cursor_timer(info);
+ /* NEW STOUGH, 2021-04-01 */
+ if (vc->vc_softback_lines)
+ mode = CM_ERASE;
+ /* END OF NEW STOUGH */
+
ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1;
ops->cursor(vc, info, mode, get_color(vc, info, c, 1),
@@ -3115,6 +3120,11 @@
.con_font_default = fbcon_set_def_font,
.con_font_copy = fbcon_copy_font,
.con_set_palette = fbcon_set_palette,
+ /* NEW STOUGH, 2021-04-01 */
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+ .con_scrolldelta = concon_scrolldelta,
+#endif
+ /* END OF NEW STOUGH */
.con_set_origin = fbcon_set_origin,
.con_invert_region = fbcon_invert_region,
.con_screen_pos = fbcon_screen_pos,
--- include/linux/vt_kern.h.orig 2021-04-02 20:01:19.552159645 +0000
+++ include/linux/vt_kern.h 2021-04-01 17:31:45.125471834 +0000
@@ -129,6 +129,11 @@
/* vt.c */
void vt_event_post(unsigned int event, unsigned int old, unsigned int new);
int vt_waitactive(int n);
+/* NEW STOUGH, 2021-04-01 */
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK
+void concon_scrolldelta(struct vc_data *vc, int lines);
+#endif
+/* END OF NEW STOUGH */
void change_console(struct vc_data *new_vc);
void reset_vc(struct vc_data *vc);
extern int do_unbind_con_driver(const struct consw *csw, int first, int last,
^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2021-04-02 20:49 UTC | newest]
Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13 10:30 [gentoo-user] Console scrollback Peter Humphrey
2021-01-13 10:38 ` Michael
2021-01-13 10:55 ` Peter Humphrey
2021-01-13 11:21 ` Andreas Fink
2021-01-13 11:46 ` Peter Humphrey
2021-01-13 18:14 ` Alan Mackenzie
2021-01-13 18:44 ` Neil Bothwick
2021-01-14 16:00 ` Alan Mackenzie
2021-01-13 19:14 ` Peter Humphrey
2021-01-13 19:32 ` Grant Taylor
2021-01-13 21:56 ` Alan Mackenzie
2021-01-13 22:14 ` Grant Taylor
2021-01-14 16:39 ` karl
2021-01-13 22:15 ` [gentoo-user] " Grant Edwards
2021-01-13 23:01 ` Neil Bothwick
2021-01-13 23:06 ` Grant Edwards
2021-01-14 0:00 ` Grant Taylor
2021-01-14 1:25 ` Grant Edwards
2021-01-14 17:10 ` Grant Taylor
2021-01-14 0:12 ` Neil Bothwick
2021-01-14 16:06 ` Alan Mackenzie
2021-01-16 12:01 ` Alan Mackenzie
2021-01-17 5:17 ` [gentoo-user] " Thomas Mueller
[not found] ` <20210117051748.E3239E0869@pigeon.gentoo.org>
2021-01-17 9:16 ` Philip Webb
[not found] ` <20210117051748.B8178E0863@pigeon.gentoo.org>
2021-01-19 17:09 ` Laurence Perkins
2021-01-20 19:59 ` Alan Mackenzie
2021-01-21 9:32 ` Wols Lists
2021-01-21 8:58 ` Jorge Almeida
2021-01-21 12:40 ` Remco Rijnders
2021-01-21 13:00 ` Jorge Almeida
2021-01-25 12:42 ` Alan Mackenzie
2021-04-02 18:30 ` Alan Mackenzie
2021-04-02 19:32 ` karl
2021-04-02 20:49 ` Alan Mackenzie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox