High Sierra - USB 3 (xHCI) fails

Discussions about using Mac OS X guests (on Apple hardware) in VirtualBox.

High Sierra - USB 3 (xHCI) fails

Postby granada29 » 12. Jul 2017, 01:40

High Sierra (macOS 10.13) seems to have problems with the VirtualBox USB 3 driver.
Lots of bus resets during initialisation and when finally booted, the mouse and keyboard are not working.

Choosing the USB 2.0 driver makes the problem go away, but I suspect this is less than optimal.

The log and vbox files are attached. This is a rawdisk VM, but the result is reproducible with .vdi VM
I killed the VM before the boot completed, but there should be enough info in the log.
This raw disk works just fine when booted natively so I doubt Apple will be very interested in making changes.

Bryan
Attachments
VBox.log.zip
vbox log
(27.93 KiB) Downloaded 7 times
Sierra-External.vbox.zip
vbox config
(1.98 KiB) Downloaded 6 times
granada29
 
Posts: 44
Joined: 3. Mar 2015, 07:27

Re: High Sierra - USB 3 (xHCI) fails

Postby IOOI » 12. Jul 2017, 17:29

Hi,

can you explain how you got 10.13 to install inside VBox? I tried but did not succeed.

regards,

IOOI
Last edited by socratis on 12. Jul 2017, 17:43, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
IOOI
 
Posts: 48
Joined: 14. Nov 2014, 18:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OPENSTEP, Mac OS X, FreeBSD, Windows

Re: High Sierra - USB 3 (xHCI) fails

Postby granada29 » 13. Jul 2017, 00:07

In this particular case, I had 10.12 installed on an external drive. I upgraded that installation to 10.13 (in native mode) and then used VBoxRawdisk to load it into VirtualBox as a raw disk.

For the .vdi based installation its a little trickier. Again start with a 10.12 VM and begin the upgrade. When the VM reboots you have to interrupt it and mess about in the EFI shell. I followed the process described at https://raimue.blog/2017/06/09/upgradin ... irtualbox/

Clearly there is some change in the way 10.13 is handling the EFI partition so I am not sure if this is an Apple issue (unlikely because it all works in native mode), or if the VirtualBox EFI loader needs a tweak.

Hope that helps
granada29
 
Posts: 44
Joined: 3. Mar 2015, 07:27

Re: High Sierra - USB 3 (xHCI) fails

Postby IOOI » 14. Jul 2017, 08:47

granada29 wrote:For the .vdi based installation its a little trickier. Again start with a 10.12 VM and begin the upgrade. When the VM reboots you have to interrupt it and mess about in the EFI shell. I followed the process described at https://raimue.blog/2017/06/09/upgradin ... irtualbox/

I tried this but I got this error:
Code: Select all   Expand viewCollapse view
Read error 0xe
Error loading kernel cache (0xe)

whereas the recovery launch was successful (using fs2:)
Clearly there is some change in the way 10.13 is handling the EFI partition so I am not sure if this is an Apple issue (unlikely because it all works in native mode), or if the VirtualBox EFI loader needs a tweak.

Hope that helps

maybe @socratis can tell …

cheers,

IOOI
IOOI
 
Posts: 48
Joined: 14. Nov 2014, 18:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OPENSTEP, Mac OS X, FreeBSD, Windows

Re: High Sierra - USB 3 (xHCI) fails

Postby granada29 » 14. Jul 2017, 10:00

I've noticed that sometimes VirtualBox won't reboot properly with macOS. Have you tried the EFI interrupt after a fresh start of the VM. i.e. when the VM starts the auto reboot, just power it off, then manually start it again, hitting your interrupt key while its starting.
granada29
 
Posts: 44
Joined: 3. Mar 2015, 07:27

Re: High Sierra - USB 3 (xHCI) fails

Postby socratis » 14. Jul 2017, 10:04

One, I've never noticed reboots not working, not once. Second, what do you mean "interrupt key"?

BTW, has anyone tried to installing 10.13 as their host? I might try it tonight if I'm in the mood... ;)
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12658
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: High Sierra - USB 3 (xHCI) fails

Postby IOOI » 14. Jul 2017, 10:37

socratis wrote:One, I've never noticed reboots not working, not once. Second, what do you mean "interrupt key"?

I guess he means the key to press to enter the EFI, in my case this is fn-F8

BTW, has anyone tried to installing 10.13 as their host? I might try it tonight if I'm in the mood... ;)

I'd try this if I had a host to install on, I could go an try to free up an external HD to install on however …
IOOI
 
Posts: 48
Joined: 14. Nov 2014, 18:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OPENSTEP, Mac OS X, FreeBSD, Windows

Re: High Sierra - USB 3 (xHCI) fails

Postby IOOI » 14. Jul 2017, 10:39

granada29 wrote:I've noticed that sometimes VirtualBox won't reboot properly with macOS. Have you tried the EFI interrupt after a fresh start of the VM. i.e. when the VM starts the auto reboot, just power it off, then manually start it again, hitting your interrupt key while its starting.

Now I tried this power down trick — still getting the read error. Only difference: now the EFI console returns after a while (after a reboot I could enter the boot sequence only once and then be hung forever).

regards,

IOOI
IOOI
 
Posts: 48
Joined: 14. Nov 2014, 18:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OPENSTEP, Mac OS X, FreeBSD, Windows

Re: High Sierra - USB 3 (xHCI) fails

Postby granada29 » 14. Jul 2017, 11:57

By "interrupt key", I mean the "key" you press to "interrupt" the boot process and cause it to break into the EFI loader. It seems that it varies depending on your keyboard and settings, hence I didn't say F12.

I quite often see a macOS VM reboot fail. A fresh start of the VM will clear the fault. Just cause you've never seen it, doesn't mean that it doesn't happen. I assume its something to do with USB bus timings, especially when dealing with raw devices on USB connections.
granada29
 
Posts: 44
Joined: 3. Mar 2015, 07:27

Re: High Sierra - USB 3 (xHCI) fails

Postby granada29 » 14. Jul 2017, 12:06

BTW, has anyone tried to installing 10.13 as their host? I might try it tonight if I'm in the mood... ;)

I think its too early in the 10.13 beta cycle to try something like VirtualBox. There are unresolved issues with loading 3rd party kexts and the kernel timekeeping system call adjtime() is broken.

However if you do try it, I'd certainly be interested in the results.
granada29
 
Posts: 44
Joined: 3. Mar 2015, 07:27

Re: High Sierra - USB 3 (xHCI) fails

Postby socratis » 15. Jul 2017, 17:46

granada29 wrote:However if you do try it, I'd certainly be interested in the results.

Sure I did. Didn't like it. I had to put the post in "OSX Hosts » OSX pre-releases". See: viewtopic.php?f=39&t=83811
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12658
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: High Sierra - USB 3 (xHCI) fails

Postby granada29 » 18. Jul 2017, 23:11

The xHCI problem persists in Version 5.1.24 r117012 (Qt5.6.2)
So its back to USB 2.0 again
granada29
 
Posts: 44
Joined: 3. Mar 2015, 07:27

Re: High Sierra - USB 3 (xHCI) fails

Postby socratis » 21. Jul 2017, 19:33

Hey granada29, can you try one thing? Shut down the VM, and issue the command:
VBoxManage setextradata "<vm>" VBoxInternal2/EfiBootArgs "keepsyms=1 serial=0x1"

Boot the VM. You will know that the command was successful if you do NOT see the typical text-only output during the boot phase, but a more familiar Apple logo.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12658
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: High Sierra - USB 3 (xHCI) fails

Postby granada29 » 24. Jul 2017, 13:35

Well that does as you said (i.e. Apple logo and no verbose boot).
There is still no mouse or keyboard with USB 3.0 but fine with USB 2.0

I prefer the verbose boot (something to look at while I'm waiting and also able to quickly spot any errors) so I'll backout that setextradata change.

Thanks for the suggestion.

Bryan
granada29
 
Posts: 44
Joined: 3. Mar 2015, 07:27

Re: High Sierra - USB 3 (xHCI) fails

Postby michaln » 17. Aug 2017, 16:57

I think I can see the problem with xHCI. It's actually macOS being either too clever or too dumb (take your pick).

It looks like Apple yet again rewrote the USB drivers, and introduced interesting misbehavior. The xHCI architecture has several 64-bit registers that have to be written as two 32-bit PCI transactions. The xHCI controller itself can support 64-bit addressing or not. If it doesn't, then writing the low-dword register clears the high register and takes some action. If the xHCI controller does support 64-bit addressing, then it is writing the high-dword register that triggers something. The controller emulated by VirtualBox does not report 64-bit addressing support, but Apple "knows" that it really does. So, things fall apart because the driver expects one thing and the emulated hardware another.

The quick workaround is to reduce the VM's memory size. With 3GB, I have High Sierra beta 6 VM booting with xHCI (in fact booting off of a USB3 stick).
michaln
Oracle Corporation
 
Posts: 2841
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Next

Return to Mac OS X Guests

Who is online

Users browsing this forum: No registered users and 2 guests