[karmic] please add config option for 'set gfxpayload' to /etc/default/grub

Bug #416772 reported by Arne Goetje
48
This bug affects 7 people
Affects Status Importance Assigned to Milestone
grub
Unknown
Unknown
grub2 (Debian)
Fix Released
Unknown
grub2 (Ubuntu)
Fix Released
Wishlist
Unassigned
Nominated for Karmic by Andrei B. Borisov

Bug Description

Binary package hint: grub2

Unfortunately my graphics card (Matrox MGA G550) requires the vga=0x031b kernel boot option in order to boot into X with 1280x1024 resolution. Since the vga= kernel boot option is now depreciated, I need to add the 'set gfxpayload=1280x1024x24,1280x1024' command into the linux kernel stance manually everytime I boot/reboot the machine.

Could you please add a configure option in /etc/default/grub, similar to GRUB_GFXMODE ?

Please note that at least with the mga card I have, the kernel boot options 'splash quiet' don't work with this setting. I need to disable those boot options, or I won't get any X at all.

When the gfxpayload setting is in place, however, I just get a black screen during boot until finally gdm comes up. Not sure if this is a bug or intended. Probably a kernel issue?

ProblemType: Bug
Architecture: i386
Date: Fri Aug 21 10:44:08 2009
DistroRelease: Ubuntu 9.10
Package: grub-pc 1.96+20090725-1ubuntu2
ProcEnviron:
 LANGUAGE=en_US.UTF-8
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-6.25-generic
SourcePackage: grub2
Uname: Linux 2.6.31-6-generic i686

Related branches

Revision history for this message
Arne Goetje (arnegoetje) wrote :
Changed in grub2 (Debian):
status: Unknown → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

We probably oughtn't to expose this to any significant number of users until said kernel issue is resolved. For details, see:

  https://lists.ubuntu.com/archives/kernel-team/2009-August/006773.html

Note that there are more configuration files available than just /etc/default/grub, although they're harder work to edit (that's why /etc/default/grub exists, with the easy options), so you do have a workaround available: you can edit /etc/grub.d/10_linux, look for the linux_entry function definition, and add whatever gfxpayload line you like just before the "linux ${rel_dirname}/..." line.

Changed in grub2 (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
mabawsa (mabawsa) wrote :

I tried to add the the set gfxpayload=1280x800x24 prior to the linux command but the console and splash display in 640x480. Here is my /etc/grub.d/10_linux, linux_entry function. I would like to get this working as now the boot experience is just plain ugly:

linux_entry ()
{
  cat << EOF
menuentry "$1" {
EOF
  if [ "x$3" = "xquiet" ]; then
    cat << EOF
 set quiet=1
EOF
  fi
  save_default_entry | sed -e "s/^/\t/"
  prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
  cat << EOF
 set gfxpayload=1280x800x24
 linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro $2
EOF
  if test -n "${initrd}" ; then
    cat << EOF
 initrd ${rel_dirname}/${initrd}
EOF
  fi
  cat << EOF
}
EOF
}

Revision history for this message
vmc (vmclark) wrote :

I did what Colin Watson suggested in post#2. Karmic worked ok, but jaunty did not.
From grub.cfg:
menuentry "jaunty (/dev/sda7) (on /dev/sda9)" {
 insmod ext2
 set root=(hd0,9)
 search --no-floppy --fs-uuid --set 5d67fd00-0856-4ce1-b278-9acf3e926a5c
 gfxpayload=1024x768
 linux /boot/vmlinuz-2.6.28-14-generic root=UUID=5d67fd00-0856-4ce1-b278-9acf3e926a5c ro splash
 initrd /boot/initrd.img-2.6.28-14-generic
}

I get no output until boot complete. If I remove splash, I still receive no output. If I add vga=773 to end of kernel line I get the "depreciated" message but I get a splash output as expected.

Grub2 is installed on karmic partition.

Revision history for this message
mabawsa (mabawsa) wrote :

OK once I switch to set gfxpayload=1280x800 (removing the x24) or 1024x768 all my consoles become a garbled mess. The 1280x800x24 (correct for my DELL M1330 laptop) shows up with a 640x480 console post grub2 menu. Using x8 causes a more ordered grid like mess on the consoles.

Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

I think that both gfxmode and gfxpayload should be tied up together.

Its true that for some the gfxmode doesn't work.

@mabawsa, some hints I know.

grub can only set the video mode through bios.
It often happens that bios doesn't expose the native resulution of the laptop, but only a list of well known resulutions.
Usually this is 640x480, 800x600,1024x768,....

So, when you try 1280x800, your bios reject it.
So I guess it would be safe to use 1024x768 (or 800x600 for small screens).

Now you say a garbaged mess. I know why this happens.

Grub puts console in graphical mode, kernel also knows it is in the graphical mode, but then something (usplash I am looking at you) tells the graphic card to go back to the text mode, but the kernel doesn't know anything about it.

Try booting without 'splash' boot option

What graphical card you have?

Revision history for this message
Maxim Levitsky (maximlevitsky) wrote :

I think that it is best to add
set gfxpayload = keep
if the gfxmode is set.

Revision history for this message
mabawsa (mabawsa) wrote :

The actual grub2 screen where you select OS, etc works well in 1280x800x24. Its only the terminals that get messed up.
I tried what you suggested and I still get a garbled screen.
Interestingly since the yesterdays updates it says it cant find terminal early in the boot process.
My graphics card is a nvidia G8400 256 mbyte.
I guess this issue is a completely different from the original post so I opened another bug. Bug #443105

Revision history for this message
emarkay (mrk) wrote :

This is something that is more relevant with legacy cards, but yes, I agree there needs to be a clear, defined way to adjust resolution in both the boot process and when the GUI (X) starts, before any drivers or video configuration settings are adjusted there, in the final Karmic release.

Revision history for this message
joblessinusa (wmopayne) wrote :

 I DON'T KNOW IF THIS IS THE RIGHT PLACE FOR THIS ONE BUT HERE GOES:

WHEN I BOOT AN UBUNTU 9.04 OR 9.10 DISK ALL I GET IS CROSS HATCHING ON MY MONITOR. NO
INTELLIGIBLE INFORMATION. AND SO NO INSTALL. HOW EVER WHEN I TRY TO BOOT LINUX MINT 7
IT'S NICE ENOUGH TO ALLOW HARDWARE DETECTION. IT GOES ON FROM THERE TO THE LIVE CD DESKTOP.

I HAVE GIVEN UP ON UBUNTU BECAUSE OF THIS "PROBLEM". NO USABLE DESKTOP=NO USABLE OS...

HOW DO I "TRICK" UBUNTU INTO DOING A HARDWARE DETECTION INSTALL? NOW, SOMETHING EASY!
I DON'T WANT TO JUMP THROUGH A LOT OF COMMAND LINE HOOPS!
MY MACHINE IS OF VERY RECENT MANUFACTURE. HAS A AMD 5050E DUAL CORE CPU. DDR2 800 MEMORY AND SO ON.

<email address hidden>

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 416772] Re: [karmic] please add config option for 'set gfxpayload' to /etc/default/grub

