I also found if I delete the IOKitPersonalities for these items in VoodooI2CHID.kext's plist:
VoodooI2CHIDDevice Multitouch HID Event Driver
VoodooI2CHIDDevice Stylus HID Event Driver
VoodooI2CHIDDevice Touchscreen HID Event Driver
The TPL0 (secondary screen) would be unusable, but TPL1 (main screen) still works as trackpad. Some device detection/assign is playing a part in the TPL0, even after I remove TPL1 from the motherboard, which doesn't make sense as the only differences are the connector type (DP in TPL0 vs eDP in TPL1), resolution (3840 x 1100 vs 3840 x 2160), and HID (ELAN9008 vs ELAN9009). Tried renaming ELAN9008 to ELAN9009, which still have the same effect.
@shiecldk IOKitPersonalities usually for telling the OS to load the driver for a particular device.
I keep mentioning that the stylus code was hacked together AND your combination of multi-screen devices is exotic. Technically speaking, VoodooI2C should work across numerous devices BUT multi-screen devices are not found in real Apple hardware AND macOS does not natively support styluses. That is why I am saying it's hacked together.
You are pretty much in unexplored waters here and while I can try to explain what's going on, it's quite tough as I have not written that code (@alexandred ha) nor I have not looked at that particular code in well over 2 years. You may be better off creating a separate satellite and directly interfacing with VoodooInput.
Is there a place where the VoodooI2C
- assign the I2C device to be stylus or touchscreen?
- enable/disable multi contact point check?
@shiecldk Everything is decided by your particular report descriptor for each device. In terms of differentiation between a stylus and a single touch finger contact point as far a macOS is concerned, they are the same. We use a very procedural hack with the defined type (again, by your report desc) to apply some logic that makes sense for each type, meaning, with a finger we want to be able to click and drag items, and with a stylus we may want the buttons to handle the clicking while we hover etc. If a device reports pressure, tilt, barrel sensitivity, etc, we collect it but macOS has no mechanism in the public kernel API to apply those features. So even a stylus, is essentially a finger. It was done in this fashion because if you were to send the singletouch data to the multitouch stack, it would behave like a giant trackpad vs a touchscreen since there are no touchscreen Macs and we are using a faked MT2 device. Regardless, in my opinion, your first step should be to use the FingerMgmt app to check what is being reported to the multitouch stack, and then log the input data to see what your device is reporting vs worrying about what personality is being loaded.
@blankmac Thank you! Please check this debug dump:
For the Linux driver, what specify driver could I look for to help create the standalone satellite?
The Linux driver I found is in here:
It has the exact same touchscreens and touchpad as my UX582:
It looks like in order to get the stylus function well in both touchscreens, wacom driver is needed to be loaded. Would the above link be a right direction to start with? I appreciate your help.