Can't switch to console mode when booting from grub2

Bug #447765 reported by Rocko
108
This bug affects 26 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned
Nominated for Karmic by Rocko

Bug Description

Binary package hint: xorg

In Karmic, I can no longer get a console screen with CTRL-ALT-Fx, eg CTRL-ALT-F1. The screen changes mode to a black screen filled with random coloured pixels and (on some consoles) a flashing single-pixel cursor midway across the screen (pressing ENTER changes the screen somewhat, so it seems to be a screen resolution problem).

It used to work until quite recently in Karmic and it works in Jaunty with the same nvidia drivers.

This looks similar to bug #129910. modprobing the modules suggested there (eg vesafb) doesn't help, though.

ProblemType: Bug
Architecture: amd64
Date: Sat Oct 10 11:49:53 2009
DistroRelease: Ubuntu 9.10
MachineType: Dell Inc. XPS M1530
NonfreeKernelModules: nvidia
Package: xserver-xorg 1:7.4+3ubuntu5
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-13-generic root=UUID=04dd136a-dd4b-418d-be41-813ceb63d3f4 ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-13.43-generic
RelatedPackageVersions:
 xserver-xorg 1:7.4+3ubuntu5
 libgl1-mesa-glx 7.6.0-1ubuntu2
 libdrm2 2.4.14-1ubuntu1
 xserver-xorg-video-intel 2:2.9.0-1ubuntu1
 xserver-xorg-video-ati 1:6.12.99+git20090825.fc74e119-0ubuntu3
SourcePackage: xorg
Uname: Linux 2.6.31-13-generic x86_64
dmi.bios.date: 11/19/2008
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A12
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA12:bd11/19/2008:svnDellInc.:pnXPSM1530:pvr:rvnDellInc.:rn:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: XPS M1530
dmi.sys.vendor: Dell Inc.
fglrx: Not loaded
system:
 distro: Ubuntu
 architecture: x86_64kernel: 2.6.31-13-generic

Revision history for this message
Rocko (rockorequin) wrote :
Bryce Harrington (bryce)
affects: xorg (Ubuntu) → nvidia-graphics-drivers-180 (Ubuntu)
Revision history for this message
Hans B (chonz) wrote :

Hi,
 I have the same problem. But I do not use the nvidia driver. The problem is new.
-Version-
Kernel : Linux 2.6.31-13-generic (x86_64)
Compiled : #43-Ubuntu SMP Fri Oct 9 17:41:46 UTC 2009
C Library : GNU C Library version 2.10.1 (stable)
Default C Compiler : GNU C Compiler version 4.4.1 (Ubuntu 4.4.1-4ubuntu7)
Distribution : Ubuntu karmic (development branch)
-Current Session-

Desktop Environment : GNOME 2.28.0

-display
                description: VGA compatible controller
                product: M92 LP [Mobility Radeon HD 4300 Series]
                vendor: ATI Technologies Inc
                physical id: 0
                bus info: pci@0000:01:00.0
                version: 00
                width: 32 bits
                clock: 33MHz
                capabilities: pm pciexpress msi bus_master cap_list rom
                configuration: driver=fglrx_pci latency=0
                resources: irq:30 memory:d0000000-dfffffff(prefetchable) ioport:2000(size=256) memory:cfef0000-cfefffff

Revision history for this message
Rocko (rockorequin) wrote :

Yes, I also get the problem if I start X without an /etc/X11/xorg.conf file (ie just using the open-source nv driver), so it is independent of nvidia or fglrx.

affects: nvidia-graphics-drivers-180 (Ubuntu) → xorg (Ubuntu)
Revision history for this message
Hans B (chonz) wrote :

Yes, the only working text mode is recovery mode. And I think that works with framebuffer.
Good that fglrx still works...

Revision history for this message
Rocko (rockorequin) wrote :

I tried a fresh installation from the beta live CD, and I can't get a virtual console at all (ctrl-alt-f1 has no effect). I wonder if that is intentional?

Bryce Harrington (bryce)
affects: xorg (Ubuntu) → nvidia-graphics-drivers-180 (Ubuntu)
Revision history for this message
Rocko (rockorequin) wrote :

@Bryce: I'm curious why you've marked this as only affecting the nvidia-180 drivers when (a) it happens on my PC when X is not using the the nvidia driver, and (b) it happens on Hans B's machine which is using an ATI card?

Revision history for this message
Rocko (rockorequin) wrote :

See also bug #447904.

affects: nvidia-graphics-drivers-180 (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Julien Aubin (gojulgarbmail) wrote :

OK marked bug 447904 as duplicate.

One remark : for some configurations including mine, setting the vga parameter in the kernel command line in file /boot/grub/menu.lst solved the issue. In my case this was vga=791. Check what is correct for your system. vga=771 seems to work almoste all time.

Revision history for this message
Rocko (rockorequin) wrote :

Unfortunately vga= doesn't work with grub2 (it's deprecated). Did you manually reinstall grub1 or just refuse to install grub2 when prompted?. I tried some suggested grub2 alternatives (eg set gfxpayload=keep in /etc/grub.d/00_header and setting GRUB_GFXMODE in /etc/default/grub) but it didn't fix the problem.

