You are not logged in.

#1 2012-05-19 08:57:58

amen
Member
Registered: 2009-08-02
Posts: 44

How to set native resolution in GRUB2 - Intel HD graphics

Hello.
I want to set 1440x900 in GRUB2.
I use Intel HD 3000 integrated graphics with CPU i5 2500k.
I use grub2-efi-x86_64 1:2.00beta4-1.

Hwinfo from running Arch Linux shows:

[root@myhost ~]# hwinfo --framebuffer
02: None 00.0: 11001 VESA Framebuffer                           
  [Created at bios.459]
  Unique ID: xxxxxxxxxxxxxxxxxxxxxx
  Hardware Class: framebuffer
  Model: "Intel(R) Sandybridge/Ivybridge Graphics Controller"
  Vendor: "Intel Corporation"
  Device: "Intel(R) Sandybridge/Ivybridge Graphics Controller"
  SubVendor: "Intel(R) Sandybridge/Ivybridge Graphics Chipset Accelerated VGA BIOS"
  SubDevice: 
  Revision: "Hardware Version 0.0"
  Memory Size: 511 MB + 960 kB
  Memory Range: 0xe0000000-0xfffeffff (rw)
  Mode 0x0307: 1280x1024 (+1280), 8 bits
  Mode 0x031a: 1280x1024 (+2560), 16 bits
  Mode 0x031b: 1280x1024 (+5120), 24 bits
  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
  Mode 0x037d: 1440x900 (+1472), 8 bits
  Mode 0x037e: 1440x900 (+2880), 16 bits
  Mode 0x037f: 1440x900 (+5760), 24 bits
  Config Status: cfg=new, avail=yes, need=no, active=unknown

I tried these settings in /etc/default/grub:

GRUB_GFXMODE=auto #running with 800x600 resolution
GRUB_GFXMODE=1440x900x24 #not working: still running with 800x600 resolution

but always GRUB2 run with 800x600.

Any ideas how to set 1400x900 in GRUB2? Is it even possible?

Last edited by amen (2012-05-22 12:11:07)

Offline

#2 2012-05-19 16:55:30

MadTux
Member
Registered: 2009-09-20
Posts: 553

Re: How to set native resolution in GRUB2 - Intel HD graphics

Did you try this workaround from the Grub2 Wiki?

https://wiki.archlinux.org/index.php/Gr … ution_hack

It seems to be the exact screen resolution you want, so in general I guess that it is possible.

Offline

#3 2012-05-19 19:16:38

amen
Member
Registered: 2009-08-02
Posts: 44

Re: How to set native resolution in GRUB2 - Intel HD graphics

Thanks, I try invoke 915resolution from GRUB2 command shell, but GRUB2 had no such command.
How can I add 915resolution program to GRUB2 command shell?

Anyway I installed from AUR package 915resolution.
915resolution -l from running Arch Linux shows:

[root@myhost ~]# 915resolution -l
Intel 800/900 Series VBIOS Hack : version 0.5.3

Intel chipset detected.  However, 915resolution was unable to determine the chipset type.
Chipset Id: 1008086
Please report this problem to stomljen@yahoo.com

Any ideas?

Last edited by amen (2012-05-20 09:15:01)

Offline

#4 2012-05-22 10:32:38

amen
Member
Registered: 2009-08-02
Posts: 44

Re: How to set native resolution in GRUB2 - Intel HD graphics

Can anyone help?

Offline

#5 2012-05-22 10:37:02

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: How to set native resolution in GRUB2 - Intel HD graphics

hwinfo shows your desired resolution, so it's in the vbios, which means you don't need i915resolution. That one is to program resolutions that are *not* in the vbios already.

But as to why grub2 won't work, idk, I'm staying away from this over-engineered piece of... something... that just happens to also include a bootloader smile. Could be your syntax is wrong. Have you already tried 1440x900@24 or 1440x900-24 or simply 1440x900 or 0x037f?

Edit: Gah, GRUB_GFXMODE isn't for grub.cfg, it's for /etc/default/grub. If you're configuring grub.cfg directly, it's 'set gfxmode=1440x900x24'. See what I mean with over-engineered piece of something? smile

