Activity log for bug #392795

Date Who What changed Old value New value Message
2009-06-27 05:36:54 Norm Pierce bug added bug
2009-06-27 05:36:54 Norm Pierce attachment added Patch to make usplash restore all VGA registers http://launchpadlibrarian.net/28451713/restore_all_regs.patch
2009-06-27 05:39:15 Norm Pierce attachment added Patch to make usplash restore Color Plane Enable Register http://launchpadlibrarian.net/28451755/restore_cpe_reg.patch
2009-06-27 05:50:43 Norm Pierce 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-2.6.27-14-generic, Version: 2.6.27-14.33 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_all_regs.patch", simply restores the code that restores all of the VGA registers. The other patch, "restore_cpe_reg.patch", restores only the Color Plane Enable Register -- the one register that relates to this bug. I think the first patch is probably the better patch, and could make usplash a little more robust by possibly preventing other bugs from cropping up in the future due to registers that were not restored. On the other hand, there is something to be said for making the smallest change necessary to fix a bug, and thus reduce the chances of creating others, which is why I've included the second patch. This problem is mentioned by Uwe Geuder in a comment to LP:355057: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/355057/comments/12 Reports for other bugs that also happen to mention a similar problem which may or may not be related to this bug: https://bugs.launchpad.net/bugs/303561 https://bugs.launchpad.net/bugs/159053 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/console-setup 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 right, you have this bug. 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-2.6.27-14-generic, Version: 2.6.27-14.33 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_all_regs.patch", simply restores the code that restores all of the VGA registers. The other patch, "restore_cpe_reg.patch", restores only the Color Plane Enable Register -- the one register that relates to this bug. I think the first patch is probably the better patch, and could make usplash a little more robust by possibly preventing other bugs from cropping up in the future due to registers that were not restored. On the other hand, there is something to be said for making the smallest change necessary to fix a bug, and thus reduce the chances of creating others, which is why I've included the second patch. This problem is mentioned by Uwe Geuder in a comment to LP:355057: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/355057/comments/12 Reports for other bugs that also happen to mention a similar problem which may or may not be related to this bug: https://bugs.launchpad.net/bugs/303561 https://bugs.launchpad.net/bugs/159053 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/console-setup 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.
2009-07-04 11:47:34 Norm Pierce bug watch added http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=528357
2011-03-24 02:34:26 Phillip Susi usplash (Ubuntu): status New Invalid