Jump to content

FileVault 2


vit9696
 Share

496 posts in this topic

Recommended Posts

Very odd, my UsbKbDxe doesn't have many changes from the original, which is the one EDK2 deploys (distributed with EDK2 for QEMU a.k.a. OVMF). Do you have AppleKeyMapAggregator loaded as well? How do you know the system freezes, is mouse input not working after a key press or what?

 

AptioInputFix is for Aptio firmwares, as the name says...

 

 

Yes, I had AppleKeyMapAggregator loaded as well.

I can tell that the system freezes because the input cursor stops blinking. A functional system would also displays a "If you have problems entering your password..." message after a while, this doesn't happen with UsbKbDxe after pressing a button and causing the freeze.

Mouse input doesn't work at all. Its interesting that you mention that your UsbKbDxe doesn't have many changes from the original OVMF. Perhaps I'll have better luck without the UsbKbDxe but with the AppleKeyMapAggregator, that's a combination I haven't tried yet.

 

Here is an (another) idea:

Try to remove the usb keyboard (or remove the passthrough) on that screen and reattach it and see if it works.

 

That, removing the USB keyboard, was the first thing I tried. It doesn't seem to work because the hypervisor acts as an abstraction layer and disconnecting the device from the host machine seems to leave it intact in the VM, albeit as a non-functional ghost device. That's my suspicion anyway... whatever reconnect/reinitialisation is required to get it working doesn't seem to happen.

 

I'm not sure if I'll be able to remove the passthrough while the machine is running but I'll look into that.

 

Another option I've thought of would be to buy an extra PCIe USB controller card and passthrough the entire card to the VM, which may allow USB hotplug to work the way it would on bare metal. Unfortunately all my PCIe slots are full so that's a last resort option. All the USB ports on this mothrboard are on the same controller and if I pass through that, I'd lose USB on the host. 

 

I do think that FV2 can work inside the VM, from what I can tell at the moment the only problem is that I can't input the password with the standard OVMF EFI.

Link to comment
Share on other sites

Perhaps I'll have better luck without the UsbKbDxe but with the AppleKeyMapAggregator, that's a combination I haven't tried yet.

No, the Aggregator needs to be fed by UsbKbDxe.

 

I do think that FV2 can work inside the VM, from what I can tell at the moment the only problem is that I can't input the password with the standard OVMF EFI.

Sure it should, idk what Slice is talking about. If I were you, I would compile a modded OVMF image and replace its UsbKbDxe with mine and add AppleKeyMapAggr. Are you using Apple's or Clover's AppleKeyMapAggregator? Idk if it's a bug in my code or maybe one of Slice's mods.

  • Like 1
Link to comment
Share on other sites

No, the Aggregator needs to be fed by UsbKbDxe.

 

Sure it should, idk what Slice is talking about. If I were you, I would compile a modded OVMF image and replace its UsbKbDxe with mine and add AppleKeyMapAggr. Are you using Apple's or Clover's AppleKeyMapAggregator? Idk if it's a bug in my code or maybe one of Slice's mods.

 

I tried the original version (AppleKeyMapAggregator.efi linked in the OP) and the Clover one (AppleKeyAggregator.efi) together with your UsbKbDxe (posting #107) binary in /EFI/Clover/drivers64UEFI. Either combination freezes the system when I press the first button. I can't even Ctrl-Alt-Del to reboot, which works when I boot without the two aforementioned drivers (even though obviously any other input doesn't work).

 

Maybe it's one of the three workarounds that makes UsbKbDxe it incompatible with OMVF, I have to do some more research and try to compile a version without them. Thanks for the help, much appreciated.

Link to comment
Share on other sites

After a long time of wrangling with the OVMF image build environment, I've finally managed to get a build with UsbKbDxe and either variation of the KeyAggregator (Clover and Apple) but it still freezes when I press the first button on the keyboard. :(

l also tried a different keyboard but it seems like I'll have to scrap my hackintosh VM for now as I view FileVault as a must-have for me to use it as my main machine.

Link to comment
Share on other sites

After a long time of wrangling with the OVMF image build environment, I've finally managed to get a build with UsbKbDxe and either variation of the KeyAggregator (Clover and Apple) but it still freezes when I press the first button on the keyboard. :(

l also tried a different keyboard but it seems like I'll have to scrap my hackintosh VM for now as I view FileVault as a must-have for me to use it as my main machine.

I saw there has been a commit I did not merge yet: https://github.com/tianocore/edk2/commit/4ae46dbacd8b049c66714c3578a88ecc09dcec95

I'll merge it and push changes soon... maybe should import the UsbKbDxe history too.

 

EDIT: done.

Link to comment
Share on other sites

Hi!

 

I would like to get FV 2 running on my lenovo x220 laptop with mavericks. I tried every possible driver combination mentioned in this thread.

But there is no keyboard input possible at login screen. Before Clover starts is says Ami Shim installation failed.

Any ideas?

Link to comment
Share on other sites

  • 2 weeks later...

Everything works, except at first, I didn't realize you need to use Recovery HD to boot.

 

I have only one problem: I need to re-plug the USB keyboard in order to enter password, but the mouse works fine. Tried with and without UsbKbDxe-64 - same result. Any ideas how to fix this?

 

- Clover 4061, macOS 10.12.4, Legacy BIOS (Asus x58)

Link to comment
Share on other sites

I've got an old GF9300( MPC79 ) Bios motherboard, and I built the UsbKbDxe from the source linked in the first post, but every time I press a key to enter my password at the prompt, the cursor freezes, and no input is logged. My mouse does not work at all, never worked in Clover either, but the kbd does work in Clover.

 

I tried both keyboard map aggregators, but when I try to load them from the EFI Shell in Clover I get device error.

 

I'm not sure if it's a problem with the UsbKbDxe or the kb aggregator, and I don't know how to enable debugging, or where the preboot.log is?

 

I'm really stuck, at this point, I don't need the mouse to work, but I need the kb. I did try to unplug the USB RF receiver and plug it back in, no help.

 

Can anyone tell me how to enable Debugging and where the preboot.log is, please?

 

Anyone have any other idea's as to what I should try, and yes, I know, buy a new motherboard.

Link to comment
Share on other sites

Everything works, except at first, I didn't realize you need to use Recovery HD to boot.

 

I have only one problem: I need to re-plug the USB keyboard in order to enter password, but the mouse works fine. Tried with and without UsbKbDxe-64 - same result. Any ideas how to fix this?

 

- Clover 4061, macOS 10.12.4, Legacy BIOS (Asus x58)

Did you try the recommendation from 2. ?

Link to comment
Share on other sites

Does anyone know what happened to the old fv.py that could extract drivers from Apple Firmware updates?

 

The newer one https://raw.githubusercontent.com/tianocore/buildtools-BaseTools/master/Source/Python/GenFds/Fv.py doesn't seem to work as well as the old one did.

 

I can't seem to get the driver .efi files from it.

 

Maybe I can find a working key map aggregator or kbd driver in Apple's Firmware updates. My hardware is almost exactly like the MacMini3,1.

Link to comment
Share on other sites

34213335102_4ec78a1b70_b.jpgHave you tried UEFITool? It should work fine.

 

I can see the files I want to extract from the firmware update, but I don't know how to properly extract them, so they are valid .efi driver images.

 

When I extract them, they are always .ffs, and when I change the extension to .efi and try to load it in the efi shell, it always says, "Not a valid image".

 

Could someone guide me through how to properly extract them, please?

Link to comment
Share on other sites

I can see the files I want to extract from the firmware update, but I don't know how to properly extract them, so they are valid .efi driver images.

 

When I extract them, they are always .ffs, and when I change the extension to .efi and try to load it in the efi shell, it always says, "Not a valid image".

 

Could someone guide me through how to properly extract them, please?

PE32 -> extract body.

Link to comment
Share on other sites

PE32 -> extract body.

 Thanks, that worked, but I still had the same trouble with the Apple UsbkbDxe from the MacMini3,1 firmware update.

 

I installed the Apple UsbBusDxe.efi and Usbkb and UsbMouse, and I tried the Echi driver, but that made Clover kernel panic.

 

Same result from all the drivers I've tried, the cursor is blinking, waiting for input, until I hit a letter key, then it freezes, the GUI doesn't freeze, just the cursor.

 

I tried turning of legacy support for USB kb and mouse in my bios, that made the kb unusable in Clover, but I can still use it in my bios. Booting the reboot env, I had to unplug and plug my USB RF receiver for my kb and mouse, then if I hit a letter key, the cursor would freeze.

 

Some keys I hit, other than letter keys, just do nothing.

 

I think it's trouble with the handoff between my bios and the UsbKbDxe, but I don't really know how that works, so I can't debug it.

 

I also tried to disable Ehci in my bios, but same result.

 

Anyone have any other ideas on what I could try, I'm at a loss?

 

Also I remover the key map aggregator, but then I couldn't boot the reboot env, no video, just a blank screen. I thought that was just a keyboard map driver?

Link to comment
Share on other sites

I installed the Apple UsbBusDxe.efi and Usbkb

???

 

but that made Clover kernel panic.

Clover cannot kernel panic.

 

I thought that was just a keyboard map driver?

It exposes the protocol boot.efi uses to get the boot hotkeys and indirectly FV2 input, not more and not less.

Link to comment
Share on other sites

Regarding having to replug the keyboard to enter password, what worked for me was using Download-Fritz's UsbKbDxe.efi from page 6, not the one in Clover 4061.

 

Thanks, I tried that one as well, cursor freezes on that one too.

Link to comment
Share on other sites

???

 

Clover cannot kernel panic.

 

It exposes the protocol boot.efi uses to get the boot hotkeys and indirectly FV2 input, not more and not less.

I mean I installed the USB .efi files, from the Apple Firmware Update for the MacMini3,1 into Clover.

 

Clover/Duet can reach an exception state.

Link to comment
Share on other sites

 

 

Same result from all the drivers I've tried, the cursor is blinking, waiting for input, until I hit a letter key, then it freezes, the GUI doesn't freeze, just the cursor.

 

How do you know the GUI doesn't freeze? Can you still use Ctrl-Alt-Del to hard reboot?

Your cursor freezing issue seems identical to the one I'm experiencing in my KVM OVMF VM, except I can't re-plug my USB devices because they are virtualised by the VM and it seemed like the whole machine was hanging as it stopped responding to Ctrl-Alt-Del.

The USB mouse never worked, so with the cursor also freezing and no input being accepted, I have to assume that the whole machine freezes, not just the GUI.

 

I tried a few workarounds but in the end ran out of time to debug it as much more important circumstances got in the way.

 

You mentioned a USB-receiver, is it a Logitech Unifying receiver by any chance? That's what I'm using. Maybe that's the common denominator that is causing the freezes?

Link to comment
Share on other sites

How do you know the GUI doesn't freeze? Can you still use Ctrl-Alt-Del to hard reboot?

Your cursor freezing issue seems identical to the one I'm experiencing in my KVM OVMF VM, except I can't re-plug my USB devices because they are virtualised by the VM and it seemed like the whole machine was hanging as it stopped responding to Ctrl-Alt-Del.

The USB mouse never worked, so with the cursor also freezing and no input being accepted, I have to assume that the whole machine freezes, not just the GUI.

 

I tried a few workarounds but in the end ran out of time to debug it as much more important circumstances got in the way.

 

You mentioned a USB-receiver, is it a Logitech Unifying receiver by any chance? That's what I'm using. Maybe that's the common denominator that is causing the freezes?

Yes, it is a Logitech receiver.

 

If you leave it for a few minutes, it will show a message on the screen, telling you what to do if you are having trouble. I know it's not locked up, because I get this message.

Link to comment
Share on other sites

Yes, it is a Logitech receiver.

 

If you leave it for a few minutes, it will show a message on the screen, telling you what to do if you are having trouble. I know it's not locked up, because I get this message.

 

I see. I remember getting that message, but not after pressing a button with the recompiled Usbkbxe, so perhaps mine really freezes and we have two different problems.

Perhaps I just didn't leave it on long enough... I'll try again today.

Curious that we both have freezing issues with the Logitech Unifying receiver, makes me wonder if that's at fault. I'll also try a new keyboard when I have the time. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...