Goodix touchscreen - how to fix flipped coordinates?

764 views
Skip to first unread message

Hannu Markkula

unread,
Nov 15, 2015, 3:32:38 AM11/15/15
to Android-x86
So I got Android-x86 running on my tablet and otherwise it seems to be working, but the touchscreen is flipped. How would I modify this patch to work with my device? https://kernel.googlesource.com/pub/scm/linux/kernel/git/axboe/linux-block/+/8b5a359c5b3e631f17eeb1dcb930474000d33d49

Mauro Rossi

unread,
Nov 15, 2015, 4:32:06 AM11/15/15
to Android-x86
Hi Hannu,

if you want or need to avoid touchscreen calibration, you need to descend in kernel folder and apply the patch,

git apply [patch_filename]

then rebuild and test. 
BTW do you know if the patch has been upstreamed to kernel 4.3  or it will be in next kernels?


Since from your message I get that driver is working but, just flipped, if it is acceptable to calibrate once at first installation, 
you could try to trigger the calibration procedures in device/generic/common/init.sh (talking about lollipop-x86),

which should be able to handle flipped coordinates touchscreens, by adding in the list of PRODUCT the two tablets function init_tscal()

function init_tscal()
{
case "$PRODUCT" in
T91|T101|ET2002|74499FU|945GSE-ITE8712|CF-19[CDYFGKLP]*)     #you need to add PRODUCT as |LABEL before *
create_pointercal
return
;;
*)
;;
esac

case construct will check for exact match with PRODUCT LABELs listed, 
your product LABEL can be obtained by issueing this command in DEBUG mode console [ALT]+[F1]:

cat /sys/class/dmi/id/product_name

M.

Hannu Markkula

unread,
Nov 15, 2015, 5:18:23 AM11/15/15
to Android-x86
Hi Mauro,

Does editing that file require rebuilding whole Android-x86? I'd like to avoid that.
As far as I know this patch has been upstreamed in 4.2. What it does is it recognizes if machine is Winbook TW100 or TW700 and flips the touch input and what I'd like to do is modify the patch so it does that for my tablet also.

Mauro Rossi

unread,
Nov 15, 2015, 7:27:27 AM11/15/15
to Android-x86
Hi,

kernel patch would require building the kernel and the ISO/efi image, there are cases where patch can be backported to previous kernel without impacts,
cases where headers/uapi is impacted (that may prevent functionality) this seams the former, but I'm not entirely sure.


If you don't want to build/test then I suggest you move to next option:

init.sh could be edited on the device where Android-x86 is installed by using an auxiliary desktop/laptop with ubuntu and adb.

Could you please retrieve your product ID, then you just need to continue as instructed and see if it works.

The modified init.sh file will need to be adb pulled, edited and adb pushed to overwrite the existing one.

adb connect [ip address]
adb root
adb pull /etc/init.sh ./init.sh

[you edit the init.sh file by adding your product ID label]

adb push ./init.sh /etc/init.sh

[reboot]
[perform Calibration]

Let me know if the init.sh modding works. You may need to launch Calibration app once on an already installed Android-x86
If you confirm it works, then your problem would be solved.

Next kernels changes are not usually backported in android-x86 current stable kernel, afaik.

Mauro

Reply all
Reply to author
Forward
0 new messages