OnePlusOSS / android_kernel_oneplus_sm8350

Other
64 stars 50 forks source link

Issue with touchscreen on 9 Pro #1

Closed kristofpetho closed 3 years ago

kristofpetho commented 3 years ago

Hello, I've managed to get the kernel compiled and booted, but I have an issue with the touchscreen. The touch registers 5-10mm from where the screen is actually touched. Is there an additional parameter that needs to be set for the 9 Pro? Our can you please make sure that all sources needed for proper functionality are here on GitHub?

Thank you!

Kristof

ghost commented 3 years ago

Hey, I know this is a bit off-topic, but how did you manage to build the kernel? I can't seem to compile on my PC. Also might want to look in the techpack, maybe it's in there.

kristofpetho commented 3 years ago

Hey, I know this is a bit off-topic, but how did you manage to build the kernel? I can't seem to compile on my PC. Also might want to look in the techpack, maybe it's in there.

Take a look in my repo, all patches needed to compile are there.

ghost commented 3 years ago

Thanks, will see if I can reproduce.

kristofpetho commented 3 years ago

This has been resolved.

kristofpetho commented 3 years ago

@YuHuang65 I'm hoping you can help me since the issue is still there with latest sources. Touch seems to be off by ~2-3mm. Thanks!

Vellige commented 3 years ago

@YuHuang65 I'm hoping you can help me since the issue is still there with latest sources. Touch seems to be off by ~2-3mm. Thanks!

I've try to complied kernel code and booted, the touchpanel seems to be ok, I set the screen resolution to QHD, and the location that actually touched is same as pointor location printed. How do you check the location of the touch?

kristofpetho commented 3 years ago

@YuHuang65 I'm hoping you can help me since the issue is still there with latest sources. Touch seems to be off by ~2-3mm. Thanks!

I've try to complied kernel code and booted, the touchpanel seems to be ok, I set the screen resolution to QHD, and the location that actually touched is same as pointor location printed. How do you check the location of the touch?

There is only a misalign when I inline all kernel modules. If I load modules from the vendor partition it indeed works fine, but then I'm experiencing random reboots within minutes of booting up. To me, this most likely means that the touchscreen sources on Github are missing something.

YuHuang65 commented 3 years ago

@YuHuang65 I'm hoping you can help me since the issue is still there with latest sources. Touch seems to be off by ~2-3mm. Thanks!

I've try to complied kernel code and booted, the touchpanel seems to be ok, I set the screen resolution to QHD, and the location that actually touched is same as pointor location printed. How do you check the location of the touch?

There is only a misalign when I inline all kernel modules. If I load modules from the vendor partition it indeed works fine, but then I'm experiencing random reboots within minutes of booting up. To me, this most likely means that the touchscreen sources on Github are missing something.

I've checked the touchpanel source code on Github and compiled source codes to debug, there is on missing code, and touchpanel module is normal without touch deviation. Could you mind sending me the log of problem recurrence? it will be more convenient for me to help you, Thanks.

kristofpetho commented 3 years ago

@YuHuang65 I'm hoping you can help me since the issue is still there with latest sources. Touch seems to be off by ~2-3mm. Thanks!

I've try to complied kernel code and booted, the touchpanel seems to be ok, I set the screen resolution to QHD, and the location that actually touched is same as pointor location printed. How do you check the location of the touch?

There is only a misalign when I inline all kernel modules. If I load modules from the vendor partition it indeed works fine, but then I'm experiencing random reboots within minutes of booting up. To me, this most likely means that the touchscreen sources on Github are missing something.

I've checked the touchpanel source code on Github and compiled source codes to debug, there is on missing code, and touchpanel module is normal without touch deviation. Could you mind sending me the log of problem recurrence? it will be more convenient for me to help you, Thanks.

Thank you! I can send you dmesg files, but it shows that touch is registering, but it registers higher than touches. If I compile the source code as is, I need to force load modules from the vendor partition - this way touch works perfectly, but I have random reboots as soon as the screen turns off. If I compile the source code with inlining all modules, the random reboots are gone, but then touchscreen registers touches differently.

What do you mean by "there is on missing code"?

YuHuang65 commented 3 years ago

@YuHuang65 I'm hoping you can help me since the issue is still there with latest sources. Touch seems to be off by ~2-3mm. Thanks!

