linux-on-hi10 icon indicating copy to clipboard operation
linux-on-hi10 copied to clipboard

Is there anyway to use the Windows capacitive button? / Hi10 Plus

Open Danct12 opened this issue 6 years ago • 23 comments

Is there anyway to get the Windows capacitive button to work? I plan to use it for a custom function. The tablet is Chuwi Hi10 Plus.

EDIT: I forgot to mention that the touch screen driver was gslx680-acpi.

Danct12 avatar Sep 09 '18 12:09 Danct12

I remember seeing this commit about it, but I don't think it worked for me.

I will test the last kernel, and report back here as soon as I can.

EDIT: I forgot to mention that I am using the silead_ts kernel driver, and not the gslx680 one.

danielotero avatar Sep 09 '18 16:09 danielotero

I tried it yesterday and it didn't work. But they "key" no longer moves the cursor as it did before, so maybe I'm just missing something.

danielotero avatar Sep 11 '18 12:09 danielotero

Hmm, have you tried to use evtest on the touch screen device?

Danct12 avatar Sep 11 '18 15:09 Danct12

I have tried it in my Lubuntu installation. I have a slightly modified 4.13.0-25 kernel with gslx680-acpi driver and this silead_ts.fw. I also have LXDE as my desktop. Evtest reports me this:

Event: time 1536734571.688804, -------------- SYN_REPORT ------------
Event: time 1536734571.769642, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1536734571.769642, type 1 (EV_KEY), code 330 (BTN_TOUCH), value `0`

So the system seems to detect it. When I touch it, it also moves the cursor to that position.

willyneutron avatar Sep 12 '18 19:09 willyneutron

Yes, I also get the same events using the gslx680-acpi driver. But no button is emulated in libinput.

On the other hand, the silead kernel driver report nothing.

danielotero avatar Sep 12 '18 22:09 danielotero

That's unfortunately a waste, I wish someone got it to do something useful like on the Surface.

Danct12 avatar Sep 13 '18 05:09 Danct12

I'm working on patches to get the built-in silead driver to work on the Chuwi Hi10 Plus.

Danct12 avatar May 22 '19 19:05 Danct12

I'm working on patches to get the built-in silead driver to work on the Chuwi Hi10 Plus.

I'm also interested in give it a try to see if there are some improvements that could be easily done. Is there any place where I can track your progress? I hope to have some time in the following weeks.

danielotero avatar May 23 '19 09:05 danielotero

I've got this patch reviewed, still working on the platform data. https://patchwork.kernel.org/patch/10955031/

You can track my progress and pretty much anything I do on my matrix.org channel, or if you still prefer Discord then I can be found here

Danct12 avatar May 23 '19 09:05 Danct12

Was easier than I expected. I've already got the windows touch button to work. Need to test specific values to tune the hi10pro in the touchscreen_dmi.c file.

Will be back with more information later!

danielotero avatar May 25 '19 12:05 danielotero

Same, got that too. I've sent the patch to mailing list. https://patchwork.kernel.org/patch/10958713/

Anyway, if you got it tuned properly, send the patch to the mailing list :)

Danct12 avatar May 25 '19 12:05 Danct12

@Danct12 May I ask how did you get the touchscreen-{min,size}-{x,y} values? The only reference I got is from onitake/gsl-firmware "Touch panel resolution" which says it is estimate.

danielotero avatar May 25 '19 16:05 danielotero

