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 781505 - Handle currently unhandled RFKILL keys (requires input changes)
Handle currently unhandled RFKILL keys (requires input changes)
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: media-keys
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
https://bugs.freedesktop.org/show_bug...
Depends on:
Blocks: 760517
 
 
Reported: 2017-04-19 16:27 UTC by Benjamin Berg
Modified: 2017-05-15 06:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] media-keys: Add support for new XF86RFKill keysym (1.08 KB, patch)
2017-05-12 14:27 UTC, Hans de Goede
none Details | Review
[PATCH] media-keys: Add support for new XF86RFKill keysym (1.63 KB, patch)
2017-05-15 06:53 UTC, Hans de Goede
committed Details | Review

Description Benjamin Berg 2017-04-19 16:27:23 UTC
Bug #760517 will add the ability to disable the kernel handling of rfkill related input events. Unfortunately we don't yet handle enough of the corner cases to actually use this feature in production.

To enable, we should at least handle the following two evdev input events:
 * KEY_WIMAX
 * KEY_RFKILL

Both of these do not have a keysym so adding them is likely only possible on wayland. We are currently in the process of figuring out how to add these as the keycodes will need to be above 255 and are therefore not supported by X11. (That is, KEY_FAVOURITES is being added right now as an example case.)

I will update the bug once there is news or upstream bugs available.
Comment 1 Benjamin Berg 2017-05-08 14:07:42 UTC
The xkeyboard-config bug in question is https://bugs.freedesktop.org/show_bug.cgi?id=100970.
Comment 2 Benjamin Berg 2017-05-10 15:16:31 UTC
As Hans said in bug #76760517 there are a few more steps involved:
   https://bugzilla.gnome.org/show_bug.cgi?id=760517#c42

> Ok I've been working on updating various bits and pieces to make KEY_RFKILL work and I can confirm that it works > under X11 too, so once we've all the fixes for KEY_RFKILL upstream we're good to go with this bug.
> 
> I've decided to use a new keysym for the RFKILL key, so that we can differentiate between KEY_WLAN and KEY_RFKILL in the future (if we want to), as a bonus this means no mutter changes are necessary
> 
> This involves several steps:
> 1) Get the new keysym define accepted upstream:
> https://patchwork.freedesktop.org/patch/155279/
> 2) Sync libkxbcommon with these changes:
> https://github.com/jwrdegoede/libxkbcommon/commit/570fcdfd8107f824a398190056436612efa442d1
> 3) Rebuild libX11 against a new xproto package with the added keysyms
> 4) Update xkeyboard-config with mappings for the new keysyms (patch to be written)
> 5) Update g-s-d with XF86Rfkill keybinding:
> https://github.com/jwrdegoede/gnome-settings-daemon/commit/5df52e6c6d6bfc132141879d1485840dc77608c8

> With all the other steps depending on 1. as that finalizes the keysym name. I've commit rights for xproto, so as soon as I've an ack I'll push 1. and start working on the other bits.
Comment 3 Hans de Goede 2017-05-12 14:23:51 UTC
> Ok I've been working on updating various bits and pieces to make KEY_RFKILL
> work and I can confirm that it works under X11 too, so once we've all the
> fixes for KEY_RFKILL upstream we're good to go with this bug.
> 
> I've decided to use a new keysym for the RFKILL key, so that we can
> differentiate between KEY_WLAN and KEY_RFKILL in the future (if we want to),
> as a bonus this means no mutter changes are necessary
> 
> This involves several steps:
> 1) Get the new keysym define accepted upstream:
> https://patchwork.freedesktop.org/patch/155279/
> 2) Sync libkxbcommon with these changes:
> https://github.com/jwrdegoede/libxkbcommon/commit/
> 570fcdfd8107f824a398190056436612efa442d1
> 3) Rebuild libX11 against a new xproto package with the added keysyms
> 4) Update xkeyboard-config with mappings for the new keysyms (patch to be
> written)
> 5) Update g-s-d with XF86Rfkill keybinding:

I've just finished all steps, except for step 5. I'll attach the patch for step 5 here, once that patch is applied this bug can be closed.
Comment 4 Hans de Goede 2017-05-12 14:27:10 UTC
Created attachment 351724 [details] [review]
[PATCH] media-keys: Add support for new XF86RFKill keysym
Comment 5 Benjamin Berg 2017-05-12 15:00:18 UTC
Review of attachment 351724 [details] [review]:

I think it would be sane to also bind XF86WWAN at the same time (g-s-d will also disable WWAN modules through Network Manager when in airplane mode).
Comment 6 Hans de Goede 2017-05-12 15:03:16 UTC
Hi,

(In reply to Benjamin Berg from comment #5)
> Review of attachment 351724 [details] [review] [review]:
> 
> I think it would be sane to also bind XF86WWAN at the same time (g-s-d will
> also disable WWAN modules through Network Manager when in airplane mode).

I don't know of any laptops with a specific WWAN toggle key, but if I had such a laptop I would expect it to behave the same as the bluetooth key, iow only toggle WWAN, that would actually be quite a sensible feature since WWAN often has a datacap and/or per MB cost. Toggling all radios on/off for a WWAN key feels wrong to me. So properly supporting XF86WWAN would require more then adding just a key-binding.

Regards,

Hans
Comment 7 Bastien Nocera 2017-05-15 05:57:48 UTC
Review of attachment 351724 [details] [review]:

Looks good, please commit to master.

Also make sure to update your commit message to mention bug 760517, and the bits necessary for this patch to actually work.
Comment 8 Hans de Goede 2017-05-15 06:53:21 UTC
(In reply to Bastien Nocera from comment #7)
> Review of attachment 351724 [details] [review] [review]:
> 
> Looks good, please commit to master.
> 
> Also make sure to update your commit message to mention bug 760517, and the
> bits necessary for this patch to actually work.

I don't have commit rights, I'll attach an updated version with an improved commit message.
Comment 9 Hans de Goede 2017-05-15 06:53:47 UTC
Created attachment 351852 [details] [review]
[PATCH] media-keys: Add support for new XF86RFKill keysym
Comment 10 Bastien Nocera 2017-05-15 06:59:52 UTC
Committed to master, thanks!