Help - Search - Members - Calendar
Full Version: Hacked PS/2 Driver :)
InsanelyMac Forum > OSx86 Project > Hardware and Drivers > Other Peripheral Devices
Pages: 1, 2, 3, 4
babaev
My native notebook keyboard did not work "out of the box".

I downloaded ApplePS2 driver source from Apple's developer site, hacked them a little (added self-test to keyboard enabling method) and my notebook's keyboard (notebook: LG LS50, Centrino (SSE2 only), ATI Radeon M10 (9600)) works almost perfect.

I give no guarantee, that it'll work with your's specific keyboard, but you can try. May be I'll continue to develop this driver. I'm totally newbie to MacOSX developing, so...

How to install:

1. download Click to view attachment
2. unzip
3. copy it to /System/Library/Extensions (something like "cp -R ApplePS2Controller.kext /System/Library/Extensions/" in terminal)
4. modify owner (something like "chown -R root:wheel /System/Library/Extensions/ApplePS2Controller.kext" in terminal)

before entering commands in terminal, switch to superuser mode ("su", press enter and enter password)

Reboot, unplug USB keyboard and enjoy (if you can).
nemattoad
if it works for one PS/2 keyboard, it will work for all of them.
cwestpha
This thing can be considered a Alpha product that is a first "real" release on this platform. Rules of logic dont apply. An extra key might be enough to throw the whole thing off and cause a panic for all we know.
azuran
It works for me for a while but then it will randomly just stop, and I will have to plug in a usb mouse to do anything. Any ideas? There is no real indicative output to Console.

Azuran
babaev
Well, It's not a normal patch, it's a hack. Workink for me flawlessly.

I'm totally new to MacOSX an totally new to PS/2 . So, I need some more time to find out all the problems of Apple's driver. It's not complete - I can cay it because not all PS/2 messages are handled. And the problem of my keyboard was, that it didn't initialized properly.

I'll continue to develop this driver, so, may be in some time we'll get fully working one.
NX01
Allright dude! I also have an LG laptop, but LS 70 express model and my keyboard doesn't work too. Thank god that someone developed a patch... Will try patch as soon as get home from work biggrin.gif
azuran
Best of luck, your work is very much appreciated smile.gif
babaev
Well, a day passed. Driver works normally, without any problems (I work with another drivers now, so I do reboot often and so on). Even display backlight keys works (combinations with Fn key) and volume button works.

If anybody is interested - I've updated one more driver. PCCard now works for me. It's a Texas Instruments chipset. As I remember, TI7620. If anybody needs this updated driver, I can upload it here.
NX01
Repect man! My keyboard now works excellent!
Sure, upload the driver for PCCard... mine laptop has also Texas Instruments chipset - don't know which model, but i'd like to try...
babaev
Ok, here is my patched PCCard driver Click to view attachment. If it does not work, it is not very hard to add another (similar) chipset...

Installation is like keyboard driver, only names differ.
Wingen
I have a PS/2 keyboard and a USB mouse. Tried the patch, now OS X won't boot anymore. At the grey loading screen, I get that "no go" sign after a while. In verbose mode, I don't get any special error messages (afaik). I've tried booting with the -x parameter and with the platform parameter.
When I boot OS X from VMware (used the physical disk as a VMware "image"), everything works fine and OS X boots like normal. Could it be that VMware makes the system think I have a USB keyboard?
babaev
try booting -v, you'll see, where booting is stopped - write it here, we'll try to help.
Wingen
The weird thing is that when I boot with -v, it actually manages to boot all the way. I can use OS X like nothing happened. Even my iPod is recognized and mounted! Everything's tip top, except for one thing, of course. Any PS/2 device I have plugged in (first I tried with the keyboard on PS/2 and mouse on USB, then both on PS/2) won't function once OS X has booted. If I boot with the -s parameter, giving me access to a shell, I won't be able to type anything in.
I took a screenshot of the last message sent in verbose mode, along with the rest on the screen. I had both the mouse and the keyboard plugged in on PS/2 at the time. Clicky.
babaev
QUOTE(Wingen @ Sep 1 2005, 02:10 AM)
I took a screenshot of the last message sent in verbose mode, along with the rest on the screen. I had both the mouse and the keyboard plugged in on PS/2 at the time.
*


Try to check permissions on newly installed patch. There must be a line or two, mentioning PS/2 patch. Looks like you have wrong permissions/copied file to wrong place.

Anyway, if this patch does not work - please, tell you computer configuration, I'll try to solve this problem.
Wingen
QUOTE(babaev @ Aug 31 2005, 11:16 PM)
Try to check permissions on newly installed patch. There must be a line or two, mentioning PS/2 patch. Looks like you have wrong permissions/copied file to wrong place.

Anyway, if this patch does not work - please, tell you computer configuration, I'll try to solve this problem.
*


I put it in /System/Library/Extensions using the "cp -R" command and then chowned the kext with "chown -R root:wheel". Isn't that how I should do it?

The permissions window for the file I copied into the Extensions folder has the following in it:

CODE
Ownership & Permissions:
You can: Read only
Details:
Owner: system (lock icon)
Access: Read & Write

Group: wheel
Access: Read only

Others: Read only


Now my keyboard isn't working in VMware either sad.gif
Stern
the owner of the file shouldn't be root, it should be system. this is much easier to change in the gui if you have administrator rights. just right click the file and choose "get info", and go to the bottom where it says permissions. go to details and choose system from the owner box, and wheel from the other. that should make it work.
babaev
QUOTE(Wingen @ Sep 1 2005, 08:30 AM)
I put it in /System/Library/Extensions using the "cp -R" command and then chowned the kext with "chown -R root:wheel". Isn't that how I should do it?
*


Did you execute these commands in superuser mode?

Well, maybe, this patch isn't for you. What is your system configuration?
Wingen
QUOTE(babaev @ Sep 1 2005, 09:22 AM)
Did you execute these commands in superuser mode?

Well, maybe, this patch isn't for you. What is your system configuration?
*


I'll do some attempts to fix the PS/2 devices once I get home from school. I am pretty sure I executed the commands in SU mode.
This morning I tried to make a document with the necessary terminal commands, and put that with the zip file containing the kext, and making an ISO of it. I then used the ISO as a CD-ROM-drive in VMware, brought up a terminal, opened the text document, copied the commands from the document, pasted in terminal, but that's where I get stuck. I have no idea of how to actually "enter" the stuff without my enter key laugh.gif

My system consists of the following:
AMD Athlon64 3200+ (S754)
1024 MB Corsair Value Select PC3200
MSI K8N Neo Platinum Edition (nForce 250Gb chipset)
Hercules 9800 Pro

That's the relevant stuff smile.gif
Wingen
Just saw something in verbose mode.
CODE
KB: ApplePS2Keyboard: Unexpected acknowledge from PS/2 controller.


Huh?
babaev
QUOTE(Wingen @ Sep 1 2005, 03:16 PM)
Just saw something in verbose mode.
CODE
KB: ApplePS2Keyboard: Unexpected acknowledge from PS/2 controller.


Huh?
*


It's ok. I'll rebuild driver on the weekend, insert normal dmesg output (to verbose mode) and, maybe, create more accurate ps/2 keyboard initialization.
Wingen
I'll try formatting and reinstalling OS X once again, then applying the patch like Stern said.
Wingen
QUOTE(Stern @ Sep 1 2005, 06:22 AM)
the owner of the file shouldn't be root, it should be system.  this is much easier to change in the gui if you have administrator rights.  just right click the file and choose "get info", and go to the bottom where it says permissions.  go to details and choose system from the owner box, and wheel from the other.  that should make it work.
*


When I 'chown' the kext to system:wheel, it gives me the following error:
CODE
chown: system: Invalid argument
babaev
QUOTE(Wingen @ Sep 1 2005, 04:18 PM)
When I 'chown' the kext to system:wheel, it gives me the following error:
CODE
chown: system: Invalid argument

*


No, if you use chown, you must use root:wheel. System - it's the name of "root" for GUI applications, as I understand. So, chown -R root:wheel if in terminal.
Wingen
QUOTE(babaev @ Sep 1 2005, 01:23 PM)
No, if you use chown, you must use root:wheel. System - it's the name of "root" for GUI applications, as I understand. So, chown -R root:wheel if in terminal.
*


Last time I did that, it didn't work. Oh well, I'll try it again.

EDIT: Can't use the keyboard in OS X anymore sad.gif Same thing as last time.
babaev
QUOTE(Wingen @ Sep 1 2005, 04:25 PM)
Last time I did that, it didn't work. Oh well, I'll try it again.

EDIT: Can't use the keyboard in OS X anymore sad.gif Same thing as last time.
*


If it worked, why did you install patch? blink.gif

If it didn't work neither before, not now - tell me you system configuration, please. I'll try to do something.
Wingen
QUOTE(babaev @ Sep 1 2005, 02:23 PM)
If it worked, why did you install patch?  blink.gif

If it didn't work neither before, not now - tell me you system configuration, please. I'll try to do something.
*


If I don't apply the patch, the keyboard works in VMware, but not in native mode. If I patch, it doesn't work in VMware nor native. My system config is in one of my later posts on page one of this thread.

Thanks for trying to help smile.gif
myzar
KB: ApplePS2Keyboard: Unexpected acknowledge from PS/2 controller.

i get the same error plus something about mach unable to set the interrupt and the keyboard doesn't work anymore.

Now if only i didn't password the root account i would be able to replace the offending kext without having to reinstall osx lol
devorama
This seems to have fixed my keyboard problem. Although it only seems to work only after a cold boot and if I press a key during the boot up. If I don't touch anything, it doesn't seem to work. Odd...
babaev
QUOTE(devorama @ Sep 2 2005, 01:03 AM)
This seems to have fixed my keyboard problem.  Although it only seems to work only after a cold boot and if I press a key during the boot up.  If I don't touch anything, it doesn't seem to work.  Odd...
*


Source driver is written very badly. I did one more step to correct work of ps/2 keyboard driver, but it's not last. When I'll know more about protocol, I'll create more correct patch. Now it's only an "ugly hack" :-)
DeathChill
Just use this one from darwin, works just fine.
NX01
QUOTE(DeathChill @ Sep 2 2005, 05:53 AM)
Just use this one from darwin, works just fine.
*


Darwin driver doesn't work on some computers. On mine it didn't work even when I booted Darwin x86 8.01 CD. Babaev hack works for me...
babaev
I spent some more time to create more accurate patch. Now it does not do BAT (keyboard self test), but only sets needed parameters. Also I got rid of annoying messages in system log.

But, in fact new KernelExtension do all the same things.

If your keyboard does not work with this patch - PLEASE, tell me keyboard type/manufacturer/ID/somethingElseToDetermineKeyboard. Type of your notebook, if it's native laptop keyboard.

PS/2 protocol is awfull! But I'll try to write normal driver. Next step will be looking to linux ps/2 drivers.

New Extension (installation is the same): Click to view attachment
Wingen
I tried your new patch, and unlike the last one, this one made the keyboard work in VMware. However, I still can't use it in native mode. My keyboard is a Logitech Ultra-X Flat (Model name Y-SX49). Would be very grateful if my problem could be solved. Keep up the good work!
Wingen
I've finally managed to make the keyboard work in OS X. I disabled USB keyboard and mouse support in BIOS and then put my mouse on PS/2 instead of USB. Voilá! It works! Thanks for the patch! biggrin.gif
babaev
QUOTE(Wingen @ Sep 3 2005, 05:24 AM)
I tried your new patch, and unlike the last one, this one made the keyboard work in VMware. However, I still can't use it in native mode. My keyboard is a Logitech Ultra-X Flat (Model name Y-SX49). Would be very grateful if my problem could be solved. Keep up the good work!
*


I know that keyboard, I'll try to update a patch for it next week.
craigdarock
QUOTE(babaev @ Sep 3 2005, 01:56 PM)
I know that keyboard, I'll try to update a patch for it next week.
*


Hi Babev, could you look at the HP Pavilion ZV5410us keyboard unsure.gif , the only thing that was working on it with the new patch was the mousepad. But as soon as I tried typing everything went down.(The Keyboard and Touchpad). So if you could take a look at it. It would be greatly appreciated.

Specs
http://h10025.www1.hp.com/ewfrf/wc/documen...cname=c00285232
babaev
QUOTE(craigdarock @ Sep 4 2005, 01:02 AM)
Hi Babev, could you look at the HP Pavilion ZV5410us keyboard unsure.gif , the only thing that was working on it with the new patch was the mousepad.  But as soon as I tried typing everything went down.(The Keyboard and Touchpad).  So if you could take a look at it. It would be greatly appreciated.

Specs
http://h10025.www1.hp.com/ewfrf/wc/documen...cname=c00285232
*



Ok, sure, I'll try. In some days. The difficulty of these keyboard's driver is that all keyboards are different. So, it's very hard to create universal driver. But I'll try in some time to create it.
shenki
@babaev

thanks for your help. I succesfully used your PS2 driver to get the keyboard working on my LG LW40 Express laptop; previously I was experiencing problems similar to those you reported, where the keyboard would not respond after booting OSX.

on a different topic, do you run linux on your LW laptop? If so, does it use the Intel HD audio for it's sound, and have you been able to get that working under linux? I have been running ubuntu, and despide getting everything else working over the past month, I havn't had any sucess with sound. feel free to email me joel.stan at gmail.com if you have any suggestions.

thanks again
babaev
QUOTE(shenki @ Sep 6 2005, 01:14 PM)
@babaev

on a different topic, do you run linux on your LW laptop?

*


Yes, I run linux there. But I've no HD Audio (my laptop is LS50, it does not have it).

Seems, like all LG notebooks work after this patch. Good.
speech
babaev, I'm using deadmoo wmware image, copied to HD. It doesn't work, because of the trackpad (I guess). I think of using your patch, but, did you have this ApplePS2Controler.kext at the very beginning and tried to replace it, or was your first installation clean of this kext ?

I have seen that there is an AppleTrackpad.kext on Darwin source code site for my trackpad (synaptic) but I have anything to compile it.
babaev
I've recompiled all drivers, connected with PS/2 Controller. So, my patch has all these drivers (Mouse/Keyboard/Trackpad) from 8.2 (latest) sources. Also, I'll pathced a little driver for keyboard. Other drivers are the same.
Le_Vert
I have an issue with PS2Trackpad/Keyboard...

Maybe you could help me? Here is all details :

http://forum.osx86project.org/index.php?showtopic=2345


Thanks a lot !
babaev
QUOTE(Le_Vert @ Sep 11 2005, 06:36 PM)
I have an issue with PS2Trackpad/Keyboard...

Maybe you could help me? Here is all details :

http://forum.osx86project.org/index.php?showtopic=2345
Thanks a lot !
*


Well, not right now, but I think, I can look through this problem.
uplinux
I tried your new patch , but it not working on my Comaq(HP) Presario B2000 laptop, sad.gif
Would be very grateful if my problem could be solved. Keep up the good work!
babaev
Sorry, not now. Have no time at all. I think, that time will be in several weeks, so...
MorphewS
It work for a PS2 mouse?
My keyboard is USB.
babaev
QUOTE(MorphewS @ Sep 21 2005, 03:15 AM) *
It work for a PS2 mouse?
My keyboard is USB.


I didn't touch code, that controls mouse.
mainchip
I've tried both versions of the driver posted, however my Mitsumi KFK-EA4XT (it's an old, basic 101 key layout) still isn't working. Unfortunately, I don't have access to a PS/2 mouse right now, so I don't know if that fixes my problem.
ramzi22
Yeah, ive also tryed both and neither work for my laptop. I have an Acer Aspire 3000, ill try and find my exact make and model and post, thanks.
ramzi22
Any updates on this hacked PS2 driver? I still cant get my touchpad or keyboard working.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.