THEDEVIOUS1 / CHUWI-MINIBOOK-HACKINTOSH

EFI files for hackintosh on the CHUWI Minibook
39 stars 7 forks source link

Source code for modified VoodooI2CGoodix? #25

Open lazd opened 2 months ago

lazd commented 2 months ago

Hey fellas, I'm looking for the source code for the beta touch drivers. As far as I can see, it may be based off two PRs that were sent against VoodooI2CGoodix, but it also has some other changes that are making it work nice in Sonoma. I need to get this building again and try to fix it to work with the latest VoodooI2C (it does, but without scroll functionality), but I'm not sure what the secret sauce is that's making the beta version of VoodooI2CGoodix in this repository work.

Please link me to the branch so I can fix it up! Thank uyou!

cc @balopez83 @THEDEVIOUS1

THEDEVIOUS1 commented 2 months ago

just saw this...was actually coming to message u about the exact same thing after i saw the pull incorporated but no new release. just so we're clear here...exactly what beta build are u referring to? if its the final touch zip i uploaded....im not sure how much is junk and how much is needed other than removal of the dependency but this should be what u require . also...i assume that it is working well after sleep on sonoma(having an issue with that on the onegx1 non pro ...which can also be added to the working list otherwise) and youre using the latest voodooi2c? oh yeah...u still using the chuwi/what device if not?

https://github.com/lazd/VoodooI2CGoodix/compare/master...THEDEVIOUS1:VoodooI2CGoodix:master

lazd commented 2 months ago

Hey @THEDEVIOUS1 long time no talk! Yeah, I'm looking for the source that was used to build the final touch zip that's in this repo. If it's your master, that's a good hint. Basically, it simply does not get interrupts after setting up the device with my master... I'll take a look, perhaps acpi_device->evaluateObject("_PS0") is the answer...

And nope, I'm not using the CHUWI, that thing keeps puffing batteries. I'm working on a LattePanda 2 Alpha 864s build inside of an old Apple eMate that happens to use the same Goodix touchscreen! Your kext from this repo works perfectly, I just can't get local builds to work haha

THEDEVIOUS1 commented 2 months ago

good to hear from u @lazd ....glad to see u are still at it also. as far as im aware....i am unable to use any version of voodooi2c other than 2.3 when using the "final touch" version so is that true for u too? meant to ask earlier....if u dont mind and can find the time could u provide me with some basic instructions to build the kext myself? obviously have dont it before myself but seems ive forgotten how in the last past 4 years....lol. just realized i overlooked the part where u said your new builds do in fact work with the latest but not without limitations...i dont really care about scrolling right now so do u mind providing me a prebuilt kext so i can see if it still has the sleep issue on my system please?

balopez83 commented 2 months ago

@lazd @THEDEVIOUS1 If you want to send me the exact code changes that made 2.3 work I can prob update the latest code to reflect that. I can't remember exactly what version but I think around 2.6 they refactored it and so will need to be tweaked to handle the changes that make the goodix screens to work.

I did something similar to bring in full surface keyboard and pen support with standard touch screen support for the Surface Pro 3 devices. I can likely add the goodix changes to my modded version to make it work for you guys. Mine is the latest version of voodooi2c so it should be an easy mod.

balopez83 commented 2 months ago

@lazd I just looked over the code and I think you may be onto something with the evaluate code.

@THEDEVIOUS1 Are you just trying to use the satelite directly with the latest voodooi2c? I think they changed too much with the latest version to be able to directly drop it in. I am pretty sure the master code will need to be incorporated into a build file of the master voodooi2c to build it with the latest version. Likely some dependencies will need to be resolved as well since they moved stuff around a bit. Like I mentioned before though, I have a ready to go build of voodooi2c with a modded voodooi2chid that I use for the Surface Devices. I can try to drop in the code and see if I can make it work assuming @lazd doesn't figure it out before I get a chance :)

Also, what sleep issues are you having? Is it a crash on sleep on anything from Ventura on? If so, its because Apple depreciated a couple things and required some code to be added. Same issue occured with the Surface Devices. I have the code and just need to dig it up assuming thats your issue? If it is, its a really easy add.

THEDEVIOUS1 commented 2 months ago

well...if it isnt my long lost minibook bro @balopez83 ! lol....how have u been man? ive basically traveled backwards in time and picked up a pocket 2 but then came across a onegx for a nice price so mostly have been using it although having a few stupid issues 2 of which dealing with brightness....on the pocket 2 the buttons will only work when added to the dsdt but not through a ssdt which seems like a simple enough fix but havent updated the repo in almost a month because of that. the other thing appears more major....on the onegx both the buttons and slider work but doesnt actually dim/brighten the screen. My apologies for derailing the thread @lazd but concerning voodooi2cgoodix...for the time being im simply trying to use the files from the final touch folder which work but only until the device sleeps then the touch screen is dead afterwards (check the link above for changes i made). now that i think about it...im not sure if i ever tried it on ventura(definitely didnt on these 2 devices anyway) but waiting for lazd to confirm if its working for him after awakening

lazd commented 2 months ago

good to hear from u @lazd ....glad to see u are still at it also. as far as im aware....i am unable to use any version of voodooi2c other than 2.3 when using the "final touch" version so is that true for u too? meant to ask earlier....if u dont mind and can find the time could u provide me with some basic instructions to build the kext myself? obviously have dont it before myself but seems ive forgotten how in the last past 4 years....lol. just realized i overlooked the part where u said your new builds do in fact work with the latest but not without limitations...i dont really care about scrolling right now so do u mind providing me a prebuilt kext so i can see if it still has the sleep issue on my system please?

Unfortunately I can't get my built kexts -- that LattePanda Alpha I was using died! @balopez83 is right, I had to change a few include statements to get things to build, but even then, my built kexts for VoodooI2CGoodix never worked -- only the kext from this repo worked! I was able to just drop on VoodooI2C.kext and VoodooI2CHID.kext from the latest version, and the kext from this repo would still work, albeit without scrolling.

I don't have any sleep issues at all, so perhaps your issue isn't with the kext itself...

balopez83 commented 2 months ago

@lazd so does this mean that even if it builds you won't be able to test?

Can you both help me remember how this satellite actually worked? Based on the config.plist we had both the Goodix and Voodooi2chid kext active. Is the Goodix kext based off the i2CHID kext and thus requiring the voodooi2CHID kext to be installed and active? It looks like this one would be easy to integrate back into the and combine with the voodooi2CHID kext if that is the case. Likely will make this more resilient to new voodooi2c releases if we do that.

Also if it requires the CHID kext @lazd did you remember to add that in when you built it? I have a hunch that the issue is something to do with those two satellite kexts and not so much with the main i2c kext.

Anyway just spitballing this one and open to your thoughts.

balopez83 commented 2 months ago

oh @lazd @THEDEVIOUS1 , since you are using Sonoma did you all test with the latest voodooInput kext? There was a new release that I don't believe has been integrated into the VoodooI2C master and is required to get I2C to work properly with the latest version of Sonoma.

THEDEVIOUS1 commented 2 months ago

@lazd so does this mean that even if it builds you won't be able to test?

Can you both help me remember how this satellite actually worked? Based on the config.plist we had both the Goodix and Voodooi2chid kext active. Is the Goodix kext based off the i2CHID kext and thus requiring the voodooi2CHID kext to be installed and active? It looks like this one would be easy to integrate back into the and combine with the voodooi2CHID kext if that is the case. Likely will make this more resilient to new voodooi2c releases if we do that.

Also if it requires the CHID kext @lazd did you remember to add that in when you built it? I have a hunch that the issue is something to do with those two satellite kexts and not so much with the main i2c kext.

Anyway just spitballing this one and open to your thoughts.

as far as i know....theres no need for the hid kext because its working on the pocket 2 perfectly fine without it but thats interesting @lazd is saying he could just drop in the latest voodooi2c (but is also including voodooi2chid) with the final touch kext. correct me if im wrong @balopez but i dont think thats ever been true for us...even back on the minibook i believe we had to specifically use voodooi2c 2.3 which is why i included in that zip but again may be majorly mistaken so maybe that is effecting operation after awakening on my setup although i admit it could be a completely unrelated acpi configuration error

edit: @balopez just dropped in the latest voodooi2c with the hid kext and included the most recent version of voodooinput with the final touch goodix and its still dead on boot as it always has been for me if i recall correctly @lazd meant to mention how awesome that build was but hate to hear your device has died....if its possible please upload your ssdt/ddst and/or renames u were using as there has to be something different about your setup

balopez83 commented 2 months ago

@THEDEVIOUS1 So I might have missed something but I don't think @lazd was using the HID kext and only trying to build it with the latest i2c build. That said you are exactly right in that the goodix kext shouldn't work without the 2.3 i2c release. They made too many changes for the goodix kext to work as-is with 2.6.

The way I see it is we are going to have to do this in two stages. The first is to use a clean i2c v2.3 to build against. We would need to build @lazd 's release and add that acpi code as I am pretty sure that is the difference that makes yours work and not the master goodix. That build will need to be tested to confirm that is the code change. Once that is done the second stage will be to update that code to the latest release and test against that until it works.

Doing it that way will take longer but it will allow us to ensure we are not hunting around blind for the issue. Problem is, we need a device to test against. I am grabbing my modded code off my SP3 which I can build against but until we have a computer to test against, I won't know if it actually works.

BTW, other than a old Surface Pro 3 and Surface Pro 4, and my work Surface Pro 7, I don't have any other device to test on. I do still have the One Mix Yoga 4 still but with the 11th gen its useless. I actually have a real mac now as well which I will build on. Wish those minibooks were better, I would have loved to still have it and have it work.

THEDEVIOUS1 commented 2 months ago

@THEDEVIOUS1 So I might have missed something but I don't think @lazd was using the HID kext and only trying to build it with the latest i2c build. That said you are exactly right in that the goodix kext shouldn't work without the 2.3 i2c release. They made too many changes for the goodix kext to work as-is with 2.6.

The way I see it is we are going to have to do this in two stages. The first is to use a clean i2c v2.3 to build against. We would need to build @lazd 's release and add that acpi code as I am pretty sure that is the difference that makes yours work and not the master goodix. That build will need to be tested to confirm that is the code change. Once that is done the second stage will be to update that code to the latest release and test against that until it works.

Doing it that way will take longer but it will allow us to ensure we are not hunting around blind for the issue. Problem is, we need a device to test against. I am grabbing my modded code off my SP3 which I can build against but until we have a computer to test against, I won't know if it actually works.

BTW, other than a old Surface Pro 3 and Surface Pro 4, and my work Surface Pro 7, I don't have any other device to test on. I do still have the One Mix Yoga 4 still but with the 11th gen its useless. I actually have a real mac now as well which I will build on. Wish those minibooks were better, I would have loved to still have it and have it work.

agreed and to expand on that....what i originally did to figure out what works was to compare the goodix kext against the i2chid code and, since its so similar, was able to transplant parts until it was functioning properly. @lazd just so we're clear here....dont know if u have taken the time to review my source code yet but i realize there is a part i wasnt quite clear about when explaining(it is in the actual commits however)...im pretty sure the iographics dependency needs to be removed in the code as well and not just the plist like i seemed to be suggesting in the pull request

edit @balopez83 i must be missing something...just realized the last release for the minibook is using voodooi2c 2.6 with goodix 3.1 so is that a special recompiled version with stuff added/subtracted or did u not test it at the time?

balopez83 commented 2 months ago

@THEDEVIOUS1 so you are right, I had my version numbers all messed up. That said I went ahead and built a voodooI2CGoodix.kext against the 2.8.0 master. I used your repo for the Goodix code and not @lazd so it includes all of your changes and in theory "should" work. Just drop in

I know we don't really have a way of testing but perhaps @THEDEVIOUS1 you could test on your machine to see if the kext even works to drive your machine. I know we won't be able to confirm if it will work on the lattepanda but at least we can validate if my build has issues or if it works as I hope.

VoodooI2C.kext.zip

VoodooI2CGoodix.kext.zip

If it doesn't work at first, try downloading the official 2.8.0 release of VoodooI2C and try my goodix kext again and see if it works. If that still doesn't work then let me know and I will dig deeper. Also, if it works I will zip up the whole build folder so you can play around with it as well since it builds.

balopez83 commented 2 months ago

Oh @THEDEVIOUS1 I forgot to also add that if it works but it's not quite right such as losing multitouch or something else, try also replacing voodooinput with the latest actual release. I forgot to pull a new release of it and include it in the release I just sent you. I don't believe the actual 2.8.0 master release has the updated voodooinput either so you would have to replace that one as well if you try it.

THEDEVIOUS1 commented 2 months ago

Oh @THEDEVIOUS1 I forgot to also add that if it works but it's not quite right such as losing multitouch or something else, try also replacing voodooinput with the latest actual release. I forgot to pull a new release of it and include it in the release I just sent you. I don't believe the actual 2.8.0 master release has the updated voodo oinput either so you would have to replace that one as well if you try it.

welp...long story short? looks like we're back to one of our original issues....yours works with either voodooinput BUT will only do so after warm boot from windows which also means it breaks after sleep with any version of voodooi2c other than 2.3. as far as with 2.3...it functions fine/the exact same as my version from cold boot and after awake EXCEPT scroll is broken on yours while it works on mine.

The fact that it only works after windows is probably why @lazd thought his builds werent working at all....oh & i assume that if u were loading the final touch goodix with newer versions is why the scroll was broken but the fact u were able to do so at all is still an anomaly and so im left to assume that there is in fact something else switched on/off on your setup

