[SRU] Support isdv4-aes stylus group and multiple AES stylus definitions

Bug #1921991 reported by Bin Li
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
High
Bin Li
libwacom (Ubuntu)
Fix Released
Medium
Unassigned
Focal
Fix Released
Undecided
Unassigned
Groovy
Won't Fix
Undecided
Unassigned

Bug Description

[Impact]

 * There are lots of stylus couldn't be used on Lenovo's platform, our OEM customer request to support ThinkPad P15 Gen 1, ThinkPad X1 Yoga Gen5, ThinkPad P1 G3.

 * I reviewed and tested the below patches from upstream. It could support the stylus very well on P15, P1 or X1 Yoga.

 * a864679 - Add multiple AES stylus definitions
   I applied into libwacom2 1.3-2ubuntu1, no errors.

 * 8652aa3 - Add isdv4-aes stylus group to all AES sensors
  I tried to apply this patch, but there are not 'data/isdv4-48ca.tablet' and 'data/isdv4-48ce.tablet', it failed for these two files.

 * ba02abf - Add ISDv4 51e9 (Lenovo ThinkPad P15 Gen 1) (#325)

[Test Plan]

 * Need your laptop have AES stylus, check the pen setting at gnome-control-center when the pen touch the screen. It could not set/customize the stylus, such as the second button as right click.

 * After updated the new packages with these patches, you could customize the stylus at gnome-control-center.

[Where problems could occur]

 * It only changes the data/ parts to support more stylus from upstream, so it's low risk.

[Other Info]

 * Related bug: https://bugs.launchpad.net/ubuntu/+source/libwacom/+bug/1869059

Bin Li (binli)
description: updated
Revision history for this message
Bin Li (binli) wrote :

commit 8652aa3376bfb0e833af3704dc2ab7948958cd8f
Author: Jason Gerecke <email address hidden>
Date: Tue Oct 29 15:26:51 2019 -0700

    Add isdv4-aes stylus group to all AES sensors

    AES sensors determined based on comments and HID descriptors available
    at the wacom-hid-descriptors repository, where available. Some pen/sensor
    combinations may not truly be compatible with each other, but it difficult
    to know a priori which are problematic. This ultimately doesn't matter
    *too* much, however, since the ID list is primarily used by tools like
    GNOME Control Center that just need a rough idea of what pens might work
    with a given tablet during configuration.

Revision history for this message
Bin Li (binli) wrote :
Revision history for this message
Bin Li (binli) wrote :
Revision history for this message
Bin Li (binli) wrote :

The add-isdv4-aes-stylus-group.patch need the isdv4-48ca.patch and isdv4-48ce.patch.

Revision history for this message
Bin Li (binli) wrote :

commit a864679083c035eb08a75cf084a6564d589c0b1c
Author: Jason Gerecke <email address hidden>
Date: Fri Nov 1 11:51:20 2019 -0700

    Add multiple AES stylus definitions

    Adds definitions for many different AES styli. The precise information
    about supported features is hard to come by, but in general most pens
    have two buttons (one of which is treated as an eraser) and can only
    report pressure. A few exceptions are known or suspected and their
    data has been set accordingly.

....

Revision history for this message
Bin Li (binli) wrote :

commit ba02abf58f8d0405140e658d8238b69e89120576
Author: Jason Gerecke <email address hidden>
Date: Wed Jan 6 13:01:29 2021 -0800

    data: Add ISDv4 51e9 (Lenovo ThinkPad P15 Gen 1) (#325)

    Tablet definition was tested and verified to work by the bug reporter.

Revision history for this message
Bin Li (binli) wrote :
Bin Li (binli)
summary: - Support isdv4-aes stylus group and multiple AES stylus definitions
+ [SRU] Support isdv4-aes stylus group and multiple AES stylus definitions
Mathew Hodson (mhodson)
Changed in libwacom (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Bin Li (binli) wrote :

@mathew,

 Thanks for taking care of it, if you need any help feel free to let me know.

Rex Tsai (chihchun)
tags: added: oem-priority
Bin Li (binli)
Changed in oem-priority:
importance: Undecided → High
assignee: nobody → Bin Li (binli)
status: New → Triaged
Bin Li (binli)
tags: added: originate-from-1907016 sutton
tags: added: originate-from-1910795
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Bin, thanks for the work there. By SRU rule the issue needs to be fixed in the current serie first. Are the patches in 1.8/hirsute? If not could you prepare a debdiff for that serie?

Revision history for this message
Bin Li (binli) wrote :

@seb128,

 Thanks for your feedback, I checked 1.8-2ubuntu1 in hirsute-devel, these patches which I made for focal are all included. So this issue should be fixed in hirsute with libwacom2-1.8-2ubuntu1 package. Thanks!

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, closing the current serie target then and it means it's ready for sponsoring, I will work on that today or tomorrow

Changed in libwacom (Ubuntu):
status: New → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

Uploaded to focal

Revision history for this message
Bin Li (binli) wrote :

@seb128,

 Thanks a lot!

Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Bin, or anyone else affected,

Accepted libwacom into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libwacom/1.3-2ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libwacom (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Chris Halse Rogers (raof) wrote :

Thanks for that. @Bin - thanks for checking that these fixes are in hirsute. Are they also in groovy? If they're not in groovy's libwacom we'll also need an upload to groovy, so people who update from focal to groovy don't lose this fix.

Changed in libwacom (Ubuntu Groovy):
status: New → Incomplete
Revision history for this message
Bin Li (binli) wrote :

@raof,

 Fine, I will check the groovy later.

Now there are build errors for auto_test, I'm just working on it.

Revision history for this message
Bin Li (binli) wrote :

For below error in test-stylus-validity and test-dbverify, I add this patch to support the 'Mobile' type.

Bail out! libwacom-FATAL-WARNING: Stylus '0x1' has no type defined, falling back to 'General'

commit 36a22c884f3439fd72bfc2268afd1c29364ffee8
Author: Jason Gerecke <email address hidden>
Date: Fri Nov 1 15:24:03 2019 -0700

    Introduce WSTYLUS_MOBILE type for AES devices
····
    AES styli are distinct enough from the existing stylus classes to
    deserve one of their own. This class is named WSTYLUS_MOBILE both to
    reflect the fact that AES sensors are only found on tablet PCs and to
    allow the potential inclusion of other similar sensors which may not
    use AES tech.
····
    Stylus test cases are added to cover the future addition of AES styli
    to libwacom.
····
    Signed-off-by: Jason Gerecke <email address hidden>

Revision history for this message
Bin Li (binli) wrote :

For the error in data-files-in-meson.build autotest, I add the tablets data file in meson.build.

Revision history for this message
Bin Li (binli) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Chris, about 20.10, not SRUing desktop fixes to it at this point is a decision, the topic was discussed in the past on https://lists.ubuntu.com/archives/ubuntu-release/2019-March/004728.html and the SRU team confirmed it shouldn't be an hard requirement. The cost/benefit for us to deal with the extra work on a non LTS serie about to become non current isn't just not worth it

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Bin, or anyone else affected,

Accepted libwacom into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libwacom/1.3-2ubuntu3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Bin Li (binli) wrote :

On ThinkPad P1 Gen 3, with libwacom2:1.3-2ubuntu1, there are no stylus found when I open the gnome-control-center. After upgraded the 1.3-2ubuntu3, there are 'AES pen' at 'Wacom Tablet', and I tried set the 'Top barrel button' to 'Right Mouse Button Click', then 'Middle Mouse Button Click', it works fine.

BTW, the second button, 'Bottom barrel button', is not supported yet.
https://bugs.launchpad.net/ubuntu/+source/libwacom/+bug/1869059

From libwacom-list-local-devices, I could find the new Styli was updated.

@@ -8,7 +7,7 @@
 Width=14
 Height=8
 IntegratedIn=Display;System;
-Styli=0xffffe;0xfffff;
+Styli=0x1;0x11;0x19;0x21;0x31;0x39;0x49;0x71;0x221;0x231;0x271;0x421;0x431;0x621;0x631;0x8051;0x805b;0x806b;0x807b;0x826b;0x846b;

# On 1.3-2ubuntu1
$ libwacom-list-local-devices
# Device node: /dev/input/event8
[Device]
Name=Wacom ISDv4 51a0
ModelName=
DeviceMatch=usb:056a:51a0;
Class=ISDV4
Width=14
Height=8
IntegratedIn=Display;System;
Styli=0xffffe;0xfffff;

[Features]
Reversible=false
Stylus=true
Ring=false
Ring2=false
Touch=true
TouchSwitch=false
# StatusLEDs=
NumStrips=0
Buttons=0

Revision history for this message
Bin Li (binli) wrote :

On ThinkPad X1 Yoga Gen 5, upgraded the wacom to 1.3-2ubuntu3 in proposed, there are 'AES pen' at 'Wacom Tablet', and I tried set the 'Top barrel button' to 'Right Mouse Button Click', then 'Middle Mouse Button Click', it works fine.

$ cat .cache/gnome-control-center/wacom/devices
[056a:51b9]
Styli=b54d2477;
$ cat .cache/gnome-control-center/wacom/tools
[b54d2477]
ID=11

# 1.3-2ubuntu3
$ libwacom-list-local-devices
# Device node: /dev/input/event9
[Device]
Name=ISDv4 51B9
ModelName=
DeviceMatch=usb:056a:51b9;
Class=ISDV4
Width=12
Height=7
IntegratedIn=Display;System;
Styli=0x1;0x11;0x19;0x21;0x31;0x39;0x49;0x71;0x221;0x231;0x271;0x421;0x431;0x621;0x631;0x8051;0x805b;0x806b;0x807b;0x826b;0x846b;

[Features]
Reversible=false
Stylus=true
Ring=false
Ring2=false
Touch=true
TouchSwitch=false
# StatusLEDs=
NumStrips=0
Buttons=0

Revision history for this message
Bin Li (binli) wrote :

On ThinkPad P15 Gen 1 with libwacom2:1.3-2ubuntu1, there are no supported devices at libwacom-list-local-devices.
After upgraded to libwacom2:1.3-2ubuntu3, it could show 51e9 device, there are 'AES pen' at 'Wacom Tablet', and I tried set the 'Top barrel button' to 'Right Mouse Button Click', then 'Middle Mouse Button Click', it works fine.

$ libwacom-list-local-devices·
# Device node: /dev/input/event9
[Device]
Name=ISDv4 51e9
ModelName=
DeviceMatch=usb:056a:51e9;
Class=ISDV4
Width=14
Height=8
IntegratedIn=Display;System;
Styli=0x1;0x11;0x19;0x21;0x31;0x39;0x49;0x71;0x221;0x231;0x271;0x421;0x431;0x621;0x631;0x8051;0x805b;0x806b;0x807b;0x826b;0x846b;

[Features]
Reversible=false
Stylus=true
Ring=false
Ring2=false
Touch=true
TouchSwitch=false
# StatusLEDs=
NumStrips=0
Buttons=0

$ cat .cache/gnome-control-center/wacom/devices·
[056a:51e9]
Styli=9f9b00f7;
$ cat .cache/gnome-control-center/wacom/tools·
[9f9b00f7]
ID=806b

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Bin Li (binli)
Changed in oem-priority:
status: Triaged → Fix Committed
Changed in libwacom (Ubuntu Groovy):
status: Incomplete → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libwacom - 1.3-2ubuntu3

---------------
libwacom (1.3-2ubuntu3) focal; urgency=medium

  * The previous revision failed to build due to some issues with the
    backport of the feature to the old version, fix the problems
    with those changes
    - d/p/meson-build-auto-test.patch:
      include the new tablet files in the list of data files to install
    - d/p/split_EMR_specific_stylus_tests.patch,
    - d/p/introduce_WSTYLUS_MOBILE_type.patch:
      cherry pick test fixes to match the code changes

libwacom (1.3-2ubuntu2) focal; urgency=medium

  * Support isdv4-aes stylus group and multiple AES stylus definitions.
    (LP: #1921991)

 -- Bin Li <email address hidden> Wed, 21 Apr 2021 18:16:53 +0800

Changed in libwacom (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for libwacom has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Bin Li (binli)
Changed in oem-priority:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.