needs porting to udev/upstart

Bug #524439 reported by Thierry Carrez
86
This bug affects 17 people
Affects Status Importance Assigned to Milestone
console-setup (Ubuntu)
Fix Released
High
Colin Watson
Lucid
Fix Released
High
Colin Watson

Bug Description

Binary package hint: console-setup

Doing a server install with daily ISO (20100219) , including console-setup 1.34ubuntu10.
Selecting French language / French keyboard, works well during installation. (This also happens with the Dvorak layout)
After installation completes and reboots, console keyboard is set to US.

Running sudo dpkg-reconfigure console-setup with the default preseeded values, I get the french keyboard.
Rebooting, I'm back on US keyboard. (You also get reset the to US keyboard layout when you reboot if you set the layout with sudo loadkeys <keyboard_layout_name> .)

Revision history for this message
Steve Langasek (vorlon) wrote :

Scott, I believe this is fallout from the plymouthification of console-setup; can you look at this for a3?

Changed in console-setup (Ubuntu):
assignee: nobody → Scott James Remnant (scott)
Changed in console-setup (Ubuntu Lucid):
status: New → Triaged
importance: Undecided → High
milestone: none → lucid-alpha-3
tags: added: iso-testing
Colin Watson (cjwatson)
Changed in console-setup (Ubuntu Lucid):
milestone: lucid-alpha-3 → ubuntu-10.04-beta-1
Revision history for this message
Christian Göbel (christiangoebel) wrote :

At least some of the issues reported in the following bug(s) sound similar.
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/401497

Revision history for this message
Colin Watson (cjwatson) wrote :

Christian: people in that bug seem to be mostly talking about the layout in X. That's unrelated to this bug.

Changed in console-setup (Ubuntu Lucid):
assignee: Scott James Remnant (scott) → Colin Watson (cjwatson)
Revision history for this message
TJ (tj) wrote :

I believe this affects not just the server ISO, but all installations. I've linked several other similar bugs as duplicates.

I discovered this issue for the console tty's of an Ubuntu Lucid Alpha 3 Live CD installation.

To solve the issue for the session I used:

setupcon -k

where /etc/default/console-setup contained XKBLAYOUT="gb" (UK-GB layout in this case).

summary: - 20100219 Server ISO fails to set up console keyboard correctly
+ 20100219 Server ISO, 20100224.1 desktop ISO fails to set up console
+ keyboard correctly
description: updated
tags: added: amd64 lucid
Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 524439] [NEW] 20100219 Server ISO fails to set up console keyboard correctly

It would probably be helpful if I explained what I'm planning to do
here.

Firstly, the immediate problem is that console-setup hasn't been
upstartified and is no longer being run it in the initramfs in the
majority of installations (although systems with cryptsetup are a
notable exception). This means that its init scripts are set up such
that they try to run while plymouth is running. Setting the keymap
breaks in this case because plymouth is in raw mode, and setting the
font breaks because the console is in graphics mode.

I am addressing this by converting console-setup to an upstart job; it
turns out that it was already taking some care to save ACMs and fonts to
/etc/ for early use, so having two separate tasks at different points in
the boot sequence doesn't seem necessary any more. This solution isn't
perfectly correct because setting the font races with X startup, but if
we use 'starting on plymouth-splash' (etc.) then I think we'll generally
get away with it until we have better options.

Secondly, the reason I've taken a while to do anything about this bug is
that I wanted to take the opportunity to do something about one of the
kernel limitations alluded to above, namely that it's not possible to
set the font on a graphics-mode console. This isn't fundamentally
impossible - you can save the font and program it later upon switching
to text mode - but unfortunately nobody ever successfully managed to
tell vgacon that, so the ioctls are restricted to stop people breaking
things with them. I've been working on extending vgacon so that this
restriction no longer needs to exist. See this post for more
information:

  https://lists.ubuntu.com/archives/kernel-team/2010-March/009198.html

I think we can probably get away without such a kernel change for Lucid,
but this is something like the third or fourth time I've fixed this type
of bug, and I'm getting fed up with it, so I wanted to spend some time
removing the limitation so that this whole system is less fragile.

Revision history for this message
Martin-Éric Racine (q-funk) wrote : Re: 20100219 Server ISO, 20100224.1 desktop ISO fails to set up console keyboard correctly

I personally don't find the console font not being set in the initrd.img to be such a huge issue, but I definitely NEED the keyboard map to be set there, if only to ensure that I don't go completely nuts whenever trying to rescue a system from within initrd. Honestly, expecting everyone to magically switch mindset to a US keyboard layout to rescue a system, just because someone decided to use a new bootsplash system, is just plain silly. Thus the only half-decent solution really is to split keyboard map and vcons font setting to two different stages.

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 524439] Re: 20100219 Server ISO, 20100224.1 desktop ISO fails to set up console keyboard correctly

On Fri, Mar 05, 2010 at 04:04:54AM -0000, Martin-Éric Racine wrote:
> I personally don't find the console font not being set in the initrd.img
> to be such a huge issue, but I definitely NEED the keyboard map to be
> set there, if only to ensure that I don't go completely nuts whenever
> trying to rescue a system from within initrd. Honestly, expecting
> everyone to magically switch mindset to a US keyboard layout to rescue a
> system, just because someone decided to use a new bootsplash system, is
> just plain silly.

It should surely be quite obvious that this was an accidental
consequence, not a deliberate act. Please don't assume malice in the
first instance ...

It's not a consequence of moving to plymouth as such, either; it's a
consequence of rearranging the boot sequence to avoid blocking initramfs
completion on setting up the console, for boot speed. As I think I made
clear in my previous message, though, it is not really the fault of the
boot speed work, but rather an inherent fragility in the system due to a
kernel limitation, which we were unlucky enough to run into.

The initramfs is already supposed to be set up to set the keymap on
panic, so that you have a working keymap in a rescue shell. If that
isn't working for you, can you file a separate bug about it? It isn't
really the same as this bug.

> Thus the only half-decent solution really is to split keyboard map and
> vcons font setting to two different stages.

They already are two different stages; it's just that neither of them is
working! However, in order to fix this bug (either the one in the bug
description, or the separate problem you report), they don't actually
need to be separate; since nowadays all the necessary data is available
in /etc (thanks to setupcon --save), we can set up both keymap and font
before telling plymouth to show its splash screen.

The font might not matter to you, but it certainly matters to anyone
whose keymap emits characters not in the default VGA font. Even if you
don't need those characters very much when rescuing a system, it's a lot
less confusing if you don't get utter garbage on your screen if you
press the "wrong" key.

Colin Watson (cjwatson)
summary: - 20100219 Server ISO, 20100224.1 desktop ISO fails to set up console
- keyboard correctly
+ needs porting to udev/upstart
Colin Watson (cjwatson)
Changed in console-setup (Ubuntu Lucid):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package console-setup - 1.34ubuntu11

---------------
console-setup (1.34ubuntu11) lucid; urgency=low

  * Move boot tasks to a combination of two udev rules and a single Upstart
    job, ensuring that they're run at points when we are able to satisfy the
    constraints on the relevant ioctls. This may not work optimally with
    vgacon, but you have to go to special effort to use that with Ubuntu
    now, and it at least shouldn't break (LP: #524439).
  * Set default layout for Guernsey, Jersey, and the Isle of Man to gb
    (LP: #533003).
  * Fix incorrect FONT and ACM tests in initramfs script.
  * Depend on kbd (>= 1.15-1ubuntu3) for a valuable loadkeys improvement.
    This was previously a recommends, but the udev rule won't work without
    kbd or console-tools anyway, I'm not really interested in supporting a
    system without either installed, and console-tools is thoroughly
    obsolete now.
 -- Colin Watson <email address hidden> Sat, 13 Mar 2010 12:56:30 +0000

Changed in console-setup (Ubuntu Lucid):
status: In Progress → 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.