Merge lp:~abone/ubuntu/precise/console-setup/fix-433897 into lp:ubuntu/precise/console-setup

Proposed by Andrey Bondarenko on 2012-08-09
Status: Merged
Merge reported by: Colin Watson
Merged at revision: not available
Proposed branch: lp:~abone/ubuntu/precise/console-setup/fix-433897
Merge into: lp:ubuntu/precise/console-setup
Diff against target: 69 lines (+39/-0)
4 files modified
debian/changelog (+10/-0)
debian/console-setup.console-font.upstart (+12/-0)
debian/console-setup.initramfs-confhook (+13/-0)
debian/rules (+4/-0)
To merge this branch: bzr merge lp:~abone/ubuntu/precise/console-setup/fix-433897
Reviewer Review Type Date Requested Status
Colin Watson 2012-09-28 Needs Fixing on 2012-10-09
Ubuntu branches 2012-08-09 Pending
Review via email: mp+118886@code.launchpad.net

Description of the Change

Branch have fixes for broken console fonts for non-latin languages. The issue is reproducible since Maverik (Natty, Oneiric and Precise are affected), but you must ensure cryptosetup package is not installed. It has initramfs conf hook, that unconditionally sets FRAMEBUFFER=y and masks the problem.

I don't have any documentation for FRAMEBUFFER option from initramfs-tools (bug 789141). Changes probably need some review from console-setup and initramfs-tools developers.

To post a comment you must log in.
Dimitri John Ledkov (xnox) wrote :

looks good. There is a typo in the comment 'If /etc/default/grub has "spalsh" option in' s/spalsh/splash/.
Will test and merge if this fixes the problems.

Colin Watson (cjwatson) wrote :

I'd like to have some time to review this before it lands, as this is a very delicate area. I'll try to make time for it next week.

Oliver Grawert (ogra) wrote :

i dont think it is the right approach to forcefully set FRAMEBUFFER=y as soon as splash is set on the commandline, imho the setting of the font should not depend on the type of output ...

also note that FRAMEBUFFER=y installs additional plymouth theme bits in the initrd growing its size by quite a bit.

the better option would be to simply not depend on FRAMEBUFFER for the console-setup hook (if thats doable without breakage) and install it regardless

Andrey Bondarenko (abone) wrote :

I agree that it is better if setting up font does not depend on FRAMEBUFFER, but don't know if OPTION may be safely removed. My knowledge of linux console is rather weak. Will try to test.

Andrey Bondarenko (abone) wrote :

I've tried to remove OPTION=FRAMEBUFFER from init-top/console_setup script. At least it does not break my system. This option was added by Scott James Remnant <email address hidden> in revision 69 on 15th December 2009 with comment "We don't need the initramfs hooks if the initramfs doesn't load the framebuffer or splash screen" Looks like a kind of optimization.

So, I don't mind having console_setup enabled all the time. Another way, if you prefer to save some space in latin locales, is to creaate separate option for console-setup, and enable it regardles of framebuffer usage. For example it can be enabled if /etc/default/locale contains some non-latin locale or /etc/default/console-setup have some "non-default" font setup.

My patch also contains upstart job for console-setup. This job, in my opinion, should be enabled anyway.

Waiting for your feedback.

Colin Watson (cjwatson) wrote :

After some thought, I agree that this Upstart job is the right thing to add, and I'm going to apply this to quantal. Thanks!

I am much less convinced by the proposal to remove OPTION=FRAMEBUFFER (and still less by the proposal to force FRAMEBUFFER=y when splash is enabled; I agree with Oliver on that). I also don't think that creating a separate option for it is the right answer. If the framebuffer isn't enabled for some other reason, then the console-setup script should not need to run in the initramfs at all (except in the case of a panic, which is handled); the fact that this shouldn't be needed is what OPTION=FRAMEBUFFER expresses. It should be sufficient for the corresponding code to run from udev rules and Upstart jobs.

Therefore, if the udev rules and Upstart jobs aren't working properly when there is no framebuffer code in the initramfs, that is what needs to be debugged. I believe this ought to be possible without running console-setup code in the initramfs.

review: Needs Fixing
Colin Watson (cjwatson) wrote :