I've try to complied kernel code and booted, the touchpanel seems to be ok, I set the screen resolution to QHD, and the location that actually touched is same as pointor location printed. How do you check the location of the touch?

There is only a misalign when I inline all kernel modules. If I load modules from the vendor partition it indeed works fine, but then I'm experiencing random reboots within minutes of booting up. To me, this most likely means that the touchscreen sources on Github are missing something.

I've checked the touchpanel source code on Github and compiled source codes to debug, there is on missing code, and touchpanel module is normal without touch deviation. Could you mind sending me the log of problem recurrence? it will be more convenient for me to help you, Thanks.

Thank you! I can send you dmesg files, but it shows that touch is registering, but it registers higher than touches. If I compile the source code as is, I need to force load modules from the vendor partition - this way touch works perfectly, but I have random reboots as soon as the screen turns off. If I compile the source code with inlining all modules, the random reboots are gone, but then touchscreen registers touches differently.

What do you mean by "there is on missing code"?

The way that touch coordinates printed in dmesg files is higher than touches, the reason may be that OP9 Pro supports two screen resolution modes: FHD and QHD, In FHD mode, the coordinates printed in dmesg files is higher than touches actually, because it is based on the coordinates in QHD mode. You can change the screen resolution into QHD mode, and then compares the difference between two coordinates to see if there is any deviation. You can change the screen in this way: "Setting ---> Display ---> Advenced ---> Resolution ---> QHD".

kristofpetho commented 3 years ago

@YuHuang65 I'm hoping you can help me since the issue is still there with latest sources. Touch seems to be off by ~2-3mm. Thanks!

I've try to complied kernel code and booted, the touchpanel seems to be ok, I set the screen resolution to QHD, and the location that actually touched is same as pointor location printed. How do you check the location of the touch?

There is only a misalign when I inline all kernel modules. If I load modules from the vendor partition it indeed works fine, but then I'm experiencing random reboots within minutes of booting up. To me, this most likely means that the touchscreen sources on Github are missing something.

I've checked the touchpanel source code on Github and compiled source codes to debug, there is on missing code, and touchpanel module is normal without touch deviation. Could you mind sending me the log of problem recurrence? it will be more convenient for me to help you, Thanks.

Thank you! I can send you dmesg files, but it shows that touch is registering, but it registers higher than touches. If I compile the source code as is, I need to force load modules from the vendor partition - this way touch works perfectly, but I have random reboots as soon as the screen turns off. If I compile the source code with inlining all modules, the random reboots are gone, but then touchscreen registers touches differently. What do you mean by "there is on missing code"?

The way that touch coordinates printed in dmesg files is higher than touches, the reason may be that OP9 Pro supports two screen resolution modes: FHD and QHD, In FHD mode, the coordinates printed in dmesg files is higher than touches actually, because it is based on the coordinates in QHD mode. You can change the screen resolution into QHD mode, and then compares the difference between two coordinates to see if there is any deviation. You can change the screen in this way: "Setting ---> Display ---> Advenced ---> Resolution ---> QHD".

Thank you. But the problem is that it actually registers touches in the wrong place. I've verified on multiple 9 Pro devices with a custom kernel with inline modules. To reproduce, on the keyboard if you touch the bottom on a letter, like "y", it registered either a "g" or an "h". When the modules are force loaded, it registered normally, as a "y".

YuHuang65 commented 3 years ago

@YuHuang65 I'm hoping you can help me since the issue is still there with latest sources. Touch seems to be off by ~2-3mm. Thanks!

I've try to complied kernel code and booted, the touchpanel seems to be ok, I set the screen resolution to QHD, and the location that actually touched is same as pointor location printed. How do you check the location of the touch?

There is only a misalign when I inline all kernel modules. If I load modules from the vendor partition it indeed works fine, but then I'm experiencing random reboots within minutes of booting up. To me, this most likely means that the touchscreen sources on Github are missing something.

I've checked the touchpanel source code on Github and compiled source codes to debug, there is on missing code, and touchpanel module is normal without touch deviation. Could you mind sending me the log of problem recurrence? it will be more convenient for me to help you, Thanks.

