Jump to content
Ulysse31

Cypress PS2 Trackpad kext

128 posts in this topic

Recommended Posts

Hi all,
 
I've been writing a kext for the cypress touchpad (available on dell xps 12, 13, 15z and others).
I'm opening this topic in order to post here future updates/news on it.
Sources are based on rehabman VoodooPS2Controller in which I've added support for the cypress PS2 protocol.
It can be now considered as stable and basic parameters can now be changed in prefpane.
Source code and kext download is available here :

 

https://github.com/ulysse31/voodoops2controllercypress

 
Actual Features:

  • tap to click
  • dragging *New*
  • triple tap draglock (one tap to end) *New*
  • two fingers scrolling (no smooth momentum)
  • two fingers tap for right click
  • 3 fingers tap/window move/select
  • 4 fingers swipe: need to have set on System Preferences => keyboard input shortcut to control+command+[up/down/left/right]
  • 5 fingers lock screen : keep your 5 fingers for arround a second and leave the pad
  • 5 fingers sleep mode : keep your fingers for at least 3 secs
  • Basic Settings can now be changed on : System Preferences => Trackpad
  • advanced settings can now be tested quickly via the new prefpane and then be set definitively on the VoodooPS2Trackpad.kext/Info.plist *New*

I do all this for my personal fun, but if some good souls are happy with it and wants to make a donation, you will find the link on the googlecode homepage.
 
Best Regards to all,
 
EDIT:
Installation Note: Backup all your actual PS2 related kext ! since this version is forked from rehabman's one: you did not need AppleACPIPS2Nub.kext/ApplePS2Controller.kext and must remove it if you have it or you will crash.
 
UPDATE:
v0.7 is out ! Everyone should use this release ! this version makes some bug corrections, working optimizations, and brings now a prefpane for quick parameters testing and allow to know easily which good values to set on the VoodooPS2Trackpad.kext/Info.plist

CHANGELOG:

  • v0.7
  • corrected bugs and added optimizations
  • cleaned a bit the code
  • added kalman filtering (smooth) on multifinger gestures and pressure calc
  • added viable communication between kext and prefpane
  • added a prefpane that allows changing advanced settings in live and quick Info.plist edition
  • all values can now be set with the VoodooPS2Trackpad Info.plist
  • v0.6
  • changed all taps to use real timers (better finger tapping for 1 to 5 fingers)
  • cleaned a bit the code
  • enhanced 4 fingers swipes
  • scrolling speed can be now scalled on the trackpad preferences
  • 5 fingers lock screen : keep your 5 fingers for arround a second and leave the pad : it launches the OSX shortcut keys for screen locking (Control+Shift+Eject)
  • 5 fingers sleep mode : keep your fingers for at least 3 secs : it launches the OSX sleep shortcut keys (Command+Option(Alt)+Eject)
  • 2 fingers tap right click : 2 fingers tap gives a right click
  • v0.5:
  • Handles Buggy firmwares (v34, v35) that do not follow cypress own documentation (?!) sending 0x04 header packet instead of 0x20 for 4 fingers packets.
  • Now basic settings can be modified on System Preferences => Trackpad !
  • v0.4:
  • Added tap to click for XPS 15z ( framerate superior on firmware v34 v35 to firmware v11)
  • corrected bug for firmwares superior to v11 that does not handle rate and resolution to 200dpi 8count/mm
  • v0.3 :
  • Added 3 fingers tap/window move
  • Added 4 fingers swipe
  • v0.2:
  • smoothed mouse moves
  • v0.1:
  • first release : basic features => tap to click, 2 fingers scrolling

FAQ:
 
Q:Could you add gesture XXXX ?

A: Short answer: maybe. Long Answer : For now we are limitated on PS2 dev to voodooPS2 basics, in order to implement all possible gestures, we need to change from IOHIDPointer to a new class (IOHIDFamily ?), but that represents a LOT of work since using a "Upper" class also means get rawer implementation to graphical hooks ... in other words, when someone will find a way to implement a trackpad (whichever material) using a Upper class, others will then follow. it does not means i will not work on that, i will, at least try to, but the workload being quite huge, don't expect it soon (on the next months) from my part at least. If you have in mind a feature, make an issue, and i would tell you if it's possible or not.
 
 
 
Q:I have a bug/freeze/hang/whatsoever using your kext, what should i do ?

A: Firstly, you need to be sure that you have followed the per-requisites on the installation note on main page, by removing all other mouse related kexts (AppleACPIPS2Nub.kext/ApplePS2Controller.kext), but also other "plugin" kexts like smoothmouse. if you are sure on that, then check your permissions. Finally, if everything is checked, use the following debug kext downloadable here(will keep link updated)

Try to reproduce the bug with this kext loaded (you can also build one with the latest sources and use the debug version). Once the bug occurs, you have 2 things to do :

  • write down date(s)/time(s) it occurs
  • extract logs by using the following commands and sent it to me: sudo cat /var/log/system.log | grep -i cypress > ~/cypress_dump.txt

You'll have a cypress_dump.txt on your home directory containing the kext logs. Don't hesitate contacting me by the forum (PM or on the cypress topic), by the google issues or even directly by mail. you need to try to explain the bug as much as possible :

  • a link to download your cypress_dump.txt (or put it in attachment)
  • mention the time(s)/date(s) it occured
  • its type (hang, jerkyness, freeze or KP) ?
  • is it at boot ?
  • is it using a specific feature ?

Generally, the few issues comes from a untest yet firmware with some feature, since i have a XPS 13 (cypress firmware v11) i cannot see/detect some bugs without the help of the community.
 I do all this just because i like to code, and i like OsX, so I'll try to do the best i can to get it working on most different computers. Again, if you have a problem, don't hesitate, contact me and send me logs.

 

 

 

EDIT 18th June 2017 : BACK FROM DEATH FOR A SHORT TIME :

 

Here is a Sierra version download link, features ARE really LIMITED, since the settings loading (Info.plist/prepane) changed, value are HARDCODED.

 

https://mega.nz/#!VggiUapL!psmojkiZeiVJIgMG5Pvb6QgxT0z35dnjK89VJttBA1k

 

 

 

It works under Sierra on my XPS 13, (by the way, Sierra runs quite well on it ^^ ), I DO NOT HAVE TESTED UNDER OTHER COMPUTERS.

 

Cheers all,

 

 

 
--
Ulysse31

Share this post


Link to post
Share on other sites
Advertisement

thanks for your efforts! Is there a good place to read how to patch these kexts?  editing the plist files is well documented and easy to do, but if you have to change the kext itself…where do you begin? NO intent to hijack the thread, but if you could point me in the right direction I'll owe you a coke! 

Share this post


Link to post
Share on other sites

Hi,

 

You're welcome ! ^^

Unfortunately since all values still hard coded, for now, to change values you need to checkout code, modify and recompile it :s

I'm gonna stop adding features for now, and I'm gonna concentrate on binding values on plist variables in order to allow personalization, and also concentrate on code stabilization.

Once that done, I'll update the main post with a documentation on variables available for edition on the plist.

 

thanks for your efforts! Is there a good place to read how to patch these kexts?  editing the plist files is well documented and easy to do, but if you have to change the kext itself…where do you begin? NO intent to hijack the thread, but if you could point me in the right direction I'll owe you a coke! 

 

--

Ulysse31

Share this post


Link to post
Share on other sites

version 0.3 causes crash_this is the 3rd time i'm typing this :) i didn't think i would have time but send me debug kext and instructions on how to log . i'm using 15z; 3 finger is jerky; haven't gotten to 4 fingers since it keeps crashing. but still thank you for your efforts.

Share this post


Link to post
Share on other sites

version 0.3 causes crash_this is the 3rd time i'm typing this :) i didn't think i would have time but send me debug kext and instructions on how to log . i'm using 15z; 3 finger is jerky; haven't gotten to 4 fingers since it keeps crashing. but still thank you for your efforts.

Oh :s not cool ...

On mine the only problem is in fact the 3 fingers movement that are a little jerky, but that is because i need to apply a noise reduction algorithm (cf my svn log history).

Could you answer the following :

- when you say crash, you mean OSX kernel panic, or bug in mouse mouvement ?

- have you removed all PS2 related kext like marked on the homepage ? AppleACPIPS2Nub.kext, ApplePS2Controller.kext and others ? if they are present crashes comes from it ! because my sources are based on rehabman's VoodooPS2Controller which includes already those kexts inside. so, if you still have those kext, remove them, clear your kext cache and repair permissions.

