lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231103200524.53930-1-ostapyshyn@sra.uni-hannover.de>
Date:   Fri,  3 Nov 2023 21:05:25 +0100
From:   Illia Ostapyshyn <ostapyshyn@....uni-hannover.de>
To:     jkosina@...e.cz
Cc:     benjamin.tissoires@...hat.com, davidrevoy@...tonmail.com,
        jason.gerecke@...om.com, jose.exposito89@...il.com,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        nils@...sfuhler.de, peter.hutterer@...-t.net, ping.cheng@...om.com,
        bagasdotme@...il.com,
        Illia Ostapyshyn <ostapyshyn@....uni-hannover.de>
Subject: Re: Requesting your attention and expertise regarding a Tablet/Kernel issue

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