Jump to content

Cypress PS2 Trackpad kext

cypress ps2 touchpad trackpad

  • Please log in to reply
111 replies to this topic

#1
Ulysse31

Ulysse31

    InsanelyMac Protégé

  • Coders
  • 65 posts
  • Gender:Male
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://code.google....trollercypress/
 
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.
 
--
Ulysse31

#2
jakebour

jakebour

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts

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! 



#3
Ulysse31

Ulysse31

    InsanelyMac Protégé

  • Coders
  • 65 posts
  • Gender:Male

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



#4
t6590

t6590

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts

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.



#5
Ulysse31

Ulysse31

    InsanelyMac Protégé

  • Coders
  • 65 posts
  • Gender:Male

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



#6
t6590

t6590

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts

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



#7
Ulysse31

Ulysse31

    InsanelyMac Protégé

  • Coders
  • 65 posts
  • Gender:Male

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/#...qT9g6l4OvEU8ip0

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



#8
t6590

t6590

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts

here you go http://www.mediafire...ss_dump.txt.zip



#9
Ulysse31

Ulysse31

    InsanelyMac Protégé

  • Coders
  • 65 posts
  • Gender:Male

Ok,

 

but which action was done ? did you tried to tap ? did it KP also ?

Thanks,

 

--

Ulysse31



#10
t6590

t6590

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts

 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.



#11
Ulysse31

Ulysse31

    InsanelyMac Protégé

  • Coders
  • 65 posts
  • Gender:Male

 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/#...d4zaVjAcBiOUF9A

 

 

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.



#12
t65902

t65902

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts

i don't know whats up with my account i can't log in but anyways have got it will do with the new debug kext.



#13
t65902

t65902

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts

alright here you go with taps separated by several seconds

 

http://www.mediafire...s_dump2.txt.zip

 

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



#14
Ulysse31

Ulysse31

    InsanelyMac Protégé

  • Coders
  • 65 posts
  • Gender:Male

alright here you go with taps separated by several seconds

 

http://www.mediafire...s_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



#15
t65902

t65902

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts

 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?



#16
Ulysse31

Ulysse31

    InsanelyMac Protégé

  • Coders
  • 65 posts
  • Gender:Male

 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



#17
youngwake

youngwake

    InsanelyMac Protégé

  • Members
  • PipPip
  • 67 posts

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



#18
Ulysse31

Ulysse31

    InsanelyMac Protégé

  • Coders
  • 65 posts
  • Gender:Male

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

#19
youngwake

youngwake

    InsanelyMac Protégé

  • Members
  • PipPip
  • 67 posts

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

Attached Files



#20
Ulysse31

Ulysse31

    InsanelyMac Protégé

  • Coders
  • 65 posts
  • Gender:Male

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/#...d4zaVjAcBiOUF9A

 

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







Also tagged with one or more of these keywords: cypress, ps2, touchpad, trackpad


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy