Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Whenever I use setxkbmap in a terminal (or my .bashrc), the next time I press any modifier keys (ctrl, shift, alt) the NumLock LED on my keyboard goes off, but NumLock itself is still active so it's in some kind of inconsistent state.

If I now press NumLock, the LED stays off but NumLock turns off, and a second press on NumLock turns both the numpad and the LED on again. Curiously, while the LED is in this inconsistent state, pressing caps lock turns both the NumLock and CapsLock LEDs on.

The command that I have in my .bashrc causing this is setxkbmap -option compose:ralt but it also happens if I issue a plain setxkbmap with no parameters, or do anything else with that command.

Why is this happening (and am I doing something wrong)?

Dump of Xorg -version in case it helps (I'm running Xubuntu/XFCE):

X.Org X Server 1.7.6
Release Date: 2010-03-17
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-30-server x86_64 Ubuntu
Current Operating System: Linux xxxxx 2.6.32-41-generic #94-Ubuntu SMP Fri Jul 6 18:00:34 UTC 2012 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32-41-generic root=UUID=xxxxx ro quiet splash
Build Date: 25 February 2012  06:57:33AM
xorg-server 2:1.7.6-2ubuntu7.11 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.16.4
share|improve this question
    
FWIW, I am seeing the exact same issue on X.Org X Server 1.13.0 (vanilla Ubuntu 12.04.2, Das Keyboard P/N DKI-USB). Possibly related bug report. –  l0b0 Apr 10 '13 at 11:38
add comment

1 Answer

Looks like this quote explains it:

Warning. setxkbmap not only alters the alphanumeric keys to the values given in the map; it also resets all other keys to the startup default. If you have assigned values to the Windows keys or the multimedia keys, these settings may be lost.

Since the default visual and system (or "actual") state of the Num Lock key presumably is off, I'm guessing that's why this happens at all. Why the system state is untouched and why this only happens when pressing certain keys is still a mystery.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.