I got it from the estimate too, but I tweaked it on my own until the touch screen is good to use for me. (you can use gslx680-ts-acpi driver to conveniently reloading the touchscreen driver if you're trying to calibrate it)

For touchscreen-min, I used my pen and touch the edge, if the cursor moves to a wrong place (maybe 2-3 centimeters from the pen to the cursor), you can try to change it to 2 or 3 and so on until you got it properly calibrated, same goes to the y axis. (someone needs to correct this)

Danct12 avatar May 26 '19 02:05 Danct12

After spending some time calibrating, I found out that my touch screen is pretty shitty. It works for basic usage, but when I use the HiPen, the precision is awful. And it doesn't reach the border either.

Bellow is an image of the patterns that arise when drawing diagonal lines (and also the limits for the pen). Any of you know if it does the same on Windows or Android?

Touchscreen pattern

danielotero avatar May 26 '19 22:05 danielotero

A little bit off-topic, but that's some nice pattern the pen made.

Sadly though, I wiped Windows and Android on the tablet days ago, so cannot test. Plus, this is my work tablet so I don't wanna risk breaking something.

Danct12 avatar May 26 '19 22:05 Danct12

Don'to worry! I don't want to reinstall Windows either :sweat_smile:

I'm convinced that the pattern is the touchscreen underlying hardware array, and I wonder if can be easily corrected somehow in the driver. It's not so obvious with the finger, but the way the diagonal lines bend with the pen, bothers me too much :laughing:

Also, I find strange that about 5mm of the screen border are unreachable with the pen, but not with the finger. I guess is just a hardware limitation...

danielotero avatar May 27 '19 06:05 danielotero

@danielotero Have you managed to fix the issue with your HiPen yet?

Danct12 avatar May 15 '20 01:05 Danct12

@danielotero Have you managed to fix the issue with your HiPen yet? Do you mean the pattern I draw in the above image? I though they were a hardware limitation so everyone had the same problem. Don't you? The only thing I had to do was drawing diagonal lines fast in Gimp.

I currently are not using the tablet that much, but I'm glad to spend a little time helping however I can.

At the time, I did attempt to submit a patch with my calibration values to the kernel mailing list, but it didn't get enough attention. So I gave up.

danielotero avatar May 15 '20 11:05 danielotero

Yeah, I was talking about the pattern, I still think that it's possible for a software patch or something, not sure.

Anyway, regarding the mailing list, did you CC the emails correctly? Mine gets merged pretty quickly.

Danct12 avatar May 16 '20 01:05 Danct12

Upstream/mainline maintainer of the Silead touchscreen_dmi.c info / Silead driver here.

I have access to both the Chuwi Hi10 Plus (CWI527) and the Chuwi Hi10 Pro (CWI529) now, when using the mainline kernel (which only very recently got support for the Hi10 Pro added, you need 5.14 for this) then the capacitive windows/home buttons works fine, so I believe that this can be closed.

As for the H2 pen support, the button support in the mainline kernel actually filters out pen events, so it does now work with the mainline kernel. But I have a set of patches to add support for the pen as a separate input device, so that Linux actually recognizes that it is a pen, also see #16.

Note as already noted by @danielotero, the accuracy of the pen is quite bad and it does not support pressure, stylus buttons, etc.

jwrdegoede avatar Sep 03 '21 11:09 jwrdegoede

p.s. At least from a mainline kernel pov I believe that this issue can be closed.

jwrdegoede avatar Sep 03 '21 11:09 jwrdegoede

:+1: on closing. When playing with the updated drivers this week-end I realized that yes, the capacitive windows button worked on my Hi 10 Pro.

Note that CONFIG_TOUCHSCREEN_DMI is kind of important and (I think) needs to be enabled here.

samueldr avatar Sep 03 '21 19:09 samueldr

It's been 3 years and we jumped from 5.10 -> 6.8. Time flies so fast.

At this point this should no longer be an issue (at least on this tablet), so let's close this issue once and for all. But if it still does, let's file a new issue for this.

I don't use my Hi10 Plus anymore and it's currently sitting under the desk collecting dust..

The USB host controller on the bottom port blown up or something so there was a short, revived by plugging it in and let it burn out (dumb idea I know, but it worked for me) and continued to live on until I got my Orange Pi 5.

I'd like to thank everyone involved in this project, all I have to say is that be strong. :D

Danct12 avatar Mar 22 '24 19:03 Danct12