Last edited by Gusar (2012-05-22 10:45:13)

Offline

#6 2012-05-22 10:50:27

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: How to set native resolution in GRUB2 - Intel HD graphics

Yeah, I don't think you should be editing grub.cfg. Last time I used GRUB 2 that file had multiple references to the same thing.

Edit /etc/default/grub and then generate a grub.cfg:

$ sudo grub-mkconfig -o /boot/grub/grub.cfg

https://wiki.archlinux.org/index.php/GR … mmended.29


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#7 2012-05-22 12:25:48

amen
Member
Registered: 2009-08-02
Posts: 44

Re: How to set native resolution in GRUB2 - Intel HD graphics

Gusar wrote:

hwinfo shows your desired resolution, so it's in the vbios, which means you don't need i915resolution. That one is to program resolutions that are *not* in the vbios already.

But as to why grub2 won't work, idk, I'm staying away from this over-engineered piece of... something... that just happens to also include a bootloader smile. Could be your syntax is wrong. Have you already tried 1440x900@24 or 1440x900-24 or simply 1440x900 or 0x037f?

Edit: Gah, GRUB_GFXMODE isn't for grub.cfg, it's for /etc/default/grub. If you're configuring grub.cfg directly, it's 'set gfxmode=1440x900x24'. See what I mean with over-engineered piece of something? smile

Thanks for tips. Yes, I edited /etc/default/grub not grub.cfg. Everytime when I finish editing /etc/default/grub I execute

grub-mkconfig -o /boot/grub/grub.cfg

I tried:

/etc/default/grub - GRUB_GFXMODE=1440x900@24  #aka 'set gfxmode=1440x900@24' in /boot/grub/grub.cfg - still running at 800x600
/etc/default/grub - GRUB_GFXMODE=1440x900-24  #aka 'set gfxmode=1440x900-24' in /boot/grub/grub.cfg - still running at 800x600
/etc/default/grub - GRUB_GFXMODE=1440x900     #aka 'set gfxmode=1440x900' in /boot/grub/grub.cfg - still running at 800x600
/etc/default/grub - GRUB_GFXMODE=0x037f       #aka 'set gfxmode=0x037f' in /boot/grub/grub.cfg - still running at 800x600

My current /etc/default/grub:

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch Linux"
GRUB_CMDLINE_LINUX_DEFAULT="quiet add_efi_memmap"
GRUB_CMDLINE_LINUX="elevator=deadline"

# Preloa GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=auto
GRUB_GFXMODE=1440x900@24

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter 
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" 
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper 
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-blue/black"
GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

My current /boot/grub/grub.cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=light-blue/black
set menu_color_highlight=light-cyan/blue

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  cedaa9c2-d515-4f3d-ae6e-d166d2ee3c51
else
  search --no-floppy --fs-uuid --set=root cedaa9c2-d515-4f3d-ae6e-d166d2ee3c51
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=1440x900@24
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=pl_PL
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux GNU/Linux, za pomocą systemu Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-cedaa9c2-d515-4f3d-ae6e-d166d2ee3c51' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  cedaa9c2-d515-4f3d-ae6e-d166d2ee3c51
	else
	  search --no-floppy --fs-uuid --set=root cedaa9c2-d515-4f3d-ae6e-d166d2ee3c51
	fi
	echo	'Wczytywanie systemu Linux core repo kernel...'
	linux	/boot/vmlinuz-linux root=UUID=cedaa9c2-d515-4f3d-ae6e-d166d2ee3c51 ro elevator=deadline quiet add_efi_memmap
	echo	'Wczytywanie początkowego dysku RAM...'
	initrd	/boot/initramfs-linux.img
}
menuentry 'Arch Linux GNU/Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-cedaa9c2-d515-4f3d-ae6e-d166d2ee3c51' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  cedaa9c2-d515-4f3d-ae6e-d166d2ee3c51
	else
	  search --no-floppy --fs-uuid --set=root cedaa9c2-d515-4f3d-ae6e-d166d2ee3c51
	fi
	echo	'Wczytywanie systemu Linux core repo kernel...'
	linux	/boot/vmlinuz-linux root=UUID=cedaa9c2-d515-4f3d-ae6e-d166d2ee3c51 ro elevator=deadline quiet add_efi_memmap
	echo	'Wczytywanie początkowego dysku RAM...'
	initrd	/boot/initramfs-linux-fallback.img
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Microsoft Windows x86_64 UEFI-GPT" {
    insmod part_gpt
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --no-floppy --set=root c299-4f49
    chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