- does the tap to click works ?

- does the scroll works ?

 

Following the answers you will gave me i will add debug logs on the correct section on the code before building the debug kext and send it to you.

Thanks.

 

--

Ulysse31

Share this post


Link to post
Share on other sites

kernel panic

both AppleACPIPS2 and ApplePS2 are removed i have been using rehabmans default voodoo before coming upon your kext.

tap doesn't work and in one instance attempting to use it caused KP this didn't happen with your v 0.1 and v0.2

yes scroll works with 2 fingers

Share this post


Link to post
Share on other sites

kernel panic

both AppleACPIPS2 and ApplePS2 are removed i have been using rehabmans default voodoo before coming upon your kext.

tap doesn't work and in one instance attempting to use it caused KP this didn't happen with your v 0.1 and v0.2

yes scroll works with 2 fingers

Hi,

 

So it KP only when you tap ? or other circonstances also ?

To find why it kernel panic, you should send me a stack trace, the error in stack should appear on the screen when it kernel panic.

You may find it on your /var/log/system.log file (or with the Console application), if you cannot find it, please try to take a photo of the message.

 

Also, Please download and test the following kext : https://mega.co.nz/#!o4pmkBqY!HNDCVWjA6jDDW5ynR0PZX2LT3nNeqT9g6l4OvEU8ip0

