Jump to content
bpedman

New TouchPad driver for E6520 / ALPS

Recommended Posts

So I took some time to get a working touchpad driver for the touchpad in my Latitude E6520. This driver is based off of the one by ReHabMan.

Source:
https://github.com/bpedman/OS-X-Voodoo-PS2-Controller

The code for the ALPS driver is also heavily based on the Linux driver (3.8 kernel version). See here: http://lxr.free-electrons.com/source/drivers/input/mouse/alps.c?v=3.8

The driver is now ported mainly from the v3.9 kernel which supports a few more models. See here: https://github.com/torvalds/linux/blob/v3.9/drivers/input/mouse/alps.c

Installation Instructions:
Make sure to follow the installation instructions from rehabman especially the part on removing the other PS2 kexts you have installed like AppleACPIPS2Nub.kext. See https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/wiki/How-to-Install

Note that if there is a constant dinging sound after you boot at the login screen, just hit the backspace key to make it stop.

What Works:
- Side scrolling (hallelujah)
- Tap clicking
- Trackstick movement
- Trackstick buttons, including middle click with the middle trackstick button
- Two-finger scrolling
- Recognized as built-in trackpad (the trackpad prefpane loads)

What Doesn't Work:
- 3-finger swiping (I can see it correctly detect 3 fingers but the swiping action doesn't work right now I don't think)
- NO IDEA if any of the preferences in the preference panes work...I have not tried changing many things except for enabling tap clicking, I just modified the default values in the driver to acceptable values for me)
- ALPS V1/V2 touchpads will not work....other drivers out there already support those versions. I made this just for my touchpad version but I could fairly easily support multiple versions in the future just like the Linux driver does. I updated to support a lot more versions but I still need to figure out how to properly port the v1/v2 packet processing. Got it ported now for V1/V2 models but not sure if it works correctly or not.

TODO:
- Merge with ReHabMan's official driver to have fairly good support for multiple touchpads (his has good support for Synaptics touchpads, I chose to base off his driver because of the extensive options and his code was very nice and understandable)...
- Get 3-finger swiping working
- Make 3 finger actions actually do something....
- Test out the preference pane options
- Support multiple ALPS device versions
- Fix issue where a tap click occurs when lifting finger after doing a side-scroll (I made a change to hopefully help but I still see it happen every once in a while).

The driver includes both debug and release versions...debug version includes TONS of log messages to /var/log/system.log

Have fun...hopefully I have time to do all the things on the list.

------------------------------------------------------------

EDIT: 13-May-2013

- Got swiping working, but I still don't see anything happening. It is controlled by the VoodooPS2Controller and sends some special keyboard sequences, but I don't see anything happen in the OS...oh well, at least it is firing the 3-finger swipe actions now...

EDIT: 18-May-2013
- Ported nearly all the code from the Linux driver over to this. Now supports most models that are not v1/v2...I still need to figure out how exactly to process their packets

 

EDIT: 24-May-2013

- Translated what I could of the v1/v2 protocol...not sure if it is correct or not, but would be nice to have someone test...not even sure what models of laptops use this, but at least now it is a complete port for support for all models.

 

EDIT: 5-June-2013 (v5)

- Fixed issues with detecting if a trackstick was present or not

- Fixed issue with finger detection on v1/v2 models

- Preliminary support for multiple finger detection on v1/v2 models

- Potential fix for side scrolling on v1/v2 models

 

EDIT: 9-July-2013 (v6)

- Rework the way command mode nibbles are handled, reflecting the Linux driver more closely

- Potentially fix an issue that might occur when resetting the mouse

 

EDIT: 12-July-2013 (v7)

- Fixed some issues during the refactor of the nibble sending. It should now all work. Tested working on an n5050, thanks bjornw!

 

EDIT: 8-Sept-2013

- Adding merge with rehabman

 

ALPS-TouchPad-Driver-v7.zip

RehabmanMerge.zip

  • Like 8

Share this post


Link to post
Share on other sites

Looking forward to trying this on my E5430 when I get home from work tonight.

It really is one of the last things that needs improvement on my system to make it completely usable! Not sure if my ALPS touchpad is the same revision as yours, but there has only been one kext I've found to work so far, and there is no scrolling support with it. Hopefully this helps!

 

Thanks for your contribution!

Share this post


Link to post
Share on other sites

Looking forward to trying this on my E5430 when I get home from work tonight.

It really is one of the last things that needs improvement on my system to make it completely usable! Not sure if my ALPS touchpad is the same revision as yours, but there has only been one kext I've found to work so far, and there is no scrolling support with it. Hopefully this helps!

 

Thanks for your contribution!

Make sure to check /var/log/system.log if it doesn't work and check for "ALPS model x,x,x." And let me know the numbers there. That way I can try and make sure it works for your version.

Share this post


Link to post
Share on other sites

Hi,

 

tried it on my E6520, unfortunately it does not work. All extensions are loaded and the Daemon is running.

 

May 14 22:30:09 gerat kernel[0]: ApplePS2ALPSGlidePoint: ALPS model 0x73,0x02,0x64

 

 

 

Share this post


Link to post
Share on other sites

Hi,

 

tried it on my E6520, unfortunately it does not work. All extensions are loaded and the Daemon is running.

 

May 14 22:30:09 gerat kernel[0]: ApplePS2ALPSGlidePoint: ALPS model 0x73,0x02,0x64

 

Hmm, should be working for that version. That is the same model I have, although there are some minor variations in the behavior between the 0x73,0x02,0x64 versions...but since you have an E6520 as well, it should really be the exact same.

 

So, some questions:

- What version of OSX are you running?

- Run the following 2 commands in a terminal:

find /System/Library/Extensions -name '*PS2*'

find /Extra/Extensions -name '*PS2*'

And paste the output..This is to make sure that no other PS2 kexts are there including the AppleACPIPS2Nub and ApplePS2Controller which should not exist anywhere...sometimes those kexts get left over either in /E/E or in /S/L/E/myHack.kext/PlugIns

- Did it not work at all? Or just no side-scrolling or whatever?

 

Also, I have noticed at other times that sometimes the kexts don't get refreshed properly until after a couple reboots...but it may have been my own fault...should be OK as long as you use myHack and run a quick fix or just regenerate the kext cache

Share this post


Link to post
Share on other sites

OK, strange results on my E5430. I had already tried RehabMan's voodoops2controller.kext a few weeks ago to try it, but it wouldn't work at all for me.. so I had  already updated to his FakeSMC.kext.

I installed your VoodooPS2Controller.kext to /E/E and copied your VoodooPS2Daemon to /usr/bin with RehabMan's org.rehabman.voodoo.driver.Daemon.plist copied to /Library/LaunchDaemons. Ran MyFix and rebooted.

 

Trackpad and TrackStick work, but only as basic mouse and very slow tracking. Loading Trackpad prefpane gives a message that no trackpad can be found.

 

system.log does not contain anything relating to ALPS model. Instead I do notice this line though:

VoodooPS2Trackpad: Identify TouchPad command returned incorrect byte 2 (of 3): 0x00

 

When loading the debug version, system.log gets flooded with messages like below, and system constantly beeps.

 

May 14 19:44:57 Marks-MacBook-Pro kernel[0]: ps2m: dx=0, dy=1, dz=0, buttons=0
May 14 19:44:57 Marks-MacBook-Pro kernel[0]: ps2m: dx=-1, dy=0, dz=0, buttons=0
May 14 19:44:57 Marks-MacBook-Pro kernel[0]: ps2m: dx=0, dy=1, dz=0, buttons=0
May 14 19:44:57 Marks-MacBook-Pro kernel[0]: ps2m: dx=-2, dy=1, dz=0, buttons=0
May 14 19:44:57 Marks-MacBook-Pro kernel[0]: ps2m: dx=-1, dy=1, dz=0, buttons=0
May 14 19:44:57 --- last message repeated 1 time ---
May 14 19:44:57 Marks-MacBook-Pro kernel[0]: ps2m: dx=-2, dy=1, dz=0, buttons=0
May 14 19:44:57 Marks-MacBook-Pro kernel[0]: ps2m: dx=-2, dy=0, dz=0, buttons=0
May 14 19:44:57 Marks-MacBook-Pro kernel[0]: ps2m: dx=-1, dy=1, dz=0, buttons=0

Share this post


Link to post
Share on other sites

 

system.log does not contain anything relating to ALPS model. Instead I do notice this line though:

VoodooPS2Trackpad: Identify TouchPad command returned incorrect byte 2 (of 3): 0x00

 

If the system.log does not contain a line like 'ApplePS2ALPSGlidePoint: ALPS model 0x73,0x02,0x64' then it isn't loading the correct kext...might be picking up something from the cache still or some other version from another location. See post #7. https://osxlatitude.com/index.php?/topic/2545-new-touchpad-driver-for-e6520-alps/&do=findComment&comment=19195

Share this post


Link to post
Share on other sites

Actually, since you are on a E5430, if you are running the debug version check the log for:

 

E7: { 0xXX, 0xXX, 0xXX } E6: { 0xXX, 0xXX, 0xXX }

ALPS Device? yes/no

 

Maybe I should include those lines in the regular kext instead of just on debug

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

×