Public bug reported:

Binary package hint: linux-image-2.6.27-7-generic

In Ubuntu 8.10, when using the VGA console driver (no framebuffer).  If
you load a new font into one virtual console that has a unimap that
differs from the unimap used by the font in another virtual console,
some characters subsequently entered in the other virtual console will
not be mapped correctly to the font.

To reproduce this problem:
1. If your console is currently using the framebuffer driver, not VGA, boot 
8,10 live CD, using nofb option if necessary.
2. Go to any virtual console.
3. If necessary, issue unicode_start to ensure you are in UTF-8 mode.
4. setfont Uni1-Fixed16
5. echo -e "\xc2\xb0"
6. Observe that the degree symbol is displayed.  This is good.
7. Go to another virtual console.
8. setfont Uni2-Fixed16
9. Return to previous virtual console.
10. echo -e "\xc2\xb0"
11. Observe that the symbol displayed in now incorrect.

It appears that around the time of Ubuntu 8.04, some code was added (as
an "UBUNTU SAUCE" enhancement) to complete_change_console() in
drivers/char/vt_ioctl.c.  This code saves the current font when
switching away from a virtual console, and restores it when switching
back.  So far, so good.

Traditionally the VGA console driver supported one font for all virtual
consoles.  (I believe this is still the case with a stock kernel.)
Since all consoles shared a single font, they also shared a single
unimap.  However, the code in drivers\char\vt.c supports multiple
unimaps so that another driver (e.g., the framebuffer console driver)
can use them.  In vt.c, visual_init() initializes vc->vc_uni_pagedir_loc
to point at vc->vc_uni_pagdir, so that each console can have its own
unimap.  After doing that it calls vc->vc_sw->con_init().

When using the VGA console driver, that call goes to vgacon_init() in
drivers/video/console/vgacon.c.  That function changes
.vc_uni_pagdir_loc in the vc_data structure to point at
vga_unimap_pagedir, the single unimap shared by all VGA virtual
consoles.

So we have multiple fonts sharing a single unimap.

I've only tested this with Intrepid, but it looks like the font
save/restore code was added to 8.04 and 9.04 as well.

Norm Pierce

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
VGA console supports multiple fonts but not multiple unimaps.
https://bugs.launchpad.net/bugs/385964
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to