Thank you! I can send you dmesg files, but it shows that touch is registering, but it registers higher than touches. If I compile the source code as is, I need to force load modules from the vendor partition - this way touch works perfectly, but I have random reboots as soon as the screen turns off. If I compile the source code with inlining all modules, the random reboots are gone, but then touchscreen registers touches differently. What do you mean by "there is on missing code"?

The way that touch coordinates printed in dmesg files is higher than touches, the reason may be that OP9 Pro supports two screen resolution modes: FHD and QHD, In FHD mode, the coordinates printed in dmesg files is higher than touches actually, because it is based on the coordinates in QHD mode. You can change the screen resolution into QHD mode, and then compares the difference between two coordinates to see if there is any deviation. You can change the screen in this way: "Setting ---> Display ---> Advenced ---> Resolution ---> QHD".

Thank you. But the problem is that it actually registers touches in the wrong place. I've verified on multiple 9 Pro devices with a custom kernel with inline modules. To reproduce, on the keyboard if you touch the bottom on a letter, like "y", it registered either a "g" or an "h". When the modules are force loaded, it registered normally, as a "y".

I'm sorry that I can't reappearance your problems, maybe you can send me relative log files so that we can analyse the problems here, Thank you!

kristofpetho commented 3 years ago

Thank you. I guess you are building everything as is, so creating modules. I'm trying to build everything inline since I'm trying to build a standalone kernel. What logs would be meaningful that you could use that I can provide?

YuHuang65 commented 3 years ago

Thank you. I guess you are building everything as is, so creating modules. I'm trying to build everything inline since I'm trying to build a standalone kernel. What logs would be meaningful that you could use that I can provide?

You can use OnePlus Logkit to capture relative log through following operations:

  1. Dial in "*#800#" and enter OnePlus Logkit interface;
  2. Start "Basic Log" and reboot you phone;
  3. Reappear your problems;
  4. Stop "Basic Log" and the log files will be preserved in "/sdacrd/Android/data/oem_log" path. You can pull the logs and send to me. Thank you!
kristofpetho commented 3 years ago

Thank you. In the meantime, whenever I'm using any modules, I get random reboots when the screen goes off, mostly while in a call. Please see attached, hopefully this will help. When I do load touchscreen as a module (and not build inline), touchscreen works perfectly, but then I have these reboots...

console-ramoops-0.txt dmesg-ramoops-0.txt dmesg-ramoops-1.txt

kristofpetho commented 3 years ago

And here is the requested log for when everything is inlined and the touchscreen is off by a few millimeters. It's a 70Mb zip file, so can't upload it here.

https://drive.google.com/file/d/1WpJ2TzpwuXYYMWjEnwZbnqAvqo4CJD-R/view?usp=sharing

Edit: I see that whenever I inline the techpack/oneplus modules, op_cmdline cannot get proper information from the system. Maybe that's the issues?

YuHuang65 commented 3 years ago

And here is the requested log for when everything is inlined and the touchscreen is off by a few millimeters. It's a 70Mb zip file, so can't upload it here.

https://drive.google.com/file/d/1WpJ2TzpwuXYYMWjEnwZbnqAvqo4CJD-R/view?usp=sharing

Edit: I see that whenever I inline the techpack/oneplus modules, op_cmdline cannot get proper information from the system. Maybe that's the issues?

It seems that the mismatched TP firmware was loaded during touchpanel module initialization, the reason may be that your TP driver codes are not fully synchronized. You can check codes in "techpack/oneplus/input/OneplusTouchScreen/" path to see if the codes are fully synchronized.

kristofpetho commented 3 years ago

And here is the requested log for when everything is inlined and the touchscreen is off by a few millimeters. It's a 70Mb zip file, so can't upload it here. https://drive.google.com/file/d/1WpJ2TzpwuXYYMWjEnwZbnqAvqo4CJD-R/view?usp=sharing Edit: I see that whenever I inline the techpack/oneplus modules, op_cmdline cannot get proper information from the system. Maybe that's the issues?

It seems that the mismatched TP firmware was loaded during touchpanel module initialization, the reason may be that your TP driver codes are not fully synchronized. You can check codes in "techpack/oneplus/input/OneplusTouchScreen/" path to see if the codes are fully synchronized.

Thank you - my codes are fully in sync, just checked...

kristofpetho commented 3 years ago

Thank you for all the help @YuHuang65! Found the issue in my kernel, all fixed and running perfectly.