How to setup a text mode console bigger than 80x25?

Asked by Uqbar

Hi all.
Under another distribution (and with another PC) I used to have a hires text mode console, very useful both in the boot to see diagnostics long lines and during text mode operations. It used to be a "vga=xyz"
Now I'm running Gutsy on a laptop with an nVidia at 1440x900 resolution.
As far as X Windows is concerned, there's no problem with both the framebufer driver and with the nVidia one.
How can I set the proper "vga=" kernel parameter to make it boot with hires text mode?
Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Uqbar
Solved:
Last query:
Last reply:
Revision history for this message
Wolf Canis (wolf-canis) said :
#1

Hello uqbar,
first you have to load a framebuffer.

Find the right module:

$ find /lib/modules/2.6.22-14-generic/ -name "nvi*fb*"
/lib/modules/2.6.22-14-generic/kernel/drivers/video/nvidia/nvidiafb.ko

Add it to your initrd:

${YOUR_FAVORITE_EDITOR} /etc/initramfs-tools/modules

only the module name (without path and suffix)

Save your original:
$ sudo cp /boot/initrd.img-2.6.22-14-generic /boot/initrd.img-2.6.22-14-generic.save

Do that for all your initrds.

Now update your initrd with your new settings:

$ sudo update-initramfs -k all -u

Next configure grub:
Add the following kernel parameter:

video=nvidiafb:mtrr:3,ywrap,1024x768-16@60

that should result in a resolution of 1024x768 16, colors, 60Hz frequenz.

Now update grub:

$ sudo update-grub

Next step is to boot and hopefully it is what you expect, if not - boot again and when the grub screen appears quickly press ESC, choose the kernel, press
'e', then go to the kernel entry and press 'e' again, delete the video parameter and press ENTER, than 'b' for boot.
Then post the result, please.

Hope that helps.

Revision history for this message
Uqbar (uqbar) said :
#2

<quote>
Next configure grub:
 Add the following kernel parameter:
video=nvidiafb:mtrr:3,ywrap,1024x768-16@60
that should result in a resolution of 1024x768 16, colors, 60Hz frequenz.
</quote>
In which file?
I've tried the /boot/grub/menu.lst but it got wiped by the subsequent update-grub.

Revision history for this message
Uqbar (uqbar) said :
#3

I've tried not to run the update-grub but the console remained at 80x25.
Any hint about the meaning of the video=... argument list?
Thanks again.

Revision history for this message
Uqbar (uqbar) said :
#4

By the way, I have a Core 2 Duo CPU, that is in the family of amd64.
Maybe this info is important.

Revision history for this message
Wolf Canis (wolf-canis) said :
#5

Hello uqbar,
the video parameter has to be added in the /boot/grub/menu.lst file, at the end of the line which starts with # kopt= .
After that you *have to* run update-grub, if not this changes have no effect.
After that you should boot.

Please post the result.

Revision history for this message
Uqbar (uqbar) said :
#6

Nothing new happened.
The system boots and nothing (kernel diagnostics messages) is shown.
From X I switch to the text console (CTRL-ALT-F1) and see the usual 80x25 console.

Revision history for this message
Wolf Canis (wolf-canis) said :
#7

Hello,
please, post your /boot/grub/menu.lst and the output of the following commands:

$ lsb_release -a

$ lsmod | grep fb

$ lsmod | grep nvi

$ lspci

Thanks.

Revision history for this message
Uqbar (uqbar) said :
#8

The initrd.img file I have produced is smaller than the original one, rather than bigger.
I suspect something is missing in there.
Any hint on how to add the fb module to the original initrd.img file?

Thanks again.

Revision history for this message
Wolf Canis (wolf-canis) said :
#9

Hello,
did you as described in my first post? And please post the information, those I asked for in my previous post.

Thanks.

Revision history for this message
Uqbar (uqbar) said :
#10

I followed your directions step by step.
Somehow I places two postings and your last but one got inserted in between.
This is why I was not sending the output.

Revision history for this message
Uqbar (uqbar) said :
#11

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 7.10
Release: 7.10
Codename: gutsy

nvidiafb 53668 0
fb_ddc 4096 1 nvidiafb
i2c_algo_bit 8324 1 nvidiafb
cfbcopyarea 5248 1 nvidiafb
vgastate 10496 1 nvidiafb
cfbimgblt 4096 1 nvidiafb
cfbfillrect 5760 1 nvidiafb
i2c_core 30208 4 nvidiafb,fb_ddc,i2c_algo_bit,nvidia

nvidiafb 53668 0
fb_ddc 4096 1 nvidiafb
i2c_algo_bit 8324 1 nvidiafb
cfbcopyarea 5248 1 nvidiafb
vgastate 10496 1 nvidiafb
cfbimgblt 4096 1 nvidiafb
cfbfillrect 5760 1 nvidiafb
nvidia 7013492 26
i2c_core 30208 4 nvidiafb,fb_ddc,i2c_algo_bit,nvidia

00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)
01:00.0 VGA compatible controller: nVidia Corporation GeForce 8600M GT (rev a1)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
03:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection (rev 61)
07:00.0 SATA controller: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02)
08:01.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)
08:01.1 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)
08:01.2 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 12)
08:01.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)
08:01.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 12)

Revision history for this message
Uqbar (uqbar) said :
#12

Exactly in the order you requested them.

Revision history for this message
Wolf Canis (wolf-canis) said :
#13

Hello,
thanks. Now I'm missing /boot/grub/menu.lst. Please post it too.

Thanks.

Revision history for this message
Uqbar (uqbar) said :
#14

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=322081c2-fae3-4d21-aecb-34e2af2cc40b ro video=nvidiafb:mtrr:3,ywrap,1440x900-16@60

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash locale=it_IT

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /vmlinuz-2.6.22-14-generic root=UUID=322081c2-fae3-4d21-aecb-34e2af2cc40b ro video=nvidiafb:mtrr:3,ywrap,1440x900-16@60 quiet splash locale=it_IT
initrd /initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,0)
kernel /vmlinuz-2.6.22-14-generic root=UUID=322081c2-fae3-4d21-aecb-34e2af2cc40b ro video=nvidiafb:mtrr:3,ywrap,1440x900-16@60 single
initrd /initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd0,0)
kernel /memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

Revision history for this message
Wolf Canis (wolf-canis) said :
#15

Hello,
Ok, thanks. I would suggest to configure a smaller resolution 1024x768, that, if it works, results in a console 128x48 (lines x rows). And you did run the command update-grub? That is a *must* not a nice to have.
If it is still not working. Than you can try the following parameter:

video=nvidiafb:1024x768-16@60

Please post the result.

Thanks.

Revision history for this message
Uqbar (uqbar) said :
#16

Yes, I did run the update-grub, as the video=nvidiafb:... paramenter got copied to all the relevant stanzas i the grub configuration file ...
I can try the 1024x768.

Revision history for this message
Uqbar (uqbar) said :
#17

Nothing different happened.
The boot starts with 80x25 console with just two lines in the bottom.
--------
Loading, please wait...
kinit: name_to_dev_t(/dev/disk/by-uuid/36be90cd-568f-477e-8c11-3ade56123258) = sda2(8,2)
kinit: trying to resume from /dev/disk/by-uuid/36be90cd-568f-477e-8c11-3ade56123258
kinit: No resume image, doing normal boot...

Ubuntu 7.10 uqbar tty1

uqbar login:

Kernel alive
kernel direct mapping tables up to 100000000 @ 8000-d000
--------
Please not the "weird" line order ...
Then the screen goes black until I have the X running.

Revision history for this message
Wolf Canis (wolf-canis) said :
#18

Hello,
Ok, ok. Last try that I know is:

change the kernel parameter to:

vga=0x318 video=nvidiafb

If that still not work, then I'm at the end of my wisdom and I'm sorry that I couldn't fix this issue. But I have nor one idea and that is the parameter mode_option but I don't know the syntax. Usage: video:nvidiafb:mode_option....

Please post the result.

Thanks.

Revision history for this message
Uqbar (uqbar) said :
#19

Something changed.
The console screen now shows only the blinking line cursor at the top left corner.
I fear I have to stay with the 80x25!

Revision history for this message
Wolf Canis (wolf-canis) said :
#20

Hello,
you have the opportunity to load the vesafb driver and the procedure as I did describe in my first post. But I don't know whether the vesafb goes with nvidia (for xorg) or not. Perhaps that works.

Please post the result.

Thanks.

Revision history for this message
Uqbar (uqbar) said :
#21

Hi.
Nothing new. As if I never put a video=... , that is 80x25.
What's really puzzling is that after the very few first lines from the kernel, the screen goes blank (deep black as when X initializes the screen and the nVidia logo gets displayed) until X starts.

I've found this page:
http://en.wikipedia.org/wiki/VESA_BIOS_Extensions#VBE_mode_numbers
but no luck to use any hires VESA mode.

Revision history for this message
Uqbar (uqbar) said :
#22

Hi.
I've tried the following boots: video=vesafb vga=x with x in the mode list shown in the above URL for the 1440x900 video mode.
I think that switching to, say, a 1024x768 on a 1440x900 LCD won't work. Will it?
What I'm going to try is the saem as above, but with video=nvidiafb.
Any other hint?
Thanks.

Revision history for this message
Uqbar (uqbar) said :
#23

Hi.
By using "nosplash" in the grub boot line I can at least see the 80x25 boot diagnostics.
Which is something better than a blank screen.
Later I'll try the video=... procedure from the beginning.

Revision history for this message
Uqbar (uqbar) said :
#24

Hi.
No luck at all. The maximum I can have is an 80x25 console with nosplash.
Just to provide more details:
the hardware is a "GeForce 8600M GT";
the driver is nvidia-glx-new v 100.14.19+2.6.22.4-14.10 (!);
the display is 1440x900 pixel and
X reports that "depth is 24 pixmap while format is 32 bpp".
The system CPU is a T7500 (Core 2 Duo - amd64 family).
A couple of references is here:
http://ubuntuforums.org/showthread.php?t=473396
http://ubuntuforums.org/showthread.php?t=585454
but none worked it out!
Hoping to see some more hints here!
Thanks.

Revision history for this message
Uqbar (uqbar) said :
#25

I found the solution here:
http://ubuntuforums.org/showthread.php?t=622018

Thanks Mr Canis for the patience!

Revision history for this message
Wolf Canis (wolf-canis) said :
#26

Hello uqbar,
nice to hear that you could tame that beast.
And thanks for posting the solution.