I've been having this problem for a while now (= months). Though it's not life or death, it's like radiation poisoning - it accumulates, and reached a critical point. Here goes:
The Numlock and Capslock LEDs change randomly and very infrequently (i.e. after minutes, hours or maybe days). The actual state is still correct. Eg. if the numlock was active, it remains active even if the LED is off.
I have an .xmodmap defined for latin character composition. When I execute xmodmap .Xmodmap, it works for about the same 'while' as the LED problem. Then composition stops working.
I suspect both problems are related, though I've never seems them happen simultaneously. It's not the keyboard (which I already changed to another brand). I thought it might be a problem with the XFCE window manager (4.10), so I upgraded that one too. Also upgraded the kernel (now 3.6.6).
Does anyone have a hint on where to look? How I can capture the LED commands and see which program generates them?
Thanks in advance! John
BTW: Keyboard is PS/2 if that matters