Reducing video mode switching during Linux boot

12

When I boot up my desktop computer, which only has Linux on it, the video mode and/or console font gets switched four times:

  • When GRUB starts, it switches from 80x25 text to a graphical mode so it can draw a pretty background behind its menu;
  • GRUB then goes back to 80x25 text after I pick something from the menu;
  • When the KMS driver for my video card loads, it switches to a much higher-resolution text mode (I don't know if this is a hardware text mode or not);
  • Finally X starts and it goes graphics and stays that way. I think this last switch does not change the resolution of the video mode, only the graphicalness.

I'd like to get rid of as many of these mode switches as possible. Ideally, when GRUB takes over from the BIOS it would go directly to the same high-resolution text mode that the KMS driver selects, and the display would stay in that mode till X starts and brings up graphics. I am under the impression that this is possible by mucking with the kernel command line and/or the GRUB console module load parameters, but I don't know the details.

GRUB 1.98+20100706, kernel 2.6.32.15 using Nouveau video drivers. Distro is Debian unstable. Please no answers that involve recompiling anything or cobbling together bleeding-edge kernel/driver combinations, I don't care enough about this to go to that much trouble.

EDIT: Tobu suggests setting GRUB_GFXMODE to the full pixel resolution of the monitor, and GRUB_GFXPAYLOAD_LINUX=keep to avoid the mode switch after the menu goes away. This does part of what I want, but winds up being worse overall. There's no mode switch after the menu, but there's still a painfully-slow screen repaint (I should probably just give up on GRUB's gfxmode, it's waaaay too slow at 1920x1200). More seriously, there's now a double mode switch when nouveaufb loads, along with fun-looking error messages in dmesg

[    5.923798] [drm] nouveau 0000:02:00.0: allocated 1920x1200 fb: 0x40250000, bo ffff8801ba5f4600
[    5.923802] fb: conflicting fb hw usage nouveaufb vs EFI VGA - removing generic driver
[    5.923821] [drm] nouveau 0000:02:00.0: PFIFO_INTR 0x00000010 - Ch 1
("PFIFO_INTR" message repeats 400+ times)
[    5.925609] Console: switching to colour dummy device 80x25
[    5.925802] Console: switching to colour frame buffer device 240x75
linux
boot
graphics-card
grub
asked on Super User Jul 12, 2010 by zwol • edited Aug 14, 2011 by Tamara Wijsman

3 Answers

2

Plymouth is designed to help in this regards:

The idea is that early on in the boot process the native mode for the computer is set, plymouth uses that mode, and that mode stays throughout the entire boot process up to and after X starts. Ideally, the goal is to get rid of all flicker during startup.

As you only have a single OS installed, disabling the grub resolution changes (no background graphic), and even the menu itself, leaving it 80x25 would result in no change until Plymouth takes over.

answered on Super User Nov 18, 2011 by chris
1

Probe your resolution and your colour depth:

xrandr -q
xdpyinfo | grep 'depth of root window' | awk '{ print $5 }'

Set GRUB_GFXMODE=<width>x<height>x<depth> in /etc/default/grub so that the grub menu resolution matches the KMS resolution.

Maybe add GRUB_GFXPAYLOAD_LINUX=keep to the defaults as well, so that there is no intermediate step after the grub menu and before setting up KMS. X11 should keep what KMS uses, meaning there is no X11 switch to worry about.

Apply your edits with

sudo update-grub
answered on Super User Jul 12, 2010 by Tobu
0

You can have KMS active from just after GRUB, and this usually will include a parameter to the kernel command line that turns it on. For intel, it's i910.modeset=1, but beyond you'd have to check your distribution's docs on this.

answered on Super User Jul 12, 2010 by Daenyth

User contributions licensed under CC BY-SA 3.0