GRUB2 still running at 800x600. Any ideas?

Offline

#8 2012-05-22 13:00:46

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: How to set native resolution in GRUB2 - Intel HD graphics

Oh god, my eyes, my eeeeeeeyesssssss!!!

Seriously, don't you guys cringe when you see that monstrosity?

I see you're using EFI, so why are you bothering with grub in the first place, just use efi_stub and rEFInd.

Offline

#9 2012-05-22 14:19:45

amen
Member
Registered: 2009-08-02
Posts: 44

Re: How to set native resolution in GRUB2 - Intel HD graphics

Gusar wrote:

Oh god, my eyes, my eeeeeeeyesssssss!!!

Seriously, don't you guys cringe when you see that monstrosity?

I see you're using EFI, so why are you bothering with grub in the first place, just use efi_stub and rEFInd.

I use GRUB2 because GRUB2 is supported more or less by Arch Linux.
I think rEFIt is for Macs systems. I have ASUS P8Z68V-LX motherboard - http://www.asus.com/Motherboards/Intel_ … P8Z68V_LX/

I tried to install refit from AUR but without success because gnu-efi dependence shows build error.

I tried http://refit.sourceforge.net/doc/c1s5_burning.html but this CD don't work (not booting).

Offline

#10 2012-05-22 14:39:14

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: How to set native resolution in GRUB2 - Intel HD graphics

I didin't say rEFIt. I said rEFInd. And instead of assuming, it'd do you good to inform yourself what it is and what it actually does. efi_stub + rEFInd is a much simpler way than using the grub2 monstrosity. Search the forums, there are threads discussing it.

Last edited by Gusar (2012-05-22 14:40:08)

Offline

#11 2012-05-22 15:34:31

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: How to set native resolution in GRUB2 - Intel HD graphics

Gusar wrote:

... over-engineered piece of something? smile

In my humble opinion - grub2 is an OS looking for a decent boot-loader ... smile

(sorry, just couldn't help myself)

Offline

#12 2012-05-22 15:58:40

amen
Member
Registered: 2009-08-02
Posts: 44

Re: How to set native resolution in GRUB2 - Intel HD graphics

Gusar wrote:

I didin't say rEFIt. I said rEFInd. And instead of assuming, it'd do you good to inform yourself what it is and what it actually does. efi_stub + rEFInd is a much simpler way than using the grub2 monstrosity. Search the forums, there are threads discussing it.

Thanks! I installed rEFInd. I set resolution to 1440 900 but when rEFInd starts then showed me that there are to choose only three possibilities:
- 1024x768
- 800x600
- 640x480.
So I can't set 1440x900 resolution. sad

Last edited by amen (2012-05-22 15:59:34)

Offline

#13 2012-05-22 16:13:46

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: How to set native resolution in GRUB2 - Intel HD graphics

No ideas then. hwinfo shows it, so it should be available. Though what hwinfo shows is the vbios, who knows if EFI is actually using that. It's quite possible that it's not, EFI has it's own graphics driver. And it seems 1024x768 is all you'll get from it. Unless someone more knowledgeable about EFI has some ideas.

Offline

#14 2012-05-22 17:07:21

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: How to set native resolution in GRUB2 - Intel HD graphics

For grub2,

GRUB_GFXMODE="1440x900x32;1440x900x24;1024x768x32;1024x768x24;auto"

in /etc/default/grub is the correct syntax, not 1440x900@24 or the other ones. But even grub2 uses UEFI framebuffer driver. So if UEFI itself supports only 1024x768 or 800x600 , then grub2 will fallback to one of those resolutions.

Last edited by the.ridikulus.rat (2012-05-22 17:10:22)

Offline

Board footer

Powered by FluxBB