All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Illia Ostapyshyn <ostapyshyn@sra.uni-hannover.de>, jkosina@suse.cz
Cc: benjamin.tissoires@redhat.com, davidrevoy@protonmail.com,
	jason.gerecke@wacom.com, jose.exposito89@gmail.com,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	nils@nilsfuhler.de, peter.hutterer@who-t.net,
	ping.cheng@wacom.com
Subject: Re: Requesting your attention and expertise regarding a Tablet/Kernel issue
Date: Sat, 4 Nov 2023 07:46:48 +0700	[thread overview]
Message-ID: <ZUWUeEYtvpldMTp1@debian.me> (raw)
In-Reply-To: <20231103200524.53930-1-ostapyshyn@sra.uni-hannover.de>

[-- Attachment #1: Type: text/plain, Size: 2082 bytes --]

On Fri, Nov 03, 2023 at 09:05:25PM +0100, Illia Ostapyshyn wrote:
> Hello David, Hello Jiri,
> 
> The XP-Pen hardware reports the Eraser usage for the upper stylus button.
> Generally, styli report Invert usages when erasing, as described in [1].
> XP-Pen digitizers, however, tend to omit them.
> 
> The generic driver maps the Eraser usage to BTN_TOUCH and the Invert
> usage to BTN_TOOL_RUBBER.  Pens conforming to [1] send the Invert usage
> first (switching the tool to BTN_TOOL_RUBBER) followed by Eraser, which
> appears in userspace as a BTN_TOUCH event with the rubber tool set.
> 
> Due to an oversight, devices not reporting Invert had the BTN_TOOL_RUBBER
> event masked.  This has caused the kernel to send only BTN_TOUCH events
> without the tool switch when erasing.
> 
> The situation got worse with refactoring done in 87562fcd1342.  An eraser
> without Invert caused the hidinput_hid_event state machine to get stuck
> with BTN_TOOL_RUBBER internally (due to it being masked).  For the
> userspace, this looked as if the pen was never hovering again, rendering
> it unusable until the next reset.  276e14e6c3 fixes this by adding
> support for digitizers that do not report Invert usages when erasing.
> 
> ---
> 
> David, we are sorry that our patch broke your workflow.  However,
> forwarding hardware events *as-is* to the userspace has always been the
> intended behavior, with a kernel bug preventing it so far.  You can still
> remap the eraser button to a right click using xsetwacom:
> 
> xsetwacom set "UGTABLET 24 inch PenDisplay eraser" "Button" "1" "3"
> 
> Replace the device name with the corresponding *eraser* device from
> "xsetwacom list devices".  You can also do this with "xinput set-button-map",
> which works for libinput as well.  We have tested this with several
> XP-Pen devices, including Artist 24.
> 
> [1] https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states

Thanks for the explanation!

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-11-04  0:46 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <kRKTNDYigUSblpNgSuZ2H4dX03Of1yD4j_L9GgbyKXcDqZ67yh5HOQfcd7_83U3jZuQzxpKT3L6FXcRkkZIGdl_-PQF14oIB0QmRSfvpc2k=@protonmail.com>
2023-11-01 19:37 ` Requesting your attention and expertise regarding a Tablet/Kernel issue Jiri Kosina
2023-11-02  0:44   ` Bagas Sanjaya
2023-11-02  6:31     ` Linux regression tracking (Thorsten Leemhuis)
2023-11-02  7:51       ` Bagas Sanjaya
2023-11-02  7:44   ` Linux regression tracking #adding (Thorsten Leemhuis)
2023-12-01  8:24     ` Linux regression tracking #update (Thorsten Leemhuis)
2023-11-03 20:05   ` Illia Ostapyshyn
2023-11-04  0:46     ` Bagas Sanjaya [this message]
2023-11-06 13:17     ` David Revoy
2023-11-06 13:39       ` Conor Dooley
2023-11-06 16:59       ` Benjamin Tissoires
2023-11-06 20:06         ` Illia Ostapyshyn
2023-11-07  7:59           ` Benjamin Tissoires
2023-11-07 13:25             ` Illia Ostapyshyn
2023-11-07 13:40             ` Illia Ostapyshyn
2023-11-08  5:23             ` Eric GOUYER
2023-11-08  9:04               ` Benjamin Tissoires
2023-11-08  9:23                 ` José Expósito
2023-11-08  9:34                   ` Benjamin Tissoires
2023-11-08 18:21                     ` Benjamin Tissoires
2023-11-09  0:32                       ` David Revoy
2023-11-09 11:56                         ` Benjamin Tissoires
2023-11-09 16:13                           ` Benjamin Tissoires
2023-11-09 22:04                             ` David Revoy
2023-11-10 10:19                               ` Benjamin Tissoires
2023-11-11  8:52                               ` Benjamin Tissoires
2023-11-13 22:08                                 ` David Revoy
2023-11-14 14:35                                   ` Benjamin Tissoires
2023-11-15 15:14                                     ` Benjamin Tissoires
2023-11-23 22:12                                       ` David Revoy
2023-11-24 17:18                                         ` Benjamin Tissoires
2023-11-29 15:32                                           ` Benjamin Tissoires
2023-11-30 22:25                                             ` David Revoy
2023-12-01 15:41                                               ` Benjamin Tissoires
2023-11-08 19:40                 ` Nils Fuhler
2023-11-08 20:34                   ` Benjamin Tissoires
2023-11-08 22:31                     ` ostapyshyn
2023-11-09 11:46                       ` Benjamin Tissoires
2023-11-08 23:18             ` David Revoy
2023-11-09 11:47               ` Benjamin Tissoires
2023-11-11 17:15               ` Thorsten Leemhuis
2023-11-08 22:28         ` David Revoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZUWUeEYtvpldMTp1@debian.me \
    --to=bagasdotme@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=davidrevoy@protonmail.com \
    --cc=jason.gerecke@wacom.com \
    --cc=jkosina@suse.cz \
    --cc=jose.exposito89@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nils@nilsfuhler.de \
    --cc=ostapyshyn@sra.uni-hannover.de \
    --cc=peter.hutterer@who-t.net \
    --cc=ping.cheng@wacom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.