tty console doen't show characters with accent

Bug #133072 reported by Rafael Belmonte
48
This bug affects 4 people
Affects Status Importance Assigned to Milestone
console-setup (Ubuntu)
Confirmed
Medium
Colin Watson
Declined for Intrepid by Brian Murray
Declined for Jaunty by Brian Murray
Nominated for Karmic by Rafael Belmonte
kbd (Ubuntu)
Fix Released
Undecided
Unassigned
Declined for Intrepid by Brian Murray
Declined for Jaunty by Brian Murray
Nominated for Karmic by Rafael Belmonte

Bug Description

In Kubuntu 7.10 tribe 4, tty console (out of X) cannot display characters with accent, also can't display 'ñ' and '€'.
Locale value:

LANG=es_ES.UTF-8
LANGUAGE=es_ES:es:en_GB:en
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=

Thanks for your atention.

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

Does running 'sudo setupcon' at the console fix it? (That would be depressing; I thought I'd nailed this bug a while ago.)

Changed in console-setup:
assignee: nobody → kamion
status: New → Incomplete
Revision history for this message
Y Desmouceaux (yoanndesmouceaux) wrote :

I have the same problem (but with fr_FR.UTF-8), and 'sudo /etc/init.d/console-setup restart' or 'sudo setupcon' fix it.

Revision history for this message
Rodolfo Valeiras (rodoval) wrote :

Hello. 'sudo /etc/init.d/console-setup restart' or 'sudo setupcon' fix it (temporarily), but some special characters (ñ, á,...) are "highlighted" (white instead gray, cyan, instead blue, etc.). Some solution for this? Thanks!

Revision history for this message
Henning Moll (drscott) wrote :

Just want to report that it is possible to reproduce this bug in a virtual vmware machine:

default install of gutsy (select german language).
tty's are not able to view some 'umlauts': 'ö' and 'ü' are not properly viewed, but 'ä'. Also the euro sign is bad.

Character encoding is utf8 and is working. The bad characters can be typed in a file, which shows correctly under X ('file' says 'UTF-8 Unicode text').

after running 'setupcon' (no sudo needed) everything works fine...

Revision history for this message
Henning Moll (drscott) wrote :

Some news: I noticed that i only have to use an additional "sudo setupcon" if i choose a specific codeset within "dpkg-reconfigure console-setup":

If i choose 'Combined - Latin; Slavic Cyrillic; Hebrew; basic Arabic' and restart the system, the german umlauts are not properly shown in a tty. After doing a 'sudo setupcon' they do work. (On my system some of the umlauts are still grey colored and not white as all of the other characters... But i can't reproduce this color issue in a vmware...)

If i choose 'Latin1 and Latin5' and restart the system, everything works perfectly. No additional 'sudo setupcon' needed (no color issue...).

hth

Revision history for this message
Henning Moll (drscott) wrote :

Another solution is to enable the framebuffer. Then it works with 'Combined - Latin; Slavic Cyrillic; Hebrew; basic Arabic' (Uni1) out of the box.

Revision history for this message
Ugra Dániel (daniel.ugra-deactivatedaccount) wrote :

Confirming in Kubuntu Hardy Beta (console-setup 1.21ubuntu4).

The problem seems threefold:

1) After clean install console character set is "Uni1". It should be "Lat2" for hu_HU.
When hacking around in mc on console (eg. change some X setting) it is very annoying that there is no bright attribute (Uni1 has 512 chars).
This can be solved with dpkg-reconfigure console-setup and selecting Lat2 as console character set.

2) With Uni1 character set some accented chars appear brighter. Maybe those with character code >= 256 (bright attribute set).
Maybe this is a feature, not a bug?

3) With Uni1 switching from console to X then back makes characters described in 2) appear as garbage.
Executing setupcon solves the problem.

Changed in console-setup:
status: Incomplete → Confirmed
Revision history for this message
Rafael Belmonte (eaglescreen) wrote :

This bug is present in Kubuntu Intrepid ibex.
tty console cannot display characters as vocals with accent: í, ú,..; 'ñ', or euro '€' symbol.
This is already an old bug in Ubuntu releases. Why is it not fixed yet?

Revision history for this message
cubells (cubells) wrote :

Are you sure?

There is no bug in my Ubuntu Intrepid Ibex (Gnome)...

Revision history for this message
Rafael Belmonte (eaglescreen) wrote :

Yes sure, I am suffering it now in Kubuntu Intrepid ibex. In addiction i think this is also reproducible in Hardy heron, i will confirm this.

Revision history for this message
cubells (cubells) wrote :

""In addiction i think this is also reproducible in Hardy heron, i will confirm this.""

Yes, this is not what I was saying: I can't write especial characters in my tty console in my Ubuntu Hardy, but <b>I have no problem in my Ubuntu Intrepid</b> (gnome).

So we have to guess if it is a kde problem or it is a problem of your system, we haven't?

I have activated proposed and backported repositories. Have you?

Revision history for this message
NeverMind (agathe-durieux) wrote :

Are you try ?

sudo dpkg-reconfigure console-setup

