Unable to enable framebuffer modes with grub 2

Bug #428519 reported by Alex Valavanis
54
This bug affects 9 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: grub2

With grub on jaunty, I used to be able to add the vga=791 parameter to the kernel boot command to enable a 1024x768x16 display resolution in the console. Now, the vga parameter has been deprecated by the "set gfxpayload" command in grub 2, and this doesn't seem to work on my laptop.

I've tried editing the boot command list from the grub 2 menu and inserting "set gfxpayload=1024x768x16, 1024x768" before the kernel boot command. The system boots successfully, but switching to a console (CTRL+ALT+F1) just gives a blinking cursor in the top-left of on an otherwise black screen.

I'm not an expert with grub 2/kernel parameters, so please let me know what information to attach to help fix this bug.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

$ uname -a
Linux lepton 2.6.31-10-generic #32-Ubuntu SMP Thu Sep 10 23:29:56 UTC 2009 x86_64 GNU/Linux

$ apt-cache policy grub2
grub2:
  Installed: (none)
  Candidate: 1.97~beta2-2ubuntu2
  Version table:
     1.97~beta2-2ubuntu2 0
        500 http://gb.archive.ubuntu.com karmic/universe Packages

Revision history for this message
Paul Thomas (pw1517) wrote :

I am experiencing the same issue. Do you happen to have an NVIDIA graphic card?

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Yes, I do. It's an onboard nvidia chipset on an HP Compaq Presario CQ50-110em laptop.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

I can now use vga=791 although it is painfully slow as described in bug #297704. I'll try gfxpayload shortly

Revision history for this message
Vernon (vernonlyon) wrote :

I have the same issue and have been trying to fix it for hours.
I can set the resolution for the GRUB2 menu using gfxmode=1024x768x16
I can also set the initial resolution for the kernel boot using gfxpayload=keep or gfxpayload=1024x768x16
I even see the resolution change to the desired mode for a while, however the screen remains blank until the kernel switches back to text only 80x30 mode!

After doing dmesg I see this line:
[ 12.831560] Console: switching to colour frame buffer device 80x30
I guess this is where the kernel switched back to text mode (Which is good since the gfx mode just remains blank!)
I'm running Karmic server:
Linux ubuntu 2.6.31-14-generic-pae #48-Ubuntu SMP Fri Oct 16 15:22:42 UTC 2009 i686 GNU/Linux
and
grub-pc 1.97~beta4-1ubuntu3

Revision history for this message
Vernon (vernonlyon) wrote :

I have an update on this issue:
After some more attempts to get grub2 to work I finally gave up and downgraded to grub legacy.
However I still have the same problem!!!
This problem is NOT related to grub (grub legacy or grub2) it's the kernel in karmic!

Both grub versions correctly set the graphics mode you choose, however karmic does not send it's output there!
That's why there are sooo many posts saying that they have a blank screen for a while.
Then during boot, karmic switches the console back to it's own text mode and you can suddenly see all the output from the boot process.

This is somewhat similar to previous versions of Ubuntu.
In jaunty the console output from the kernel boot does NOT go the graphical screen set by grub, until during boot it encounters this: (as seen in dmesg)
[ 6.750050] pci 0000:00:08.0: Boot video device
(I guess this is where the kernel has initialized PCI and is now able to use that to send console output there?)
After this point all the rest of the boot output for the console is displayed in the graphical screen set by grub.
However jaunty does not try to set it's own text mode the way karmic does.

So this bug should not be filed against grub2 but somewhere else, although I don't know where.

Revision history for this message
Sebastian Koch (sebkoch) wrote :

For me everything works fine.
Maybe you couldn't configure it properly.
I've those lines inside grub.cfg:

set gfxmode=1280x800
set gfxpayload=keep
insmod gfxterm
insmod vbe

Revision history for this message
Frank Cheung (fcuk112) wrote :

Sebastian, just out of interest how did you edit grub.cfg? I can't seem to edit mine because even with sudo vi it opens in read-only mode.

Revision history for this message
Felix Zielcke (fzielcke) wrote : Re: [Bug 428519] Re: Unable to enable framebuffer modes with grub 2

Am Dienstag, den 17.11.2009, 07:26 +0000 schrieb FRANK CHEUNG:
> Sebastian, just out of interest how did you edit grub.cfg? I can't seem
> to edit mine because even with sudo vi it opens in read-only mode.
>

vim at least tells you that you can override the read only check with
a !
i.e. :w! or :wq! if you directly want to save and exit it.

--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer

Revision history for this message
Sebastian Koch (sebkoch) wrote :

I use root account and mcedit editor.

Revision history for this message
brx75 (brx75x) wrote :

Same problem.
To edit grub.cfg you must edit files '/etc/grub.d/' and then run 'grub-mkconfig -o /boot/grub/grub.cfg'

Revision history for this message
l-x-l (labouie) wrote :

Same problem. I've edited the appropriate file /etc/grub.d/00_header to "set gfxpayload=1024x768x16". Then ran sudo update-grub to update the grub.cfg file. I then open the grub.cfg file to verify & it is updated. But when I reboot my computer I get the grub2 screen for OS selection, choose Ubuntu, then all I get is a blinking cursor on the upper-left.

I too have a nVidia card. Using the depreciated "vga=791" works.

