Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 08 2021 12:53
    @kprinssu banned @sqlsec
  • Feb 01 2021 20:01
    @kprinssu banned @kdmitrienko
  • Nov 18 2020 13:40
    @kprinssu banned @PredatorAlpha777
  • Nov 15 2020 16:16
    @kprinssu banned @nikhil19rathore99
CoolStar
@coolstar
I do have a machine that has dedicated trackpad buttons on an I2C trackpad; unfortunately installing macOS on it is a no-go
PM981 SSD doesn't play nicely with macOS
spending $140 on a new SSD only to have to give up wifi and dGPU doesn't exactly seem like a great proposition
Larry Davis
@lazd

hello! i'm new to VoodooI2C and kernel extension development in general, and i'm working on a driver for the Goodix touchscreen (https://github.com/lazd/VoodooI2CGoodix/), based mostly on the awesome work @coolstar has done with the AtmelMXT driver. my satellite matches and loads, and although it doesn't do anything useful when you poke it (yet), it does log out some information.

i am able to see this information in the console if i load the kext from the terminal, and i can see the logs scroll by during verbose boot, but i can't see to get log to show me anything after boot. running log show --last 5m --info --debug --loss --predicate 'eventMessage contains "Goodix"' shows me the logs from when i loaded it via the terminal, but not the logs from boot. i do see other VoodooI2C logs, but not those from my satellite...

i'm sure it's something simple, any pointers? thanks!

Ben Raz
@ben9923
@coolstar That sucks :(
@lazd Are you properly calling IOLog?
Use grep to filter data, no idea how you're filtering
penghubingzhou
@startpenghubingzhou
@lazd no offense,and I haven't also get any information of your iolog. But after reading the code, I think maybe you haven't give mtinterface the correct data of max_x max_y and x_size_mm y_size_mm yet.(my guess)
Btw, if you want to get some iolog,maybe you could try syscl' maclog. You can obtain it here: https://github.com/syscl/maclog
Larry Davis
@lazd
@ben9923 I should be calling IOLog correctly, considering it works when I load the kext after boot and I can see the log messages scroll by during boot. I am using log —predicate to filter, I’ll try dumping the entire thing and grepping it instead
@startpenghubingzhou none taken, and you’re right, the code is just stubbed our right now, it doesn’t actually do anything. That bit is unrelated to my being unable to get the logs after boot, unfortunately.
penghubingzhou
@startpenghubingzhou
@lazd yeah I noticed that.
Recently I m trying to port f12 into i2csyna
And I noticed that if you set a transducer and give a number of finger to it, then compile and load the kext,you ll see touchpad setting in the settings.
Larry Davis
@lazd
@startpenghubingzhou yes, i saw the same thing when i publish the multitouch interface. i can also see the interface in IORegistryExplorer. of course, it does nothing... yet
penghubingzhou
@startpenghubingzhou
But it can't work because you haven't set the mt2engine correctly. So the key to connect finger touch with kernel is mt2interface.
And by watching the code of i2csyna, I guess max_x max_y x_size_mm and y_size_mm is the key to load mt2engine.
So I think you can watch the ported code carefully and find what function set these variables, and then port it to your kext :smile:
penghubingzhou
@startpenghubingzhou
@lazd
penghubingzhou
@startpenghubingzhou
sensor->x_mm = (pitch_x * rx_receivers) >> 12;
penghubingzhou
@startpenghubingzhou
This code will convert the initialized pitch_x to x_mm, aka x_size_mm in mt2interface.
Larry Davis
@lazd
This is good info, I’m sure it’ll come in handy once I get past this GPIO power on sequence and I2C read errors. Thanks!
Ben Raz
@ben9923
@coolstar Try having a look at this one, anyway. Just noticed this kext (Seems like an early stage, not sure if it can help with that funky SSD)
https://github.com/acidanthera/NVMeFix
Johnny
@johnnync13
@ben9923 Yes, but it still doesn't work. in less than a month they will release the first release. We will finally have a native energy control in nvme
Larry Davis
@lazd

hey all, i managed to get I2C communication working with the Goodix device last night, and i'm able to update the transducers with touch coordinates and emit an event, but my touchscreen is acting like a gigantic trackpad, moving the cursor relative to its existing position. how can i configure VooodooI2C's DigitiserTransducers and MultitouchInterface to function like a touchscreen? that is, position the cursor at the exact coordinates of the touch event, tap, etc.

here's where i create transducers: https://github.com/lazd/VoodooI2CGoodix/blob/master/VoodooI2CGoodix/VoodooI2CGoodixTouchDriver.cpp#L112-L116

here's where I update transducers: https://github.com/lazd/VoodooI2CGoodix/blob/master/VoodooI2CGoodix/VoodooI2CGoodixTouchDriver.cpp#L343-L358

here's where i create the MultitouchInterface: https://github.com/lazd/VoodooI2CGoodix/blob/master/VoodooI2CGoodix/VoodooI2CGoodixTouchDriver.cpp#L395-L399

Alexandre Daoud
@alexandred
@lazd have a look at the multitouch event driver in voodooi2chid
What happens is that single touch is handled separately
And multitouch is sent to the native engine
Larry Davis
@lazd
ok, i'll take a look. i saw the docs for VoodooI2CTouchscreenHIDEventDriver, and it seemed like it was along the lines of what i was looking for, but i couldn't find any usage examples
meanwhile, i'm still having to warm boot from Windows to get that power-on sequence sent so interrupts work :( we're looking into sending the reset sequence in the _PS0 method in the DSDT.
Larry Davis
@lazd

alright, i see the code you're referring to here https://github.com/alexandred/VoodooI2CHID/blob/ee2620720850a652eb493dbd377da16c1fd57fef/VoodooI2CHID/VoodooI2CTouchscreenHIDEventDriver.cpp#L228-L242

should i be implementing something similar in my satellite, or should i somehow be instantiating a VoodooI2CTouchscreenHIDEventDriver and passing events to it?

Larry Davis
@lazd
it seems like, perhaps i've gone about this wrong. what i did was write a driver to interface with the touchscreen, publish a multitouch interface, and emit events. perhaps what i should be doing is writing a driver that publishes a HID device, which will then be recognized by VoodooI2CHID. is that the case? if so, is there an existing example i can refer to that does something like this?
(forgive me and please correct me if my terminology is wrong here, i'm in uncharted territory as far as my knowledge of these things)
Alexandre Daoud
@alexandred
@lazd gimme a sec, I will get my laptop out to type you a proper response
Larry Davis
@lazd
thanks!
Alexandre Daoud
@alexandred
@lazd okay so the answer to your last question is yes and no
Larry Davis
@lazd
i figured as much, heh
Alexandre Daoud
@alexandred
VoodooI2CHID is really two things under the hood: it is first and foremost a low-level driver for devices which expose an I2C HID interface (i.e those devices with a compatible ID of PNCP050 iirc)
most if not all laptops and tablets have i2c-hid compatible trackpads and touchscreens these days
but i2c hid is merely a protocol and it can be used in any device which wishes to implement the HID protocol over I2C (for example many cameras use I2C HID as well)
so if your device is I2C HID then you definitely want to make use of the API that VoodooI2CHID exposes so that you dont have to reimplement the i2c hid protcol
Larry Davis
@lazd
ok, this matches my understanding so far. the device is not I2C HID, unfortunately.
Alexandre Daoud
@alexandred
okay
the other part of VoodooI2CHID is an implementation of the microsoft precision trackpad/touchscreen protocol that many devices use
the precision protocol works over USB or I2C so that part of the driver is actually protocol-agnostic
(or rather agnostic to the bus it running on I should say)
Larry Davis
@lazd
i see
Alexandre Daoud
@alexandred
so if your device happens to implement the precision protocol then you could certainly use that
but its probably unliekly that it does given that it doesnt use i2c hid
i have addmitedly not yet read your original message so let me do that now