Linux – Set Resolution in Text Consoles When `vga=…` Fails

consolelinuxnvidiavideo

It is a common way to set the resolution of a text consoles (that are usually available by Ctrl-Alt-F1 thru Ctrl-Alt-F6) by using a vga=... kernel parameter.
I'm using Ubuntu 10.04 Lucid, output of uname -a is:

Linux  2.6.32-33-generic #70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011 x86_64 GNU/Linux

To identify modes available i use the sudo hwinfo --framebuffer which reports:

02: None 00.0: 11001 VESA Framebuffer                            
  [Created at bios.464]  
  Unique ID: rdCR.R1b4duaxSqA  
  Hardware Class: framebuffer  
  Model: "NVIDIA G73 Board - p456h1  "  
  Vendor: "NVIDIA Corporation"  
  Device: "G73 Board - p456h1  "  
  SubVendor: "NVIDIA"  
  SubDevice:   
  Revision: "Chip Rev"  
  Memory Size: 256 MB  
  Memory Range: 0xc0000000-0xcfffffff (rw)  
  Mode 0x0300: 640x400 (+640), 8 bits  
  Mode 0x0301: 640x480 (+640), 8 bits  
  Mode 0x0303: 800x600 (+800), 8 bits  
  Mode 0x0305: 1024x768 (+1024), 8 bits  
  Mode 0x0307: 1280x1024 (+1280), 8 bits  
  Mode 0x030e: 320x200 (+640), 16 bits  
  Mode 0x030f: 320x200 (+1280), 24 bits  
  Mode 0x0311: 640x480 (+1280), 16 bits  
  Mode 0x0312: 640x480 (+2560), 24 bits  
  Mode 0x0314: 800x600 (+1600), 16 bits  
  Mode 0x0315: 800x600 (+3200), 24 bits  
  Mode 0x0317: 1024x768 (+2048), 16 bits  
  Mode 0x0318: 1024x768 (+4096), 24 bits  
  Mode 0x031a: 1280x1024 (+2560), 16 bits  
  Mode 0x031b: 1280x1024 (+5120), 24 bits  
  Mode 0x0330: 320x200 (+320), 8 bits  
  Mode 0x0331: 320x400 (+320), 8 bits  
  Mode 0x0332: 320x400 (+640), 16 bits  
  Mode 0x0333: 320x400 (+1280), 24 bits  
  Mode 0x0334: 320x240 (+320), 8 bits  
  Mode 0x0335: 320x240 (+640), 16 bits  
  Mode 0x0336: 320x240 (+1280), 24 bits  
  Mode 0x033d: 640x400 (+1280), 16 bits  
  Mode 0x033e: 640x400 (+2560), 24 bits  
  Config Status: cfg=new, avail=yes, need=no, active=unknown  

It looks like many hi-res modes are available, like 0x305, 0x307, 0x317, 0x318, 0x31a, 0x31b (by the way, what does the plus-number means in the list of modes?). However, setting any of these modes in kernel option string, line vga=0x305, results in either pitch black text console, or screen filled by blinking color/bw dots.

What is the 'modern', 'robust' way to set up high resolution in text consoles?

Best Answer

Newer kernels use KMS by default, so you should move away from appending vga= to your grub line as it will conflict with the native resolution of KMS. However, it depends upon the video driver you are using: the proprietary Nvidia driver doesn't support KMS, but you can work around it.

You should be able to get full resolution in the framebuffer by editing your /etc/default/grub and making sure that the GFXMODE is set correctly, and then adding a GFXPAYLOAD entry like so:

GRUB_GFXMODE=1680x1050x24

# Hack to force higher framebuffer resolution
GRUB_GFXPAYLOAD_LINUX=1680x1050

Remember to run sudo update-grub afterwards.

Related Question