Revision history for this message
Rafael Belmonte (eaglescreen) wrote :

Hi, this is still an issue in 8.10, but as C. Watson said, sudo setupcon fixes the problem, the unique problem is that I need to run sudo setupcon each time I boot Ubuntu.

Revision history for this message
Rafael Belmonte (eaglescreen) wrote :

I can confirm this bug also in Ubuntu 9.04 in two complete different computers (all I have for testing), one is amd64 and the other one is i386.
'sudo setupcon' fixes the problem, but it is necessary to run it each time you log in to a tty.
Both computers have Spanish configuration.

Revision history for this message
David Henningsson (diwic) wrote :

Swedish language, Ubuntu 9.04. ÅÄÖåä works but not ö. If I do "setupcon" the "ö"s show up but they are in white color (all other text is light gray).

Revision history for this message
Rafael Belmonte (eaglescreen) wrote :

I have a similar issue on karmic, tty seems to be set in English keyboard, while my system was installed and configured for Spanish. After running $sudo setupcon, tty is fixed and start to use Spanish keyboard.
But it is the same problem, you need to run setupcon for each time you login on tty.

Revision history for this message
Rafael Belmonte (eaglescreen) wrote :

This is recently fixed for me in some karmic update, unfortunately, i don't know what package update fixed the problem.

Revision history for this message
Henning Moll (drscott) wrote :

I also can't reproduce this anymore in karmic.

Revision history for this message
Andrej Mernik (r33d3m33r-deactivatedaccount) wrote :

This is still an issue with Maverick Meerkat, slovenian locale.

LANG=sl_SI.UTF-8
LANGUAGE=
LC_CTYPE="sl_SI.UTF-8"
LC_NUMERIC="sl_SI.UTF-8"
LC_TIME="sl_SI.UTF-8"
LC_COLLATE="sl_SI.UTF-8"
LC_MONETARY="sl_SI.UTF-8"
LC_MESSAGES="sl_SI.UTF-8"
LC_PAPER="sl_SI.UTF-8"
LC_NAME="sl_SI.UTF-8"
LC_ADDRESS="sl_SI.UTF-8"
LC_TELEPHONE="sl_SI.UTF-8"
LC_MEASUREMENT="sl_SI.UTF-8"
LC_IDENTIFICATION="sl_SI.UTF-8"
LC_ALL=

čšž show up as white filled squares.

tags: added: regression-potential
tags: added: regression-release
removed: regression-potential
Changed in console-setup (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Current situation in Natty:

1) Booting normally in X and switching to vt1:
Font and charmap is not applied.

2) Booting in X *without splash* and switching to vt1:
Font is applied (e.g. Terminus), but not charmap, so I still can't see e.g. Greek.

3) Booting in recovery mode (vmlinuz single):
Everything works fine.

I tried troubleshooting it a bit, by putting a wrapper script around /bin/setfont. I saw that "setfont -C /dev/ttyX /etc/console-setup/Uni2-Terminus16.psf" is actually called for tty[1-6] on boot, and also *twice* for each tty, but something prevents them from actually taking effect.

Of course running that command after boot correctly sets the font/charmap.

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Update.

In a VirtualBox Natty installation (=no KMS), I'm able to 100% make the problem disappear, by doing both the following:

1) Disabling grub graphics mode:
Uncomment "GRUB_TERMINAL=console" in /etc/default/grub and run `sudo update-grub`.

2) Removing "vt.handoff=7" from the kernel command line:
Either manually, by pressing "e" (edit) at the grub menu, or by removing it from /etc/grub.d/10_linux, and running `sudo update-grub`.

I'll try with a KMS Natty client next, not sure if that will make any difference.

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

No, disabling grub graphics mode and vt.handoff didn't solve the problem on a Natty laptop with KMS.
I had to also add "nomodeset" to make it work, so something else is needed for KMS clients.

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

I believe the problem is in setfont, so I'm adding "kdb" to the affected projects.

setfont should at least indicate an error if it's unable to load the font because of grub graphics mode/plymouth/KMS/whatever, right?

It now happily says
"Loading 512-char 8x16 font from file /etc/console-setup/Uni2-TerminusBold16.psf
Loading Unicode mapping table..."
when I turn on its verbose mode in my /bin/setfont wrapper, but of course that font is never loaded unless I disable the grub graphics mode, vt.handoff=7, and KMS with nomodeset.

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Adding a small delay (in my case 2 secs) in a setfont wrapper script makes the problem go away for KMS clients too.

Also, in /lib/udev/console-setup-tty and in /lib/udev/rules.d/85-console-setup some comments indicate that there are known race conditions, maybe this bug is caused by them.

Changed in console-setup (Ubuntu):
status: Confirmed → Fix Released
Changed in kbd (Ubuntu):
status: New → Fix Released
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

The problem still exists in 15.10 daily build.

