LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   1024x768 Console!! (higher available!) (https://www.linuxquestions.org/questions/%2Absd-17/1024x768-console-higher-available-366057/)

halo14 09-22-2005 05:02 PM

1024x768 Console!! (higher available!)
 
I finally got a 1024x768 console in freeBSD... which is the native resolution on my notebook... normally you have the little 640x480 square in the middle... no longer!!

I'm going to write a detailed HOWTO for LinuxAnswers tomorrow.. and I'll be sure and post it back here... I struggled for months trying to figure out what I was doing wrong.. now that I know how to do it.. it's very very easy..

I did it on FreeBSD 6.0 Beta5... but I'm going to try it on my standard 5.4 installation tomorrow morning to make sure it works equally as well...

Hopefully this will help others along the way..

JamieBrown 09-22-2005 05:29 PM

Hi Halo!

Please do! I'd be interested in hearing more about it. Is it just a BSD thing?

Jamie.

halo14 09-22-2005 06:08 PM

well the BSDs generally are limited to 640x480 console resolution by default, yes. Pretty much all Linux distro's support at least 1024x768 consoles with a kernel parameter in the boot manager such as "vga=791" for 1024x768x16bit color...

I had heard that you can get the decent console res. on BSD but had never been able to get ti to work right...

I will surely get it done tomorrow though, so we can all enjoy! :)

oxleyk 09-23-2005 07:41 AM

Sounds good! I'm interested in see this also. This is one of my frustrations with FreeBSD. My computer is capable of 132x60 text console but I've never been able to get more than 100x32.

Kent

halo14 09-23-2005 09:27 AM

posting this here until I get the time to appropriately format it!!! The I will submit to LinuxAnswers

note: this is a rough draft, and will have better formatting in the future, however, the information is correct and should work accordingly.

This document is an instruction on how to provide your FreeBSD installation with a high resolution console.

I have successfully done this in FreeBSD 6.0-BETA5 and FreeBSD 5.4-RELEASE.

In the 6.x series, there is support for consoles up to 1600x1200x32 resolution. 5.x supports a max of 1024x768.. which is fine for most people.

First thing we have to do is add VESA and SC_PIXEL_MODE to the kernel and rebuild. You should always cvsup and rebuild your kernel and world to the latest available. However, don't try to 'optimize' the BSD kernel. It is already well optimized. If there is an option, like this, that you need to have, then go for it. We need to open the kernel config file. I would recommend that you cvsup first so that you rebuild the latest world/kernel, but it's optional.
Code:

cvsup -h cvsup2.freebsd.org -g -L 2 /usr/share/examples/cvsup/standard-supfile
Obviously, you can use whichever cvsup server you want. You can install fastest_cvsup to fins what server is fastest for your location as well. If this is the first time you are cvsup-ing, it will take some time. When it completes, we will continue.
Code:

cp /usr/src/sys/i386/conf/GENERIC /usr/src/sys/i386/conf/GENERICVESA
Name it to whatever you want.
Code:

vi /usr/src/sys/i386/conf/GENERICVESA
You will see, a couple of lines down an "ident GENERIC" line. You can change this if you want. It will be the display of the kernel in uname.

Directly after that, you will start to see 'option xxxxx #Description' sections..

This is where we add our options:
Code:

options  VESA
options  SC_PIXEL_MODE

Save your changes and exit.

From here, you generally build the world, and the kernel, install the kernel, reboot to single-user mode, mergemaster, installworld, etc... but I'm going to skip the buildworld because it will eat up a lot of time, and we can do it after the kernel.

Code:

cd /usr/src
make buildkernel KERNCONF=GENERICVESA
make installkernel KERNCONF=GENERICVESA
reboot

Now, you won't get the resolution just yet, we're not quite done. Boot back up and do the following:

Code:

kldload vesa
vidcontrol -i mode | less

You should see a punch of different modes. Scroll through and find one you'd like. For me, 1024x768x24 is the size I want. The first column shows the mode number, mine being 280.

Choose the one you want and try:
Code:

vidcontrol MODE_xxx
Substituting "xxx" for the number of the mode you want. The screen will go bank for a second, then it should come back with the prompt. If it cannot handle the resolution you specified, it should return with an error.

If it works, GREAT! Now we can add this to /etc/rc.conf to load on boot-up. However, we must make sure we load vesa on boot-up as well.
Code:

vi /boot/defaults/loader.conf
see the line that says:
Code:

vesa_load="NO"
change it to "YES" (maintaining caps)
Save, and exit.
Code:

vi /etc/rc.conf
and add to the end:
Code:

allscreens_flags="MODE_xxx"
again, substituting "xxx" for the mode of your choice.

Reboot, and it should come up to the correct console resolution. It does take a while for it to load since it's from a config file. Not like the kernel parameter in Linux where the whole thing boots full-screen. In my case, it goes to full screen just before loading the Linux ABI.

oxleyk 09-23-2005 07:53 PM

It works!

You don't need to load the vesa module since you built it into the kernel. All you need after that is the allscreens addition to rc.conf.

I've tried to get this to work for a long time but never found the "MODE_xxx" part.

Thanks!

Kent

taylor_venable 10-02-2005 12:51 PM

Hey, pretty sweet! As per your instructions, it all works fine. (Although, it is true that you don't need to load the vesa module.) The only problem is that the green screensaver doesn't work now. :( When the time comes, the display simply stops updating, rather than going off. Probably a hardware thing. But great job figuring that out, I've been looking for it for a while!

cnjohnson 10-02-2005 07:38 PM

I am clueless. :)

When I do a vidcontrol MODE_280 all I get is the usage message from vidcontrol. Indeed, any MODE_XXX does that. What am I missing?

Cheers--
Charles

halo14 10-03-2005 07:29 AM

cnjohnson, try this:
Code:

vidcontrol -g 100x37 VESA_800x600
tell me if that works better. 6.x has an enhanced framebuffer, I forgot to update it with the correct function for 5.x.

cnjohnson 10-03-2005 07:12 PM

Better!

Thanks.

Cheers--
Charles

zulsolar 10-08-2006 06:14 PM

It works!!! Thank you!!! :D

rehab junkie 04-06-2007 09:08 PM

Quote:

Originally Posted by halo14
[b]If it works, GREAT! Now we can add this to /etc/rc.conf to load on boot-up. However, we must make sure we load vesa on boot-up as well.
Code:

vi /boot/defaults/loader.conf
see the line that says:
Code:

vesa_load="NO"
change it to "YES" (maintaining caps)
Save, and exit.

Sorry to drag up the past, but seeing as no one else mentioned it, I need to add: Argh! No! Don't EVER modify /boot/defaults/loader.conf! Add the line to /boot/loader.conf instead, it is an override. :)

rob0t 08-25-2008 01:47 PM

THHHHHAAANNNKKK YOUU!!!

This has solved my problem and it's a very thorough howto!


All times are GMT -5. The time now is 05:25 PM.