Revision history for this message
Matt Burgess (matthew-linuxfromscratch) wrote :

I see the same problem. Even just adding "set gfxpayload=640x480", i.e. setting it to the same as the default resolution, is enough to reproduce the blinking cursor in the upper-left corner. I have an Intel 965 Express Chipset video device, in a Compaq 6910p laptop. Karmic is being booted under a VirtualBox-3.1.0 VM on a Windows XP host.

Revision history for this message
Robert Kroes (robert-syskro) wrote :

Ditto. Also running Karmic 9.10 server (no X server) under VirtualBox-3.1.0 (Windows XP Pro Host).When I set gfxmode=1024x768 and gfxpayload=keep and remove "quiet splash" from the "linux" line I still get a blank screen (correct resolution though). System appears to boot okay, but nothing is displayed. Console switching has no effect (ALT-F1/F2/etc or CTRL-ALT-F1/F2/etc). Sending CTRL-ALT-DEL reboots the guest (as expected).

Revision history for this message
aramis (dirkvdb) wrote :

I'm going to add my two cents of advice. I had the problem as well. This is what I did to solve it.

1) in /etc/grub.d, I've added the line set gfxpayload=keep right after set gfxmode=${GRUB_GFXMODE}
2) in /etc/default I've added the line GRUB_GFXMODE=1024x768
3) I ran update-grub, and the grub.cfg file in /boot/grub was changed correctly

After these modifications I got the same issues as meantioned here (blank screen and no console output).
In /var/log/messages I've had these lines : Console: colour dummy device 80x25
and earlier without these changes it said : Console: colour VGA+ 80x25
After checking the /etc/modprobe.d directory, I've discovered a file named blacklist-framebuffer.conf
I've commented all of these, and rebooted the computer.

Now I had the problem discribed by Vernon. It switched back to 80x30. With lsmod I've discovered the kernel loaded the nvidiafb module. My guess was that this module caused the change so I wanted the kernel to load the vesafb module instead (nvidia is VESA compatible right)
So I blacklisted all modules in blacklist-framebuffer.conf again, except the vesafb module. Rebooted the computer again, and now the kernel didn't load any framebuffer modules.

I issued the command : sudo modprobe vesafb and checked the messages logfile again and now a line was added like : Console: switching to colour frame buffer device 128x48. I've checked the monitor on the computer (I did this all with an ssh connection) and now the console was displayed in 1024x768 mode.

To make all this work automatically I added vesafb in /etc/modules, and now the kernel loads this module at startup.

So recap for those who want to solve it without hassle :

1) In /etc/grub.d, add the line set gfxpayload=keep right after set gfxmode=${GRUB_GFXMODE}
2) In /etc/default, add the line GRUB_GFXMODE=1024x768
3) Run update-grub to change the grub.cfg file
4) uncomment the vesafb module in /etc/modprobe.d/blacklist-framebuffer.conf
5) add vesafb in /etc/modules
6) restart the computer

now the issue should be solved.

Revision history for this message
Robert Kroes (robert-syskro) wrote :

Thanks aramis, I can confirm your workaround works on Ubuntu 9.10 Server.

Revision history for this message
l-x-l (labouie) wrote :

Update: I was able to fix my problem by following the instructions step by step found in the 2nd post here.

http://forums.debian.net/viewtopic.php?f=5&t=41881&sid=cad4fe74d13a3ed1e9bc754942ee1825&start=15

Revision history for this message
Philip Muškovac (yofel) wrote :

As of grub2 1.98-1 grub supports a
GRUB_GFXPAYLOAD_LINUX=...
option in /etc/default/grub .
You need to make sure that the vbe module get's loaded though. (Setting GFXMODE seems to take care of that for me)

Revision history for this message
Andrew Cranwell (andrew-cranwell) wrote :

Does this bug still affect any supported release?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Oliver Joos (oliver-joos) wrote :

@Andrew: yes, I still see it in Natty 11.04:
The following 2 lines in /etc/default/grub are supposed to set resolution of grub screen AND framebuffer consoles:
  GRUB_GFXMODE=1024x768
  GRUB_GFXPAYLOAD_LINUX=1024x768
The grub screen resolution changes accordingly, but the framebuffer consoles with Alt+F1..F6 don't!

I found and marked bug 546224 as duplicate.

Revision history for this message
Oliver Joos (oliver-joos) wrote :

"... with Ctrl+Alt+F1..F6" I meant.

Revision history for this message
Oliver Joos (oliver-joos) wrote :

This might help:
If the line 'GRUB_GFXPAYLOAD_LINUX=text' is in /etc/default/grub and I boot with the kernel parameter 'noplymouth' (instead of default 'quiet splash') then the first few messages after the kernel is loaded do appear on a screen with (estimated) VGA size! But only seconds later the resolution changes to the usual maximum of my laptop (1680x1050), and no wonder all the Ctrl+Alt+F1...6 consoles are again 1680x1050 too.
So no matter what GRUB_GFXPAYLOAD or GRUB_GFXPAYLOAD_LINUX is, the resolution of consoles stays at maximum (which in my case is hard to read and memory-consuming).

After some googling and tweaking I bet it is not the fault of grub or the kernel. It is a component that starts a bit later in the boot process, e.g. plymouth.

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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