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

Add support for Lenovo ThinkPad X1 Yoga Gen 7 #626

Merged
merged 2 commits into from
Jan 14, 2024

Conversation

fahlb
Copy link
Contributor

@fahlb fahlb commented Jan 14, 2024

@fahlb
Copy link
Contributor Author

fahlb commented Jan 14, 2024

libwacom has been successfully compiled and tested with data/isdv4-5309.tablet:

$ meson test -C builddir
ninja: Entering directory `/home/felix/TEMP/libwacom_contribution_xorg-redo/libwacom/builddir'
ninja: no work to do.
1/8 libwacom:all / test-ltversion                       OK              0.00s
2/8 libwacom:all+valgrind / test-stylus-validity        OK              0.02s
3/8 libwacom:all+valgrind / test-tablet-validity        OK              0.06s
4/8 libwacom:all+valgrind / test-svg-validity           OK              0.07s
5/8 libwacom:all+valgrind / test-load                   OK              0.08s
6/8 libwacom:all+valgrind / test-dbverify               OK              0.12s
7/8 libwacom:all / files-in-git                         OK              0.73s
8/8 libwacom:all / pytest                               OK              5.69s

Ok:                 8   
Expected Fail:      0   
Fail:               0   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   

Full log written to /home/felix/TEMP/libwacom_contribution_xorg-redo/libwacom/builddir/meson-logs/testlog.txt

@fahlb
Copy link
Contributor Author

fahlb commented Jan 14, 2024

I propose to either add the product name or the model number to the device name in the first line, eg in my case:

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

or

# Lenovo ThinkPad X1 Yoga Gen 7 (21CES00100)

This would help to differentiate between different configurations of the same model family. For example there is another pr over at linuxwacom/wacom-hid-descriptors for the same model but a different screen and PID (52b5): linuxwacom/wacom-hid-descriptors#256.

Copy link
Member

@whot whot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good minus one error, surprised meson test passed this one on your machine? Anyway, rest looks good, thanks.

data/isdv4-5309.tablet Outdated Show resolved Hide resolved
@whot whot merged commit 6d2b712 into linuxwacom:master Jan 14, 2024
12 of 13 checks passed
@fahlb
Copy link
Contributor Author

fahlb commented Jan 14, 2024

Looks good minus one error, surprised meson test passed this one on your machine? Anyway, rest looks good, thanks.

Whoops, good catch! The test actually failed before I fixed this on my machine. I must have forgotten to add the change to staging before committing. Sorry for that!

@fahlb
Copy link
Contributor Author

fahlb commented Jan 14, 2024

I have one more thing: With the correct isdv4-5309.tablet file added to /etc/libwacom and libwacom-update-db /etc/libwacom successfully executed, the settings for my wacom tablet are displayed correctly and work as intended - except for the button mapping of the stylus. That works fine in X.org but not in a Wayland session. There, the default behaviour doesn't change no matter what I select from the drop down menu.

The button mapping works fine with my Wacom One M even under Wayland. So Wayland can't be the issue, I guess. Any idea where this problem might be located?

@whot
Copy link
Member

whot commented Jan 14, 2024

libwacom itself doesn't handle the button mappings, that's up to the compositor (e.g. mutter) in Wayland, so the issue will be there. Mind you - are you talking about the eraser button? If so that one cannot be changed on AES pens, it's hardcoded in the fw and really hard to remap in software because it requires unreliable heuristics, so libinput doesn't have support for that. Though iirc that button shouldn't be exposed in the configuration either.

@fahlb
Copy link
Contributor Author

fahlb commented Jan 14, 2024

Thank you. No, I'm talking about the second button above the eraser that is currently mapped to middle click by default (after upgrading to Fedora 39 with Gnome 45). Previously it was mapped to right click.

I also suspect mutter besides gnome settings and maybe libinput. I'll ask around if anyone else experiences this issue on their built in wacom tablets and file a bug report for mutter or gnome.

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

Successfully merging this pull request may close these issues.

2 participants