View previous topic :: View next topic |
Author |
Message |
miket Guru

Joined: 28 Apr 2007 Posts: 498 Location: Gainesville, FL, USA
|
Posted: Wed Apr 14, 2021 2:20 am Post subject: Grr. Framebuffer scrollback is gone |
|
|
There's a feature I don't use much--but when I do, I do depend on it.
I was setting up a new machine and had some problems at boot time (gentoo-sources-5.10.27). It seemed that an interesting message scrolled off the screen, so I hit Shift-Page Up to see it. Hmm. Didn't scroll up.
A search led to a Phoronix article quoting Linus saying that no one uses FBCON any more so the scroll functionality was coming out as of 5.9.rc5.
Ouch! How do I find that message? Dmesg doesn't record messages from either early boot or init. As far as that goes, /var/log/messages doesn't either (and the machine is borked enough that this isn't being written anyway).
Linus Torvalds wrote: | So rather than try to maintain a likely unused set of code, I'll just aggressively remove it, and see if anybody even notices. |
I sure as hell did. |
|
Back to top |
|
 |
Zucca Moderator


Joined: 14 Jun 2007 Posts: 3963 Location: Rasi, Finland
|
Posted: Wed Apr 14, 2021 7:03 am Post subject: |
|
|
I do hope someone competent enough continues to maintain it. _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
 |
Goverp Advocate


Joined: 07 Mar 2007 Posts: 2212
|
Posted: Wed Apr 14, 2021 8:50 am Post subject: |
|
|
Yup, scrollback's been gone for some time. The usual answer is to use "app-misc/screen" or IIUC tmux; I use screen, though I don't like it much (too many other features and a weird magic keys to get it to scroll back - "Ctl-[" "a" "PgUp" ?). Of course, you need to remember to start it before you type any other commands, or include it in a shell profile.
<edit> Sorry, of course you can't start screen that early.
I think there are some early printk and pstore kernel configuration options that can send compressed output to pstore, though I couldn't get it to work when I tried some time ago. I read somewhere (perhaps a note from Neddie Seagoon) that you need to spuriously enable serial port console stuff to get early printk to work.
IIUC you really don't want to run with this pstore stuff enabled all the time, as pstore (assuming you use efivars for storage - maybe there are better alternatives) is strictly limited, and overfilling it can brick you machine; hence specify xz compression or similar. _________________ Greybeard |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 54957 Location: 56N 3W
|
Posted: Wed Apr 14, 2021 9:22 am Post subject: |
|
|
miket,
Install over ssh. Every live media has that, don't they? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
pa4wdh l33t

Joined: 16 Dec 2005 Posts: 914
|
Posted: Wed Apr 14, 2021 10:04 am Post subject: Re: Grr. Framebuffer scrollback is gone |
|
|
Removing framebuffer scrollback seems like a bad idea to me ...
miket wrote: |
Ouch! How do I find that message? Dmesg doesn't record messages from either early boot or init. As far as that goes, /var/log/messages doesn't either (and the machine is borked enough that this isn't being written anyway).
|
If you can't scroll back and the message is too early for dmesg to record it, i think netconsole is the only way?
Some documentation on netconsole can be found here: https://www.kernel.org/doc/html/latest/networking/netconsole.html _________________ The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world
My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com |
|
Back to top |
|
 |
wjb l33t


Joined: 10 Jul 2005 Posts: 646 Location: Fife, Scotland
|
Posted: Wed Apr 14, 2021 10:06 am Post subject: |
|
|
Setting rc_logger in /etc/rc.conf gets you a little bit more than dmesg, but not the earliest stuff. |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5469 Location: Bavaria
|
Posted: Wed Apr 14, 2021 10:44 am Post subject: |
|
|
wjb wrote: | Setting rc_logger in /etc/rc.conf gets you a little bit more than dmesg, but not the earliest stuff. |
You also can set rc_interactive="YES" in /etc/rc.conf |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23148
|
Posted: Wed Apr 14, 2021 3:46 pm Post subject: |
|
|
Scrollback was removed for having known bugs, some of which had (somewhat obscure, iirc) security implications. Linus hoped that someone competent to maintain it would object and resurrect it. So far, despite having inconvenienced some users, nobody has stepped up to take over that subsystem, as far as I know.
Although a bit of a hack, in some cases, configuring a framebuffer driver might be helpful because it will give the kernel more total lines on screen. Depending on timing, OP might be able to use flow control to suspend output before the interesting message scrolls out. I've dealt with systems that produce output too fast to rely on a human to suspend output at the right time, though.
OP's problem is not that it is too early for dmesg, but that it is not a kernel-generated message, so it was never in dmesg and never will be. He needs to capture some user-program generated message(s). |
|
Back to top |
|
 |
miket Guru

Joined: 28 Apr 2007 Posts: 498 Location: Gainesville, FL, USA
|
Posted: Wed Apr 14, 2021 8:19 pm Post subject: |
|
|
From what I found on lwn.net, I'm not alone. There are a couple of kernel devs who are working on it (or at least started). Linus' original beef was about odd bugs in a system that has accumulated a lot of cruft over the years; the security issue was reported later. He wants a clean refactoring of the system.
I like pietinger's rc_interactive="YES" suggestion. I also found it helpful to start the Busybox recovery shell in my initramfs: at least I can see the messages.
That brings up an issue that others have noted: the Busybox recovery shell also loses its scrollback.
Good luck trying to capture output into a file if init can't mount the HD r/w. At least I got that solved--but somehow nothing's being written to /var/log/messages.
I'll have to limp along with rc_interactive="YES". |
|
Back to top |
|
 |
eccerr0r Watchman

Joined: 01 Jul 2004 Posts: 9917 Location: almost Mile High in the USA
|
Posted: Wed Apr 21, 2021 1:10 am Post subject: |
|
|
For people with bus connected serial ports or (ugh) management engine, serial console if you have another machine.
Yeah I noticed the scrollback disappearing. It's too bad, though the only reason why I use it is because it was in Linux since forever.
The NetBSD FB console on the pmax didn't have scrollback and only wished it because Linux supported it.
Looks like I will have to use gnu/screen more, even on console.
BTW gnu-screen scrollback is not actually scrollback, it's actually abusing the cut/paste feature... WAIT... you can cut and paste in gnu-screen? Without a mouse? (Yeah I'm a gnu-screen abuser, so many useful features, so many arcane key sequences to access them ...) _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
 |
Leonardo.b Guru

Joined: 10 Oct 2020 Posts: 308
|
Posted: Wed Apr 21, 2021 1:47 am Post subject: |
|
|
miket wrote: | Good luck trying to capture output into a file if init can't mount the HD r/w |
There is a tool called "bootlogd", distributed with sysVinit. A manual is avaiable too.
Not sure how to use it, I didn't tried it, yet. |
|
Back to top |
|
 |
M95D Tux's lil' helper

Joined: 03 Jan 2020 Posts: 96
|
Posted: Sat Jul 10, 2021 4:52 pm Post subject: |
|
|
I saw this conversation:
https://linux.gentoo.user.narkive.com/waFrRU83/gentoo-user-console-scrollback-is-back-again
There seems to be a patch available that restores console scrollback with a separate buffer for each console!
Unfortunately I can't see the patch file. Either the site doesn't store attachments or there's a problem with my browser.
Does anyone have that file? Please post it here. Thank you! |
|
Back to top |
|
 |
pa4wdh l33t

Joined: 16 Dec 2005 Posts: 914
|
|
Back to top |
|
 |
CaptainBlood Advocate


Joined: 24 Jan 2010 Posts: 3998
|
Posted: Sat Jul 10, 2021 8:59 pm Post subject: |
|
|
+1
Planning 2 test it this W.E.
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
 |
JustAnother Apprentice

Joined: 23 Sep 2016 Posts: 197
|
Posted: Sun Jul 11, 2021 5:38 am Post subject: |
|
|
Quote: | Dmesg doesn't record messages from either early boot or init. As far as that goes, /var/log/messages doesn't either (and the machine is borked enough that this isn't being written anyway). |
The kernel has switches for early boot messages via a serial port (uses polling), and netconsole, which will throw the boot messages through the ethernet port even before the network card driver is loaded. So you have to specify the NIC card settings in the kernel command line.
I tried to set up netconsole but ran out of time to get it to work. But if early boot messages are your thing, this is the one to try out. |
|
Back to top |
|
 |
M95D Tux's lil' helper

Joined: 03 Jan 2020 Posts: 96
|
Posted: Mon Jul 12, 2021 1:45 pm Post subject: |
|
|
Patch works!
Thank you and thanks to the original patch author! |
|
Back to top |
|
 |
M95D Tux's lil' helper

Joined: 03 Jan 2020 Posts: 96
|
|
Back to top |
|
 |
figueroa Advocate


Joined: 14 Aug 2005 Posts: 3008 Location: Edge of marsh USA
|
Posted: Thu Apr 14, 2022 4:03 am Post subject: |
|
|
Leonardo.b wrote: | ...
There is a tool called "bootlogd", distributed with sysVinit. A manual is avaiable too.
Not sure how to use it, I didn't tried it, yet. |
Code: | rc-update add bootlogd sysinit |
The one should/will find the log in /var/log.
ADDED: I just updated an old forum post that discusses bootlog. It may be helpful so here it is:
https://forums.gentoo.org/viewtopic-t-1142299.html _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
 |
Zucca Moderator


Joined: 14 Jun 2007 Posts: 3963 Location: Rasi, Finland
|
Posted: Thu Apr 14, 2022 6:05 pm Post subject: openrc-init |
|
|
I use openrc-init instead of sysvinit.
Any guesses if it'll will be impossible to have bootlogd operating correctly with openrc-init? _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
 |
figueroa Advocate


Joined: 14 Aug 2005 Posts: 3008 Location: Edge of marsh USA
|
Posted: Thu Apr 14, 2022 7:09 pm Post subject: Re: openrc-init |
|
|
Zucca wrote: | I use openrc-init instead of sysvinit.
Any guesses if it'll will be impossible to have bootlogd operating correctly with openrc-init? |
Why do you use openrc-init? There doesn't seem to be any advocacy for it. In any case, you won't know till you try. What's the worst that could happen? _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
 |
Zucca Moderator


Joined: 14 Jun 2007 Posts: 3963 Location: Rasi, Finland
|
Posted: Fri Apr 15, 2022 8:16 am Post subject: Re: openrc-init |
|
|
figueroa wrote: | Why do you use openrc-init? | I saw it as an option so I tried it. I stuck with it since it works. And I like to hand off all the possible service handlings to openrc... Practically it only means getting rid of /etc/inittab and getting several more files in /etc/init.d... Not really sure if it's all that beneficial really. :D But Like I said, I stuck with it. I works as good as sysvinit. figueroa wrote: | There doesn't seem to be any advocacy for it. | Maybe just one thing at the moment...
figueroa wrote: | In any case, you won't know till you try. What's the worst that could happen? | Yeah. I'll give it a go. _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
 |
M95D Tux's lil' helper

Joined: 03 Jan 2020 Posts: 96
|
Posted: Fri Apr 15, 2022 7:55 pm Post subject: |
|
|
Patch works with gentoo-sources-5.15.32-r1  |
|
Back to top |
|
 |
flysideways Guru

Joined: 29 Jan 2005 Posts: 501
|
Posted: Sat Aug 13, 2022 12:06 am Post subject: |
|
|
I'm glad I found the recommendation for abusing screen. |
|
Back to top |
|
 |
irets Apprentice


Joined: 17 Dec 2019 Posts: 233
|
Posted: Mon Feb 12, 2024 5:59 pm Post subject: |
|
|
The patch does not apply anymore.
Does anyone have an updated patch?  |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5469 Location: Bavaria
|
|
Back to top |
|
 |
|