Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lenovo ThinkPad X1 Yoga Gen 7 (Wacom HID 5309) #353

Closed
fahlb opened this issue Jan 13, 2024 · 5 comments
Closed

Lenovo ThinkPad X1 Yoga Gen 7 (Wacom HID 5309) #353

fahlb opened this issue Jan 13, 2024 · 5 comments

Comments

@fahlb
Copy link
Contributor

fahlb commented Jan 13, 2024

Here is the sysinfo of my X1 Yoga Gen 7 with 1080p screen: sysinfo.up1aDlcShX.tar.gz

EDIT: The sysinfo above was created under Wayland. I created another one under X.org (see comment): sysinfo.Vy5OTYeU2H.tar.gz

My device reports the devices 'Wacom HID 5309 Pen' and 'Wacom HID 5309 Finger' in the output of # libinput list-devices. This number is different from the 'Wacom HID 52B5', reported in issue #255.

Sadly I cannot generate a .tablet-file from this via scripts/git-update.sh. It's simply missing in the generated files. Because I'm on Wayland I installed xinput and xrandr in the hopes their output would help fix this but it didn't. Maybe I'll try it manually from the information generated.

@fahlb
Copy link
Contributor Author

fahlb commented Jan 13, 2024

Okay, I having read in the libwacom documentation it should be sufficient to change an existing .tablet file of similar/identical hardware. Compared to the existing X1 Yoga Gen 6 entries and PR for issue #255, only my productID (PID) should be different. Thus I copied them and only changed the Name and DeviceMatch entries. This seems indeed sufficient when also taking a look at the extensive libwacom/data/wacom.example.

I propose the creation of a file called isdv4-5309.tablet, containing the following:

# Lenovo ThinkPad X1 Yoga Gen 7
# Sensor Type: AES
# Features: Touch (Integrated), Tilt
# HW Resolution: 30159 x 18850 (2540 x 2540 lpi)
#
# Manually generated from sysinfo.up1aDlcShX
# https://github.com/linuxwacom/wacom-hid-descriptors/issues/353

[Device]
Name=ISDv4 5309
ModelName=
DeviceMatch=i2c:056a:5309
Class=ISDV4
Width=12
Height=7
IntegratedIn=Display;System
Styli=@isdv4-aes;

[Features]
Stylus=true
Touch=true

EDIT: Fixed VID hex to be lowercase. Needed to pass testing of libwacom as mentioned in my latest comment.

@fahlb
Copy link
Contributor Author

fahlb commented Jan 13, 2024

I was able to install my isdv4-5309.tablet file as described in the libwacom/README.md. My device is now recognized:

$ libwacom-list-local-devices
devices:
- name: 'ISDv4 5309'
  bus: 'i2c'
  vid: '0x056a'
  pid: '0x5309'
  nodes: 
  - /dev/input/event7: 'Wacom HID 5309 Pen'

The device is now also displayed in gnome settings and can be configured there. I call this a success and will create a pull request next!

EDIT: It looks like button 1 can not be configured. I select 'Right Mouse Button Click' but it still behaves like a middle click (as is default in my Fedora 39 install...).

EDIT2: In an X.org session the button configuration works fine! I guess it has something to do with xsetwacom not working under Wayland.

@fahlb
Copy link
Contributor Author

fahlb commented Jan 13, 2024

According to the discussion in #279 and the related pull request #280, running sysinfo under X.org provides additional data (in xsetwacom.txt). So I did just that.

Here is my sysinfo generated in an X.org session (after temporarily removing the custom .tablet file from above) :
sysinfo.Vy5OTYeU2H.tar.gz

There is still no .tablet file generated with scripts/git-update.sh. Since the above works 100% in the X.org session (including remapping button 1). So I'll copy my .tablet file over and create a PR with the data from the X.org session.

EDIT: Since there is already an open pull request #256 for 'Lenovo ThinkPad X1 Yoga Gen 7' with a 4k screen, I'll call mine 'Lenovo ThinkPad X1 Yoga Gen 7 (Version A)' to avoid any conflicts.

fahlb added a commit to fahlb/wacom-hid-descriptors that referenced this issue Jan 14, 2024
fahlb added a commit to fahlb/wacom-hid-descriptors that referenced this issue Jan 14, 2024
fahlb added a commit to fahlb/wacom-hid-descriptors that referenced this issue Jan 14, 2024
@fahlb
Copy link
Contributor Author

fahlb commented Jan 14, 2024

Please ignore the previous commits on my fork with the typos. I should have worn my glasses. A coffee wouldn't have hurt either lol.

@fahlb
Copy link
Contributor Author

fahlb commented Jan 14, 2024

Compiling and testing libwacom revealed that the vendor id (VID) hex needs to be lowercase. So in isdv4-5309.tablet, the line DeviceMatch=i2c:056A:5309 needs to be changed to DeviceMatch=i2c:056a:5309 only then do all tests pass.

EDIT: This has been fixed in my pull requests here (#355) and over at linuxwacom/libwacom#626
EDIT2: Or so I thought...

fahlb added a commit to fahlb/libwacom that referenced this issue Jan 14, 2024
whot pushed a commit to linuxwacom/libwacom that referenced this issue Jan 14, 2024
jigpu pushed a commit that referenced this issue Dec 10, 2024
@jigpu jigpu closed this as completed Dec 16, 2024
jigpu added a commit to jigpu/libwacom that referenced this issue Dec 16, 2024
Continuing to add device definitions from wacom-hid-descriptors.
 - Corrects X/Y dimensions for wacom-isdv4-5309.tablet.
 - Replaces wacom-hid-52c6.tablet with wacom-isdv4-52c6.tablet that has
corrected dimensions.
 - Replaces wacom-hid-52EB-pen.tablet with wacom-isdv4-52eb.tablet that
has additional metadata.

HID data:
 - linuxwacom/wacom-hid-descriptors#358
 - linuxwacom/wacom-hid-descriptors#366
 - linuxwacom/wacom-hid-descriptors#359
 - linuxwacom/wacom-hid-descriptors#374
 - linuxwacom/wacom-hid-descriptors#371
 - linuxwacom/wacom-hid-descriptors#369
 - linuxwacom/wacom-hid-descriptors#353
 - linuxwacom/wacom-hid-descriptors#345
 - linuxwacom/wacom-hid-descriptors#373
 - linuxwacom/wacom-hid-descriptors#365
whot pushed a commit to linuxwacom/libwacom that referenced this issue Dec 17, 2024
Continuing to add device definitions from wacom-hid-descriptors.
 - Corrects X/Y dimensions for wacom-isdv4-5309.tablet.
 - Replaces wacom-hid-52c6.tablet with wacom-isdv4-52c6.tablet that has
corrected dimensions.
 - Replaces wacom-hid-52EB-pen.tablet with wacom-isdv4-52eb.tablet that
has additional metadata.

HID data:
 - linuxwacom/wacom-hid-descriptors#358
 - linuxwacom/wacom-hid-descriptors#366
 - linuxwacom/wacom-hid-descriptors#359
 - linuxwacom/wacom-hid-descriptors#374
 - linuxwacom/wacom-hid-descriptors#371
 - linuxwacom/wacom-hid-descriptors#369
 - linuxwacom/wacom-hid-descriptors#353
 - linuxwacom/wacom-hid-descriptors#345
 - linuxwacom/wacom-hid-descriptors#373
 - linuxwacom/wacom-hid-descriptors#365
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants