You are not logged in.

#1 2012-02-21 11:25:52

mcicak
Member
From: Novi Sad, Serbia
Registered: 2010-11-30
Posts: 22

GRUB2 Graphics Mode doesn't work

I removed old grub and installed grub2 and everything went smoothly, I even got the 1024x768 resolution on grub menu. Then I slightly changed /etc/default/grub and when I again generated grub.cfg, I always get plain console resolution (80x24).

Here is my /etc/default/grub file. I tried both gfxmode and vbemode options, but no success. sad

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

# Preload both 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="800x600,640x480,1024x768"
vbemode="0x117"

# 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.
export GRUB_COLOR_NORMAL="white/black"
export GRUB_COLOR_HIGHLIGHT="white/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/boot/grub/archlinux.png"
#GRUB_THEME="/path/to/gfxtheme"

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

#GRUB_SAVEDEFAULT="false"

and here is /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 [ "${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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

set menu_color_normal=white/black
set menu_color_highlight=white/blue

insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b445da59-e82b-4918-8b90-4859dda5a85d
else
  search --no-floppy --fs-uuid --set=root b445da59-e82b-4918-8b90-4859dda5a85d
fi
if loadfont /grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='hd0,msdos1'
  if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b445da59-e82b-4918-8b90-4859dda5a85d
  else
    search --no-floppy --fs-uuid --set=root b445da59-e82b-4918-8b90-4859dda5a85d
  fi
  set locale_dir=($root)/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/06_grub-customizer_menu_color_helper ###
### END /etc/grub.d/06_grub-customizer_menu_color_helper ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux linux' --class archlinux --class gnu-linux --class gnu --class os {
	load_video
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b445da59-e82b-4918-8b90-4859dda5a85d
	else
	  search --no-floppy --fs-uuid --set=root b445da59-e82b-4918-8b90-4859dda5a85d
	fi
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=/dev/disk/by-uuid/0dd3efdb-9c0e-4e2f-af60-670e6a7abd3e ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux linux Fallback' --class archlinux --class gnu-linux --class gnu --class os {
	load_video
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b445da59-e82b-4918-8b90-4859dda5a85d
	else
	  search --no-floppy --fs-uuid --set=root b445da59-e82b-4918-8b90-4859dda5a85d
	fi
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=/dev/disk/by-uuid/0dd3efdb-9c0e-4e2f-af60-670e6a7abd3e ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/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.
### 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 ###

Is there a way to get the 1024x768 back? Maybe I'm missing something. Confus.gif

Offline

#2 2012-02-21 12:15:30

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

Re: GRUB2 Graphics Mode doesn't work


"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

#3 2012-02-21 18:32:43

mcicak
Member
From: Novi Sad, Serbia
Registered: 2010-11-30
Posts: 22

Re: GRUB2 Graphics Mode doesn't work

Yes I tried that already, you can see in /etc/default/grub script that I tried with vbemode as suggested in GRUB2 Wiki. But that didn't work either.

Offline

#4 2012-02-21 19:11:58

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

Re: GRUB2 Graphics Mode doesn't work

grub2 does not use vbemode. You should use GRUB_GFXMODE

Offline

#5 2012-02-21 22:55:16

mcicak
Member
From: Novi Sad, Serbia
Registered: 2010-11-30
Posts: 22

Re: GRUB2 Graphics Mode doesn't work

the.ridikulus.rat wrote:

grub2 does not use vbemode. You should use GRUB_GFXMODE

I first tried with GRUB_GFXMODE, but in GRUB2 Wiki it says "If this example does not work for you try to replace gfxmode="1024x768x32" by vbemode="0x105".", so I tried even with vbemode, but no success. Now, I'm back on GRUB_GFXMODE, but it still won't show the right resolution, and like I sad, the first time I installed GRUB2, it worked well.

I think it is something about my /etc/default/grub file that's wrong, but I'm not sure what?

Offline

#6 2012-02-22 00:45:35

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: GRUB2 Graphics Mode doesn't work

Did you edit mkinitcpio.conf and regenerate the kernel image?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2012-02-22 09:41:12

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

Re: GRUB2 Graphics Mode doesn't work

I think the wiki is pretty clear on it.

Press "c" at the GRUB 2 prompt and type vbeinfo. If "1024x768x32" is supported (which I'm guessing it is), boot into Arch and go ahead and use it:

sudo nano /etc/default/grub
# 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=1024x768x32
sudo grub-mkconfig -o /boot/grub/grub.cfg

My guess is you only ran sudo grub-mkconfig instead of specifying the output file, which only flashed for a second in the terminal and you thought it was done.

Here, just to double check, you can peruse your grub.cfg for the resolution:

...
if loadfont /boot/grub/unicode.pf2 ; then
  set gfxmode=1024x768x32
  load_video
  insmod gfxterm
...

Yup. It's there. You're good to go.

Last edited by DSpider (2012-02-22 09:44:58)


"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

#8 2012-02-22 16:38:08

mcicak
Member
From: Novi Sad, Serbia
Registered: 2010-11-30
Posts: 22

Re: GRUB2 Graphics Mode doesn't work

DSpider wrote:

I think the wiki is pretty clear on it.
Press "c" at the GRUB 2 prompt and type vbeinfo. If "1024x768x32" is supported (which I'm guessing it is), boot into Arch and go ahead and use it:

I did that and 1024x768x32 was listed among other resolutions. I tried setting many of those resolutions via GRUB_GFXMODE and later with vbemode, but no change happens.

My guess is you only ran sudo grub-mkconfig instead of specifying the output file, which only flashed for a second in the terminal and you thought it was done.

I always specify an output file, I even check the generated file. I tried changing grub.cfg manualy and setting a resolution but still no changes.

I did however installed grub-customizer. Could grub-customizer somehow affect this?

Offline

#9 2012-02-22 16:40:32

mcicak
Member
From: Novi Sad, Serbia
Registered: 2010-11-30
Posts: 22

Re: GRUB2 Graphics Mode doesn't work

cfr wrote:

Did you edit mkinitcpio.conf and regenerate the kernel image?

No. Here is content of my mkinitcpio.conf:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES=""

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run first, so it may be used to
# override the actual binaries used in a given hook.
# (Existing files are NOT overwritten if already added)
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options
# like so:
#    FILES="/etc/modprobe.d/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS="base udev autodetect pata scsi sata filesystems"
#
##   This is identical to the above, except the old ide subsystem is
##   used for IDE devices instead of the new pata subsystem.
#    HOOKS="base udev autodetect ide scsi sata filesystems"
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS="base udev pata scsi sata usb filesystems"
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS="base udev pata mdadm encrypt filesystems"
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev usb lvm2 filesystems"
HOOKS="base udev autodetect pata scsi sata filesystems usbinput"

# COMPRESSION
# Use this to compress the initramfs image. With kernels earlier than
# 2.6.30, only gzip is supported, which is also the default. Newer kernels
# support gzip, bzip2 and lzma. Kernels 2.6.38 and later support xz
# compression.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""

Offline

#10 2012-02-22 17:07:07

mcicak
Member
From: Novi Sad, Serbia
Registered: 2010-11-30
Posts: 22

Re: GRUB2 Graphics Mode doesn't work

Can you guys paste here your own grub.cfg and /etc/default/grub files so that I can compare them througly?

If not, can you at least check your GRUB_TERMINAL_INPUT and GRUB_TERMINAL_OUTPUT values? Does it say "console" or "gfxterm"?

Thank you.

Offline

#11 2012-02-22 22:20:10

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: GRUB2 Graphics Mode doesn't work

No point in showing you mine - it doesn't work for me either. But I haven't tried very hard to get it to work so it isn't very surprising.

I asked about mkinitcpio.conf because I believe that for my video, I have to load the driver early by specifying it there and thus getting it included in the kernel image. I'm not sure. These instructions are for grub but I was assuming it would apply for grub2, as well: https://wiki.archlinux.org/index.php/In … Setting.29.

I could well be wrong, though. Like I said, I haven't tried much to get this to work. I was so pleased to get my machine to boot at all that I haven't really worried much about the appearance during boot - I'm just too glad it is working! I'd quite like to get native resolution earlier, mind, but not really bothered about graphics.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#12 2012-03-10 15:40:54

bluTaz
Member
Registered: 2011-01-11
Posts: 15

Re: GRUB2 Graphics Mode doesn't work

have you tried using 'video=' option? Like so in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet video=1366x768 video=LVDS1:d i915.modeset=1"

For me, this makes grub output its max supported resolution, since it doesn't support 1366x768, but switches to it as soon as the kernel is loaded, making my TTYs a nice native resolution for me to play on.

Last edited by bluTaz (2012-03-10 15:41:40)


“Knowledge comes by eyes always open and working hands; and there is no knowledge that is not power.”
                    ~ Ralph Waldo Emerson

Offline

#13 2012-03-10 16:18:23

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

Re: GRUB2 Graphics Mode doesn't work

Nah, the TTY hi-res is because the "i915" chipset (Intel GMA) can use KMS:
https://wiki.archlinux.org/index.php/KMS

Which, by the way:

At first, note that for any method you use, you should always disable:

    Any "vga=" options in your bootloader as these will conflict with the native resolution enabled by KMS.
    Any "video=" lines that enable a framebuffer that conflicts with the driver.
    Any other framebuffer drivers (such as uvesafb).


"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

#14 2012-03-10 16:38:22

bluTaz
Member
Registered: 2011-01-11
Posts: 15

Re: GRUB2 Graphics Mode doesn't work

without the video=1366x768, ttys expand beyond my monitor. Been using these options for over a year without issue. I read all of that well and none of it works for me without video options.

**Edit: Just doubled checked, almost been a year now tongue

Original post

Last edited by bluTaz (2012-03-10 16:49:27)


“Knowledge comes by eyes always open and working hands; and there is no knowledge that is not power.”
                    ~ Ralph Waldo Emerson

Offline

#15 2012-03-10 16:51:23

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

Re: GRUB2 Graphics Mode doesn't work

bluTaz, I don't have an Intel onboard video card, but I think you should add "i915" in MODULES from /etc/mkinitcpio.conf instead of specifying it from GRUB: https://wiki.archlinux.org/index.php/In … Setting.29

I have an onboard Geforce 7025 and have "nouveau" in there. So, yeah... No need for a kernel parameter. That just complicates things.


"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

#16 2012-03-10 16:56:10

bluTaz
Member
Registered: 2011-01-11
Posts: 15

Re: GRUB2 Graphics Mode doesn't work

it is, specifying it just makes sure it loads, scroll down from your link and it shows where I got it from, since it never did on its own.


“Knowledge comes by eyes always open and working hands; and there is no knowledge that is not power.”
                    ~ Ralph Waldo Emerson

Offline

#17 2012-03-10 17:09:57

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

Re: GRUB2 Graphics Mode doesn't work

Modesetting is the default, so you don't need to specify it. Only if you wish to deactivate it, but in the case of intel and nouveau it means X won't work. Only the radeon X driver still has UMS support, but only for pre-Evergreen cards.

And you don't even need to put anything in MODULES, that's just for cosmetics - KMS will load earlier if you do.

Offline

#18 2012-03-10 17:32:21

bluTaz
Member
Registered: 2011-01-11
Posts: 15

Re: GRUB2 Graphics Mode doesn't work

I put it in MODULES to get rid of the ugly big text that would take a while to switch to my native resolution. However, it didn't work until I specified as a kernel option, which made it fix as soon as the kernel was loaded. The video options were necessary to force my native resolution in ttys, and to stop my monitor from going on/off during the boot process (disabling LVDS1). Anyhow, just thought I'd offer a suggestion, my resolution works just fine as is afaik. Monitor displays native resolution from kernel loaded to shutdown.


“Knowledge comes by eyes always open and working hands; and there is no knowledge that is not power.”
                    ~ Ralph Waldo Emerson

Offline

#19 2012-03-10 17:45:00

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

Re: GRUB2 Graphics Mode doesn't work

It should work if you remove the i915.modeset=1 part. It's the default. Keep the video= stuff, it seems you have a quirky machine that requires it.

Offline

#20 2012-03-10 17:55:29

bluTaz
Member
Registered: 2011-01-11
Posts: 15

Re: GRUB2 Graphics Mode doesn't work

hmmm, guess it starts early without it now. Cheers, smile


“Knowledge comes by eyes always open and working hands; and there is no knowledge that is not power.”
                    ~ Ralph Waldo Emerson

Offline

#21 2012-03-10 18:26:56

bluTaz
Member
Registered: 2011-01-11
Posts: 15

Re: GRUB2 Graphics Mode doesn't work

oh, yeah. Seems taking it off has made my cpu's lower than they've been in a long time, I don't even see firefox in htop, which normally runs %10-40. smile


“Knowledge comes by eyes always open and working hands; and there is no knowledge that is not power.”
                    ~ Ralph Waldo Emerson

Offline

Board footer

Powered by FluxBB