[SOLVED] Console font changes to a very small size after graphics hardware initialization
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Console font changes to a very small size after graphics hardware initialization
One thing that has been bugging me lately is that about half-way through booting (after the graphics hardware is initialized), my console font changes to an extremely small size, and I decided to try and tackle this today.
First I tried to explore some of the various custom fonts, but they're all pretty much the same size (too small.)
I managed to figure out I can pass a video= parameter to the append option in LILO, which lets me force any resolution I want, and that kinda-sorta worked. The problem though is that none of the resolutions are quite what I'd like to have.
Ideally, I would like my regular console to look exactly like it does when I boot from the Slackware disc, but I've tried every combination of resolutions I can think of and none of them are a match.
After some more reading, it sounds like my issue might be related to the nouveau driver, specifically the frame buffer. I've looked around a bit and I can't find anywhere to configure any options for it.
I saw some posts suggesting the nomodeset option in LILO, but that has the side effect of X not working, and I'd like to find a fix that doesn't break anything else in the process.
First I tried to explore some of the various custom fonts, but they're all pretty much the same size (too small.)
Which font did you try? Terminus font for instance has a lot of different size from really big to really small.
I would suggest using a bigger font and not lowering your resolution.
Well, I certainly won't claim to have tried them all, but I tried several of the ISO fonts, and a few others I can't recall. I had pulled up a site that showed a little graphic preview of them all and just tried some of the larger looking ones.
I wasn't able to find any called Terminus under /usr/share/fonts, I looked for both Terminus and terminus and had no results from the find command.
Is there a particular reason that you recommend against changing the resolution?
Sorry, I tought Terminus was already in 14.0, but it is not the case.
It's currently in current, so it will be available by default with Slackware 14.1 .
If you want to install it, you could pick it from slackbuilds.org
Why I don't recommend changing the resolution?
I'm convinced that high resolution tty is a feature, not a bug.
If you lower the resolution, your font will be bigger, but more pixelated.
If you just use a bigger font with your native resolution, the end result will be more good looking because of the higher resolution.
( I have no actual proof for this statement, it is based on a pure subjective test that I made myself )
No worries, I did look it up and it looked intriguing, I'll probably check it out when I get to that point. But, ultimately I'd like to be able to solve the problem using only a default installation.
I definitely agree that having a hi-res console is a great feature to have. I don't really mind a little pixelation though, I grew up in the 80's so pixels are pretty natural to me. =)
So, that brings me back to the original issue...how can I make my Slackware console look identical to the way it looks when I boot from the Slackware disc?
So, that brings me back to the original issue...how can I make my Slackware console look identical to the way it looks when I boot from the Slackware disc?
I'd get the terminus fonts from Slackware current and install it. You'll have a big choice in sizes. FYI Pat uses size 20 in Slackware-current's installer in case of kernel mode setting.
OK, so after I got my system working again last night, I checked out this terminus font. This was my first time using SlackBuilds, so I had to figure that out first, which actually wasn't too bad.
I have to admit, it's a very nice font! I'm using the 232b, and it looks great on a hi-res terminal. Thanks for the recommendation!
But...I'm still curious why this happens in the first place? Why does the console switch to such a tiny font after initializing the video hardware? I don't really understand this particular step in the boot process, so I'd like to figure it out.
But...I'm still curious why this happens in the first place? Why does the console switch to such a tiny font after initializing the video hardware? I don't really understand this particular step in the boot process, so I'd like to figure it out.
When you boot using LILO, the bootloader uses the one of the VESA fonts supplied by your computer's BIOS (set by vga=xxx or vga=normal to accept the default) in your /etc/lilo.conf.
With newer Linux kernels, KMS (kernel mode setting) is implemented, so during boot the kernel switches to using a kernel supplied framebuffer and an associated font which may be of a different size.
The change to KMS began with kernel 2.6.28. http://en.wikipedia.org/wiki/Mode_setting
Is it possible to configure the kernel to pick a specific font at the moment it switches over to the framebuffer?
I am not aware of a kernel parameter allowing to do that, but what you could do in user space is set the font as soon as possible in the boot process.
/etc/rc.d/rc.local is the last script executed in the boot sequence, so you could put that setting instead in /etc/trc.d/rc.S, but not too early (you could observe at which points of rc.S handover occurs).
Is it possible to configure the kernel to pick a specific font at the moment it switches over to the framebuffer?
You can use the fbcon=font:<name> kernel option, where <name> is one of the fonts built into the kernel (there are about half a dozen or so of them), but I don't know how many of them are included in the stock kernels. 'SUN22x12' is the largest of them, and it's a serif font so it's pretty ugly.
On occasion I've toyed with the idea of trying to patch the terminus font into the kernel in the same way as these builtin fonts are done, but being a nvidia card owner I don't use modesetting or the framebuffer console (I still use vga=normal) so I've not really had much motivation to expend the effort and there are always other things to spend my time on.
You have not provided much detail about your setup, but I infer a wide screen monitor and a nVidia GPU.
In my setup (1280x1024 screen and nVidia GeForce 7300 LE), I find that setting vga=795 in /etc/lilo.conf gives a consistent font throughout the boot sequence. If I use 'setconsolefont' to set a different console font, then I can see a change to a different font when /etc/rc.d/rc.font is run in the boot sequence, but this occurs quite late.
Have you experimented with the vga= setting? There is a useful table under the Linux video mode numbers heading at http://en.wikipedia.org/wiki/VESA_BIOS_Extensions that shows some possible values that may suit your display.
Quote:
but I don't know how many of them are included in the stock kernels
On my 64bit -current I see this
Code:
bash-4.2# grep FONT .config
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_7x14 is not set
# CONFIG_FONT_PEARL_8x8 is not set
# CONFIG_FONT_ACORN_8x8 is not set
# CONFIG_FONT_MINI_4x6 is not set
CONFIG_FONT_SUN8x16=y
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
You have not provided much detail about your setup, but I infer a wide screen monitor and a nVidia GPU.
Correct, although a little more complicated...it's a laptop with both Intel and nVidia using Optimus (not configured yet.) The screen is 17" @ 1920x1080.
From what I've read it sounds like the nVidia drivers don't work the same as the nouveau drivers in regards to all this, so I'll probably have to make some adjustments once I get all of that worked out.
Quote:
Have you experimented with the vga= setting?
Yes, I actually experimented with this for a couple of hours before starting this thread. Using vga= in LILO would only affect the screen before the framebuffer section. I had to use video= inside the append argument to keep it from reverting back during boot, and although I found a few settings that were in the ballpark, none of them were quite what I wanted.
Quote:
You can use the fbcon=font:<name> kernel option, where <name> is one of the fonts built into the kernel (there are about half a dozen or so of them), but I don't know how many of them are included in the stock kernels.
This sounds like a great exercise, but since I haven't learned how to build a custom kernel yet it would be a whole 'nother process in itself. Great to know that this is possible though, I will probably try this at some point.
Quote:
/etc/rc.d/rc.local is the last script executed in the boot sequence, so you could put that setting instead in /etc/trc.d/rc.S, but not too early (you could observe at which points of rc.S handover occurs).
I had considered this originally, but wasn't sure if it was the best way to go, although this actually ended up being the fix that I went for. I added the command "setfont -v ter-232b.psf.gz" right after the section labeled "Mount Control Groups filesystem interface", and it switches almost instantly after the framebuffer.
During the process of experimenting to figure out where to put this command, I also discovered a redundancy in my LVM initialization and cleaned that up a little bit also, so this worked out great!
So until I decide to tackle the custom kernel, I think this will work just fine, I'm very pleased. =)
(about "fbcon=font:<name> " proposed by GazL) this sounds like a great exercise, but since I haven't learned how to build a custom kernel yet it would be a whole 'nother process in itself.
IIRC no need to re-compile your kernel for that, just include it in an "append=" statement in your /etc/lilo.conf.
IIRC no need to re-compile your kernel for that, just include it in an "append=" statement in your /etc/lilo.conf.
Yes, but he'd only get to choose from the choices that are already built in to the stock kernel (see allend's post above) and non of those are particularly 'large'.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.