After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 737673 - keyboard: xkb-options not applied when bluetooth keyboard connects
keyboard: xkb-options not applied when bluetooth keyboard connects
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-09-30 16:56 UTC by Ben Davis
Modified: 2014-10-03 18:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backend-x11: Re-upload keymap when new keyboard devices are added (4.05 KB, patch)
2014-10-02 17:16 UTC, Rui Matos
committed Details | Review

Description Ben Davis 2014-09-30 16:56:05 UTC
I just upgraded to 3.14 (archlinux), and when I start gnome my xkb-options setting does not get applied. I have the following settings in dconf:

    $ dconf read /org/gnome/desktop/input-sources/xkb-options
    ['compose:ralt', 'terminate:ctrl_alt_bksp', 'caps:escape', 'altwin:swap_alt_win']

I've confirmed that gnome-settings-daemon is running. 

I can make it work by going to gnome-tweak-tool, and changing the specific setting to something else, and then back to where I had it, but I have to do that for each setting.

I can also make it work by running "setxkbmap" with no arguments, which applies all settings that are in dconf.
Comment 1 Ben Davis 2014-09-30 23:05:05 UTC
Update: I found out this only happens with a bluetooth keyboard. If I disconnect my bluetooth keyboard and reconnect it, I have to manually set the options again. In 3.12 the xkb options were applied automatically when my keyboard connected.
Comment 2 Rui Matos 2014-10-02 17:16:46 UTC
Created attachment 287610 [details] [review]
backend-x11: Re-upload keymap when new keyboard devices are added

The X server applies a default keymap to hotplugged keyboard
devices. To enforce our current settings we must re-upload the keymap
when a new keyboard shows up.

Note that setting the VCK keymap causes the server to propagate it
to all slave keyboard devices.
Comment 3 Rui Matos 2014-10-02 17:18:54 UTC
It turns out that we need to reset the root window property as well so just keeping the component names around wasn't enough and thus I decided to cache the strings from the public API and redo all dance when needed.
Comment 4 Rui Matos 2014-10-03 16:49:19 UTC
(In reply to comment #3)
> It turns out that we need to reset the root window property as well so just
> keeping the component names around wasn't enough and thus I decided to cache
> the strings from the public API and redo all dance when needed.

I forgot to mention that we need to reset the root window property because the X server resets it to the RMLVO values that it applies on the newly attached keyboard device.
Comment 5 Jasper St. Pierre (not reading bugmail) 2014-10-03 17:00:49 UTC
Which is really dumb and stupid, but it is what is.
Comment 6 Jasper St. Pierre (not reading bugmail) 2014-10-03 17:01:42 UTC
Review of attachment 287610 [details] [review]:

OK.
Comment 7 Rui Matos 2014-10-03 17:05:02 UTC
Jasper told me to push on IRC.

Attachment 287610 [details] pushed as 478b75e - backend-x11: Re-upload keymap when new keyboard devices are added
Comment 8 Carl Worth 2014-10-03 18:09:22 UTC
Thanks, Rui, for the bug fix!

This was driving me crazy the past day or two, (and I just realized now it was connected to plugging in my USB keyboard).

-Carl