FWIW, I also get the screen corruption when I suspend, resume, and shut down, ie whenever it switches out of the CTRL-ALT-F7 console.

I have tried the vanilla 2.6.31.3 kernel and it also has the problem. At that point I thought it might be a grub2 issue but if grub1 also has it, perhaps it's an xserver problem? I'll try an older kernel to see if that fixes it.

Revision history for this message
Rocko (rockorequin) wrote :

2.6.31-020631-generic #020631 also has the problem (and it didn't when it was released back on 10th Sept).

Revision history for this message
Benjamin Scranton (bscran) wrote :

After installing a batch of updates this morning I am no longer experiencing this issue although my console definitely did not work last night.

Revision history for this message
Rocko (rockorequin) wrote :

There was an update to 2.6.31-14 today, although I still had the issue afterwards. I think xserver-xorg-core also updated itself.

I applied some more updates, then purged and reinstalled grub2, and rebooted. Now I no longer get the screen corruption - but instead I just get a flashing cursor and no login. ps shows all the tty consoles are running, though. Is this a new bug?

Revision history for this message
Rocko (rockorequin) wrote :

I tried switching to a console using the open-source nv driver rather than the nvidia driver, and the corruption is still present. In fact it was so colourful that I thought I should include a photo of it.

Revision history for this message
Rocko (rockorequin) wrote :

Confirmed it is a grub2 issue, not a kernel issue. I installed grub1 instead, and now I can switch to the tty consoles.

affects: linux (Ubuntu) → grub2 (Ubuntu)
summary: - Can't switch to console mode
+ Can't switch to console mode when booting from grub2
Revision history for this message
Colin Watson (cjwatson) wrote :

gfxmode/gfxpayload in grub2 doesn't really work properly with the kernel yet. vga= works but only if you use linux16/initrd16 rather than the linux/initrd commands.

However, when you installed grub1 instead, did you have to use vga= as suggested in a previous comment? If so, then to be honest this still feels like a kernel bug for not working out of the box.

Revision history for this message
Rocko (rockorequin) wrote :

No, - I've never had to use vga= with grub1, so the kernel is working fine. I also tried removing gfxpayload and it didn't make any difference (I added that to see if it would fix the inability to switch in the first place).

Strangely, I *could* get to the tty consoles from Jaunty if I booted with grub2, but not with Karmic. Something changed recently that stops vga mode working properly with grub2 - not in the kernel, though, because I'm running the same kernel in both.

Also, I can't boot into recovery mode from either Jaunty or Karmic using grub2. I get the first two lines where it says it's booting the kernel image, and then nothing further. Perhaps this is because it can't switch video modes.

Revision history for this message
mabawsa (mabawsa) wrote :

I have two identical laptops (M1330). One with grub 2 cannot display the tty's if gfxpayload is set. One works flawlessly with the terminal at 1280x800 with grub 1 and VGA=0x0361

I think this is a grub2 and karmic issue.

Revision history for this message
meborc (meborc) wrote :

i see this bug confirmed (i can confirm it myself also), but it is assigned to no-one... this means it will probably never get fixed, unless some update from upstream fixes it

should we just wait or try to get someone on the bug team on it?