Changed in console-setup (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Valery Frolov (fvgenn) wrote :
Download full text (5.0 KiB)

My 5 cents.
I guess the problem is in the console-setup package. i was digging in initramfs scripts. hope this may help.
Changes below working well for me (15.10, i386).
Look at the "#check" marks for comments (excuse me for my badly broken English ;-):

1. /usr/share/initramfs-tools/hooks/console_setup
====================================================================cut here
#! /bin/sh -e

PREREQ="kbd|console_tools"

prereqs () {
 echo "$PREREQ"
}

case $1 in
prereqs)
 prereqs
 exit 0
 ;;
esac

. /usr/share/initramfs-tools/hook-functions
[ -r /etc/default/keyboard ] || exit 0
[ -r /etc/default/console-setup ] || exit 0
. /etc/default/console-setup # also sources /etc/default/keyboard

# Copy console-setup configuration
mkdir -p "$DESTDIR/etc/default"
cp -p /etc/default/keyboard "$DESTDIR/etc/default"
cp -p /etc/default/console-setup "$DESTDIR/etc/default"

#check: because of naming convention: "8xNN" -> "NN"
FONTSIZE=${FONTSIZE#8x}
# Assume setupcon --save has been run
if [ -f "$FONT" ]; then
 FONT="/etc/console-setup/${FONT##*/}"
#check: .gz is a valid suffix
#check# FONT="${FONT%.gz}"
else
 FONT="/etc/console-setup/$CODESET-$FONTFACE$FONTSIZE.psf"
#check: font is always gzipped, so it's better to add ".gz" suffix
 [ -f "${FONT}.gz" ] && FONT="${FONT}.gz"
fi
if [ -f "$FONT" ]; then
 mkdir -p "$DESTDIR${FONT%/*}"
 cp -p "$FONT" "$DESTDIR$FONT"
fi
if [ -f "$ACM" ]; then
 ACM="/etc/console-setup/${ACM##*/}"
 ACM="${ACM%.gz}"
else
 ACM="/etc/console-setup/$CHARMAP.acm"
fi
if [ -f "$ACM" ]; then
 mkdir -p "$DESTDIR${ACM%/*}"
 cp -p "$ACM" "$DESTDIR$ACM"
fi
if [ -f /etc/console-setup/cached.kmap.gz ]; then
 mkdir -p "$DESTDIR/etc/console-setup"
 cp -p /etc/console-setup/cached.kmap.gz \
  "$DESTDIR/etc/console-setup/cached.kmap.gz"
fi

exit 0
====================================================================cut here

2. /usr/share/initramfs-tools/scripts/init-top/console_setup
====================================================================cut here
#! /bin/sh
# A crude much-simplified clone of setupcon for use in the initramfs.

#check: no FRAMEBUFFER needed
#check# OPTION=FRAMEBUFFER
#check# PREREQ="framebuffer"

PREREQ=""

prereqs () {
 echo "$PREREQ"
}

case $1 in
prereqs)
 prereqs
 exit 0
 ;;
esac

[ -r /etc/default/console-setup ] || exit 0
. /etc/default/console-setup

[ "$ACTIVE_CONSOLES" ] || exit 0

if [ "$VERBOSE_OUTPUT" = yes ]; then
 verbose=
else
 verbose='>/dev/null 2>&1'
fi

for i in 1 2 3 4 5 6; do
 [ -c /dev/tty$i ] || mknod /dev/tty$i c 4 $i
done

#check: because of font naming convention: "...8xNN" -> "...NN"
FONTSIZE=${FONTSIZE#8x}
#check: Define font name only once, not every cycle, also it gives proper font name for /dev/tty1
if [ "$FONT" ]; then
 FONT="/etc/console-setup/${FONT##*/}"
#check: .gz is a valid suffix
#check# FONT="${FONT%.gz}"
else
 FONT="/etc/console-setup/$CODESET-$FONTFACE$FONTSIZE.psf"
#check: try to find gzipped font
 [ -f "${FONT}.gz" ] && FONT="${FONT}.gz"
fi

for console in $ACTIVE_CONSOLES; do
 [ -w $console ] || continue

 if [ "$CHARMAP" = UTF-8 ] || [ -z "$ACM$CHARMAP" ]; then
  printf '\033%%G' >$console
 else
  printf '\033%%@' >$console
 fi

 if [ -f "$FONT" ]; then
  if type consolechar...

Read more...

Revision history for this message
Valery Frolov (fvgenn) wrote :

Sorry. Mistake in previous post:

2. /usr/share/initramfs-tools/scripts/init-top/console_setup
====================================================================cut here
#! /bin/sh
# A crude much-simplified clone of setupcon for use in the initramfs.

#check: no FRAMEBUFFER needed
#check# OPTION=FRAMEBUFFER
#check# PREREQ="framebuffer" <<------

doesn't work with PREREQ=""

leave
PREREQ=framebuffer

Revision history for this message
Oliver Grawert (ogra) wrote :

you want to ship:

/etc/initramfs-tools/conf.d/framebuffer

in teh ltsp-client install with the content FRAMEBUFFER=y ... that will make sure that update-initramfs withh include the console settings from the build system (the ltsp chroot in this case, so you need to make sure keymap and font are configured there before it runs)

Revision history for this message
Oliver Grawert (ogra) wrote :

*will include

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.