acidanthera / bugtracker

Acidanthera Bugtracker
385 stars 45 forks source link

After closing from macOS Monterey, the PS2 keyboard does not work in UEFI #1838

Closed nsby494 closed 3 years ago

nsby494 commented 3 years ago

After closing from macOS Monterey, the PS2 keyboard does not work in UEFI, but the external USB mouse can be moved and clicked. Reboot to windows or other linux systems, shut down normally, boot to OC again, and the graphical boot interface PS2 keyboard can be used again. opencore-2021-11-01-032245.txt .

vit9696 commented 3 years ago

This is your firmware, not OpenCore. Not much we can do here.

nsby494 commented 3 years ago

This is your firmware, not OpenCore. Not much we can do here. But I can use it under Catalina and BigSur. And, it’s not just my laptop who encounters this problem.

vit9696 commented 3 years ago

The fact that macOS 12 triggers a bug in your firmware does not change the fact that there is a bug in your firmware.

nsby494 commented 3 years ago

The fact that macOS 12 triggers a bug in your firmware does not change the fact that there is a bug in your firmware.

If you are free, can you help me point out which setting in the firmware caused the error? I want to try to solve it by myself, because I can't understand the meaning in the log.thanks!

CobanRamo commented 2 years ago

The shutdown problem of the Monterey and not working of the keyboard also exists after the shutdown of the Ventura Beta.

Would be really great if someone would take the problem. This must be somehow solvable with a patch or ssdt. The hope dies last. :-)

CleverCoder commented 2 years ago

I'm having the same issue. I see that this is closed. Where is this issue being tracked (I presume each MOBO manufacturer would need to track an issue??), and how can we point to a bug in the firmware? If Monterey is able to load a driver/extension that fixes the problem, then even if it's a bug, maybe there's a driver that can be added to OpenCore that can also fix the issue for this group? In my case I'm using an MSi P65 Creator (Intel HM370 chipset).

CobanRamo commented 2 years ago

I was able to work around the Monterey/Ventura shutdown problem of the PS2 keyboard not working with @Coolstar's project. (https://github.com/coolstar/HIDPS2Keyboard)

It's a bit old and incomplete, the sound keys & NumPad don't work but at least the stupid OC menu keyboard problem is out of the world. It works with Monterey & Ventura reboot with this kext.

There is no other solution at the moment, Insyde and the OEM`s will not patch this for sure, just hope that the VoodooPS2Controller team will somehow merge the two projects.

HIDPS2Keyboard.kext.zip

stevezhengshiqi commented 2 years ago

I was able to work around the Monterey/Ventura shutdown problem of the PS2 keyboard not working with @Coolstar's project. (https://github.com/coolstar/HIDPS2Keyboard)

It's a bit old and incomplete, the sound keys & NumPad don't work but at least the stupid OC menu keyboard problem is out of the world.

It works with Monterey & Ventura reboot with this kext.

There is no other solution at the moment, Insyde and the OEM`s will not patch this for sure, just hope that the VoodooPS2Controller team will somehow merge the two projects.

HIDPS2Keyboard.kext.zip

Yes, HIDPS2Keyboard works good as I mentioned in https://github.com/daliansky/XiaoMi-Pro-Hackintosh/issues/653#issuecomment-1120586026. It is a good start, but we still hope someone will fix VoodooPS2Keyboard.

diepeterpan commented 2 years ago

The following change fixed it for me, seems like the Disable sticks in the BIOS and on reboot remain disabled. Can we make this a boot option to change the behavior for having BIOS that doesn't play nice with AndDisable?

image

Test build:

VoodooPS2Controller.kext.zip

nsby494 commented 2 years ago

以下更改为我修复了它,似乎 BIOS 中的禁用棒和重新启动时仍然禁用。我们是否可以将此作为引导选项来更改与 AndDisable 不兼容的 BIOS 的行为?

图片

测试构建:

VoodooPS2Controller.kext.zip

Your modification solved the original problem on my laptop. I tried restarting and shutting down, and now in the OC startup interface, the keyboard is not disabled. If there's anything to test, I'll be happy to work with you. Thank you very much for your selfless dedication.

diepeterpan commented 2 years ago

