Some characters always display highlighted on VGA console.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
usplash (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: usplash
Ubuntu 8.10
Linux 2.6.27-14-generic #1 SMP Wed Apr 15 18:59:16 UTC 2009
linux-image-
usplash, Version 0.5.25
After booting a recent kernel with usplash ("splash") and no frame buffer ("nofb"), when using 512-character console fonts (like Uni1-Fixed16), glyphs in the second half of the font are always displayed highlighted (that is, bright white, not dull white). This can best be seen by switching to the console immediately after booting and running showconsolefont. (If you have not patched the kernel to fix the font corruption issue with the 512-character fonts, you may need to first run setfont Uni1-Fixed16 to see all of the characters.)
Some background: Normally, in text mode, the VGA hardware can only display 256 unique characters, since only 8 bits are available for each character in text memory. In order to display 512 unique characters, a bit must be "stolen" from the attribute memory, which normally is used for the character's foreground and background colors. The bit that is "stolen" is normally used to define the brightness of the character's foreground color. In fact, thanks to this bug, we see that it still can affect the character's brightness even after it has been "stolen". In order to get all 512 characters to be displayed at the same intensity, the kernel clears a bit in the VGA's Color Plane Enable Register to disable the corresponding bit plane. Now when a binary 1111 (bright white) is passed to the color palette, only 0111 (dull white) gets through.
At boot time, console-setup is run very early, even before usplash. If the font loaded by console-setup is a 512-character font, the kernel clears the necessary bit, as discussed above. Then usplash runs, switches to a graphics mode, does its thing, then exits. When it exits it puts the console back into text mode and restores the font to the VGA memory, but it never restores the VGA registers. Most of the VGA registers are set up fine, just by switching to text mode, but not the one we are interested in here.
Oddly enough, usplash does save the VGA registers -- it just never restores them. It did up until a few years ago, but that was changed.
I am including a couple of patches for consideration. Either one should fix the problem. One patch, "restore_
This problem is mentioned by Uwe Geuder in a comment to LP:355057:
https:/
Reports for other bugs that also happen to mention a similar problem which may or may not be related to this bug:
https:/
https:/
Note that this problem does not occur when booting the 8.10 Live CD. This is only because there was a problem with an initramfs script which prevented the font from being loaded before usplash was run. That problem was fixed last November. So you need a kernel newer than that to test this.
To reproduce:
1. grep CODESET /etc/default/
2. If CODESET is not a 512-character codeset (like Uni1, Uni2, or Uni3), run
sudo dpkg-reconfigure console-setup
to change it.
3. Ensure that the /boot/initrd... file that you boot with was the one that was
updated by dpkg-reconfigure (it isn't always)
4. Boot using the nofb and splash options. (You have a recent kernel, right?)
5. Wait for system to fully boot up, then switch to a text console and log-in.
6. showconsolefont
7. Ignore the garbage between the columns of characters -- that's another bug.
8. If the 256 characters on the right are missing or trashed, run
setfont Uni1-Fixed16
9. If the 256 characters on the right are brighter than the 256 on the left,
you have this bug.
description: | updated |
Another bug resulting from the fact that usplash doesn't restore the VGA registers is LP:395374.
Either of the two patches that I attached to that bug report should fix both that bug and this one. The first patch above will also fix both bugs, but the second, "Patch to make usplash restore Color Plane Enable Register", will only fix this bug, so one of the other patches is preferred.
All patches have worked fine for me, but whichever patch, if any, is used, I hope that someone who knows the code better than I do will look it over to see if any handshaking is necessary to prevent usplash and the kernel from trying to write to the VGA registers at the same time.
(By the way, the "garbage" mentioned in step 7 above, that is displayed by showconsolefont with some recent kernels, should be eliminated by kernel 2.6.30. See http:// bugs.debian. org/cgi- bin/bugreport. cgi?bug= 528357 for details.)