Grub2BootFramebuffer

Differences between revisions 3 and 4
Revision 3 as of 2010-05-10 15:36:22
Size: 3638
Editor: 217
Comment: Fix link to spec
Revision 4 as of 2010-05-18 17:21:11
Size: 4616
Editor: 82-69-40-219
Comment: dump from UDS
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 * '''Contributors''': ColinWatson, ScottJamesRemnant  * '''Contributors''': ColinWatson, ScottJamesRemnant, MatthewGarrett, ColinKing, MichaelFrey, ...
Line 11: Line 11:
GRUB2 supports programming a VBE mode in the boot loader and telling the kernel about it, causing the kernel to use efifb. With Linux 2.6.34, efifb can hand over smoothly to a KMS driver, allowing us to assemble all of this into something very close to a flicker-free boot splash process. GRUB2 supports programming a VBE mode in the boot loader and telling the kernel about it, causing the kernel to use a framebuffer at boot. With Linux 2.6.34, vesafb/efifb can hand over smoothly to a KMS driver, allowing us to assemble all of this into something very close to a flicker-free boot splash process.
Line 21: Line 21:
We want a smooth boot experience. In the process, we want to not break all the fiddly stuff - non-KMS, suspend/resume, etc. We would like to get to the point where users can be in graphical mode throughout the entire boot, particularly to cover the several seconds (sometimes more) of blank screen before Plymouth.
Line 23: Line 23:
== User stories == We currently come up in text mode, but have to switch to graphics before we can go to splash. A high-resolution console is preferable as early as possible as we can then do it only once, and therefore do *less*. If we always had a framebuffer, we would have to do this exactly once, so we could always do graphics: win. We would also have better fallback options available: X could fall back to the framebuffer. It should be noted that almost all other architectures are framebuffer from the start, so this would bring x86 into line with them.
Line 25: Line 25:
== Assumptions == In the process of all of this, we want to not break all the fiddly stuff - non-KMS, suspend/resume, etc.
Line 30: Line 30:

== Implementation ==

This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:

=== UI Changes ===

Should cover changes required to the UI, or specific UI that is required to implement this

=== Code Changes ===

Code changes should include an overview of what needs to change, and in some cases even the specific details.

=== Migration ===

Include:
 * data migration, if any
 * redirects from old URLs to new ones, if any
 * how users will be pointed to the new way of doing things, if necessary.
Line 64: Line 45:
== Notes from pre-BoF == == Notes from BoF ==
Line 67: Line 48:
 * Change GRUB packaging to use efifb by default if we have a new enough kernel   * get the patch kit together in a PPA [canonical-kernel-team]
* Change GRUB packaging to use vesafb by default if we have a new enough kernel
Line 69: Line 51:
 * Plymouth needs to cope with framebuffer mode change (probably just a bug fix, Scott thinks Plymouth's design is already sufficient)
 * Quirk pm-utils to do VBE state/mode save/restore when using efifb (and vesafb)
  * actually, for now we might be better off keeping it simple
 *
Plymouth needs to cope with framebuffer mode change (probably just a bug fix; Scott thinks Plymouth's design is already sufficient)
 * Quirk pm-utils to do VBE state/mode save/restore when using efifb or vesafb
  * we will be relying on quirking here and VT switching to ensure suspend/resume will restore the video
Line 72: Line 56:
  * may be able to generate the images on the fly
Line 73: Line 58:
 * Build fbcon into the kernel on all architectures (already done on ports)  * Build fbcon (and vesafb) into the kernel on all architectures (already done on ports) [canonical-kernel-team]
  * this is likely to require a mode change to a non-vesa native mode (leaving us with the same number of mode switches)
 * Visual indication if we wind up on fbdev as a fallback (replacing old failsafe X)
 * GRUB apparently fails to set VESA modes on some hardware (Michael Frey)
 * Modern NVIDIA cards can set modes, but can't restore them after resume; fortunately these cards are supported by nouveau (but this means that this wouldn't work with the nv driver, although nvidia-glx would work)

Summary

GRUB2 supports programming a VBE mode in the boot loader and telling the kernel about it, causing the kernel to use a framebuffer at boot. With Linux 2.6.34, vesafb/efifb can hand over smoothly to a KMS driver, allowing us to assemble all of this into something very close to a flicker-free boot splash process.

Release Note

This section should include a paragraph describing the end-user impact of this change. It is meant to be included in the release notes of the first release in which it is implemented. (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.)

It is mandatory.

Rationale

We would like to get to the point where users can be in graphical mode throughout the entire boot, particularly to cover the several seconds (sometimes more) of blank screen before Plymouth.

We currently come up in text mode, but have to switch to graphics before we can go to splash. A high-resolution console is preferable as early as possible as we can then do it only once, and therefore do *less*. If we always had a framebuffer, we would have to do this exactly once, so we could always do graphics: win. We would also have better fallback options available: X could fall back to the framebuffer. It should be noted that almost all other architectures are framebuffer from the start, so this would bring x86 into line with them.

In the process of all of this, we want to not break all the fiddly stuff - non-KMS, suspend/resume, etc.

Design

You can have subsections that better describe specific parts of the issue.

Test/Demo Plan

It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during testing, and to show off after release. Please add an entry to http://testcases.qa.ubuntu.com/Coverage/NewFeatures for tracking test coverage.

This need not be added or completed until the specification is nearing beta.

Unresolved issues

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

BoF agenda and discussion

Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.

Notes from BoF

  • Linux 2.6.34, plus https://patchwork.kernel.org/patch/19287/ or equivalent to do fbcon handoff

    • get the patch kit together in a PPA [canonical-kernel-team]
  • Change GRUB packaging to use vesafb by default if we have a new enough kernel
  • Default video mode will be a VBE mode, unless Vladimir manages to import KMS drivers into GRUB as suggested
    • actually, for now we might be better off keeping it simple
  • Plymouth needs to cope with framebuffer mode change (probably just a bug fix; Scott thinks Plymouth's design is already sufficient)
  • Quirk pm-utils to do VBE state/mode save/restore when using efifb or vesafb
    • we will be relying on quirking here and VT switching to ensure suspend/resume will restore the video
  • Suitable GRUB background image, probably reusing Plymouth's logo file (scaling/centring issues?), and set appropriate foreground/background colours
    • may be able to generate the images on the fly
  • Make sure GRUB shows background image even if not showing the menu
  • Build fbcon (and vesafb) into the kernel on all architectures (already done on ports) [canonical-kernel-team]
    • this is likely to require a mode change to a non-vesa native mode (leaving us with the same number of mode switches)
  • Visual indication if we wind up on fbdev as a fallback (replacing old failsafe X)
  • GRUB apparently fails to set VESA modes on some hardware (Michael Frey)
  • Modern NVIDIA cards can set modes, but can't restore them after resume; fortunately these cards are supported by nouveau (but this means that this wouldn't work with the nv driver, although nvidia-glx would work)


CategorySpec

FoundationsTeam/Grub2BootFramebuffer (last edited 2010-12-15 15:12:08 by 82-69-40-219)