Remix.run Logo
hamandcheese 2 days ago

> Linux still has scrollback in VGA text mode

Dumb question: when I boot a modern systemd-based distro installer in terminal mode, am I using "VGA text mode" or "graphics mode"? Do I have to be literally using VGA to use VGA text mode?

EDIT: I read TFA and it seems like the answer is that I probably have never used VGA text mode.

toast0 2 days ago | parent [-]

Depends. A UEFI boot is going to put you in graphics mode; I don't think you can get into VGA text mode from an UEFI boot, without some serious dark arts. UEFI has a text mode console API, but it's part of bootservices and those are exited somewhere on the way to starting the Linux kernel.

If you're doing a BIOS boot, you might be using VGA text mode, if you haven't loaded a framebuffer driver. VGA text mode works over BNC, DVI, HDMI, DP, etc, if that was your question, you don't need a VGA connector. EGA text mode might be similar enough to also work, but that's outside my depth.

I'm not sure that Linux uses it, but VGA has nice things to accelerate scrolling. You can set the top of the screen down into the buffer, and then set a line number where it resets to the top of the buffer. If you set the line stride so that it evenly divides the buffer (typically wider than the line width), it makes scrolling and wrapping around the buffer very simple and elegant.

UEFI GOP doesn't provide any mechanism for a buffer larger than what's displayed, so scrolling requires copying. :(