-
Notifications
You must be signed in to change notification settings - Fork 175
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 to HUION KD200 and other recent HUION 0064 tablets #644
Conversation
Since Huion uses a new device id for recent tablets, add a new device id 0x0064 to support recent Huion tablets. At least these tablets are using device id 0x0064: Gaomon 1060 Pro (0x256c:0x0064) Gaomon M6 (0x256c:0x0064) Huion KD200 (0x256c:0x0064) Huion KD100 (0x256c:0x0064) Signed-off-by: Inochi Amaoto <[email protected]>
Hi @inochisa! Thanks for the PR. For reference, this comes from this conversation in the kernel mailing list: Let's see if you can get a few users to test it! |
@JoseExposito, thanks for you improvement, I have updated my pull description. |
35df288
to
46ee430
Compare
As now the huion tablets has more than two usbif, limited interface number will lead to a broken tablet. Increase the allowed interface number to 2 to avoid this problems. Signed-off-by: Inochi Amaoto <[email protected]>
Add Digitizer, stylus and multi-axis support for the input configuration of uclogic device, this will help libinput detecte tablets accurately. Signed-off-by: Inochi Amaoto <[email protected]>
@JoseExposito Is there any advice for implement with bluetooth uclogic devices. I have already found that the tablet uses bluetooth ATT packet to configure itself (the similar configure code of the usb). But I did not find a way to send the packet from kernel. I tried to directly access the |
I tried it a while ago and I gave up because it was too complicated. The driver relays in too many USB related functionality to easily add support for Bluetooth. It'd require migrating a bunch of function (many of them I can not test because I don't own the hardware), so I decided to focus on something else. |
The code of uclogic_params_huion_init has too much condition check, use goto to simplify it. Signed-off-by: Inochi Amaoto <[email protected]>
uclogic_params_huion_init alway init tablet with a touch ring or touch strip, but some tablets have none. Add a list to suppress this init process. Signed-off-by: Inochi Amaoto <[email protected]>
Signed-off-by: Inochi Amaoto <[email protected]>
86ba88c
to
75d84fe
Compare
Hi,there are some problems when I was installing it. The make.conf is as follows: When I search for a solution, I found this: https://github.com/torvalds/linux/commit/1d9ca84ce034960707b62ce7d5ca75d04f8db91a Please could anyone give me some advice what should I do?Thanks. |
@freezai-Yang I am using 6.4.4-arch1, and there is no problem. Try to update your system and rebuild. Also, this problem seems not to be related to this pr. Please check the state of a fresh repo. |
@nvkomimi I now hold the development process since I didn't have enough time. The code of But anyway, if you only need usb support, use this patch is just enough. |
I can confirm this works with my Huion 1060P. My before state was STYLUS and ERASER, now I get PAD also |
Ah, glad to hear my code earned the "completely a mess" badge 😂 It means my perfectionism is finally giving way 😅 Thanks to everyone posting your changes to the driver, and especially @JoseExposito for the stellar work in the input layer! And sorry I'm not up to taking it any further. I'd be happy to give reigns to anyone interested and capable enough, and I just sent an invite to José. Let's see if he accepts 🤞 |
Hi, @spbnick . Thanks for your efforts for this repo. |
Hi @inochisa, Sorry for the long delay on my side. I plan to create a DIGImend release (v13) this weekend with the changes already in master and I'd like to include the new product ID for your tablet (0x0064) as well as #678 (0x006f). This should allow us to get some actual testing (and bug reports) before we send the patches to the upstream kernel. I created a PR cherry-picking your first commit: #685 About the HID: uclogic: fix invalid interface for HUION tablets patch: Is it required for the tablets to works or just avoids printing a warning? |
@JoseExposito Excellent work
This is necessary for my KD200 to work, but I suspend that it should check I have attached the usb descriptors of my board. And I hope it may be useful. |
/* Keep everything intact, but mark pen usage invalid */ | ||
p.pen.usage_invalid = true; | ||
goto output; | ||
/* Else, if it's not a pen interface */ | ||
} else if (bInterfaceNumber != 0) { | ||
} else if (bInterfaceNumber > 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@inochisa thanks a lot for the quick reply.
I'm trying to understand this second patch a bit better.
What are the events sent by the interface with bInterfaceNumber == 2
? The keyboard events? In that case, it make sense to add if (bInterfaceNumber == 1 || bInterfaceNumber == 2)
so the interface is used but not as a pen.
About the second condition. Can this else if
condition remain unmodified?
I made a minor modification of your patch in the PR I'm working on for v13 to illustrate what I mean. I think it should work: 0462d43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@inochisa thanks a lot for the quick reply.
I'm trying to understand this second patch a bit better.
What are the events sent by the interface with
bInterfaceNumber == 2
? The keyboard events? In that case, it make sense to addif (bInterfaceNumber == 1 || bInterfaceNumber == 2)
so the interface is used but not as a pen.
Yes, it is keyboard events.
About the second condition. Can this
else if
condition remain unmodified?
I think this can be left unmodified. As we already check bInterfaceNumber
"1" and "2", it is OK to use existed check.
I made a minor modification of your patch in the PR I'm working on for v13 to illustrate what I mean. I think it should work: 0462d43
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged! Thanks a lot 🎉
You can rebase this PR on top of master if you want. But I'm trying to avoid refactors without KUnit tests to ensure the functionality is kept.
About the firmware list... I recently discovered that they are unique and that can be used to identify the tablets in user-space linuxwacom/libwacom#659
It might be a good idea to add a full list of firmwares in the future, but for the moment I'd like to keep it as it is to avoid bugs/regressions until I have a clear idea of how we can take advantage of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged! Thanks a lot 🎉
You can rebase this PR on top of master if you want. But I'm trying to avoid refactors without KUnit tests to ensure the functionality is kept.
I prefer to close this PR as the left in this patch is hard to evolve. (I want to improve the touch strip detection, but it is ugly to use a firmware name list)
About the firmware list... I recently discovered that they are unique and that can be used to identify the tablets in user-space linuxwacom/libwacom#659
It might be a good idea to add a full list of firmwares in the future, but for the moment I'd like to keep it as it is to avoid bugs/regressions until I have a clear idea of how we can take advantage of it.
Excellent. I see your tool detect the feather of KD200. I will check result and see there is anything that can improve/
This patch add support for HUION KD200 tablets(
256c:0064
) and other recent HUION tabletsSummary
0064
.New support tablets
This pull request may add support to the following tablets (0064)
0064
)Allow DIGImend detects more interface
These issue with
interface is invalid, ignoring
should also be fixed:#640
#486
#335
Edit
Footnotes
I have already tested this tablet. ↩ ↩2
unlike the descriptors data in Pls Add support HUION KD200 #545, it seems that KD200 now has three usbif. ↩