Once installed lot of debug will be stored on your system log, so try to use mouse as less as possible, try to tap, (hoping it won't KP) then on a terminal, type the following :

sudo cat /var/log/system.log | grep -i cypress

if you cannot copy/paste correctly the output, you can also type :

sudo cat /var/log/system.log | grep -i cypress > ~/cypress_dump.txt

You will have a new file on your home directory called cypress_dump.txt containing the infos.

And give me the output (do NOT post it directly on the forum it will be too exhaustive, put it as an attached .txt file or on pastebin).

If this version does not KP, i think i know what should be the problem.

Thanks a lot.

 

 

--

Ulysse31

Share this post


Link to post
Share on other sites

 it was several single taps tried before creating the log ; no KP noted using debug kext;

i could try again with 3 fingers and repost if you want ; 2 fingers works well;

 

edit: jerky on 3 fingers but no noted problems other than that.

Share this post


Link to post
Share on other sites

 it was several single taps tried before creating the log ; no KP noted using debug kext;

i could try again with 3 fingers and repost if you want ; 2 fingers works well;

@t6590: Ok so kernel panic comes from the setting rate and resolution to 200dpi 8 count/mm, so that works on XPS 13 (cypress firmware v11) but not on XPS 15 ...

I can a least remove this crash on release ^^ thanks a lot, will make v0.4 with this corrected.

For the 3 fingers, it's jerky when you have your 3 fingers close each other try to have them seperated on the pad, keeping the distance between each other and you'll see it is a bit smoother (like said before need to make noise reduction on trackpad input for 3 fingers, once done, this will be corrected).

When you'll have the time, please do again the same debug generation (just try to tap several time, seperate each tap by few seconds, try to use mouse at less as possible for other things), but with this debug kext :

 

https://mega.co.nz/#!wh53gSQC!fMSlD0LHm3drRZoBP2q7OBp9KUpkd4zaVjAcBiOUF9A

 

 

It will allow me to calibrate the tap to click for XPS 15 (allow it to work on next v0.4)

 

Thanks for your kind help again.

Share this post


Link to post
Share on other sites

alright here you go with taps separated by several seconds

 

http://www.mediafire.com/download/pai66zil8t3lzee/cypress_dump2.txt.zip

 

i also wanted to ask do you use any other assitive kexts like IOWMI ?

Thanks a lot for your help !

 

Have sent you a PM with a beta version of v0.4 please test tap to click and tell me if it works better now.

It is a release version, so you should not have debug on it.

For the IOWMI thing, no i do not use it, my XPS 13 was installed following vladichimescu method (http://vladichimescu.me/) (CLOVER/UEFI/DSDT) got everything working on it with less system modification.

Thanks for the help again.

 

Regards,

 

--

Ulysse31

Share this post


Link to post
Share on other sites

 tap works, smooth 2 fingers and 3 fingers . does this support four and how to enable it i didn't understand the instruction from the other thread. also is there support for the 2 finger tap resulting in right click options popping up?

Share this post


Link to post
Share on other sites

 tap works, smooth 2 fingers and 3 fingers . does this support four and how to enable it i didn't understand the instruction from the other thread.

the 4 finger swipe allows to get mission control/expose, in order to get it working, you need to go on Sytem Preferences => Keyboard => shortcut tab.

there, you'll find 2 window, on the first, click on Mission Control, then on the second :

 

- click on the line "Mission Control" and set keys to : Control(Ctrl)+Command(Alt or windows key)+UPARROW

- click on the line "Application Window" and set keys to : Control(Ctrl)+Command(Alt or windows key)+DOWNARROW

- click on the line "Move to left space" and set keys to : Control(Ctrl)+Command(Alt or windows key)+LEFTARROW

- click on the line "Move to right space" and set keys to : Control(Ctrl)+Command(Alt or windows key)+RIGHTARROW

 

once all done, using the kext i gave you, you should the be able to swipe up and get mission control, swipe down and get the current application windows list/expose, swipe to the right (goes left) and get the dashboard.

Thanks for the info, will then release v0.4 tonight.

 

EDIT: The 2 fingers tap ? hey that's a good idea ! ^^ that might be possible ! but first i need to allow all those settings/preferences available on the Info.plist, in order to allow user to activate de-active them or even customize them.

 

Best Regards,

 

--

Ulysse31

Share this post


Link to post
Share on other sites

I have XPS 15z everything works fine, but 4 finger gestures crashes my system. I have to reboot every time. I am on 0.4 release

Are you sure that you removed all other PS2 related kext ?

Have you bind the keys like recommended ?

Do you know your firmware version ?

 

If yes, try the latest debug kext available on this thread, and see if that crashes.

Also try to get the kernel error message (stack trace) it would allow me to debug and understand why it crashes on your system.

Best Regards,

 

--

Ulysse31

Share this post


Link to post
Share on other sites

Are you sure that you removed all other PS2 related kext ?

Have you bind the keys like recommended ?

Do you know your firmware version ?

 

If yes, try the latest debug kext available on this thread, and see if that crashes.

Also try to get the kernel error message (stack trace) it would allow me to debug and understand why it crashes on your system.

Best Regards,

 

--

Ulysse31

I got this @Ulysse31

Are you sure that you removed all other PS2 related kext ?

Have you bind the keys like recommended ?

Do you know your firmware version ?

 

If yes, try the latest debug kext available on this thread, and see if that crashes.

Also try to get the kernel error message (stack trace) it would allow me to debug and understand why it crashes on your system.

Best Regards,

 

--

Ulysse31

I've removed all kexts and binded the keys as instructed. However, I am unaware of the version of the firmware. I will now try debugger

post-945211-0-62420000-1387435128_thumb.jpg

Share this post


Link to post
Share on other sites

I got this @Ulysse31

I've removed all kexts and binded the keys as instructed. However, I am unaware of the version of the firmware. I will now try debugger

Hi @youngwake,

 

Please follow this steps :

 

Try the latest debug kext, can be downloaded here :

 

https://mega.co.nz/#!wh53gSQC!fMSlD0LHm3drRZoBP2q7OBp9KUpkd4zaVjAcBiOUF9A

 

once installed, try to use trackpad as less as possible, then try to  use 4 fingers, if it crashes, reboot, and reinstall release version.

Then take a terminal and type the following :

 

sudo cat /var/log/system.log | grep -i cypress > ~/cypress_dump.txt

 

you will have on your home directory a new file called cypress_dump.txt send it to me.

Also, on a terminal type this :

 

sudo ioreg -v > ~/ioreg_dump.txt

 

you will also have on your home directory a new file called ioreg_dump.txt send it to me also.

 

And one question, have you tried to use the shortcut directly on the keyboard (like Ctrl+Alt+UPARROW)? does it also KP ?

 

Thanks a lot,

Regards,

 

PS: I'm sad to know that there is those crashes, the problem is that i do not have an XPS 15z to test myself ... (mine is XPS 13 and works well ...)

 

--

Ulysse31

Share this post


Link to post
Share on other sites

was just coming to post the same thing 4 fingers will KP our system. and setting the shortcuts doesn't do anything.

Hi,

 

Thanks for the info, please if you have time try the same thing i posted for @youngwake : with debug kext, system.log dump + ioreg dump.

If you try directly from your keyboard to use the shortcut, does it KP ?

 

Thanks,

 

Regards,

 

--

Ulysse31

Share this post


Link to post
Share on other sites

Testing now. couldn't boot system earlier!

 

by the way, the shortcut keys work perfect on the keyboard. 

 

p.s dont be sad. this is the best our trackpad ever worked. If 4 fingers is a no go on my system, I will still be more than satisfied with your work. 

Share this post


Link to post
Share on other sites

Testing now. couldn't boot system earlier!

 

by the way, the shortcut keys work perfect on the keyboard. 

 

p.s dont be sad. this is the best our trackpad ever worked. If 4 fingers is a no go on my system, I will still be more than satisfied with your work. 

Thanks, ^^ that's conforting.

But really would like to get it working :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By fen3der
      hi to all There is a touchpad elan1000 but attempts to make the work unsuccessful. Help please solve the problem
    • By M3G4DR01D
      Hello everyone, I have an Asus gl502vmk (i7 kabylake + GTX 1060 6 gb) laptop and I tried all the patches/kexts to get the brightness with fn keys/touchpad (I2C ELAN 1200 works with VooDoo I2C kext v1.0 but no gestures/preference pane)/Keyboard backlight to work but no success so far, any help would be appreciated, thanks in advance.
      [EDIT] (10/04/2018)
      Battery status now works, thanks to @RehabMan turned out to be incorrect SMBIOS (used iMac instead of Mbp) lol, but it drains crazy fast (~1.5 - 2 hours while on standby (all apps quited!), on windows 10 it lasts 4 - 5 hours, and on linux it lasts 6 ~ 7 hours!)
      And with VoodooI2C v2.0.1 + VoodooI2CHID kext and patched DSDT, the touchpad is now detected in the sys pref pane but still no input.
      Sound works with VoodooHDA v2.9.1, but the only issue is that the jack sense isn't working (the output device doesn't auto switch to headphone when connected)
       
      [EDIT 2] (11/04/2018)
      The system brightness now works thanks to @onejay09 but I have no brightness slider, and there are 4 extra brightness levels (brightness stops increasing after 12 levels)  and the brightness keys are not mapped correctly, plus the brightness decreases when I plug in the ac adapter, then increases if I unplug it???, the brightness level isn't also saved after reboot.
      battery still drains crazy fast (~1.5 - 2 hours, even with brightness at 50%, so apparently it is a power management issue).
      and I also have shutdowns while in sleep mode (I tried darkwake=10 and darkwake-0 and darkwake=no)
       
      P.S. I have uploaded my new report files, thanks!
       
      Latest report files (11/04/2018): https://www95.zippyshare.com/v/AMOpP0AY/file.html
    • By giacomo.dessi2303
      Buona sera
      Il touchpad funziona abbastanza bene però ha 2 problemini:
      Praticamente col tap riesco solo a cliccare mentre se devo trascinare finestre o selezionare devo fare per forza il click forte..
      Poi come gesture ho solo lo scorrimento con due dita e il click secondario.. allego lo screen delle informazioni del touchpad. grazie a tutti

    • By Carlocarre65
      Salve, sono un soddisfatto possessore di un hackintosh (ASUS K56CB, i3-3217U-nVidia740M-SSD-8GB di RAM), una sola cosa mi fa ancora preferire Windows a MacOS, il touchpad, il mio PC monta un elan PS2, il problema è che in rete ho trovato solo 2 tipi di kext 
      1. VoodooPS2 che però non mi fa funzionare ne tastiera ne pad
      2. Kext elan fatto da un utente che mediante le gestures simula delle scorciatoie da tastiera che eseguono la funzione, inutilizzabile.
      Parlando con altri utenti hackintosh ho saputo che per far funzionare voodoops2 in realtà bisogna anche patchare il dsdt (o ssdt,non ricordo) per ottenere delle gestures ottime, il problema è che io non sono minimamente capace, o provato a googlare e ad applicarmi ma non ci sono riuscito. Qualcuno può aiutarmi/fornirmi soluzioni alternative? Grazie in anticipo. 
       
      (In allegato nel link di drive la cartella EFI in quanto pesa troppo per essere allegata con la funzione del forum) 
      https://goo.gl/UkBgfm
×