LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-31-2013, 03:56 PM   #1
flokofcgulls
Member
 
Registered: Apr 2013
Posts: 79

Rep: Reputation: Disabled
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.

So...any ideas?
 
Old 05-31-2013, 04:05 PM   #2
elvis4526
Member
 
Registered: Aug 2011
Posts: 114

Rep: Reputation: Disabled
Quote:
Originally Posted by flokofcgulls View Post
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.
 
Old 05-31-2013, 04:23 PM   #3
flokofcgulls
Member
 
Registered: Apr 2013
Posts: 79

Original Poster
Rep: Reputation: Disabled
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?
 
Old 05-31-2013, 04:34 PM   #4
elvis4526
Member
 
Registered: Aug 2011
Posts: 114

Rep: Reputation: Disabled
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 )
 
Old 05-31-2013, 04:43 PM   #5
flokofcgulls
Member
 
Registered: Apr 2013
Posts: 79

Original Poster
Rep: Reputation: Disabled
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?
 
Old 05-31-2013, 05:18 PM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by flokofcgulls View Post
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.
 
Old 06-01-2013, 09:18 AM   #7
flokofcgulls
Member
 
Registered: Apr 2013
Posts: 79

Original Poster
Rep: Reputation: Disabled
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.
 
Old 06-01-2013, 10:02 AM   #8
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Quote:
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
 
Old 06-01-2013, 08:30 PM   #9
flokofcgulls
Member
 
Registered: Apr 2013
Posts: 79

Original Poster
Rep: Reputation: Disabled
Thank you allend, that was exactly what I was looking for!

I added a line to my rc.local to set the font, but it feels like a clunky solution having the font change 3 times during boot.

Is it possible to configure the kernel to pick a specific font at the moment it switches over to the framebuffer?
 
Old 06-01-2013, 11:57 PM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by flokofcgulls View Post
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).

Not sure that's worthwhile though
 
Old 06-02-2013, 05:44 AM   #11
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by flokofcgulls View Post

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.
 
Old 06-02-2013, 08:56 AM   #12
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
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
 
Old 06-02-2013, 11:02 AM   #13
flokofcgulls
Member
 
Registered: Apr 2013
Posts: 79

Original Poster
Rep: Reputation: Disabled
Quote:
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. =)

Thanks for all the help!
 
Old 06-02-2013, 12:28 PM   #14
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by flokofcgulls View Post
(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.
 
Old 06-02-2013, 12:34 PM   #15
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by Didier Spaier View Post
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'.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Set console locale, font, and font size? penyuan Debian 3 12-09-2011 07:54 PM
aterm font size too small saintkay Linux - Desktop 1 12-01-2008 10:17 AM
Font size with WoW small.... Biggen Linux - Games 0 04-13-2007 10:10 AM
Font size in console psyklops Linux - General 25 10-09-2006 12:22 PM
Font size is too small. qsilver Linux - General 3 07-21-2001 10:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration