Jump to content

Fixing the PS/2 driver (ApplePS2Controller.kext)


Tom H
 Share

99 posts in this topic

Recommended Posts

I have grabbed the Apple open source driver for PS/2 keyboards, mice and trackpads. I fixed it to build and run with the latest Xcode and moved headers so it would be self-contained. I still haven't fixed the build so all 4 kexts are automatically combined, but this is easy enough to work around. All are combined now, you still must build all 4 projects.

 

I have added more startup code to make it less likely to fail to load. I would say is fails about 50% as often as before - leave the kextunload/kextload hack in for now. Working much better, no failures on keyboard in 10 tries.

 

The source is covered by APSL, so modifying it is legal and here is the source posted to comply with that license.

 

Edit: 31 July 2006 - Updated kext and source. The keyboard now works without a mouse. More reliable, the kernel debug option is now off.

 

Kext: ApplePS2Controller.kext.zip

Source: ApplePS2Controller.zip

Link to comment
Share on other sites

it would be great if you could fix the bug when only a ps2 mouse or a ps2 keyboard is plugged in, the driver dies after the msg

 

Jul 16 11:19:38 localhost kernel[0]: ApplePS2Controller: Timed out on mouse input stream.

 

its weird because the trick to issue a kextunload and reload works

Link to comment
Share on other sites

thanks for continuing the work on the ps2 Driver, but i have an (old) Problem. After a few Seconds the System Starts. Mouse and Keyboard Stops working. reload is possible after a few minutes but stops working again after a few seconds. Sometimes it works for a few Minutes. I've found no Errors in Dmesg. I have a Acer Travelmate 290. I searched a lot in this forum but it seems to be nobody has fixed the problem. Yes i know i can use a USB Keyboard/Mouse. But on a notebook?

Link to comment
Share on other sites

I have a usb keyboard and ps/2 mouse.

I used your kext, loaded it and rebooted but the mouse still doesn't work.

What should I do?

I also have a usb mouse which works but I like my old trusty mouse.

Link to comment
Share on other sites

sorry I'm a n00b to OS X and macs can someone tell me how to install this package and how to remove it if I need to. Thanks for the help.

 

It's OK.

first put the kext file in system>library>extensions folder.

Open the terminal (application>utilities>terminal>

type "sudo -s" and then press enter

type chown -R root:wheel /system/library/extensions/appleps2controller.kext

type chmod -R 755 /System/Library/Extensions/appleps2controller.kext

type rm -r /System/Library/Extensions.kextcache

type rm -r /System/Library/Extensions.mkext

type exit

Restart osx and hopefully it will work.

  • Like 1
Link to comment
Share on other sites

I have a usb keyboard and ps/2 mouse.

I used your kext, loaded it and rebooted but the mouse still doesn't work.

What should I do?

I also have a usb mouse which works but I like my old trusty mouse.

 

wait and hope he's able to fix the problem, it's not supposed to be fixed yet

Link to comment
Share on other sites

  • 2 weeks later...
it would be great if you could fix the bug when only a ps2 mouse or a ps2 keyboard is plugged in
New version now supports PS/2 keyboard alone, this should be a big plus for laptop users. I haven't tested mouse without keyboard.

 

Key fix was turning off the conditional code for keyboard kernel debugging (kdb).

Link to comment
Share on other sites

Tom,

 

Is there a way to get my trackpad working (tapping is my primary concern) with your driver? Someone else wrote a driver (on this forum) that claims to get the trackpad fully functional, but my keyboard doesnt work when I use it (since it also uses PS2Controller.kext).

 

Thanks for the work so far.

Link to comment
Share on other sites

Is there a way to get my trackpad working (tapping is my primary concern) with your driver? Someone else wrote a driver (on this forum) that claims to get the trackpad fully functional, but my keyboard doesnt work when I use it (since it also uses PS2Controller.kext).
Actually, there are "4 kext's in 1", ApplePS2Controller.kext has a Plugins directory (within Contents). In there you'll find ApplePS2Trackpad.kext; replace it with the one you want. Then just delete the Extensions cache files and reboot. My changes were all in ApplePS2Controller.kext and ApplePS2Keyboard.kext (another plugin kext).

 

I read mixed reviews about the trackpad kext and was dubious about the source code. It only changes ALPS trackpad support, it apparently works well for some people - good luck.

Link to comment
Share on other sites

HI, it still doesn't seem to work for me with a ps2 keyboard and an usb mouse without having the kextunload/load trick in the /etc/rc . I can see the first message timeout on ps2 stream and the keyboard is still alive, after 3/4 secs there's another timeout msg followed by a msg about failed to probe ps2/mouse and the keyboard is dead. I've noticed that with your new build i've the keyboard working while booting with -s so i can easily uncomment the line in rc and reboot to have the keyboard working again

Link to comment
Share on other sites

HI, it still doesn't seem to work for me with a ps2 keyboard and an usb mouse without having the kextunload/load trick in the /etc/rc . I can see the first message timeout on ps2 stream and the keyboard is still alive, after 3/4 secs there's another timeout msg followed by a msg about failed to probe ps2/mouse and the keyboard is dead. I've noticed that with your new build i've the keyboard working while booting with -s so i can easily uncomment the line in rc and reboot to have the keyboard working again
Bummer! I thought I'd solved this one finally. I use both PS/2 keyboard and mouse, and have disabled my /etc/rc.local - which is where I did the kextunload/kextload. I haven't seen anymore timeout IOLog's, just probe failed for missing mice.

 

My final goal is "hot plug" support, assuming you only have 0 or 1 keyboard and 0 or 1 mouse each plugged in the "correct" port.

Link to comment
Share on other sites

This is weird with mine as a Single PS2 keyboard doesn't work with mine either. I have the current (July31) build of the kext and at no point can I get the PS2 keyboard to remotely function. I have tried to unload the kext and it says kextunload failed (and yes I do use SUDO)

 

kextunload: unload kext ApplePS2Controller.kext failed

 

So I can attempt to unload and re load the kext... Anyone have any ideas?

 

What is this trick to unload and load the kext in /etc/rc ?

Link to comment
Share on other sites

working PS2 Keyboard and USB Mouse...

 

go into ApplePS2Controller.kext/Contents/Plugins, and rename ApplePS2Mouse.kext and ApplePS2Trackpad.kext to *PS2Mouse/*Trackpad.whatever, to prevent those kexts from loading. :(

 

might be useful for some.

Link to comment
Share on other sites

Thanks guixos! Nice hint!

 

Does this driver support tapping on the trackpad for mouseclick? That's the only part of my trackpad that doesn't function... It would be worth trying if the functionality is there. Thanks for all your efforts!

Link to comment
Share on other sites

Does this driver support tapping on the trackpad for mouseclick? That's the only part of my trackpad that doesn't function... It would be worth trying if the functionality is there. Thanks for all your efforts!

 

This might work for you alexs.

 

I haven't tested this or anything (since I do not own a laptop) but basically I replaced the trackpad kext in the ApplePS2Controller.kext file with the ALPS Glidepad Driver and removed the ApplePS/2Mouse kext (not needed as laptop uses trackpad). (Originally suggested by TomH).

 

Be Warned though, as I've not tested it I have no idea what sideeffects it might produce so try it at your own risk! Also the ALPS Glidepad driver is still in development so I'd head on over to that thread and if you have any problems. Also, if you dont have any problems with the keyboard then it might just be worth you using the original ALPS driver...

ApplePS2Controller.kext.zip

Link to comment
Share on other sites

 Share

×
×
  • Create New...