Bug 234603 - setxkbmap applies keyboard layout randomly
setxkbmap applies keyboard layout randomly
Status: CLOSED DUPLICATE of bug 239409
Product: Fedora
Classification: Fedora
Component: xorg-x11-xkb-utils (Show other bugs)
8
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Hutterer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-30 11:05 EDT by Jason Farrell
Modified: 2008-09-08 04:57 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-08 04:57:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
my day-to-day xorg.conf (1.12 KB, application/octet-stream)
2007-04-03 14:49 EDT, Jason Farrell
no flags Details
Xorg.0.log with my xorg.conf (28.51 KB, text/plain)
2007-04-03 14:50 EDT, Jason Farrell
no flags Details
Xorg.0.log with no xorg.conf present (59.11 KB, text/plain)
2007-04-03 14:51 EDT, Jason Farrell
no flags Details

  None (edit)
Description Jason Farrell 2007-03-30 11:05:53 EDT
This bug has been around since at least FC3, and I figured it'd be fixed by now,
but it hasn't (I've just been putting up with it) and it's my #1 annoyance, so
I'm submitting this bug to hopefully have some attention drawn to it again
(there are no open dupes).

So since FC3 I've been using KDE + Fedora, and in that time I've used two
different MS Natural keyboards where the mod4 (windows key) would only work
*randomly* after X login. To fix it I have to reapply the same keyboard layout
over and over until it sticks using either the GUI ("kcmshell keyboard_layout")
config launched from the "kde keyboard tool" systray util, or directly from the
commandline with: "setxkbmap -model microsoftprooem -layout us".

The common keycombo I use to test that my layout is working is Win+O which tells
Amarok to show the current song info in an overlay OSD.

When everything IS working, "xev" will output the following for Win+O:
---------------------------------------------------------------------
KeyPress event, serial 32, synthetic NO, window 0x4e00001,
    root 0x1a5, subw 0x0, time 2739616650, (333,488), root:(462,766),
    state 0x10, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 32, synthetic NO, window 0x4e00001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 32, synthetic NO, window 0x4e00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 32, synthetic NO, window 0x0,
    keys:  2   0   0   0   1   0   0   0   0   0   0   0   0   0   8   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 32, synthetic NO, window 0x4e00001,
    root 0x1a5, subw 0x0, time 2739617194, (333,488), root:(462,766),
    state 0x50, keycode 32 (keysym 0x6f, o), same_screen YES,
    XLookupString gives 1 bytes: (6f) "o"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x4e00001,
    root 0x1a5, subw 0x0, time 2739617378, (333,488), root:(462,766),
    state 0x50, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
---------------------------------------------------------------------

When NOT working, the KeymapNotify event is missing, and there are 4
press,press,release,release events (and Amarok doesn't recieve it - instead the
"o" goes to the commandline).


Related bug (CLOSED w/ INSUFFICIENT_DATA):
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214427
Comment 1 Matěj Cepl 2007-04-02 08:35:18 EDT
From the above-mentioned bug you could know that I am pretty insisting on
getting /etc/X11/xorg.conf and /var/log/Xorg.*.log. Please attach them to this
bug as uncompressed separate attachments.

Also (especially because you seem to have using this system for a long time),
could you please try to restart X without any /etc/X11/xorg.conf whatsoever and
tell us (with /var/log/Xorg.*.log is appropriate) what happened?

Thanks a lot.
Comment 2 Jason Farrell 2007-04-03 14:49:10 EDT
Created attachment 151608 [details]
my day-to-day xorg.conf
Comment 3 Jason Farrell 2007-04-03 14:50:19 EDT
Created attachment 151609 [details]
Xorg.0.log with my xorg.conf
Comment 4 Jason Farrell 2007-04-03 14:51:04 EDT
Created attachment 151610 [details]
Xorg.0.log with no xorg.conf present
Comment 5 Jason Farrell 2007-04-03 14:58:46 EDT
I created a testuser to do a little more testing:
1) This bug occurs under both KDE and Gnome.
2) It occurs with my xorg.conf, or with the automagically detected defaults when
no xorg.conf is present.

Also, I notice the following error *sometimes* being appended to Xorg.0.log each
time I attempt to get my keyboard layout to stick (with "setxkbmap -model
microsoftprooem -layout us"):
BOGUS LENGTH in write keyboard desc, expected 4800, got 4804
BOGUS LENGTH in write keyboard desc, expected 5288, got 5292
BOGUS LENGTH in write keyboard desc, expected 4812, got 4816
...
Comment 6 Jason Farrell 2007-06-02 13:28:32 EDT
Bug is still present in Fedora7, and it isn't dependent on the keyboard model.
If I repeat the following a random number of times, suddenly the WinKey works again:

$ setxkbmap -model pc104 -layout us

Do it one more time, and... the key's ignore again. rinse/repeat. So aggravating.
Comment 7 Jason Farrell 2007-12-07 05:24:13 EST
... and still present in Fedora8
Comment 8 Jason Farrell 2008-04-04 16:06:27 EDT
FWIW - I haven't been able to reproduce this since switching from F8 i386 to F8
x86_64 a few weeks ago. WinKey has worked reliably.
Comment 9 Scott R. Godin 2008-04-10 12:30:38 EDT
Confirming this still occurs under F8 on i686, and only random restarts of X or 
repetition-unto-success reruns of (setxkbmap -model pc105 -layout us), get 
Super properly remapped to the Win-keys again. 

I run Xfce but problem occurs randomly on gnome and fluxbox alike, as well. 

current kernel is 2.6.24.3-34.fc8 (later ones as of this moment are still 
causing panics) 

If there's any other details I can provide, dont' hesitate to ask.
Comment 10 Peter Hutterer 2008-09-02 06:35:40 EDT
Can you cross-check with Bug 239409 please? Sounds like it's the same.
Comment 11 Jason Farrell 2008-09-02 07:26:16 EDT
(In reply to comment #10)
> Can you cross-check with Bug 239409 please? Sounds like it's the same.

It does look to be similar. I haven't been able to reproduce this problem in F9 x86_64 (or F10a x86_64). It's possible that F9 i386 is still affected.
Comment 12 Peter Hutterer 2008-09-08 04:57:53 EDT

*** This bug has been marked as a duplicate of bug 239409 ***

Note You need to log in before you can comment on or make changes to this bug.