The following change fixed it for me, seems like the Disable sticks in the BIOS and on reboot remain disabled. Can we make this a boot option to change the behavior for having BIOS that doesn't play nice with AndDisable?

image

Test build:

VoodooPS2Controller.kext.zip

I created a fork and tried to my ability to add a boot argn - https://github.com/diepeterpan/VoodooPS2

kbd_fixdisable=1

VoodooPS2Controller_kbd_fixdisable.kext.zip

Now what, how do we get it into master, reviewed .......

diepeterpan commented 2 years ago

Created pull request for kbd_fixdisable=1

https://github.com/acidanthera/VoodooPS2/pull/53

CobanRamo commented 2 years ago

Brilliant, thanks folks, just tested it, it finally works under Monterey & Ventura.

1Revenger1 commented 2 years ago

I've made a branch to test something real quick. Instead of always using setDefaults, I want to see if it works to use setDefaults on shutdown only. Can someone test the artifacts listed here? This is the git artifact from this commit

CobanRamo commented 2 years ago

I've made a branch to test something real quick.

am testing, one moment please...

diepeterpan commented 2 years ago

I've made a branch to test something real quick.

am testing, one moment please...

Curious as to what the result is, I coded it like this first on Sunday so that it only did defaults on stop but did not work on my machine :-(

1Revenger1 commented 2 years ago

I've made a branch to test something real quick.

am testing, one moment please...

Curious as to what the result is, I coded it like this first on Sunday so that it only did defaults on stop but did not work on my machine :-(

Oh, I wonder if the setDevicePowerState callback is called to shutdown. Could maybe try hooking systemWillShutdown and enabling+setDefaults during a reboot.

CobanRamo commented 2 years ago

no unfortunately your solution does not work. Here on my Lenovo with Insyde20 Bios it does not work. For me, the keyboard in the OC menu no longer responds during Monterey & Ventura reboot & shutdown.

With the solution of @diepeterpan, however, it works without problems, recently even without bootarg.

diepeterpan commented 2 years ago

I've made a branch to test something real quick.

am testing, one moment please...

Curious as to what the result is, I coded it like this first on Sunday so that it only did defaults on stop but did not work on my machine :-(

Oh, I wonder if the setDevicePowerState callback is called to shutdown. Could maybe try hooking systemWillShutdown and enabling+setDefaults during a reboot.

systemWillShutdown is worth a try - https://stackoverflow.com/questions/47617012/getting-shutdown-and-restart-notifications-in-macos

diepeterpan commented 2 years ago

no unfortunately your solution does not work. Here on my Lenovo with Insyde20 Bios it does not work. For me, the keyboard in the OC menu no longer responds during Monterey & Ventura reboot & shutdown.

With the solution of @diepeterpan, however, it works without problems, recently even without bootarg.

My latest edition the default is without the need for bootarg as suggested by @1Revenger1 - "Looking at Linux (https://github.com/torvalds/linux/blob/master/drivers/input/keyboard/atkbd.c#L913), it should be fine to just leave it as SetDefaults. I think it'd be fine to just replace with kDP_SetDefaults or to at least have the fix enabled by default."

1Revenger1 commented 2 years ago

Yeah I think in the end, just using SetDefaults should be fine. The code does expect no scan codes when running commands so I would like to not mess with sleep/wake if possible.

diepeterpan commented 2 years ago

Yeah I think in the end, just using SetDefaults should be fine. The code does expect no scan codes when running commands so I would like to not mess with sleep/wake if possible.

@1Revenger1 if you don't mind can you merge the change in.

CobanRamo commented 2 years ago

thank you for your effort, I already thought to live with this nonsense.... :) man was that annoying with a dualboot system...

diepeterpan commented 2 years ago

thank you for your effort, I already thought to live with this nonsense.... :) man was that annoying with a dualboot system...

Teamwork. Was bugging me just as much, started reading the code last Saturday and set out Sunday to see if I can get a solution. This programming is not my strong point, hence so thankful to you and other users for testing. And support from @1Revenger1 . 💕

1Revenger1 commented 2 years ago

I got another commit here. Build is here.. This hooks into systemWillShutdown.

diepeterpan commented 2 years ago

I got another commit here. Build is here.. This hooks into systemWillShutdown.

Tried it but on Restart from OS menu the keyboard did not work in UEFI/BIOS nor in OC selector.