lazd commented 2 months ago

Ok so:

  1. Yes, we have to remove the IOGraphics dependency, otherwise it doesn't build on newer XCode/macOS
  2. With my VoodooI2CGoodix built against VoodooI2C's latest master, I did try warm boots to see if my interrupts would work, unfortunately on my machine that didn't seem to work.
  3. I also found that scroll was broken with the VoodooI2CGoodix.kext in this repo + the latest VoodooI2C.kext
  4. I was always including VoodooI2CHID in my list of kexts, I didn't realize we don't need it. Can you confirm the touchscreen works without it?
  5. LattePanda is replacing the device, not sure when I'll have it, but I'll be able to get my dev env back up and start hacking on this again as soon as I get it
THEDEVIOUS1 commented 2 months ago

Ok so:

  1. Yes, we have to remove the IOGraphics dependency, otherwise it doesn't build on newer XCode/macOS
  2. With my VoodooI2CGoodix built against VoodooI2C's latest master, I did try warm boots to see if my interrupts would work, unfortunately on my machine that didn't seem to work.
  3. I also found that scroll was broken with the VoodooI2CGoodix.kext in this repo + the latest VoodooI2C.kext
  4. I was always including VoodooI2CHID in my list of kexts, I didn't realize we don't need it. Can you confirm the touchscreen works without it?
  5. LattePanda is replacing the device, not sure when I'll have it, but I'll be able to get my dev env back up and start hacking on this again as soon as I get it

as far as 4 is concerned....i2chid is NOT needed confirmed on at least 3 systems (2 different pocket 2s and the onegx) in front of me right now

balopez83 commented 2 months ago

@lazd Yeah looking at the code in the goodix kext you shouldn't technically need the HID kext at all. I am still questioning whether the goodix "drivers" should be merged back into the HID kext or that we need to bring something over from the HID kext to the goodix kext on the hunch that the goodix kext is missing something that is needed to make everything work properly in the latest version of I2C. I might play around with bringing the code back over to the HID kext to eliminate that as a cause for the sleep and scroll issues on later I2C versions

@THEDEVIOUS1 glad the kext is actually working if only the scrolling isn't working. In my build I am using your latest goodix version but now am wondering if you have something different you are using on your setup? What version is yours where it does work with scrolling? In theory, mine should have worked to scroll with v2.3.0 if the version of goodix kext you are using is the one in your repo?

That said I have little feeling I may have missed one line of dependency code when I build mine that could have caused an issue and I will look into that.

THEDEVIOUS1 commented 2 months ago

@lazd Yeah looking at the code in the goodix kext you shouldn't technically need the HID kext at all. I am still questioning whether the goodix "drivers" should be merged back into the HID kext or that we need to bring something over from the HID kext to the goodix kext on the hunch that the goodix kext is missing something that is needed to make everything work properly in the latest version of I2C. I might play around with bringing the code back over to the HID kext to eliminate that as a cause for the sleep and scroll issues on later I2C versions

@THEDEVIOUS1 glad the kext is actually working if only the scrolling isn't working. In my build I am using your latest goodix version but now am wondering if you have something different you are using on your setup? What version is yours where it does work with scrolling? In theory, mine should have worked to scroll with v2.3.0 if the version of goodix kext you are using is the one in your repo?

That said I have little feeling I may have missed one line of dependency code when I build mine that could have caused an issue and I will look into that.

was trying not to make my message too long by typing out every possible conclusion we could come to from those results but to continue...if u didnt omit anything then it seems that merely building with a later version breaks the scrolling but the files from the final touch zip located in the closed pull request i made under @lazd goodix repo which includes voodooi2c 2.3 and goodix 3.1(with changes made by me but to be clear...im not even sure if that build was from my current master although should be) is that one where scroll works(dont think i added/removed any code related to that function). although i did also test touch in general with the new voodooinput....i will triple check again to see what effect including it has on scrolling with the versions u uploaded previously. when i get chance maybe later today....i might start another branch and add code to mine by combing through the commits and get u to build another version for me(although proper instructions how to do so myself would be preferable so i wont need to wait with with every permutation)

balopez83 commented 2 months ago

@THEDEVIOUS1 lol yeah I am not so sure I could give you great instructions. It was a heck of a lot of trial and error.

Basically you need to pull voodooi2c using their build instructions and make sure you clone mackernelsdk correctly. Then fight with getting VoodooInput to build properly and drop in the right folder. Once you can successfully build a clean VoodooI2C you then need to bring over the VoodooGoodix and import it into the VoodooI2C build. Use one of the satelites to make sure you get the folder structure.

Once that is done, you need to add the Goodix project to the main VoodooI2C project so it actually tries to build, If you don't it will build but wont buld the Goodix Satellite. After that, carefully follow the mackernelSDK project installation instructions but where it states to add in the path to the headers you need to add in ../../ in front of the mackernelSDK folder relative path (e.g. $(PROJECT_DIR)/../../MacKernelSDK/Headers).

After that you need to fix the IOKit code path in the Goodix kext. Where it says Hid[something], it should be just Hid. (e.g. #include <IOKit/hid/IOHIDEventService.h>)

OR, you can just use the zipped build folders below

VoodooI2C 2.8.0 Clean & Goodix Build Folders.zip

balopez83 commented 2 months ago

@THEDEVIOUS1 can you try the following consolidated VoodooI2CHID.kext? It includes the Goodix code baked in. I want to see if it will drive the screen. Try with both my included VoodooI2C and a stock release if for some reason it doesnt work.

VoodooI2C-Goodix.zip

I am thinking that if it works then it means we need to pull something over from the CHID kext to the Goodix kext and we can just go through the code.

THEDEVIOUS1 commented 2 months ago

@THEDEVIOUS1 can you try the following consolidated VoodooI2CHID.kext? It includes the Goodix code baked in. I want to see if it will drive the screen. Try with both my included VoodooI2C and a stock release if for some reason it doesnt work.

VoodooI2C-Goodix.zip

I am thinking that if it works then it means we need to pull something over from the CHID kext to the Goodix kext and we can just go through the code.

thats exactly what i said earlier...lmao! been a while since i was able to give u a hard time but u know im just messing with u bro....give me a minute then check this message for an edit i guess

edit: didnt work plus made my boot up and restart take way longer....will be back later but i already pin pointed a couple of commits from voodooi2c to carry over into the goodix kext so hopefully we will get lucky

balopez83 commented 2 months ago

@THEDEVIOUS1 lol whatever 😜

On another note I made a mistake. I forgot to remove the regular HID touchscreen drivers so they are fighting with each other. That's why your boot took too long.

I'll try and rebuild mine with the corrections but definitely keep going with your direction and maybe one of us will figure it out.

balopez83 commented 2 months ago

Ok give this one a try. I think I removed the conflicts in the consolidate HID kext. Let me know if this works at all.

VoodooI2C-Goodix v2.zip

I was mirroring what I did for the Surface Pro 3 when combining the type cover and related HID drivers but forgot that in that case I intentionally was leaving the touchscreen and stylus drivers but for this one we explicitly needed to remove them. Whoops lol

THEDEVIOUS1 commented 2 months ago

Ok give this one a try. I think I removed the conflicts in the consolidate HID kext. Let me know if this works at all.

VoodooI2C-Goodix v2.zip

I was mirroring what I did for the Surface Pro 3 when combining the type cover and related HID drivers but forgot that in that case I intentionally was leaving the touchscreen and stylus drivers but for this one we explicitly needed to remove them. Whoops lol

well...this way may actually work as i see it is attaching in ioreg but still doesnt seem to be responding though. i made the mistake of leaving the pocket 2 at the house so dont fully trust the results im getting on the onegx to be honest...although theyve been fairly consistent. with that said...send me something else when u find time

balopez83 commented 2 months ago

@THEDEVIOUS1 can you send me your ioreg? I want to see where its attaching to see if I can narrow down what I might have missed.

balopez83 commented 2 months ago

@THEDEVIOUS1 Try this release as well but If you can send me ioregs for the last one first. This release removes the Goodix Multitouch event driver in favor of the event driver already in the HID kext. I suspect that the goodix event driver was conflicting.

VoodooI2C Goodix V3.zip

THEDEVIOUS1 commented 2 months ago

@THEDEVIOUS1 Try this release as well but If you can send me ioregs for the last one first. This release removes the Goodix Multitouch event driver in favor of the event driver already in the HID kext. I suspect that the goodix event driver was conflicting.

VoodooI2C Goodix V3.zip

https://drive.google.com/file/d/1mx_CbBKNXKdHkhhAqW7JHjJD9oiHu7Ib/view?usp=drive_link

balopez83 commented 2 months ago

@THEDEVIOUS1 Here is another attempt which removes the HID event drivers in favor of the goodix event driver.

Voodoo Goodix V4.zip

balopez83 commented 2 months ago

@THEDEVIOUS1 Try this release as well but If you can send me ioregs for the last one first. This release removes the Goodix Multitouch event driver in favor of the event driver already in the HID kext. I suspect that the goodix event driver was conflicting. VoodooI2C Goodix V3.zip

https://drive.google.com/file/d/1mx_CbBKNXKdHkhhAqW7JHjJD9oiHu7Ib/view?usp=drive_link

Cant access the link

THEDEVIOUS1 commented 2 months ago

@THEDEVIOUS1 Try this release as well but If you can send me ioregs for the last one first. This release removes the Goodix Multitouch event driver in favor of the event driver already in the HID kext. I suspect that the goodix event driver was conflicting. VoodooI2C Goodix V3.zip

https://drive.google.com/file/d/1mx_CbBKNXKdHkhhAqW7JHjJD9oiHu7Ib/view?usp=drive_link

Cant access the link

my bad but should be good now...last one was wouldnt work. dont even think it attached but will double check....about to try 4 but will go back through these once i get to the pocket 2 tomorrow though

THEDEVIOUS1 commented 2 months ago

Ok give this one a try. I think I removed the conflicts in the consolidate HID kext. Let me know if this works at all.

VoodooI2C-Goodix v2.zip

I was mirroring what I did for the Surface Pro 3 when combining the type cover and related HID drivers but forgot that in that case I intentionally was leaving the touchscreen and stylus drivers but for this one we explicitly needed to remove them. Whoops lol

WAIT...WHOA! so what do we know.. turns out that version 2 DOES indeed work BUT it suffers the same symptom as your other efforts in that only will do so from warm boot and dead after sleep. i knew it looked like it shouldve been good from the ioreg but like i said the results i was getting on the onegx werent quite right....got home and fired it up on the pocket 2 and we have active input!

lazd commented 2 months ago

WAIT...WHOA! so what do we know.. turns out that version 2 DOES indeed work BUT it suffers the same symptom as your other efforts in that only will do so from warm boot and dead after sleep. i knew it looked like it shouldve been good from the ioreg but like i said the results i was getting on the onegx werent quite right....got home and fired it up on the pocket 2 and we have active input!

Great news! @balopez83, does this version include the acpi_device->evaluateObject("_PS0") line? I wonder if that fixes warm boot issues.

THEDEVIOUS1 commented 2 months ago

@THEDEVIOUS1 so you are right, I had my version numbers all messed up. That said I went ahead and built a voodooI2CGoodix.kext against the 2.8.0 master. I used your repo for the Goodix code and not @lazd so it includes all of your changes and in theory "should" work. Just drop in

I know we don't really have a way of testing but perhaps @THEDEVIOUS1 you could test on your machine to see if the kext even works to drive your machine. I know we won't be able to confirm if it will work on the lattepanda but at least we can validate if my build has issues or if it works as I hope.

VoodooI2C.kext.zip

VoodooI2CGoodix.kext.zip

If it doesn't work at first, try downloading the official 2.8.0 release of VoodooI2C and try my goodix kext again and see if it works. If that still doesn't work then let me know and I will dig deeper. Also, if it works I will zip up the whole build folder so you can play around with it as well since it builds.

lets try again here....rebuild this separate goodix kext using my sonoma2 branch and lets see what happens. this probably wont work since ive only kinda included 3 commits starting from april 2020 and if we're lucky this sht will be legit but if not then theres only 4 more years of code to go through...smdh

balopez83 commented 2 months ago

@THEDEVIOUS1 sooooo I tried to build your sonoma2 code and its got a lot of errors. Also, please add in the updated mackernelsdk links and architecture. I updated it in the zipped build folder below with those changes but will be vital to build this going forward.

I am going to see if I can fix those errors but since you are in the code already you might know how to make the fixes faster. VoodooI2C - 2.8.0 - Goodix Sonoma v2.zip

THEDEVIOUS1 commented 2 months ago

@THEDEVIOUS1 sooooo I tried to build your sonoma2 code and its got a lot of errors. Also, please add in the updated mackernelsdk links and architecture. I updated it in the zipped build folder below with those changes but will be vital to build this going forward.

I am going to see if I can fix those errors but since you are in the code already you might know how to make the fixes faster. VoodooI2C - 2.8.0 - Goodix Sonoma v2.zip

im sure it does which reminds me of how fckn lucky i got last time...lol. oh yeah....the commits i made are named after the voodooi2chid commits and dates that im porting the code from so it should be easy for u guys to follow the pattern to how i pieced this thing together the first time and probably even fix the errors etc since u 2 are actually coding cats

balopez83 commented 2 months ago

WAIT...WHOA! so what do we know.. turns out that version 2 DOES indeed work BUT it suffers the same symptom as your other efforts in that only will do so from warm boot and dead after sleep. i knew it looked like it shouldve been good from the ioreg but like i said the results i was getting on the onegx werent quite right....got home and fired it up on the pocket 2 and we have active input!

Great news! @balopez83, does this version include the acpi_device->evaluateObject("_PS0") line? I wonder if that fixes warm boot issues.

@lazd Sorry, forgot to reply to you on this. Yes it does include that line though it seems it isn't resolving the cold boot issues. It looks like it does work from a warm boot but fails after sleep.

balopez83 commented 2 months ago

@THEDEVIOUS1 soooo I figured out what was wrong with the build. It now successfully builds with no issues. Go ahead and give this one a go:

voodooi2c-goodix-sonoma2-v1.zip

balopez83 commented 2 months ago

@THEDEVIOUS1 is it possible that you are simply missing some of this section compared with the voodooI2CHID code related to powering the device? Her is a screenshot of your code:

Screenshot 2024-08-30 at 8 33 54 PM

And here is the VoodooI2CHID code:

Screenshot 2024-08-30 at 8 35 42 PM
balopez83 commented 2 months ago

@THEDEVIOUS1 Alright got another one for you. This one is based of your master build but with some add-ons from my surface kext that should hopefully resolve some sleep issues.

VoodooI2C-Goodix v5.zip

THEDEVIOUS1 commented 2 months ago

@THEDEVIOUS1 Alright got another one for you. This one is based of your master build but with some add-ons from my surface kext that should hopefully resolve some sleep issues.

VoodooI2C-Goodix v5.zip

that other stuff is committed at a later date and possibly unrelated....when i say im walking through every code change from back since the 2.3 voodoo/the 3.1 goodix/my master which basically stopped around the march 22 2020 dependency removal i meant literally. lol...focusing on any reset/sleep/start/stop/init commits i see right now and will add any refactored attach code i can find later but for now guess i need to just try a straight forward compile of my untouched main branch on my own system to see if it will finish & function

edit v5 is the same situation...no cold boot no after awake and no scroll

balopez83 commented 2 months ago

Your main branch won't work with the latest voodooi2c. I've already built your main branch with only modifications to actually get it to build which wouldn't have caused it to not cold boot or wake from sleep

That would have been v2

balopez83 commented 2 months ago

@THEDEVIOUS1 Just want to confirm you actually mean v.4.0 and not .3.1 of the goodix kext? I have been building your forked v4.0 (with one exception that I sent you where I built Lazd's v4.0).

Where I am confused is why you have a version that has working scrolling but it can't be your forked code since thats what I am building. No changes are being done to get it to build that would break scrolling.

Just a reminder, that I have not yet updated the voodooinput kext and that does cause issues in sonoma including multitouch (scrolling) problems. I will update voodooinput in my next attempt. Until then you must replace the voodooinput satellite on all of the releases I have sent to date.

THEDEVIOUS1 commented 2 months ago

Your main branch won't work with the latest voodooi2c. I've already built your main branch with only modifications to actually get it to build which wouldn't have caused it to not cold boot or wake from sleep

That would have been v2

just so we're clear here....i named my release 4.0 YEARS before lazd updated his repo to 4.0 to differentiate it from his 3.1 which was current at the time not knowing if he was done developing it or not but effectively its 3.1 base code with stuff added. the files in the final touch zip were created to test with but made before i bumped the version number and created an "official" release but i believe the code should be the same as whats in master....with that said are u saying u have tried building my master against voodooi2c 2.3 specifically?(that should be the combo that causes scrolling to work following the conclusions we have come to so far). Also...when u say v2 u mean of your unified i2chid/goodix hybrid or the 2nd version of the separate kext u built?

THEDEVIOUS1 commented 2 months ago

@THEDEVIOUS1 Just want to confirm you actually mean v.4.0 and not .3.1 of the goodix kext? I have been building your forked v4.0 (with one exception that I sent you where I built Lazd's v4.0).

Where I am confused is why you have a version that has working scrolling but it can't be your forked code since thats what I am building. No changes are being done to get it to build that would break scrolling.

Just a reminder, that I have not yet updated the voodooinput kext and that does cause issues in sonoma including multitouch (scrolling) problems. I will update voodooinput in my next attempt. Until then you must replace the voodooinput satellite on all of the releases I have sent to date.

think we need to take a timeout and talk....either there is a HUGE issue happening here or may be im just majorly mistaken about the baseline behavior im supposed to experiencing but hopefully @lazd chimes in quickly so we can proceed. ok, so....as far as u know is your 4.0 release functional with the latest voodooi2c?(if n ot which specific release do we need) also....when u originally said "work nice in sonoma" did u mean that your version does not function at all?(i cant get it to work with either 2.3 or 2.8 so just trying to see if its the same for u)

lazd commented 2 months ago

Ok let's do this:

Everyone set up their build like this:

  1. Clone VoodooI2C:

    git clone https://github.com/VoodooI2C/VoodooI2C.git
  2. Go into the VoodooI2C Satellites folder and clone your fork of VoodooI2CGoodix

cd VoodooI2C/VoodooI2C\ Satellites
git clone git@github.com:lazd/VoodooI2CGoodix.git
  1. Drag and drop the folder you cloned VoodooI2CGoodix into XCode next to the other satellites
  2. Select the VoodooI2C target in Xcode and open its build phase settings
  3. Go to the Dependencies build phase
  4. Add VoodooI2CGoodix as a Dependencies target
Screen Shot 2024-08-31 at 11 18 56 AM
  1. Then you should be able to hit Play and build everything.

  2. Push a branch with the exact code you're working on to your fork

  3. Send a pull request against VoodooI2CGoodix so we can view changes

Then we can see where we're at and what's going on with the changes in VoodooI2CGoodix. @balopez83, if you're making changes in VoodooI2CHID, send a draft PR against VoodooI2C.

balopez83 commented 2 months ago

@THEDEVIOUS1 lol what's so confusing, I mean we have like 10 different versions with no consistent versioning from two different repos and random sh*t mixed in. lol just kidding. It's confusing as hell.

Ok so knowing that yours is a renamed 3.1 helps. So all but one of my builds is entirely based off your 3.1.

I was referring to v2 based off the separate kexts not unified.

I have not built against 2.3 because it obviously would work since I'm not changing any meaningful code.

EDIT: smh...just realized i accidently edited your post instead of quoting and replying. lol...see below though

lazd commented 2 months ago

Here's my PR, I couldn't get this to work at all, but it does build with the latest VoodooI2C master. Not sure if I removed the IOGraphicsFamily dependency thing yet here

https://github.com/lazd/VoodooI2CGoodix/pull/25

This change, specifically, was required to get it to build on Sonoma: https://github.com/lazd/VoodooI2CGoodix/pull/25/files#diff-709463703128c33306f7b21a53330144f05ae891324efb40a1d69f0d6e30f70eL24-R25

lazd commented 2 months ago

I'm not sure if this is useful, but I built this on Monterey on my CHUWI. It's built against the latest version of VoodooI2C master and the latest master branch on VoodooI2CGoodix (including the PS0 and IOGraphicsFamily/framebuffer changes)

VoodooI2C-master-VoodooI2CGoodix-master.zip

I just loaded this up on my CHUWI and can confirm it works, however none of the multitouch gestures work anymore.

  110    0 0xffffff7f84587000 0x6000     0x6000     net.lazd.VoodooI2CGoodix (0.4.0) 275AFB8D-F32A-308F-8BFD-D70CEE8F998C <109 72 64 12 6 5 3>
lazd@lazd-minibook VoodooI2CGoodix % kextstat | grep Voodoo
   43    1 0xffffff7f83437000 0x6000     0x6000     com.alexandred.VoodooI2CServices (1) 66104E8E-A22B-3AC4-922E-CA959EFFABB5 <5 3>
   70    1 0xffffff7f8360d000 0x1c000    0x1c000    org.coolstar.VoodooGPIO (1.1) 6A78A195-FAF5-3889-B6BC-AC574716367D <12 6 5 3>
   72    2 0xffffff7f845a9000 0x1f000    0x1f000    com.alexandred.VoodooI2C (2.8) 78500F91-1FA0-32B4-A702-4CFB71B0FB67 <70 64 43 13 12 6 5 3 1>
  110    0 0xffffff7f84587000 0x6000     0x6000     net.lazd.VoodooI2CGoodix (0.4.0) 275AFB8D-F32A-308F-8BFD-D70CEE8F998C <109 72 64 12 6 5 3>
  113    0 0xffffff7f8458d000 0x7000     0x7000     me.kishorprins.VoodooInput (1.1.6) 7D56D1EF-8C46-331E-BE2C-8D86F8B4DFEE <64 6 5 3>
  114    0 0xffffff7f845d4000 0x13000    0x13000    com.alexandred.VoodooI2CHID (1) 50569748-9B87-3EBD-88AC-9A45DB99BBDC <72 64 12 6 5 3>
lazd commented 1 month ago

I just tried rebuilding against various tags of VoodooI2C:

master: No multitouch 2.7.1: No multitouch 2.6.5: Multitouch working!

Therefore, our changes that broke multitouch happened between 2.6.5 and 2.7.1.

VoodooI2C-2.6.5-VoodooI2CGoodix-master.zip