I have merged the Upstart job part of this into lp:~ubuntu-core-dev/console-setup/ubuntu, which is the development branch we use. For future console-setup work, please branch from and propose to there.

I think it's least confusing (although no option avoids confusion altogether) if I mark this merge proposal as merged at this point, and suggest that you file something separately with whatever arises from my comments about OPTION=FRAMEBUFFER. These seem to be separate issues to some extent, so let's treat them separately.

Andrey Bondarenko (abone) wrote :

Ok, I've tested console-setup version 1.70ubuntu6. I think it will solve the bug 433897 for most users. There is some small issue with mount all and fsck on boot (both print translated messages while font it configured), but I think most people can live with it.

Thank you.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-04-19 16:03:16 +0000
3+++ debian/changelog 2012-08-09 07:25:24 +0000
4@@ -1,3 +1,13 @@
5+console-setup (1.70ubuntu6~ppa1) precise; urgency=low
6+
7+ * debian/console-setup.initramfs-confhook: add initramfs hook with
8+ heuristic on enabling FRAMEBUFFER option (LP: #433897).
9+ * debian/console-setup.console-font.upstart: add upstart job that
10+ sets up console font when plymouth-splash is starting.
11+ (thanks to Ahmed El-Mahmoudy) (LP: #632382).
12+
13+ -- Andrey Bondarenko <abondarenko@users.sourceforge.net> Thu, 09 Aug 2012 12:14:39 +0600
14+
15 console-setup (1.70ubuntu5) precise-proposed; urgency=low
16
17 * Update Ubuntu-specific translations from Launchpad (LP: #985605).
18
19=== added file 'debian/console-setup.console-font.upstart'
20--- debian/console-setup.console-font.upstart 1970-01-01 00:00:00 +0000
21+++ debian/console-setup.console-font.upstart 2012-08-09 07:25:24 +0000
22@@ -0,0 +1,12 @@
23+# console-font - set console font
24+#
25+# Set the console font, this is a workaround the possible race in the udev
26+# rules file with Plymouth
27+
28+description "set console font"
29+
30+start on starting plymouth-splash
31+
32+task
33+
34+exec /lib/udev/console-setup-tty fbcon
35
36=== added file 'debian/console-setup.initramfs-confhook'
37--- debian/console-setup.initramfs-confhook 1970-01-01 00:00:00 +0000
38+++ debian/console-setup.initramfs-confhook 2012-08-09 07:25:24 +0000
39@@ -0,0 +1,13 @@
40+# Since version 1.34ubuntu5 console setup does not install initramfs
41+# script unless FRAMEBUFFER option is set. But initramfs-tools does
42+# not set this option by default, which leads to broken non-latin
43+# fonts in systems where boot splash or KMS is used (LP: #433897).
44+#
45+# Using some heuristic to check host configuration and set
46+# FRAMEBUFFER=y when necessary.
47+
48+# If /etc/default/grub has "spalsh" option in GRUB_CMDLINE_LINUX
49+# assuming that boot splash and setting up console font is necessary
50+if grep -q "^[[:space:]]*GRUB_CMDLINE_LINUX[^#]*['\" \t]splash" /etc/default/grub 2>/dev/null; then
51+ FRAMEBUFFER=y
52+fi
53
54=== modified file 'debian/rules'
55--- debian/rules 2011-11-08 09:34:02 +0000
56+++ debian/rules 2012-08-09 07:25:24 +0000
57@@ -65,8 +65,12 @@
58 $(MAKE) etcdir=debian/console-setup/etc \
59 prefix=debian/console-setup/usr install
60 rm -rf debian/console-setup/etc/console-setup/ckb/
61+ install -d debian/console-setup/usr/share/initramfs-tools/conf-hooks.d
62 dh_install -pconsole-setup Keyboard/pc105.tree \
63 usr/share/console-setup
64+ install -m755 debian/console-setup.initramfs-confhook \
65+ debian/console-setup/usr/share/initramfs-tools/conf-hooks.d/console_setup
66+ dh_installinit --no-start --upstart-only --name console-font
67 dh_installinit --no-start --upstart-only --name setvtrgb
68 install -m 644 debian/vtrgb debian/console-setup/etc/console-setup/
69 install -m 644 debian/vtrgb.vga debian/console-setup/etc/console-setup/

Subscribers

People subscribed via source and target branches