I'm not sure what is the best course of action with situations like this... and i really miss my high-resolution tty's (especially now when grub2 allows my native 1680+1050...can't wait to try this out)

Revision history for this message
Rocko (rockorequin) wrote :

I tried reinstalling grub2 (I went back to grub1 for a while, partly because of this problem and partly because grub2's update-grub takes an eternity to probe devices) and now I *can* get to a tty console with ctrl-alt-fX. Maybe the act of uninstalling it and reinstalling it fixed whatever the problem was.

Revision history for this message
meborc (meborc) wrote :

i just installed ubuntu 9.10 from WUBI on my work computer... and tty's have nice 1280x1024 resolution

i looked into /etc/default/grub and no resolution is set... the GRUB_GFXMODE is commented out

i looked into /etc/grub.d/00_header and there is no "keep" option

HOW is it possible that i have 1280x1024 resolution in tty virtual console????? where is it set? it shows that it is possible to achieve this with Karmic and that i am unable to find how to do this on my laptop.

Revision history for this message
Cedric Schieli (cschieli) wrote :

@meborc: I guess your work computer has an Intel GPU and thus uses the new KMS magic. This is unfortunately not related to grub and this bug.

Revision history for this message
cazacugmihai (cazacugmihai) wrote :

Hi,

I have also this problem (on DELL XPS M1530 machine).

$ uname - r
2.6.31-17-generic

$ grub-install -v
grub-install (GNU GRUB 1.97~beta4)

[/etc/default/grub]:
GRUB_GFXMODE=1280x800x8

[/boot/grub/grub.cfg]:
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=1280x800x8
  set gfxpayload=keep
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    terminal gfxterm
  fi
fi

Revision history for this message
Rocko (rockorequin) wrote :

@cazacugmihai: I can now switch to a tty console on my XPS M1530 after reinstalling grub2 completely (ie installing grub1 and then reinstalling grub2). The differences I can see between our configurations is that GRUB_GFXMODE is commented out in my /etc/default/grub, and grub.cfg has no 'set gfxpayload=keep' line:

if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi

I'm pretty sure when I couldn't switch to a tty console I had GRUB_GFXMODE set. Does it make a difference if you comment GFXMODE out and run update-grub?

Revision history for this message
cazacugmihai (cazacugmihai) wrote :

@rocko: I have no problem to switch to a tty console. All I want is to be able to increase the tty resolution.
I've tried your advice with no success.

Revision history for this message
Otus (jan-varho) wrote :

I just noticed what I think is the same bug. Whenever I try to switch to a console using e.g. Ctrl+Alt+F1, my display says "no signal" and turns off until I switch back to the desktop. This is newish behavior, though I don't remember exactly when I last needed a console. In any case, it wasn't like this in October when I installed Karmic.

I'm using the open source ati radeon driver and have enabled Proposed updates, in case either makes any difference. I'd be happy to give more info or try something if that would help fix this.

Revision history for this message
chrisp (rhein-ufer-weg) wrote :

I have had the same problem on my LG P300 with an nvidia chip. IMHO this is a problem related to GRUB2, a graphical console and the initrd:

1. I can boot with grub-legacy and the parameter vga=0x0361 no problems (I read the kernel and initrd from an ext3 partition, but set root=(my karmic ext4-partition). grub2 no longer supports 'vga=', you need to use 'set gfxpayload='.

2. If I boot with grub2 and 'set gfxpayload=1280x800', I get the garbled console.

3. grub2 itself works all right in 1280x800 ('set gfxmode=1280x800').

My solution:

It seems that the kernel needs some framebuffer-modules to set the gfxpayload correctly:

a) Edit /etc/initramfs-tools/modules and insert the modules
fbcon
vesafb
vga16fb

b) Edit /etc/modprobe.d/blacklist-framebuffer.conf and comment out with a # the lines
blacklist vesafb
blacklist vga16fb

after editing the lines should look like this:

# blacklist vesafb
# blacklist vga16fb

The kernel does not load the added modules unless you comment the out in the blacklist.

c) Update your initrd:
First make a backup of your current initrd:
cd /boot
sudo cp initrd.img-$(uname -r) initrd.img-$(uname -r).orig
The do the actual update:
sudo update-initramfs -u

d) 'ls -l /boot/initrd.img-$(uname -r)' should now show you your new initrd (check if the date and time are very recent)

e) reboot. You should now have your console back in the mode that you chose with 'set gfxpayload='

f) If anything goes wrong with your reboot because of the new initrd, you need to choose the old initrd in grub2:
when in grub2, press 'e' so you can edit the commands
go to the line starting with 'initrd'
after the file name, add '.orig' so the original file is used
now you should be able to boot

Revision history for this message
cazacugmihai (cazacugmihai) wrote : Re: [Bug 447765] Re: Can't switch to console mode when booting from grub2

Thanks, Chris. That works for me. :o)

Revision history for this message
mabawsa (mabawsa) wrote :

Sorry chrisp didn't work for me. tried the nvidiafb as well but as soon as gfxpayload is set then the tty's are lost.

Revision history for this message
Amit Mendapara (cristatus) wrote :
Revision history for this message
Amit Mendapara (cristatus) wrote :

it's not just about the playmouth but also fixes this annoying TTY issue...

Revision history for this message
Aleksey Vorona (voronaam) wrote :

As stated in comment #9 (and I experienced this myself) this solution doesn't fix the problem. More then that, the fact that it doesn't fix it is the what the bug is about.

Revision history for this message
mabawsa (mabawsa) wrote :
Revision history for this message
Johan Bakker (johan-bakker) wrote :

 http://www.webupd8.org/2010/03/how-to-get-plymouth-working-with-nvidia.html didn't fixed the tty problem (at least for me) but setting set gfxpayload to for instance 1024x768x16 did.

Revision history for this message
mabawsa (mabawsa) wrote :

Johan thanks replacing keep with 1280x800x32 works on my DELL M1330. Looks like GRUB2 is the culprit

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

As we're discussig gfxpayload: since 1.98-1 grub supports a 'GRUB_GFXPAYLOAD_LINUX=1600x1200x32' option in /etc/default/grub. You don't need to edit any files in /etc/grub.d/ anymore. Just make sure you check what modes your gpu supports with vbeinfo in the grub console first. (https://wiki.ubuntu.com/Grub2)

Revision history for this message
Benjamin Tegge (livewirebt) wrote :

I've just tried the following tutorial to fix some Plymouth issues in Lucid with the Nvidia drivers: http://news.softpedia.com/news/How-to-Fix-the-Big-and-Ugly-Plymouth-Logo-in-Ubuntu-10-04-140810.shtml

Just wanted to let you know that this also fixes fixes your tty's for higher resolutions.

Revision history for this message
S Barnes (ironictoo) wrote :

None of the above worked for me, but I finally found a fix
Add the following to /etc/default/grub

GRUB_GFXPAYLOAD_LINUX=text

then run

sudo update-grub

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.