acidanthera / bugtracker

Acidanthera Bugtracker
385 stars 45 forks source link

Booting on legacy BIOS with bootstrap.efi breaks KeySupport #870

Closed kommtzeitkonrad closed 4 years ago

kommtzeitkonrad commented 4 years ago

https://github.com/acidanthera/OpenCorePkg/commit/a1f60694c7c5fb07392529fa600d939dd916a81b (booting with Bootstrap.efi instead of BOOTx64.efi) completely breaks support of PS2 keyboard on an HM67 board. Using a USB keyboard together with OpenUsbKbDxe.efi driver works. Ps2MouseDxe.efi driver does nothing.

opencore-2020-04-24-154614.txt

Keyboard behavior before the mentioned commit (booting with BOOTx64.efi) was the following:

roddy20 commented 4 years ago

boot_with_Ps2KeyboardDxe.efi.zip try this

ameenjuz commented 4 years ago

i set BootProtect to None but my windows partition completely disappear from boot menu am i missing something?

kommtzeitkonrad commented 4 years ago

boot_with_Ps2KeyboardDxe.efi.zip try this

Works with KeySupport=true.

opencore-2020-04-24-181924.txt

kommtzeitkonrad commented 4 years ago

Ps2MouseDxe.efi driver does nothing.

Just remembered that this driver is for touchpad support and of course does nothing regarding keyboard support. Anyway, it may be of interest that the touchpad on an HM67 laptop does not work with or without this driver. On the other side, a USB mouse does work in any configuration without an additional .efi driver, except when using boot from https://github.com/acidanthera/OpenCorePkg/commit/a1f60694c7c5fb07392529fa600d939dd916a81b.


@roddy20: Did the filename of your .zip file implied to use Ps2KeyboardDxe.efi from MdeModulePkg? Ⅰ build it with

build -a X64 -b DEBUG -t XCODE5 -p OpenCorePkg/UDK/MdeModulePkg/MdeModulePkg.dsc -m OpenCorePkg/UDK/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf

and it does not bring back keyboard support. Only setting the above mentioned KeySupport=true together with your boot file works.

vit9696 commented 4 years ago

Ps2KeyboardDxe from UDK should work fine with KeySupport=true. We will not enable Ps2KeyboardDxe in DuetPkg due to compatibility issues, you can add it to Drivers though. To make it easier I added Ps2KeyboardDxe in OpenCorePkg packaging.

kommtzeitkonrad commented 4 years ago

Ps2KeyboardDxe from UDK should work fine with KeySupport=true.

It not only works fine. Finally PollAppleHotKeys works, too. No more fiddling around to get verbose output or to get into safe mode. Very nice!

Anyways, the only working boot file that works is the one from @roddy20's post: opencore-2020-04-26-143302.txt

With boot from https://github.com/acidanthera/OpenCorePkg/commit/a1f60694c7c5fb07392529fa600d939dd916a81b keyboard is not working: opencore-2020-04-26-144005.txt

With boot from https://github.com/acidanthera/OpenCorePkg/commit/f21f3c329910f719e3e6378e998333057d544827 keyboard is not working: opencore-2020-04-26-145212.txt

Ⅰ see that you all are busy commiting to DuetPkg. Ⅰ will be patient. Thanks for all your efforts. Ⅰ love to use your software/tools and learn from everything around them. :-)

vit9696 commented 4 years ago

I.e. the only way to get keyboard working for you is to use the boot by Rodion with KeySupport=true and avoid adding any PS/2 drivers?

vit9696 commented 4 years ago

If so, could you check whether this driver works for you with DuetPkg from OpenCorePkg master. I extracted it from Rodion's booter: Ps2KeyboardDxe-clv.zip.

vit9696 commented 4 years ago

Actually reproduced and fixed on our end:

[master 75443ac] BootInstall: Fix ISA bus support
 1 file changed, 0 insertions(+), 0 deletions(-)

The need for Ps2KeyboardDxe holds of course.

kommtzeitkonrad commented 4 years ago

Ⅰ was in the middle of a series of measurements:

boot from https://github.com/acidanthera/bugtracker/issues/870#issuecomment-619118719 + Ps2KeyboardDxe.efi from OpenCorePkg + KeySupport=true: -> Keyboard works, PollAppleHotKeys works => opencore-2020-04-26-160559.txt

boot from https://github.com/acidanthera/bugtracker/issues/870#issuecomment-619118719 + KeySupport=true: -> Keyboard works, PollAppleHotKeys works => opencore-2020-04-26-162241.txt

boot from https://github.com/acidanthera/OpenCorePkg/commit/f21f3c329910f719e3e6378e998333057d544827 + Ps2KeyboardDxe.efi from OpenCorePkg' +KeySupport=true`: -> Keyboard does not work => opencore-2020-04-26-165015.txt

Will try https://github.com/acidanthera/OpenCorePkg/commit/75443ac52e2e76250f596381f023a296be360259.

kommtzeitkonrad commented 4 years ago

When using boot from https://github.com/acidanthera/OpenCorePkg/commit/75443ac52e2e76250f596381f023a296be360259 and .efi drivers from OpenCorePkg/macbuild.tool the following is observed:

KeySupport=true only: -> Keyboard does not work. => opencore-2020-04-26-172245.txt

KeySupport=true + Ps2KeyboardDxe.efi: -> Keyboard works -> PollAppleHotKeys works => opencore-2020-04-26-174508.txt

KeySupport=true + Ps2KeyboardDxe.efi + Ps2MouseDxe.efi: -> Keyboard works -> PollAppleHotKeys works => opencore-2020-04-26-173710.txt

-> Touchpad does not work in any configuration. -> USB mouse works in every configuration (UsbMouseDxe.efi is absent).

vit9696 commented 4 years ago

Right, this is expected. Thanks!

kommtzeitkonrad commented 4 years ago

Thank you!

However, I've got more. :-)

Only booting to macOS works. All other operating systems fail to boot.

08:866 03:406 OCB: Should boot from Ubuntu (T:32|F:0|DEF:0)
08:869 00:003 OCB: Perform boot Ubuntu to dp PcieRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0x0,0x0)/HD(1,GPT,F729BC2E-FB67-4AFA-8C40-C6F288D47673,0x800,0x113000)/\EFI\ubuntu\grubx64.efi (0/0)
08:871 00:002 OCB: LoadImage failed - Not Found
04:255 03:059 OCB: Should boot from Windows (T:32|F:0|DEF:0)
04:258 00:002 OCB: Perform boot Windows to dp PcieRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0x0,0x0)/HD(1,GPT,F729BC2E-FB67-4AFA-8C40-C6F288D47673,0x800,0x113000)/\EFI\Microsoft\Boot\bootmgfw.efi (0/0)
04:260 00:001 OCB: LoadImage failed - Not Found

Both .efi files are present and booted fine before.

% ls -l /Volumes/EFI/EFI/ubuntu/grubx64.efi 
-rwxrwxrwx  1 konrad  staff  1668984 20 Mär 02:11 /Volumes/EFI/EFI/ubuntu/grubx64.efi
% ls -l /Volumes/EFI/EFI/Microsoft/Boot/bootmgfw.efi
-rwxrwxrwx  1 konrad  staff  1557816  7 Dez 10:08 /Volumes/EFI/EFI/Microsoft/Boot/bootmgfw.efi
vit9696 commented 4 years ago

Yeah, I fixed Pci/Pcie bug that existed before. You will need to update your device paths.

kommtzeitkonrad commented 4 years ago

Nice! Entries now do boot.

I've got two more things not working until https://github.com/acidanthera/OpenCorePkg/commit/cd302ebe50126ce5864a29aa92fc6b3585ab80b9.

  1. BlessOverride=\EFI\Microsoft\Boot\bootmgfw.efi is ignored. -> opencore-2020-04-27-065148.txt
  2. Almost all memory pages are system reserved. -> memmap-2020-04-27-065148.txt

Most recent boot that does not ignore BlessOverride and has normal memory map is @roddy20's upload in https://github.com/acidanthera/bugtracker/issues/870#issuecomment-619118719. -> memmap-2020-04-27-065528.txt -> opencore-2020-04-27-065528.txt

vit9696 commented 4 years ago
  1. Please file a new issue about memory map.
  2. As for BlessOverride, please elaborate what do you mean. Is it boot-specific? What do you mean under BlessOverride not working, describe the configuration and so on.
kommtzeitkonrad commented 4 years ago

Please file a new issue about memory map.

https://github.com/acidanthera/bugtracker/issues/877

As for BlessOverride, please elaborate what do you mean. Is it boot-specific? What do you mean under BlessOverride not working, describe the configuration and so on.

https://github.com/acidanthera/bugtracker/issues/878

NeoBlizzard-verbose commented 1 year ago

Although this issue is closed, I still face the issue on my Lenovo G570 (Legacy BIOS). Currently on OpenCore 0.8.9, the inbuilt keyboard does not work. I tried using Roddy's boot (here) and it works (as in, duet does not automatically detect OpenCore EFI so I manually have to select it everytime) but it breaks touchpad.

Since that boot file has Ps2KeyboardDxe inbuilt, I had to disable OpenUsbKbDxe which broke support for my USB keyboard (but USB mouse works).

Using this driver did not help, either. In all the cases, I had KeySupport enabled and PS2MouseDxe as well.

1457384613gh commented 1 year ago

Hi, There are some things that confuse me. Theoretically, Duet needs drivers of LegacyBIOS. Ps2KeyboardDxe.efi is an EFI driver, but how can it be used by Duet of OC?