Text Console resolution and geometry settings in FreeBSD 9.x

The default console in FreeBSD is 80 x 25 geometry in whatever default resolution it can choose… but sometimes you want more.

So here’s how to set a new resolution…

First, you need to load the VESA driver into the kernel (if it’s not already loaded) – ignore any errors…

kldload vesa

Next, you need to query the console to find out what modes are available, to do this type (as root):

vidcontrol -i mode < /dev/console

This will output all the available modes for your card+monitor.  An example of one of the lines on my card is as follows:

280 (0x118) 0x0000001f G 1024x768x32 D   8×16  0xa0000 64k 64k 0xf3000000 3072k

(mode 280 is 1024 x 768 in 32-bit colour and uses a 8×16 font)

This is the mode I want to use, and I want to increase my geometry from 80×25 to 132×60, so I can type the following command to one-time set it:

vidcontrol -g 132×60 MODE_280 < /dev/console

If you want to use this as the default every boot, add the following line to your /etc/rc.conf file:

allscreens_flags=”-g 132×60 MODE_280″

And also load the VESA driver on boot, by adding the following line to your /boot/loader.conf file:

vesa_load=”YES”

That’s all there is to it.

7 thoughts on “Text Console resolution and geometry settings in FreeBSD 9.x

  1. Pingback: A low-power FreeBSD journey: High resolution terminal

  2. jv

    Nice.. this worked.. whats in the handbook did not, this did.. the input redirection 🙂

    however when i reboot.. the font and resolution I want does not kick in until right before the login prompt.. is that normal?

    Reply
    1. dan Post author

      Yes, that’s normal. The startup script /etc/rc.d/syscons doesn’t get run until late in the startup cycle, and this is where the font/resolution is set.
      It’s designed for when you login and use a console shell rather than the startup kernel messages output.

      Reply
  3. Dan

    New to FreeBSD after staying away from it for about 15 years – I like it! And your how-to post to change the console display resolution was the only one I found on Encyclopedia Google that works! Thanks!

    Reply
    1. dan Post author

      you should use /boot/loader.conf – the default one contains the defaults which are overridden by /boot/loader.conf
      The defaults file may be overwritten by the OS. (in the same way that /etc/defaults/rc.conf has defaults that /etc/rc.conf overrides)

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *