You are not logged in.

#1 2011-08-28 14:47:35

knob
Member
Registered: 2009-01-30
Posts: 48

[SOLVED] Grub 2 resolution issue

Problem

I cannot set the grub 2 menu to the proper (laptop screen native - 1280x800) resolution (in fact to any 16:10 resolution) while I saw that other people can.
I would like to set it even tough I know it doesn't appear in the vbe modes.

Behaviour (updated)

GRUB_GFXMODE=1280x800x24,1280x800x16

Is the same as:

GRUB_GFXMODE=auto

Falls back to the next lower resolution - 1024x768 (I think), which is stretched (and no, I can't make the screen not to stretch the image from the bios) to maintain the wide aspect) and makes the console font to look blurry.

Now, after selecting the desired option it goes something like this:
- it gives the feedback message (like 'Loading kernel ..." or "Chain loading ...")
- clears the screen
- flickers due to changing resolution (vbe is not used anymore, the open driver kicks in)
- kernel (is loaded) messages appear and control is passed to init

Using:

GRUB_VIDEO_BACKEND=<anything other than vbe (from /boot/grub/video.lst)>

Will make grub not to clear the screen after displaying the feedback message and use text mode (low-res).


Helpful information (updated)

Here's my video card:

lspci | grep ATI
01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3650

And here are the resolutions my video card is able to use due to the open driver used by X:

xrandr --query
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1280x800       60.0*+
   1280x720       59.9  
   1152x768       59.8  
   1024x768       59.9  
   800x600        59.9  
   848x480        59.7  
   720x480        59.7  
   640x480        59.4  
VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DIN disconnected (normal left inverted right x axis y axis)

I know that Grub uses vbe as the backend to interface with the video card, therefor I tried to see what resolutions are supported by it.
It shows me a lot of resolutions (even resolutions which are not supported by my monitor) which I can't print, but none of them wide but not the one I'm interested in.

./group_avail_modes.sh vbetest_output
4:3:
[403] 320x240 (256 color palette)
[405] 320x240 (5:6:5)
[406] 320x240 (8:8:8)
[435] 512x384 (256 color palette)
[437] 512x384 (5:6:5)
[438] 512x384 (8:8:8)
[451] 640x350 (256 color palette)
[453] 640x350 (5:6:5)
[454] 640x350 (8:8:8)
[257] 640x480 (256 color palette)
[273] 640x480 (5:6:5)
[289] 640x480 (8:8:8)
[259] 800x600 (256 color palette)
[276] 800x600 (5:6:5)
[290] 800x600 (8:8:8)
[261] 1024x768 (256 color palette)
[279] 1024x768 (5:6:5)
[291] 1024x768 (8:8:8)
[339] 1152x864 (256 color palette)
[341] 1152x864 (5:6:5)
[342] 1152x864 (8:8:8)
[355] 1280x960 (256 color palette)
[357] 1280x960 (5:6:5)
[358] 1280x960 (8:8:8)
[323] 1400x1050 (256 color palette)
[325] 1400x1050 (5:6:5)
[326] 1400x1050 (8:8:8)
[371] 1600x1200 (256 color palette)
[373] 1600x1200 (5:6:5)
[374] 1600x1200 (8:8:8)
[387] 1792x1344 (256 color palette)
[389] 1792x1344 (5:6:5)
[390] 1792x1344 (8:8:8)
[467] 1856x1392 (256 color palette)
[469] 1856x1392 (5:6:5)
[470] 1856x1392 (8:8:8)
[483] 1920x1440 (256 color palette)
[485] 1920x1440 (5:6:5)
[486] 1920x1440 (8:8:8)

5:4:
[263] 1280x1024 (256 color palette)
[282] 1280x1024 (5:6:5)
[292] 1280x1024 (8:8:8)

8:5:
[270] 320x200 (5:6:5)
[288] 320x200 (8:8:8)
[256] 640x400 (256 color palette)

64:35:
[451] 640x350 (256 color palette)
[453] 640x350 (5:6:5)
[454] 640x350 (8:8:8)

And if you believe me that my monitor is not able to display a wide resolution, here's the proof (EDID) that it can:

get-edid | parse-edid
	# EDID version 1 revision 3
Section "Monitor"
	# Block type: 2:0 3:f
	# Block type: 2:0 3:fe
	# Block type: 2:0 3:fe
	Identifier "AUO:7481"
	VendorName "AUO"
	ModelName "AUO:7481"
	# Block type: 2:0 3:f
	# Block type: 2:0 3:fe
	# Block type: 2:0 3:fe
	# DPMS capabilities: Active off:no  Suspend:no  Standby:no

	Mode 	"1280x800"	# vfreq 60.002Hz, hfreq 49.382kHz
		DotClock	71.110000
		HTimings	1280 1328 1360 1440
		VTimings	800 803 809 823
		Flags	"-HSync" "-VSync"
	EndMode
	# Block type: 2:0 3:f
	# Block type: 2:0 3:fe
	# Block type: 2:0 3:fe
EndSection

hwinfo seems to do a better job using EDID.

./group_avail_modes.sh hwinfo_output 
4:3:
Mode 0x0393: 320x240 (+320), 8 bits
Mode 0x0395: 320x240 (+640), 16 bits
Mode 0x0396: 320x240 (+1280), 24 bits
Mode 0x03b3: 512x384 (+512), 8 bits
Mode 0x03b5: 512x384 (+1024), 16 bits
Mode 0x03b6: 512x384 (+2048), 24 bits
Mode 0x03c3: 640x350 (+640), 8 bits
Mode 0x03c5: 640x350 (+1280), 16 bits
Mode 0x03c6: 640x350 (+2560), 24 bits
Mode 0x0301: 640x480 (+640), 8 bitsi
Mode 0x0311: 640x480 (+1280), 16 bits
Mode 0x0321: 640x480 (+2560), 24 bits
Mode 0x0303: 800x600 (+832), 8 bits
Mode 0x0314: 800x600 (+1600), 16 bits
Mode 0x0322: 800x600 (+3200), 24 bits
Mode 0x0305: 1024x768 (+1024), 8 bits
Mode 0x0317: 1024x768 (+2048), 16 bits
Mode 0x0323: 1024x768 (+4096), 24 bits

8:5:
Mode 0x030e: 320x200 (+640), 16 bits
Mode 0x0320: 320x200 (+1280), 24 bits
Mode 0x0300: 640x400 (+640), 8 bits

64:35:
Mode 0x03c3: 640x350 (+640), 8 bits
Mode 0x03c5: 640x350 (+1280), 16 bits
Mode 0x03c6: 640x350 (+2560), 24 bits

More info

Related: I checked /boot/grub/grub.cfg after writing changes with grub-mkconfig and everything looks fine.
Not-related: I also have KMS starting early and working just fine at 1280x800 (fonts looking small and crisp).

Last edited by knob (2011-09-01 14:36:50)

Offline

#2 2011-08-28 17:07:05

ploub
Member
Registered: 2007-05-16
Posts: 132

Re: [SOLVED] Grub 2 resolution issue

Well I'm using syslinux but I've got the same resolution problem on my Asus UL50 widescreen which has a native resolution of 1366 x 768.

sudo hwinfo --framebuffer                                                 
Password:                                                                             
02: None 00.0: 11001 VESA Framebuffer                                                 
  [Created at bios.459]                                                               
  Unique ID: rdCR.fRULN9k9OD4                                                         
  Hardware Class: framebuffer                                                         
  Model: "Intel(r)Cantiga Graphics Controller"                                        
  Vendor: "Intel Corporation"                                                         
  Device: "Intel(r)Cantiga Graphics Controller"                                       
  SubVendor: "Intel(r)Cantiga Graphics Chip Accelerated VGA BIOS"                     
  SubDevice:                                                                          
  Revision: "Hardware Version 0.0"                                                    
  Memory Size: 31 MB + 960 kB                                                         
  Memory Range: 0xd0000000-0xd1feffff (rw)                                            
  Mode 0x0305: 1024x768 (+1024), 8 bits                                               
  Mode 0x0317: 1024x768 (+2048), 16 bits                                              
  Mode 0x0318: 1024x768 (+4096), 24 bits                                              
  Mode 0x0312: 640x480 (+2560), 24 bits                                               
  Mode 0x0314: 800x600 (+1600), 16 bits                                               
  Mode 0x0315: 800x600 (+3200), 24 bits                                               
  Mode 0x0301: 640x480 (+640), 8 bits                                                 
  Mode 0x0303: 800x600 (+832), 8 bits                                                 
  Mode 0x0311: 640x480 (+1280), 16 bits                                               
  Config Status: cfg=new, avail=yes, need=no, active=unknown

I'm assuming from this that the framebuffer doesn't support a resolution above 1024x768, so I'm interested to hear if anyone can squeeze any more pixels into it wink

Offline

#3 2011-09-01 13:07:33

knob
Member
Registered: 2009-01-30
Posts: 48

Re: [SOLVED] Grub 2 resolution issue

I  know I might had been exaggerating smile, I mean this happens only once when I power up the laptop and lasts for like 3 seconds but the blurriness and flickering are getting on my nerves.

From what I've understood the framebuffer doesn't support some resolutions because they do not reside in the vbe modes table generated with information from the VBIOS so I investigated and found these possible solutions:

1. (compromise solution) get rid of the blurry text
Keep the highest possible resolution that has the same aspect ratio as the resolution desired.

2. (radical solution) set desired resolution, get rid of the blurry text
Buy a new video card, researching the internet before buying, to find the available modes.

3. (unsafe solution - if you don't know what you're doing) set desired resolution, get rid of the blurry text
Find if the manufacturer of the video card came with a new VBIOS that includes the desired vbe mode or if it does not include it, download the VBIOS, edit it (Link1 Link2) to include the desired mode and reflash the card.

4. (safe-but-unlikely-to-happen-too-soon solution) set desired resolution, get ridd of the blurry text
Wait for a patch like this one (works for the Chameleon bootloader - doesn't load linux kernel images) that would make grub to modify the modes table in the VBIOS's shadow in RAM before displaying anything.

5. (easiest solution) no worries
Ignore everything I said and troubles me and carry on with your life smile.


Oh, also, I don't know if succeding in having the native resolution for the bootloader and the kernel console, will stop the flickering when the bootloader passes the control to the kernel, since the control of the video card is passed from one interface (VBE) to another (KMS in my case).

The solution I approached is 1, settling with a 640x400 256 colors which keeps on flickering and the font ain't too small but hey, at least there's no blur.
Waiting for solution 4 roll or for another video card since I've never done a bios update and I'm scared of messing things up.


Now an intriguing question arises knowing that:
a. my card and monitor are capable of displaying the desired wide resolution
b. the desired resolution is supported by the vesa standard
c. others have vbe modes for wide resolutions
d. others succeded in displaying the desired wide resolution by modifying the modes table, so the functionality is implemented

Why (some) manufacturers don't include (index) for (some of) their video cards some (the right) modes in the vbios?

My laptop is an Acer so my video card's manufacturer/subvendor is Acer ... I wonder if I would've encountered this problem if my video card's subvendor was ATI/AMD.

Now this is a post worthy to be marked as SOLVED, I guess ...

Last edited by knob (2011-09-01 15:15:06)

Offline

Board footer

Powered by FluxBB