On Mon, Nov 09, 2009 at 02:06:22AM -0000, joblessinusa wrote:
> I DON'T KNOW IF THIS IS THE RIGHT PLACE FOR THIS ONE BUT HERE GOES:

Your problem does not seem to have anything to do with this bug. Also,
please disengage your Caps Lock key.

Revision history for this message
joblessinusa (wmopayne) wrote : Re: [Bug 416772] Re: [karmic] please add config option for 'set gfxpayload' to /etc/default/grub

I H A T E L I N U X . . .

On Mon, Nov 9, 2009 at 7:19 AM, Colin Watson <email address hidden> wrote:

> On Mon, Nov 09, 2009 at 02:06:22AM -0000, joblessinusa wrote:
> > I DON'T KNOW IF THIS IS THE RIGHT PLACE FOR THIS ONE BUT HERE GOES:
>
> Your problem does not seem to have anything to do with this bug. Also,
> please disengage your Caps Lock key.
>
> --
> [karmic] please add config option for 'set gfxpayload' to /etc/default/grub
> https://bugs.launchpad.net/bugs/416772
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.0 KiB)

This bug was fixed in the package grub2 - 1.98-1ubuntu1

---------------
grub2 (1.98-1ubuntu1) lucid; urgency=low

  * Resynchronise with Debian (bug-fixes relative to previous snapshot
    release). Remaining changes:
    - Adjust for default Ubuntu boot options ("quiet splash").
    - Default to hiding the menu; holding down Shift at boot will show it.
    - Set a monochromatic theme for Ubuntu.
    - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
      recovery mode, quiet option, tweak how memtest86+ is displayed, and
      use UUIDs where appropriate.
    - Conflict with grub (<< 0.97-54) as well as grub-legacy.
    - Fix backslash-escaping in merge_debconf_into_conf.
    - Remove "GNU/Linux" from default distributor string.
    - Add crashkernel= options if kdump and makedumpfile are available.
    - If other operating systems are installed, then automatically unhide
      the menu. Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus
      if available to check whether Shift is pressed. If it is, show the
      menu, otherwise boot immediately. If keystatus is not available, then
      fall back to a short delay interruptible with Escape.
    - Allow Shift to interrupt 'sleep --interruptible'.
    - Don't display introductory message about line editing unless we're
      actually offering a shell prompt. Don't clear the screen just before
      booting if we never drew the menu in the first place.
    - Remove some verbose messages printed before reading the configuration
      file.
    - Suppress progress messages as the kernel and initrd load for
      non-recovery kernel menu entries.
    - Keep the loopback file open so that subsequent changes to the "root"
      environment variable don't affect it.
    - Change prepare_grub_to_access_device to handle filesystems
      loop-mounted on file images.
    - Ignore devices loop-mounted from files in 10_linux.
    - Show the boot menu if the previous boot failed, that is if it failed
      to get to the end of one of the normal runlevels.
    - Handle RAID devices containing virtio components.
    - Improve DM-RAID probing support.
    - Don't generate /boot/grub/device.map during grub-install by default.
    - Store grub-pc/install_devices as persistent device names under
      /dev/disk/by-id/.
    - Change priority to optional to match the priority of grub.
    - Shave eight bytes off the pre-partition-table part of boot.img.
    - Don't display "GRUB loading" unless Shift is held down.
    - Adjust versions of grub-doc and grub-legacy-doc conflicts to tolerate
      our backport of the grub-doc split.
    - Optimise hostdisk device handling, substantially speeding up
      grub-probe filesystem reads.

grub2 (1.98-1) unstable; urgency=low

  * New upstream release (closes: #572898).
    - Fix grub-script-check to handle empty lines (closes: #572302).
    - Fix offset computation when reading last sectors. Partition reads and
      writes within and outside a partition (closes: #567469, #567884).
    - Fix script execution error handling bug that meant that an error in a
      menuentry's last statement caused the whole menuentry to fail (closes:
     ...

Read more...

Changed in grub2 (Ubuntu):
status: Triaged → Fix Released
Changed in grub2 (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.