D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] vga entry in lilo.conf (ACER 200DX and SuSe 7 XF86 4.03 config)



On Thursday 13 December 2001 6:50 pm, you wrote:
> > Can anyone adequately explain the significance of the "vga="
> > line? I mean I've read what it is suppose to do, but can anyone
> > explain what it really does.
>
> What it enables you to do is select a video mode for your console that
> will give you more than the standard 80x24 chars.  I use it on my laptop
> to make the console use more of the screen than a little square in the
> middle (not that it makes that much difference).

There is a complex calculation that allows you to construct a value for vga= 
from hexadecimal and it was covered (briefly) in Linux Format a while back. 

LXF17 Aug 2001 p20
In answer to a question about a lack of Tux at the login screen (init 3, 
presumably)
<quote>
The penguin [only shows] if you are running the console using the frame 
buffer even if you've got [framebuffer] support compiled in, you have to tell 
[the kernel] to use it. This is in the form of a vga= extension, the values 
of which are listed within the framebuffer configuration within the kernel 
source tree.
</quote>

http://www.linuxdoc.org/HOWTO/Framebuffer-HOWTO-5.html#ss5.1

The following table shows the mode numbers you can input at the VGA prompt or 
for use with the LILO program. (actually these numbers are plus 0x200 to make 
it easier to refer to the table) 
(this may not render well in email, try copying into an HTML page or wait for 
it to turn up on the archive which uses a monospace font for message bodies)

Colours   640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200
--------+--------------------------------------------------------------
 4 bits |    ?       ?     0x302      ?        ?        ?         ?
 8 bits |  0x300   0x301   0x303    0x305    0x161    0x307     0x31C
15 bits |    ?     0x310   0x313    0x316    0x162    0x319     0x31D
16 bits |    ?     0x311   0x314    0x317    0x163    0x31A     0x31E
24 bits |    ?     0x312   0x315    0x318      ?      0x31B     0x31F
32 bits |    ?       ?       ?        ?      0x164      ?


Key: 8 bits = 256 colours, 15 bits = 32,768 colours, 16 bits = 65,536 
colours, 24 bits = 16.8 million colours, 32 bits - same as 24 bits, but the 
extra 8 bits can be used for other things, and fits perfectly with a 32 bit 
PCI/VLB/EISA bus. 

0x300 = 768
0x301 = 769
0x302 = 770
0x303 = 771
0x305 = 773
0x307 = 775
0x310 = 784
0x311 = 785
0x312 = 786
0x313 = 787
0x314 = 788
0x315 = 789
0x316 = 790
0x317 = 791
0x318 = 792
0x319 = 793
0x31A = 794
0x31B = 795
0x31C = 796
0x31D = 797
0x31E = 798
ox31F = 799
0x161 = 353
0x162 = 354
0x163 = 355
0x164 = 356


To convert decimal into hexadecimal:
http://www.ambleside.schoolzone.co.uk/ambleweb/baseconvert/baseconvert.htm

Or try this one:
http://www.science-ebooks.com/electronics/new_page_12.htm
Converts in both directions.
(the 791 for the laptop equals 0x317 which in the above table gives me the 
expected 1024x768 16bit that I use.)

I've tried to find anything on this on my own machine but just ended up 
wasting my time. Where to start looking? I installed kernel-source RPM and 
went to the modedb.c file but I couldn't find a decent set of values for vga. 
At least, not in the form of a single number, whether hexadecimal or decimal. 
The sourceforge.net link below led to the HOWTO with the table above. 

Other files:
/usr/share/doc/kernel-doc-2.4.8/fb/modedb.txt
/usr/include/linux/fb.h
/usr/share/doc/kernel-doc-2.4.8/fb/framebuffer.txt
[from this framebuffer.txt file]
For more specific information about the frame buffer device and its
applications, please refer to the Linux-fbdev website:

    http://linux-fbdev.sourceforge.net/

All necessary files can be found at

    ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/680x0/

and on its mirrors.

The latest version of fbset can be found at

    http://home.tvd.be/cr26864/Linux/fbdev/

Does anyone have fbset already?

The example given by LXF is 800x600 in 256 colours:
The kernel needs the instruction '303' for this resolution but this is 
hexadecimal (0x303) so the value in lilo.conf is converted to decimal, 771 in 
this case.

It was too involved for me to remember so I stick to memorising (or backing 
up!) values for certain situations. My Advent laptop requires 791 because the 
panel only works in 1024x768 16bit. It's essential on my laptop - without it, 
NO setting of X will ever create any screen display. It changes the font of 
the initial boot up (but since Mandrake 8.1, it uses Aurora so I don't see 
all the start-up bumpf) and whenever I see this smaller font in use, I know X 
will fire up. So far, each distro I've tried on the laptop has OVERRIDDEN the 
lilo setting and therefore X has always failed to setup first time. I've had 
to reboot, login and amend lilo, reboot and then configure X.

>
> If youre running X all the time I'd be tempted to just remove the vga=
> line.
>
> Alex.

vga=ask doesn't work on the laptop as it consistently refuses to offer 
1024x768 16bit as an option. Even though the laptop runs X continually, X 
won't function without the vga=791 in /etc/lilo.conf

-- 

Neil Williams
=============
http://www.codehelp.co.uk
neil@xxxxxxxxxxxxxx
linux@xxxxxxxxxxxxxx
neil@xxxxxxxxxxxx


--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly