pavement

High Resolution Console

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
m (Reverted edits by AlexandraBull (Talk) to last revision by Jimbo)
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
If you come to FreeBSD after using Linux, one of the first things you may notice is the lack of high-resolution consoles. The default is 640x480. Although high-resolution is desirable to many, it's certainly not required. If you want to have a 1024x768(or even higher) console resolution, it's fairly easy to set up, just requires a kernel recompile and setting the mode you want to use in the /etc/rc.conf file.
+
If you come to FreeBSD after using Linux, one of the first things you may notice is the lack of high-resolution consoles. The default is text-mode 80x25 characters. Although high-resolution is desirable to many, it's certainly not required. If you want to have a 1024x768(or even higher) console resolution, it's fairly easy to set up, just requires a kernel recompile and setting the mode you want to use in the /etc/rc.conf file.
 +
 
 +
==Kernel Configuration==
  
 
First off, we need to edit the kernel config to add two options. I won't go into too much depth here, as this article isn't about how to config your kernel. For my example I will use the 'GENERIC' kernel config.
 
First off, we need to edit the kernel config to add two options. I won't go into too much depth here, as this article isn't about how to config your kernel. For my example I will use the 'GENERIC' kernel config.
Line 13: Line 15:
  
 
Save & exit
 
Save & exit
 +
 +
==Build & Install New Kernel==
  
 
  cd /usr/src
 
  cd /usr/src
 
  make buildkernel KERNCONF=VESAKERN
 
  make buildkernel KERNCONF=VESAKERN
 
  make installkernel KERNCONF=VESAKERN
 
  make installkernel KERNCONF=VESAKERN
 +
 +
==See Available Video Modes & Pick One==
  
 
When that is done, reboot to use the new kernel. Upon reboot, you will notice no change initially. Log in as root and enter:
 
When that is done, reboot to use the new kernel. Upon reboot, you will notice no change initially. Log in as root and enter:
Line 22: Line 28:
 
  vidcontrol -i mode
 
  vidcontrol -i mode
  
You should see a long listof all available resolutions, possibly all the way up to 1600x1200. Personally, 1024x768 console is plenty big, or small, depending on how you think about it. On my system the mode number for 1024x768x24 is 280. To test the desired mode, use the following command:
+
You should see a long list of all available resolutions, including all of the modes that the video card is capable of. Personally, 1024x768 console is plenty big, or small, depending on how you think about it. On my system the mode number for 1024x768x24 is 280. To test the desired mode, use the following command:
  
 
  vidcontrol MODE_280
 
  vidcontrol MODE_280
  
Your console should jump to that. If it works, great. If the screen goes blank, your card/monitor can't support that, and you need to use something else. You may need to switch to different terminal to try one that works. Once you find a setting that you like, we can add it to /etc/rc.conf.
+
Your console should jump to that. If it works, great. If the screen goes blank, your card/monitor can't support that, and you need to use something else. You may need to switch to different terminal to try one that works.  
 +
 
 +
==Tell FreeBSD to use the video mode all the time==
 +
 
 +
Once you find a setting that you like, we can add it to /etc/rc.conf.
  
 
  allscreens_flags="MODE_280"
 
  allscreens_flags="MODE_280"
  
 
This will tell all terminal screens to use the desired resolution. Go ahead and reboot to try it. You will not see the large screen resolution until rc.conf is processed. This is different to Linux where the bootloader passes the resolution providing for a full boot-sequence in high-resolution. On my system, it jumps to high-resolution just before loading the Linux ABI support.
 
This will tell all terminal screens to use the desired resolution. Go ahead and reboot to try it. You will not see the large screen resolution until rc.conf is processed. This is different to Linux where the bootloader passes the resolution providing for a full boot-sequence in high-resolution. On my system, it jumps to high-resolution just before loading the Linux ABI support.
 +
 +
[[Category : Configuring_FreeBSD]]

Latest revision as of 16:14, 1 August 2011

If you come to FreeBSD after using Linux, one of the first things you may notice is the lack of high-resolution consoles. The default is text-mode 80x25 characters. Although high-resolution is desirable to many, it's certainly not required. If you want to have a 1024x768(or even higher) console resolution, it's fairly easy to set up, just requires a kernel recompile and setting the mode you want to use in the /etc/rc.conf file.

Contents

[edit] Kernel Configuration

First off, we need to edit the kernel config to add two options. I won't go into too much depth here, as this article isn't about how to config your kernel. For my example I will use the 'GENERIC' kernel config.

cd /usr/src/sys/i386/conf
cp GENERIC VESAKERN
vi VESAKERN

add the following lines:

options      VESA            # Build VESA module into kernel
options      SC_PIXEL_MODE   # Allows syscons to act on pixels rather than text

Save & exit

[edit] Build & Install New Kernel

cd /usr/src
make buildkernel KERNCONF=VESAKERN
make installkernel KERNCONF=VESAKERN

[edit] See Available Video Modes & Pick One

When that is done, reboot to use the new kernel. Upon reboot, you will notice no change initially. Log in as root and enter:

vidcontrol -i mode

You should see a long list of all available resolutions, including all of the modes that the video card is capable of. Personally, 1024x768 console is plenty big, or small, depending on how you think about it. On my system the mode number for 1024x768x24 is 280. To test the desired mode, use the following command:

vidcontrol MODE_280

Your console should jump to that. If it works, great. If the screen goes blank, your card/monitor can't support that, and you need to use something else. You may need to switch to different terminal to try one that works.

[edit] Tell FreeBSD to use the video mode all the time

Once you find a setting that you like, we can add it to /etc/rc.conf.

allscreens_flags="MODE_280"

This will tell all terminal screens to use the desired resolution. Go ahead and reboot to try it. You will not see the large screen resolution until rc.conf is processed. This is different to Linux where the bootloader passes the resolution providing for a full boot-sequence in high-resolution. On my system, it jumps to high-resolution just before loading the Linux ABI support.

Personal tools