Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ugly VGA fonts with console-setup (Squeeze)

426 views
Skip to first unread message

Stephen Powell

unread,
Dec 23, 2009, 9:50:01 PM12/23/09
to
Things have changed in the area of text-mode console fonts between
Lenny and Squeeze. And I'm not happy about it.

Here is how I had things set up in Lenny.

The boot loader (grub, now called
grub-legacy in Squeeze) sets the video mode via the vga parameter.
For example, vga=3841 sets an 80x50 video mode. vga=3846 sets an
80x43 video mode, etc. Then either console-tools or kbd (via
/etc/console-tools/config or /etc/kbd/config, respectively) sets the
font (via SCREEN_FONT= or CONSOLE_FONT=, respectively). The size
of the font needed is determined by the video mode. With vga=3841
(80x50) an 8-point font is needed and I specify lat1u-08. With
vga=3846 (80x43) a 14-point font is needed and I specify lat1u-14.
Other than the fact that the video mode and font have to be manually
co-ordinated, this worked well.

But in Squeeze, it's a different story. The first problem is that
grub in Squeeze (which Lenny called grub2) is a completely new
boot loader. It may have the same name, but it is entirely new.
And the new grub doesn't support the vga option. To get vga to
work I had to install a different boot loader. To avoid confusion
between different grub releases I went back to lilo, which also
supports the vga option. OK, that problem is now "solved". But
setting the font is a problem too. There is a new package in Squeeze
called console-setup, which does not replace either console-tools
or kbd. If kbd is installed, it recognizes that console-setup is
installed and does not set the font. If console-tools is installed,
both console-tools and console-setup try to set the font. But since
console-setup runs after console-tools, console-setup wins. Either
way, it is console-setup that now controls the font.

By running "dpkg-reconfigure console-setup" I can get a VGA font of
the right point size (as long as what I need is 8, 14, or 16). But
the VGA fonts in console-setup are really *ugly* compared to the
very-nice-looking fonts that I'm used to from the kbd and
console-tools packages, chiefly lat1u-08, lat1u-14, and lat1u-16.
I have kbd installed under Squeeze now, and I can set the font
on the fly by using

setfont lat1u-08

for example, and then things look OK. But if I switch to
the X console with Alt+F7, then switch back to a text console with
Cntl+Alt+F1, I'm back to the ugly font from console-setup. Some of
the fonts are worse than others. The 8-point font isn't *too* bad,
but the 14-point font is horrible. The lower-case "s", for example,
doesn't even start on the same baseline as the other letters. Is
there some way to make console-setup use the nice-looking fonts
from /usr/share/consolefonts that were designed for kbd and/or
console-tools? There's a wide selection of them, and a lot of time
and effort has been spent over the years to make them look nice.
And now that all gets thrown out by the hastily-thrown-together,
limited selection, ugly fonts in console-setup. Yuck!

P.S. Don't tell me to use framebuffer. I want a real text-mode
console.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Dave Witbrodt

unread,
Dec 23, 2009, 10:10:01 PM12/23/09
to
Stephen Powell wrote:
> Things have changed in the area of text-mode console fonts between
> Lenny and Squeeze. And I'm not happy about it.

[snip: that was long!]

> By running "dpkg-reconfigure console-setup" I can get a VGA font of
> the right point size (as long as what I need is 8, 14, or 16). But
> the VGA fonts in console-setup are really *ugly* compared to the
> very-nice-looking fonts that I'm used to from the kbd and
> console-tools packages, chiefly lat1u-08, lat1u-14, and lat1u-16.
> I have kbd installed under Squeeze now, and I can set the font
> on the fly by using
>
> setfont lat1u-08
>
> for example, and then things look OK. But if I switch to
> the X console with Alt+F7, then switch back to a text console with
> Cntl+Alt+F1, I'm back to the ugly font from console-setup. Some of
> the fonts are worse than others. The 8-point font isn't *too* bad,
> but the 14-point font is horrible. The lower-case "s", for example,
> doesn't even start on the same baseline as the other letters. Is
> there some way to make console-setup use the nice-looking fonts
> from /usr/share/consolefonts that were designed for kbd and/or
> console-tools? There's a wide selection of them, and a lot of time
> and effort has been spent over the years to make them look nice.
> And now that all gets thrown out by the hastily-thrown-together,
> limited selection, ugly fonts in console-setup. Yuck!

What did the 'console-setup' documentation say about setting fonts?

Did you at least read the comments in '/etc/default/console-setup'?

If reading the docs does not solve the problem for you, you can wait for
an answer from debian-user for a while. If no answer comes, you could
file a bug against 'console-setup'... but I'm sure the maintainers will
tell you: it's not a bug, please RTFM (and they may even tell you how
to do it).

I actually use settings in '/etc/default/console-setup' to _prevent_ the
package from replacing the kernel fonts -- I somehow discovered the
weird 10x18 font provided by the kernel a few years ago, and grew to
love it! I can tell 'console-setup' to not load any software font at
all, and I end up with that 10x18 thing on all my VTs.


HTH,
Dave W.

Tixy

unread,
Dec 24, 2009, 5:20:02 AM12/24/09
to
On Wed, 2009-12-23 at 21:26 -0500, Stephen Powell wrote:
<snip>

> And the new grub doesn't support the vga option. To get vga to
> work I had to install a different boot loader.
<snip>

The vga option is deprecated but it works, just add it to
GRUB_CMDLINE_LINUX in /etc/default/grub (then run 'update-grub').

I use this because whatever defaults the system uses leaves me with a
completely blank console screen, and grub2 doesn't seem to have provided
us with an option to replace vga= yet.

--
Tixy

Tom H

unread,
Dec 24, 2009, 7:10:03 AM12/24/09
to
Summary of OP rather than complicated snip:

<start>
What is the grub2 equivalent of setting "vga=" in the grub1 "kernel"
line and of setting "SCREEN_FONT=" or "CONSOLE_FONT=" in
"/etc/console-tools/config" or "/etc/kbd/config" respectively?
<end>

vga 1: even though it is deprecated, you can still use "vga=" in the
"linux" line.

vga 2: if you would rather not use "vga=", you can set the resolution
with "set gfxmode="

font: you need to use "pf2" fonts and set them with "loadfont
(hd0,X)/boot/grub/<font>.pf2"

Tom H

unread,
Dec 24, 2009, 2:30:02 PM12/24/09
to
>> Summary of OP rather than complicated snip:

>> <start>
>> What is the grub2 equivalent of setting "vga=" in the grub1 "kernel"
>> line and of setting "SCREEN_FONT=" or "CONSOLE_FONT=" in
>> "/etc/console-tools/config" or "/etc/kbd/config" respectively?
>> <end>

>> vga 1: even though it is deprecated, you can still use "vga=" in the
>> "linux" line.

>> vga 2: if you would rather not use "vga=", you can set the resolution
>> with "set gfxmode="

>> font: you need to use "pf2" fonts and set them with "loadfont
>> (hd0,X)/boot/grub/<font>.pf2"

> I found that simply setting gfxmode=1280x800 didn't work. I also had to add
> insmod vbe and something along the lines of "keeppayload" in order for grub
> to pass the resolution to the kernel. KMS needs to be enabled, and I'm not
> sure if it was already when I recompiled my kernel.

> Sorry for the vagueness, but as I'm at work I can't look into
> /etc/grub/default or /etc/grub.d/debian-05 ... hopefully its enough to
> google the exact commands.

I think that you mean "set gfxpayload=keep". I did not mention it
because it has not worked for me (my boot-up stops with a black
screen) but I have seen various sites that recommend it.

I am also at work without access to my grub2 setup and not only did I
forget "insmod vbe" but "insmod gfxterm" too. Sorry.

Chris Bannister

unread,
Dec 25, 2009, 6:10:01 AM12/25/09
to
On Wed, Dec 23, 2009 at 09:26:24PM -0500, Stephen Powell wrote:
> Things have changed in the area of text-mode console fonts between
> Lenny and Squeeze. And I'm not happy about it.

http://www.debian.org/intro/help.en.html

--
Chris.

Stephen Powell

unread,
Dec 26, 2009, 1:40:01 PM12/26/09
to
On 2009-12-23 at 22:01:49 -0500, Dave Witbrodt wrote:
> What did the 'console-setup' documentation say about setting fonts?
>
> Did you at least read the comments in '/etc/default/console-setup'?

I configured the package with

dpkg-reconfigure console-setup

and there was nothing in the configuration that allowed me to use
any legacy fonts.

