Bug 1665282

Summary: Wacom Tablet Mode Switching No Longer Working
Product: Red Hat Enterprise Linux 8 Reporter: Michael Boisvert <mboisver>
Component: mutterAssignee: Carlos Garnacho <cgarnach>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: cgarnach, fmuellner, jkoten, peter.hutterer, tpelka
Target Milestone: rc   
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-12 21:13:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1635157    

Description Michael Boisvert 2019-01-10 20:37:56 UTC
Description of problem: 

Sometime between RHEL8 beta and now, mode switching stopped working on all Wacom tablets. When you map buttons on mode 1 then change modes, the same buttons are mapped for all modes. The graphical indicator pops up to show you changed modes, and the LEDs on the tablet also reflect the mode change but the buttons seem to be mapped the same on all modes.

Steps to Reproduce:
1. Map a button on a tablet that supports mode switching to "Show on-screen help"
2. Press the mode selection button.
3. Press the previously mapped button.

Actual results: On-screen help pops up.

Expected results: The button should be un-mapped.

Additional info: This is occurring on both Wayland and X.

Comment 2 Peter Hutterer 2019-01-10 23:20:56 UTC
> the LEDs on the tablet also reflect the mode change 

fwiw, this is handled by the kernel, so if that ever breaks that'd be a kernel bug.

Comment 3 Peter Hutterer 2019-01-11 04:10:24 UTC
I'm trying to page this in from ages ago and after staring at the code for a while, I **think** I remember some agreement that the mode only applies to the ring/strips, but not the buttons themselves. This is backed up by the code in mutter which passes a hardcoded -1 instead of the current mode group for the button.

src/backends/meta-input-settings.c:meta_input_settings_get_pad_button_action()

  settings = lookup_pad_action_settings (pad, META_PAD_ACTION_BUTTON,
                                         button, META_PAD_DIRECTION_NONE, -1);

Which would mean that at least for buttons, this is intentional behaviour. Testing this on a Ring with keys 'a' and 'b' assigned to different modes works correctly (albeit the overlay doesn't actually show the assignments).

The code hasn't seen changes since 2017, so I don't think this would've changed between the beta and now. Are you sure about that?

Comment 4 Carlos Garnacho 2019-01-11 10:38:15 UTC
Yes, the "mode switching only applies to rings/strips" thing is something that was done in older g-s-d code. This behavior was kept when tablet management moved within Mutter in order to keep settings 1:1 and preserve configured behavior. Only with the Wayland protocol applications have enough freedom to apply different per-mode actions, but it's kind of tangential with keybinding assignment.

> fwiw, this is handled by the kernel, so if that ever breaks that'd be a kernel bug.

For Xorg/wacom we still have helpers in gsd-wacom :).