Somehow along the way, a feature that I’ve had across DOS, OS/2, FreeBSD, and Linux — and has been present on PCs for more than 40 years — is gone.
That feature, of course, is the 80×25 text console.
Linux has, for awhile now, rendered its text console using graphic modes. You can read all about it here. This has been necessary because only PCs really had the 80×25 text mode (Raspberry Pis, for instance, never did), and even they don’t have it when booted with UEFI.
I’ve lately been annoyed that:
- The console is a different size on every screen — both in terms of size of letters and the dimensions of it
- If a given machine has more than one display, one or both of them will have parts of the console chopped off
- My system seems to run with three different resolutions or fonts at different points of the boot process. One during the initrd, and two different ones during the remaining boot.
And, I wanted to run some software on the console that was designed with 80×25 in mind. And I’d like to be able to plug in an old VGA monitor and have it just work if I want to do that.
That shouldn’t be so hard, right? Well, the old vga= option that you are used to doesn’t work when you booted from UEFI or on non-x86 platforms. Most of the tricks you see online for changing resolutions, etc., are no longer relevant. And things like setting a resolution with GRUB are useless for systems that don’t use GRUB (including ARM).
VGA text mode uses 8×16 glyphs in 9×16 cells, where the pixels are non-square, giving a native resolution of 720×400 (which historically ran at 70Hz), which should have streched pixels to make a 4:3 image.
While it is possible to select a console font, and 8×16 fonts are present and supported in Linux, it appears to be impossible to have a standard way to set 720×400 so that they present in a reasonable size, at the correct aspect ratio, with 80×25.
Tricks like nomodeset no longer work on UEFI or ARM systems. It’s possible that kmscon or something like it may help, but I’m not even certain of that (video=eDP1:720×400 produced an error saying that 720×400 wasn’t a supported mode, so I’m unsure kmscon would be any better.) Not that it matters; all the kmscon options to select a font or zoom are broken, and it doesn’t offer mode selection anyhow.
I think I’m going to have to track down an old machine.
Sigh.
I have the very same problems, as I am doing more than 90% of my productive work on 80×25 text console, outside of X. I have a partial workaround.
When I am forced to use fb, I let the kernel run the screen at native resolution, I acquire the screen size in pixels, then create a font so that 80×25 mostly fills the screen. Then I load the font using setfont and I use fbset -a -x N-y M, computing N and M so that exactly 80×25 characters fit in.
This doesn’t stretch, but leaves a 80×25 window, starting at the the top left corner, filling most of the screen. It’s impossible to get this window centered. It’s impossible to get fb to actively erase the area outside of the window. It’s impossible to get fb to run nearly as fast as native, hardware accelerated VGA 80×25. It’s impossible to get shift+pgup work (ok, that’s not directly related to fb).