I did not know about the configuration file /etc/default/console-setup.
I could not find much in the way of documentation.

man console-setup

indicated that there was no such man page.

apropos console-setup

produced no hits. The "Keyboard-and-Console-HOWTO" is out-of-date
and contains nothing on the console-setup package. The files in
/usr/share/doc/console-setup weren't much help either, though I did
learn some things there.

But you pointed me to the one place that documents how to do it:
the comments in /etc/default/console-setup. In that file I changed

FONTFACE="VGA"
FONTSIZE="14"

to

FONTFACE=""
FONTSIZE=""

then I added

FONT=lat1u-14.psf.gz

(I didn't have to specify the directory: /usr/share/consolefonts.)
I made sure that I had kbd installed instead of console-tools, so
that the font would only be set once (by console-setup). I used
vga=3846 in the boot loader to get the 80x34 text video mode, which
requires a 14-point font. That did the trick! I now have my old,
familiar, nice-looking lat1u fonts back. Thanks for your help!

Jerome BENOIT

unread,
Dec 26, 2009, 8:50:02 PM12/26/09
to
Hello Stephen,

have fill a bug report ?

Cheers,
Jerome

Jim McCloskey

unread,
Dec 27, 2009, 1:20:01 AM12/27/09
to
Tom H <tomh...@gmail.com> wrote:

|> vga 1: even though it is deprecated, you can still use "vga=" in
|> the "linux" line.
|>
|> vga 2: if you would rather not use "vga=", you can set the
|> resolution with "set gfxmode="
|>
|> font: you need to use "pf2" fonts and set them with "loadfont
|> (hd0,X)/boot/grub/<font>.pf2"

Where though (in what configuration file, I mean)? And what is the
relevant syntax and (more importantly) where can one read about all of
this and learn about it?

The state of documentation for Grub2 is beyond lamentable. And that is
surely part of the reason why the transition to Grub2 has been one of
the most poorly managed of all of the transitions I've dealt with in my
14 (otherwise excellent) years with Debian,

Jim

Stephen Powell

unread,
Dec 27, 2009, 10:50:02 AM12/27/09
to
On 2009-12-27 at 09:38:46 +0800, Jerome BENOIT wrote:
> Hello Stephen,
>
> have fill a bug report ?
>
> Cheers,
> Jerome

If I were going to file a bug report against console-setup,
it would be for missing or poor documentation,
or for incomplete configuration options via dpkg-reconfigure. I just might do that.
Unfortunately, missing or poor documentation is becoming increasingly common.
The documentation for grub (as Squeeze calls it, or grub2 as Lenny calls it) is also
sadly lacking, as Jim McCloskey has pointed out in another post
(http://lists.debian.org/debian-user/2009/12/msg01603.html).

In the end, however, I was able to get the software to do what I wanted it to do,
thanks to the help of Dave Witbrodt.

Tom H

unread,
Dec 27, 2009, 6:30:03 PM12/27/09
to
> |>  vga 1: even though it is deprecated, you can still use "vga=" in
> |>  the "linux" line.
> |>
> |>  vga 2: if you would rather not use "vga=", you can set the
> |>  resolution  with "set gfxmode="
> |>
> |>  font: you need to use "pf2" fonts and set them with "loadfont
> |>  (hd0,X)/boot/grub/<font>.pf2"

> Where though (in what configuration file, I mean)? And what is the
> relevant syntax and (more importantly) where can one read about all of
> this and learn about it?

> The state of documentation for Grub2 is beyond lamentable. And that is
> surely part of the reason why the transition to Grub2 has been one of
> the most poorly managed of all of the transitions I've dealt with in my
> 14 (otherwise excellent) years with Debian,

I edit "/root/grub.cfg" (I copied grub.cfg into that directory; it is
not there by default) and copy it over to /boot/grub/grub.cfg" because
I do not like the "correct" way of updating grub.cfg.

The "correct" way is to edit the variables in "/etc/default/grub" and
run "update-grub" (which runs "grub-mkconfig -o /boot/grub/grub.cfg").
"update-grub" runs the scripts in "/etc/grub.d/" and
"/etc/grub.d/00_something" will use the "/etc/default/grub" variables
to set up the default boot kernel, the kernel options, the graphic
mode, whether to use UUIDs, whether to create "single" menuentry
stanzas, whether to hide the menu, etc (similarly to the interaction
of grub1's "update-grub" and the "AUTOMAGIC KERNELS LIST" section of
grub1's menu.lst).

I more or less agree with your characterization of grub2's
documentation. When I started using grub2 with the Ubuntu 9.10 alphas
in September/October, documentation was scarce. I was cleaning up my
saved urls in the last two weeks and some of the links that I had
saved (on archlinux.org, kubuntuforums.net, ubuntu.com,
ubuntuforums.org) now have some some pretty good grub2 documentation.

The gnu.org grub2 page leads (bizarrely) to a grub2 wiki at engrub.org
or enbug.org (I have forgotten) for a manual/help. There is some good
information there too but it feels like a work in progress that is not
fully up to date (there is an interesting/educative "beta" of a man
page for update-grub, which must have been at the time of writing THE
script to create grub.cfg, now superceded by grub-mkconfig). There is
also a man page for grub.cfg that does not exist elsewhere.

I have not searched very thoroughly but I have only come across
http://wiki.debian.org/GrubTransition as a Debian-specific, -sourced
grub2 instruction.

What I found interesting about this thread is that the OP found a
non-grub2 way of restoring his boot-up look in spite of using grub2...

I assume that he has set "GRUB_TERMINAL=console" in
"/etc/default/grub" (or "terminal console" in /boot/grub/grub.cfg")
when he made the "/etc/default/console-setup" changes that he posted
earlier, rather than go the "terminal gfxterm", etc way.

Stephen Powell

unread,
Dec 27, 2009, 9:50:01 PM12/27/09
to
On 2009-12-28 at 00:24:48 +0100, Tom H wrote,

> What I found interesting about this thread is that the OP found a
> non-grub2 way of restoring his boot-up look in spite of using grub2...

> I assume that he has set "GRUB_TERMINAL=console" in
> "/etc/default/grub" (or "terminal console" in /boot/grub/grub.cfg")
> when he made the "/etc/default/console-setup" changes that he posted
> earlier, rather than go the "terminal gfxterm", etc way.

Actually, what I did was to de-install grub (as referred to by Squeeze,
grub2 as referred to by Lenny) and install lilo instead. I thought
about going back to grub-legacy (as referred to by Squeeze, grub as
referred to by Lenny). I knew that the original grub would support
the vga option, including vga=ask; but I was afraid that some script
would see an "update-grub" command on the system and assume that
grub (as referred to by Squeeze, grub2 as referred to by Lenny)
was installed, when in reality grub-legacy (as referred to by Squeeze,
grub as referred to by Lenny) was installed. So I installed lilo
instead. lilo supports the vga option, including vga=ask, does
everything that I need it to do, and does not result in any confusion,
either on my part or the part of install scripts, as to which version
of grub is installed. Subsequent posters have suggested ways to get
grub (as referred to by Squeeze, grub2 as referred to by Lenny) to
set the video mode; but by then I had already solved that part of the problem
another way and didn't wish to tear up the pea patch again. (If it
isn't broken, don't fix it!)

The other half of the problem, that of loading the desired font, I
was able to accomplish with console-setup, thanks to the help of
Dave Witbrodt.


Andrei Popescu

unread,
Dec 28, 2009, 5:10:02 AM12/28/09
to
On Thu,24.Dec.09, 20:29:19, Tom H wrote:
>
> > Sorry for the vagueness, but as I'm at work I can't look into
> > /etc/grub/default or /etc/grub.d/debian-05 ... hopefully its enough to
> > google the exact commands.
>
> I think that you mean "set gfxpayload=keep". I did not mention it
> because it has not worked for me (my boot-up stops with a black
> screen) but I have seen various sites that recommend it.

That would (should?) work if you also set $GRUB_GFXMODE to the desired
mode (which resulted in strange effects for me).

I'm using "GRUB_GFXPAYLOAD=1680x1050x8" instead with the attached patch
(based on the patch in [0]) that I keep in /root and apply after every
update of the grub package.

WARNING: due to some recent changes in the grub package the patch needs
some refreshing, but I'm not familiar enough with diff/patch to
regenerate it. Use only if you know how the resulting grub.cfg should
look like.

[0] http://savannah.gnu.org/bugs/?27094

Regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic

enable-gfxpayload-grub2.diff
signature.asc

Tom H

unread,
Dec 28, 2009, 10:00:01 PM12/28/09
to
>> I think that you mean "set gfxpayload=keep". I did not mention it
>> because it has not worked for me (my boot-up stops with a black
>> screen) but I have seen various sites that recommend it.

> That would (should?) work if you also set $GRUB_GFXMODE to the desired
> mode (which resulted in strange effects for me).

> I'm using "GRUB_GFXPAYLOAD=1680x1050x8" instead with the attached patch
> (based on the patch in [0]) that I keep in /root and apply after every
> update of the grub package.

> WARNING: due to some recent changes in the grub package the patch needs
> some refreshing, but I'm not familiar enough with diff/patch to
> regenerate it. Use only if you know how the resulting grub.cfg should
> look like.

> [0] http://savannah.gnu.org/bugs/?27094

Thinking back, I can only assume that I may have mistyped something
and not noticed or changed a few too many grub2 options simultaneously
or set too many options simultaneously. I will have to try again.

Thanks for the link. If I understand correctly, its purpose is to add
a grub_gfxpayload line to /etc/default/grub so that the /etc/grub.d
scripts have a value to plug in to grub.cfg. I edit my grub.cfg
manually so it does not really matter to me. I would love to know
though from where the gfxpayload variable came from and why the
gfxmode variable is not enough. One of the reasons that I tried it and
avoided it almost immediately is that it seemed to pop out of nowhere
in some fora but was not referenced in the grub.enbug.org, Ubuntu, or
ArchLinux documentation.

Andrei Popescu

unread,
Dec 29, 2009, 3:10:01 AM12/29/09
to
On Mon,28.Dec.09, 21:52:26, Tom H wrote:

> Thanks for the link. If I understand correctly, its purpose is to add
> a grub_gfxpayload line to /etc/default/grub so that the /etc/grub.d
> scripts have a value to plug in to grub.cfg. I edit my grub.cfg

Yep

> manually so it does not really matter to me. I would love to know
> though from where the gfxpayload variable came from and why the
> gfxmode variable is not enough. One of the reasons that I tried it and

In my (limited) reading of grub2 docs and a few tests, gfxmode changes
the video mode only for grub[1], it does not replicate the behaviour of
the "old" vga= variable.

[1] this is also nice as it allows use of highres images for the grub
background

> avoided it almost immediately is that it seemed to pop out of nowhere
> in some fora but was not referenced in the grub.enbug.org, Ubuntu, or
> ArchLinux documentation.

IIRC it was mentioned by grub itself when I tried adding the vga=
parameter to the kernel line, something like (from memory)

"The vga= parameter is deprecated, set gfxpayload instead"

signature.asc

Tom H

unread,
Dec 31, 2009, 12:30:01 AM12/31/09
to
>> What I found interesting about this thread is that the OP found a
>> non-grub2 way of restoring his boot-up look in spite of using grub2...

> Actually, what I did was to de-install grub (as referred to by Squeeze,


> grub2 as referred to by Lenny) and install lilo instead. I thought
> about going back to grub-legacy (as referred to by Squeeze, grub as
> referred to by Lenny). I knew that the original grub would support
> the vga option, including vga=ask; but I was afraid that some script
> would see an "update-grub" command on the system and assume that
> grub (as referred to by Squeeze, grub2 as referred to by Lenny)
> was installed, when in reality grub-legacy (as referred to by Squeeze,
> grub as referred to by Lenny) was installed. So I installed lilo
> instead.

FYI, update-grub in grub1 generates a new menu.lst and in grub2
generates a new grub.cfg.

Tom H

unread,
Dec 31, 2009, 12:30:02 AM12/31/09
to
> In my (limited) reading of grub2 docs and a few tests, gfxmode changes
> the video mode only for grub[1], it does not replicate the behaviour of
> the "old" vga= variable.

> [1] this is also nice as it allows use of highres images for the grub
> background

OK. Thanks.


>> avoided it almost immediately is that it seemed to pop out of nowhere
>> in some fora but was not referenced in the grub.enbug.org, Ubuntu, or
>> ArchLinux documentation.

> IIRC it was mentioned by grub itself when I tried adding the vga=
> parameter to the kernel line, something like (from memory)
> "The vga= parameter is deprecated, set gfxpayload instead"

Thanks. I had never tried passing a "vga=" to the kernel in grub2. I
just tried and saw the gfxpayload message.

0 new messages