xmodmap not honored

Bug #777882 reported by Eric Eisner
66
This bug affects 14 people
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: xorg

In maverick, I disabled caps lock by having the line 'clear Lock' in ~/.Xmodmap
Upon upgrade to natty, .Xmodmap is still being read, and the output of xmodmap reflects it:

$ xmodmap
shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Caps_Lock (0x42), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

But the xmodmap state is not honored and caps lock is still caps lock. Rerunning xmodmap ~/.Xmodmap changes nothing.

See also: http://ubuntuforums.org/showthread.php?t=1743145

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: xserver-xorg 1:7.6+4ubuntu3
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
NonfreeKernelModules: openafs
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,decor,mousepoll,vpswitch,regex,animation,snap,expo,move,compiztoolbox,place,grid,imgpng,gnomecompat,wall,ezoom,workarounds,staticswitcher,resize,fade,unitymtgrabhandles,scale,session,unityshell]
CompositorRunning: compiz
DRM.card0.LVDS.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1024x600
 edid-base64: AP///////wAw5AYCAAAAAAATAQOAFg14CtOFlVlWjiggUFQAAAABAQEBAQEBAQEBAQEBAQEBBhgAuEFYZCAwIDYA4H4AAAAbAAAAAAAAAAAAAAAAAAAAAAAAAAAA/gBGMDUwVIExMDFXU0EKAAAAAAAAAAAAAAAAAAEBCiAgABU=
DRM.card0.VGA.1:
 status: disconnected
 enabled: disabled
 dpms: Off
 modes:
 edid-base64:
Date: Thu May 5 10:15:18 2011
DistUpgraded: Log time: 2011-05-01 23:16:23.271461
DistroCodename: natty
DistroVariant: ubuntu
DkmsStatus:
 openafs, 1.4.14, 2.6.35-28-generic, i686: installed
 openafs, 1.4.14, 2.6.38-8-generic, i686: installed
EcryptfsInUse: Yes
GraphicsCard:
 Intel Corporation N10 Family Integrated Graphics Controller [8086:a011] (prog-if 00 [VGA controller])
   Subsystem: Dell Device [1028:041a]
   Subsystem: Dell Device [1028:041a]
InstallationMedia: Ubuntu-Netbook 10.10 "Maverick Meerkat" - Release i386 (20101007)
MachineType: Dell Inc. Inspiron 1012
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=4d929c20-c796-4eab-96b6-8612ab308e23 ro quiet splash vt.handoff=7
Renderer: Unknown
SourcePackage: xorg
UpgradeStatus: Upgraded to natty on 2011-05-02 (2 days ago)
dmi.bios.date: 02/22/2010
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A06
dmi.board.name: 0P9MDV
dmi.board.vendor: Dell Inc.
dmi.board.version: A06
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: A06
dmi.modalias: dmi:bvnDellInc.:bvrA06:bd02/22/2010:svnDellInc.:pnInspiron1012:pvrA06:rvnDellInc.:rn0P9MDV:rvrA06:cvnDellInc.:ct8:cvrA06:
dmi.product.name: Inspiron 1012
dmi.product.version: A06
dmi.sys.vendor: Dell Inc.
version.compiz: compiz 1:0.9.4+bzr20110415-0ubuntu2
version.libdrm2: libdrm2 2.4.23-1ubuntu6
version.libgl1-mesa-dri: libgl1-mesa-dri 7.10.2-0ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.10.2-0ubuntu2
version.xserver-xorg: xserver-xorg 1:7.6+4ubuntu3
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.0-0ubuntu4
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.14.0-4ubuntu7.1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110107+b795ca6e-0ubuntu7

Revision history for this message
Eric Eisner (ede-mit) wrote :
bugbot (bugbot)
affects: xorg (Ubuntu) → xserver-xorg-video-intel (Ubuntu)
Revision history for this message
Ian! D. Allen (idallen) wrote :

This xmodmap work-around works for me:

keycode 66 = Control_L
clear Lock
add Control = Control_L

see http://ubuntuforums.org/showthread.php?t=1743145

Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

Hey ede-mit,

You filed this bug report against natty, but I see it's still open and
doesn't appear to have much activity recently. So, now that oneiric
is released and stable, this may be a good point for you to upgrade
and re-test if this issue is still present there.

If it's solved in the new release and you think it's worth backporting
the fix, please indicate that. Or if having the fix in the new release
is good enough, feel free to close out the bug (or let us know and we'll
close it.)

If it's not solved, leave the bug report open. I can't promise we'll
get to it (we get way more bugs filed than we can usually get to), but
your testing and feedback can help out if and when we do.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
bernieke (bernieke) wrote :

I can confirm the problem persists on oneiric.

I've just installed one of my laptops from scratch with the minimal 11.10 media, without any "tasks". And then proceeded with installing xorg, slim and awesome.

xmodmap does not return any errors, but it doesn't set my caps_lock to mod5 either.

Since this installation does not have gnome on it, I can't use my previous trick with gnome-keyboard-properties > layouts > options...

So far I figured it was some gnome thing that was the cause of the problem, but apparently it's xorg itself?

Is there any way for me to emulate what gnome-keyboard-properties does? I would really like to be able to use my caps_lock as mod5, no matter how I need to go about it.

James E. Blair (corvus)
summary: - xmodmap not honored in natty
+ xmodmap not honored
Revision history for this message
bernieke (bernieke) wrote :

found a solution to my problem:

Instead of doing:
  remove Lock = Caps_Lock
  add mod5 = Caps_Lock

I had to do:
  remove Lock = Caps_Lock
  remove mod5 = ISO_Level3_Shift
  keysym Caps_Lock = ISO_Level3_Shift
  add mod5 = ISO_Level3_Shift

The resulting "xmodmap -pm" looks like this (0x42 is caps_lock):

xmodmap: up to 4 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x42), ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

Hopefully this will help in tracking down the bug.

Revision history for this message
nh2 (nh2) wrote :

@bernieke:
Thanks, works for me on a Thinkpad X220.

Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Stéphane (stephane-treboux) wrote :

I have the same bug in 12.04 (precise) x86_64.
This is not working:
xmodmap -display :0 -e 'clear Lock'
As a workaround I use:
xmodmap -display :0 -e 'keycode 66 ='

Revision history for this message
Johann Gail (johann-gail) wrote :

I can confirm this problem too on precise XUbuntu (12.04), 32bit edition.

I tried to remove the lock from the caps lock, i.e. to behave it as a normal shift. With xubuntu 10.10 I had the following working solution:

clear Lock
add shift = Caps_Lock

After the update to precise pangolin 12.04 on the same notebook this doesn't work anymore. I had to change the entries in .Xmodmap to:

remove Lock = Caps_Lock
keysym Caps_Lock = Shift_L
add Shift = Shift_L

Revision history for this message
Johann Gail (johann-gail) wrote :

After reading the previous comments I come to the conclusion that a working solution needs a redefinition of the keycode. Each of the working solutions have one of the following lines in it:

keycode 66 = Control_L
keysym Caps_Lock = ISO_Level3_Shift
keycode 66 =
keysym Caps_Lock = Shift_L

Chris Wilson (ickle)
affects: xserver-xorg-video-intel (Ubuntu) → xorg (Ubuntu)
affects: xorg (Ubuntu) → xorg-server (Ubuntu)
Revision history for this message
Torsten Bronger (bronger) wrote :

I confirm this on Lubuntu 12.10. An .Xmodmap file with

remove lock = Caps_Lock

has no effect, however,

keycode 66 =

successfully switches off Caps Lock (where the keycode is correct).

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.