Skip to content

Instantly share code, notes, and snippets.

@T-rex2017
Last active October 2, 2020 08:36
Show Gist options
  • Save T-rex2017/8f1d477131a19f828b2035b4b64a87da to your computer and use it in GitHub Desktop.
Save T-rex2017/8f1d477131a19f828b2035b4b64a87da to your computer and use it in GitHub Desktop.
peter is some random person who came in to p1m community at some point a shed some light on issues related to booting based on different versions of lcm and touch
hello guys, is there any chance to get p1m with aftermarket display working with LOS14.1 3.18.19 ? Phone boots with oem cracked display, but not with new aftermarket one. I have set up serial console to take a look on boot process, but I just cannot find the cause...
Is it version lineage-14.1-20180102_172327-UNOFFICIAL-P1m.zip ?
well I am able to flash it, but it will not boot with aftermarket display
yup, I have made some research: https://forum.xda-developers.com/android/help/how-to-debug-kenrel-bootloop-adb-t3820790#post77172298
but still no luck to fix it in kernel
Alfred, this is only workaround to install 3.18 ROM using TWRP based on 3.10 kernel
If you have problem that TWRP is not working anymore, you can flash older version based on 3.10 kernel instead
yes, that is the problem with 3.18.19 kernel and aftermarket display I am trying to figure out
could you please link me? I have trouble finding it
filename lineage-14.1-20171119_095733-UNOFFICIAL-P1m.zip ?
looks older than one I have tried, but I will give it a go
ok, I am dloading it, trying in few minutes
no luck, same bootloop as before
but as before, it is problem of missing LCM driver
but I cannot compile it in, as I do not have sources for this version
I can clone his git version and compile in that missing LCM
but I am afraid it wont help at all
KT?
well I have just cloned git from darklord
I can compile it with missing lcm
but I am afraid, it will not start either, as the previous version from zerocool
the lcm I need is already in kernel tree
it just need to be configured
or at lease I hope so
I got this messages in kernel log:
[ 8.943226] (1)[1:swapper/0][DISP][disp_lcm_probe #831]ERROR:FATAL ERROR: can't found lcm driver:ili9881_hd720_dsi_vdo_yassy in linux kernel driver
[ 8.944883] (1)[1:swapper/0][DISP][disp_lcm_probe #837]ERROR:FATAL ERROR!!!No LCM Driver defined
[ 8.945989] (1)[1:swapper/0][DISP][primary_display_init #5067]ERROR:disp_lcm_probe returns null
[ 8.947088] (1)[1:swapper/0][DISP][primary_display_get_width #7270]ERROR:lcm handle is null
[ 8.948173] (1)[1:swapper/0][DISP][primary_display_get_height #7284]ERROR:lcm handle is null
so I run defconfig from git, and edited:
CONFIG_CUSTOM_KERNEL_LCM="hx8394d_hd720_dsi_vdo_tianma otm1284a_hd720_dsi_vdo_baolongda ili9881_hd720_dsi_vdo_yassy"
and now compiling
home server is burning CPUs :)
so it will compile but is empty module?
because now it has finished compiling
with bunch of warnings as usual, but no error
I got it, looks very similar to ili9881_hd720_dsi_vdo_yassy
there is some source
[ 10.368469] (1)[1:swapper/0]ft5x0x 1-0070: [FTS] Step 3 fail: CTPM ID,ID1 = 0x0,ID2 = 0x0, 0x54, 0x2c:
this looks like filan problem
final*
yes that is probably the driver
Only idea I have for now is to flash OEM lenovo ROM, enable console in kernel and look how does it look there
https://pastebin.com/8crwRNLf
https://pastebin.com/rb1VePKe
it has some max length problem
https://del.dog/ogazativoj
not yet
this looks like device-specific problem rather than kernel issue
[ File : dmesg_oem.txt ]
?
the 3.18 kernel from darklords git has the driver
but it is not working somehow :)
well yes, but I cannot find the file
I have 3.10 source from lenovo
but not sure, if it is correct
It looks only posible solution is to buy used p1m with oem display to have LOS 14.1 or any 3.18 kernel based ROM
Problem is, that ili9881 display need firmware upload
And that cannot be done if u dont have it
No more options
Rex, I think I have sorted it out. LCM is not the issue. Touchscreen driver is. I have disabled ft5446 driver and I have LOS booted, only touchscreen is not responding :) So now I have to find working driver/config
Looks like only way to make it work is yo use 3.10 kernel's FT5446 driver into 3.18.19 kernel
Anybody interested? :))
Have 3.18.19 kernel + LOS 14.1 working on P1m with aftermarket screen!
Yup
[ Photo ]
But guys, it is extremely experimental. As I have only disabled firmware check in driver for touchscreen (and also enabled lcm for mu device)
Gimme some time
I have debug build only, I will compile 'prod' version today
Compiling
I have boot.img for darklords rom
https://uloz.to/!cuEWkiCv9flq/boot-img
this is boot image for ROM lineage-14.1-20171119_095733-UNOFFICIAL-P1m.zip
I can repack it to ROM and upload if u want, but I think it is not neccessarry, as this image can be flashed via fastboot
Hope I dont have to state, that it is expermintal build, use at your own risk. But aftermarket screen is now working for me in LOS 14.1 based on 3.18.19 kernel
Anybody has tested my kernel? Working?
install whatever lineageos rom, and then flash boot image via flashboot for example
I do not know if twrp can flash boot image, I have been playing with this all stuff only since monday when I have replaced my cracked display and LOS did not come up
not flashboot but fastboot
I had LOS before, yes
much much better than OEM lenovo OS
I think I have 3.1.1
TWRP_3.1.1_Default_P1m_vlk.img
yes, why not? It only needed some tuning in install script
for now I am out, mobile is fixed and my car also need some fixing :)
hello guys, is there any chance to get p1m with aftermarket display working with LOS14.1 3.18.19 ? Phone boots with oem cracked display, but not with new aftermarket one. I have set up serial console to take a look on boot process, but I just cannot find the cause...
Is it version lineage-14.1-20180102_172327-UNOFFICIAL-P1m.zip ?
well I am able to flash it, but it will not boot with aftermarket display
yup, I have made some research: https://forum.xda-developers.com/android/help/how-to-debug-kenrel-bootloop-adb-t3820790#post77172298
but still no luck to fix it in kernel
Alfred, this is only workaround to install 3.18 ROM using TWRP based on 3.10 kernel
If you have problem that TWRP is not working anymore, you can flash older version based on 3.10 kernel instead
yes, that is the problem with 3.18.19 kernel and aftermarket display I am trying to figure out
could you please link me? I have trouble finding it
filename lineage-14.1-20171119_095733-UNOFFICIAL-P1m.zip ?
looks older than one I have tried, but I will give it a go
ok, I am dloading it, trying in few minutes
no luck, same bootloop as before
but as before, it is problem of missing LCM driver
but I cannot compile it in, as I do not have sources for this version
I can clone his git version and compile in that missing LCM
but I am afraid it wont help at all
KT?
well I have just cloned git from darklord
I can compile it with missing lcm
but I am afraid, it will not start either, as the previous version from zerocool
the lcm I need is already in kernel tree
it just need to be configured
or at lease I hope so
I got this messages in kernel log:
[ 8.943226] (1)[1:swapper/0][DISP][disp_lcm_probe #831]ERROR:FATAL ERROR: can't found lcm driver:ili9881_hd720_dsi_vdo_yassy in linux kernel driver
[ 8.944883] (1)[1:swapper/0][DISP][disp_lcm_probe #837]ERROR:FATAL ERROR!!!No LCM Driver defined
[ 8.945989] (1)[1:swapper/0][DISP][primary_display_init #5067]ERROR:disp_lcm_probe returns null
[ 8.947088] (1)[1:swapper/0][DISP][primary_display_get_width #7270]ERROR:lcm handle is null
[ 8.948173] (1)[1:swapper/0][DISP][primary_display_get_height #7284]ERROR:lcm handle is null
so I run defconfig from git, and edited:
CONFIG_CUSTOM_KERNEL_LCM="hx8394d_hd720_dsi_vdo_tianma otm1284a_hd720_dsi_vdo_baolongda ili9881_hd720_dsi_vdo_yassy"
and now compiling
home server is burning CPUs :)
so it will compile but is empty module?
because now it has finished compiling
with bunch of warnings as usual, but no error
I got it, looks very similar to ili9881_hd720_dsi_vdo_yassy
there is some source
[ 10.368469] (1)[1:swapper/0]ft5x0x 1-0070: [FTS] Step 3 fail: CTPM ID,ID1 = 0x0,ID2 = 0x0, 0x54, 0x2c:
this looks like filan problem
final*
yes that is probably the driver
Only idea I have for now is to flash OEM lenovo ROM, enable console in kernel and look how does it look there
https://pastebin.com/8crwRNLf
https://pastebin.com/rb1VePKe
it has some max length problem
https://del.dog/ogazativoj
not yet
this looks like device-specific problem rather than kernel issue
[ File : dmesg_oem.txt ]
?
the 3.18 kernel from darklords git has the driver
but it is not working somehow :)
well yes, but I cannot find the file
I have 3.10 source from lenovo
but not sure, if it is correct
It looks only posible solution is to buy used p1m with oem display to have LOS 14.1 or any 3.18 kernel based ROM
Problem is, that ili9881 display need firmware upload
And that cannot be done if u dont have it
No more options
Rex, I think I have sorted it out. LCM is not the issue. Touchscreen driver is. I have disabled ft5446 driver and I have LOS booted, only touchscreen is not responding :) So now I have to find working driver/config
Looks like only way to make it work is yo use 3.10 kernel's FT5446 driver into 3.18.19 kernel
Anybody interested? :))
Have 3.18.19 kernel + LOS 14.1 working on P1m with aftermarket screen!
Yup
[ Photo ]
But guys, it is extremely experimental. As I have only disabled firmware check in driver for touchscreen (and also enabled lcm for mu device)
Gimme some time
I have debug build only, I will compile 'prod' version today
Compiling
I have boot.img for darklords rom
https://uloz.to/!cuEWkiCv9flq/boot-img
this is boot image for ROM lineage-14.1-20171119_095733-UNOFFICIAL-P1m.zip
I can repack it to ROM and upload if u want, but I think it is not neccessarry, as this image can be flashed via fastboot
Hope I dont have to state, that it is expermintal build, use at your own risk. But aftermarket screen is now working for me in LOS 14.1 based on 3.18.19 kernel
Anybody has tested my kernel? Working?
install whatever lineageos rom, and then flash boot image via flashboot for example
I do not know if twrp can flash boot image, I have been playing with this all stuff only since monday when I have replaced my cracked display and LOS did not come up
not flashboot but fastboot
I had LOS before, yes
much much better than OEM lenovo OS
I think I have 3.1.1
TWRP_3.1.1_Default_P1m_vlk.img
yes, why not? It only needed some tuning in install script
for now I am out, mobile is fixed and my car also need some fixing :)
Guys, I have modified my kernel patch, now it should boot with both oem and replacement touchscreen - as I had info it is not working on stock screen anymore.
[ File : boot.img ]
If u need, I will also post changed source file for ft5446
https://pastebin.com/arxX33Fc
This is only modified source file. Highlighted sections were commentrd out, to skip loop check in firmware update step. It is rather workaround than solution of this aftermarket touchscreen problem.
As stated in header - focaltech_flash.c
To fix what?
In that source there are highlighted blocks which were commented out
It will boot, but it is not solution
It is just workaround
Well, problem itself maybe shityy chinese chip, which cannot write/read registers in same way as original
And also as I found out, touchscreen quality itself is really poor, so I will buy used p1m with oem display instead of using aftermarket one
No idea
I have spent week of my time researching and debugging, but finally just buy another phone with original display, aftermarket touchscreens are shit, does not worth it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment