Upgrade from dapper to edgy changed Caps_Lock to Shift_Lock

Bug #69725 reported by jeejah42
68
Affects Status Importance Assigned to Milestone
console-setup (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

Recently upgraded from Dapper (6.06) to Edgy (6.10). My console keymap suddenly changed from using Caps_Lock on the [Caps Lock] key to using Shift_Lock.

I tracked it down the following lines in /usr/bin/ckbcomp:

--------------------
# A hack to work around a bug in the kernel/loadkeys
if (! $acm) {
    $xkbsym_table{'Caps_Lock'} = 'Shift_Lock';
    $xkbsym_table{'ISO_Lock'} = 'Shift_Lock';
}
--------------------

What gives? This makes my console nearly unusable; when I press '}' I get ']', when I press '_' I get '-', etc.

My /etc/default/console-setup file (as written by the upgrade from Dapper to Edgy):

--------------------
# A configuration file for setupcon

# Change to "yes" and setupcon will explain what is being doing
VERBOSE_OUTPUT=no

# Setup these consoles. Most people do not need to change this.
ACTIVE_CONSOLES="/dev/tty[1-6]"

# Put here your encoding. Valid charmaps are: UTF-8 ARMSCII-8 CP1251
# CP1255 CP1256 GEORGIAN-ACADEMY GEORGIAN-PS IBM1133 ISIRI-3342
# ISO-8859-1 ISO-8859-2 ISO-8859-3 ISO-8859-4 ISO-8859-5 ISO-8859-6
# ISO-8859-7 ISO-8859-8 ISO-8859-9 ISO-8859-10 ISO-8859-11 ISO-8859-13
# ISO-8859-14 ISO-8859-15 ISO-8859-16 KOI8-R KOI8-U TIS-620 VISCII
CHARMAP="UTF-8"

# The codeset determines which symbols are supported by the font.
# Valid codesets are: Arabic Armenian CyrAsia CyrKoi CyrSlav Ethiopian
# Georgian Greek Hebrew Lao Lat15 Lat2 Lat38 Lat7 Thai Uni1 Uni2 Uni3
# Vietnamese. Read README.fonts for explanation.
CODESET="Lat15"

# Valid font faces are: VGA (sizes 8, 14 and 16), Terminus (sizes
# 12x6, 14, 16, 20x10, 24x12, 28x14 and 32x16), TerminusBold (sizes
# 14, 16, 20x10, 24x12, 28x14 and 32x16), TerminusBoldVGA (sizes 14
# and 16), Fixed (sizes 13, 14, 15, 16 and 18), Goha (sizes 12, 14 and
# 16), GohaClassic (sizes 12, 14 and 16).
FONTFACE="VGA"
FONTSIZE="16"

# You can also directly specify nonstandard font and ACM to load:
# FONT=/usr/local/share/funnyfonts/sarge16.psf
# ACM=/usr/local/share/consoletrans/my_special_encoding.acm

# The following variables describe your keyboard and can have the same
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.
XKBMODEL="pc104"
XKBLAYOUT="us"
XKBVARIANT="dvorak"
XKBOPTIONS="compose:rwin,lv3:ralt_switch"

# Do not update the following md5 sum if you change
# /etc/console-setup/boottime.kmap.gz and Debconf will not overwrite
# your custom keymap. Do not update it even if you want to make
# Debconf overwrite it. Instead simply specify the empty string as
# a md5 sum.

BOOTTIME_KMAP_MD5="57693d0f9f70248385305611a2764a2c"
--------------------

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

I can't find out anything about what this kernel/loadkeys bug might have been. I've mailed Anton upstream to see if he remembers.

Changed in console-setup:
importance: Undecided → High
status: Unconfirmed → Confirmed
Revision history for this message
Edmundo (eantoranz) wrote : Re: [Bug 69725] Re: Upgrade from dapper to edgy changed Caps_Lock to Shift_Lock

On a previous post I got sometime ago from the bugzilla someone had
discovered what the problem was about.... I think. Let me write it
here for you (in case you haven't gotten it):

________________________________________________________________________
from Gary Wu <email address hidden>:
Nov 6
Looking through various scripts (ckbcomp in particular), I found out
that the problem was caused by the entry of

CHARMAP="UTF-8"

in /etc/default/console-setup, while a corresponding UTF-8.acm.gz does
not exist in /usr/share/consoletrans/ as chkcomp was expecting. If I
change the CHARMAP to use a different encoding that does exist in this
directory, such as

CHARMAP="ISO-8859-1"

then the problem is fixed once you reboot or restart /etc/init.d
/console-setup.

So, I don't know where the bug is... somehow my Edgy was installed with
UTF-8 specified for the console encoding, but the file
/usr/share/consoletrans/UTF-8.acm.gz was not installed.

________________________________________________________________________

That's what he wrote. Hope it helps you solve the problem.

On 12/4/06, Colin Watson <email address hidden> wrote:
> I can't find out anything about what this kernel/loadkeys bug might have
> been. I've mailed Anton upstream to see if he remembers.
>
> ** Changed in: console-setup (Ubuntu)
> Importance: Undecided => High
> Status: Unconfirmed => Confirmed
>
> --
> Upgrade from dapper to edgy changed Caps_Lock to Shift_Lock
> https://launchpad.net/bugs/69725
>

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

Yes, I saw that, thanks, but it's a red herring; CHARMAP is meant to be UTF-8, and there isn't supposed to be an ACM installed for UTF-8.

Anton replied and told me (I hope he won't mind me reproducing his comment here):

"I think the only way to fix this problem is to patch the kernel. The problem is that when the keyboard is in Unicode mode CapsLock works only for the ASCII letters. For all other letters this key works only in non-Unicode mode and unfortunately for ckbcomp it is not easy to check whether the keyboard produces only ASCII letters."

Compare also this patch we've had in console-tools for a long time:

    - 951_fix_unicode_loadkeys_capslock.patch: When loading unicode key
      maps, apply KT_LETTER to values in the range a-z or A-Z rather than
      KT_LATIN. This seems to be necessary to make Caps Lock work properly.

More information is here:

  https://launchpad.net/distros/ubuntu/+source/linux-source-2.6.15/+bug/16638

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

console-setup (1.13ubuntu4) feisty; urgency=low

  * Include ro(std) in keymap tree, after talking with Eddy Petrişor.
  * Disable workaround in ckbcomp for the kernel not applying Caps Lock to
    non-ASCII letters; the cure is worse than the disease because it makes
    Caps Lock equivalent to Shift Lock (LP: #69725).
  * Install MyKeyboardNames.pl (built from /usr/share/X11/xkb) rather than
    KeyboardNames.pl (built from the out-of-date copy in Keyboard/ckb) as
    /usr/share/console-setup/KeyboardNames.pl (LP: #71864).

 -- Colin Watson <email address hidden> Fri, 5 Jan 2007 14:15:04 +0000

Changed in console-setup:
assignee: nobody → kamion
status: Confirmed → Fix Released
Revision history for this message
shemgp (shemgp-deactivatedaccount) wrote :

I think this issue affects feisty too. console-setup_1.13ubuntu13_all.deb is installed but Caps Lock still doesn't work in the terminals. I've tried it in a P4 machine and two laptops. Also, pressing Caps Lock + any letter doesn't make it capital.

my /usr/bin/ckbcomp lines 1925-1932 are:

# A hack to work around a bug in the kernel/loadkeys
# Disabled for Ubuntu because the cure is worse than the disease:
# https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/69725
# However, Turkish still needs this behaviour.
if (! $acm && grep { $_ eq 'tr' } @layouts) {
    $xkbsym_table{'Caps_Lock'} = 'Shift_Lock';
    $xkbsym_table{'ISO_Lock'} = 'Shift_Lock';
}

I'm using kernel Ubuntu Kernel 2.6.20-15.27

Thanks for your help.

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

shemgp, this is a different problem: see bug 84156. You can work around it by running 'sudo setupcon' once from a console after each boot.

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

Other bug subscribers

Remote bug watches

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