Contribute
Register

[Guide] 10.11+ USB changes and solutions

Status
Not open for further replies.
You need it to enable all ports. It is in config_patches.plist available in the USBInjectAll repo.

Ah OK! I seen now, they were already included in my clover's config.plist, because I base that off somebody else's (who has slightly different motherboard).

Injecting only the ports you need allows you to stay within the 15-port limit.

Right sorry. But that was actually my 'why?' question: What is the effect of ignoring the 15 port limit? That we cannot remove the config plist patches? --> Therefore its not possible long term, without issues related to those patches?

I don't know why you have that impression.

[EDITED]
So if I try "XOSI fix" then? Will it give all of the USB ports? Or also still I keep the USBInjectAll.kext, and 15 ports limit, and still keep my custom .aml file in ACPI/PATCHED/ folder?

Since I have a Skylake PC, presumably its newer than what Window 7 knew. So if my XOSI.dsl file is to use the windows10 instead of windows 7. But I am confused because in your windows7 BRIX example, and in your github repo, multiple versions of windows are uncommented, not just win7, (but also including Vista and XP). I understand i must always leave uncommented:

"Windows", // generic Windows query

So then do i also un-comment all prior versions of windows before mine?

Does this look ok to you?

Code:
// This SSDT can be used instead of an "OS Check Fix" patch to
// simulate a version of Windows for Darwin
//
// The default code below simulates Windows 2009 (Windows 7)
//
// To use this SSDT, you must compile it as AML, place in ACPI/patched, add
// to config.plist/ACPI/SortedOrder, and use the "change _OSI to XOSI"
// patch in config.plist/ACPI/DSDT/Patches (see config_patches.plist)
//

DefinitionBlock ("", "SSDT", 2, "hack", "XOSI", 0)
{
    // All _OSI calls in DSDT are routed to XOSI...
    // XOSI simulates "Windows 2012" (which is Windows 8)
    // Note: According to ACPI spec, _OSI("Windows") must also return true
    //  Also, it should return true for all previous versions of Windows.
    Method(XOSI, 1)
    {
        // simulation targets
        // source: (google 'Microsoft Windows _OSI')
        //  http://download.microsoft.com/download/7/E/7/7E7662CF-CBEA-470B-A97E-CE7CE0D98DC2/WinACPI_OSI.docx
        Store(Package()
        {
            "Windows",              // generic Windows query
            "Windows 2001",         // Windows XP
            "Windows 2001 SP2",     // Windows XP SP2
            //"Windows 2001.1",     // Windows Server 2003
            //"Windows 2001.1 SP1", // Windows Server 2003 SP1
            "Windows 2006",         // Windows Vista
            "Windows 2006 SP1",     // Windows Vista SP1
            //"Windows 2006.1",     // Windows Server 2008
            "Windows 2009",         // Windows 7/Windows Server 2008 R2
            "Windows 2012",         // Windows 8/Windows Server 2012
            "Windows 2013",         // Windows 8.1/Windows Server 2012 R2
            "Windows 2015",         // Windows 10/Windows Server TP
        }, Local0)
        Return (Ones != Match(Local0, MEQ, Arg0, MTR, 0, 0))
    }
}

You can use that to exclude ports. But usually you need to also set UsbConnector correctly, which cannot be done with a kernel flag. Hence the suggestion to create a custom SSDT.

Ah OK! Now I understand the point of it. Thank you.

You would have to provide "Problem Reporting" files that show the test device plugged in and the specifics on the device, and the specific way you're testing speed... And also, keep in mind that actual speeds may vary depending on the specific device you have plugged in. Just because you use a USB3 device, does not mean that device can perform at the top of USB3 bandwidth. In any case, you should verify your device can perform at your expected speeds by testing in Windows.

Yes I understand somewhat. I already know from windows10 and linux that this USB 3.0 device can do 70MB/Sec speeds. The reason I think its wider issue is because 3-4 other people said that they have same issue in sierra, in PikerAlpha's blog.

As for providing the "Problem Reporting" files... I did that earlier today. You may want again? They way I test speed is as follows:

* Insert SATA HDD into USB caddy,
* Attach device to USB 3.0 port
* Check it shows up in IORegExplorer attached to an 'SS' port.
* run 'diskutil list' to see which disk it is
* run 'dd if=/dev/disk3 of=/dev/null bs=1m count=100m'

Always takes about 7.-- seconds, which is about 14MB/Sec average speed. I havent removed the config plist patches yet though...
 
Last edited:
Right sorry. But that was actually my 'why?' question: What is the effect of ignoring the 15 port limit? That we cannot remove the config plist patches? --> Therefore its not possible long term, without issues related to those patches?

If you go over the 15-port limit...
- without the port limit patch, your ports will be truncated
- with the port limit patch, you get all your ports, but the patch itself causes memory corruption to the USB class instance (it causes writes beyond a fixed size array).

So if I try "XOSI fix" then? Will it give all of the USB ports?

The _OSI->XOSI + SSDT-XOSI.aml causes the ACPI code to simulate a version of Windows for "Darwin".
It can affect many aspects in the ACPI code as well as USB...

But I am confused because in your windows7 BRIX example, and in your github repo, multiple versions of windows are uncommented, not just win7, (but also including Vista and XP). I understand i must always leave uncommented:

Read the document provided by Microsoft.
It is linked in the comments in SSDT-XOSI.dsl.

Yes I understand somewhat. I already know from windows10 and linux that this USB 3.0 device can do 70MB/Sec speeds. The reason I think its wider issue is because 3-4 other people said that they have same issue in sierra, in PikerAlpha's blog.

As for providing the "Problem Reporting" files... I did that earlier today. You may want again? They way I test speed is as follows:

* Insert SATA HDD into USB caddy,
* Attach device to USB 3.0 port
* Check it shows up in IORegExplorer attached to an 'SS' port.
* run 'diskutil list' to see which disk it is
* run 'dd if=/dev/disk3 of=/dev/null bs=1m count=100m'

Always takes about 7.-- seconds, which is about 14MB/Sec average speed. I havent removed the config plist patches yet though...

Are you within the 15-port limit?
Did you implement CPU power management/etc?
No idea without current "Problem Reporting" files...
 
But there is an issue with the dual Thunderbolt / USB C port. It will not work unless a device is plugged in at boot.
That's true for Thunderbolt devices.

USB devices should work normally though. El Capitan (Mac OS X 10.11.6) will only allow devices connected to the Thunderbolt 3 chip as USB 2.0 "Up to 480 Mb/sec". Sierra (macOS 10.12.3) allows USB 3.1 gen 2 devices to work at "Up to 10 Gb/sec".
 
That's true for Thunderbolt devices.

USB devices should work normally though. El Capitan (Mac OS X 10.11.6) will only allow devices connected to the Thunderbolt 3 chip as USB 2.0 "Up to 480 Mb/sec". Sierra (macOS 10.12.3) allows USB 3.1 gen 2 devices to work at "Up to 10 Gb/sec".
Thanks for the clarification. I didn't know this. I only have usb c to sata III adapter to test.
 
If you go over the 15-port limit...
- without the port limit patch, your ports will be truncated
- with the port limit patch, you get all your ports, but the patch itself causes memory corruption to the USB class instance (it causes writes beyond a fixed size array).

OK Thanks! This ^ above sentence is very easy to understand. Perhaps you could add in your post #1 for other people to know that.

Are you within the 15-port limit?
Did you implement CPU power management/etc?
No idea without current "Problem Reporting" files...

OK so then I attach here all new latest Problem Reporting files. Plus in the Terminal Saved output it also include my DD speed test command and results 14MB/Sec. Also this IOReg is taken when my USB 3.0 device is still attached to USB port. So you can see it in there is attached to 'SS' something on 14.

You can also see in my clover folder the XOSI. There is also source .dsl file in __usb__ sub-folder.

BTW you didnt ask but I include a System Profile report too, because when I Screenshot the System Profiler, it seems to think its "USB 3.0, 5GB/s" for my attached USB 3.0 device. (which is supposed to be correct, and in other OS like linux when its transfer speed is about 70MB/Sec).

Anyway don't worry too much if you dont know / cannot answer about this slow USB 2.0 speeds. Many thanks for all your help already. Tomorrow I hope to take photos of verbose boot messages, because there may be some remaining acpi error reported in there. And in sierra I cannot find the OS X boot log (/var/log/kernel/log is totally missing). So I take a video and try to get screenshots that way instead.
 

Attachments

  • CLOVER.zip
    3.9 MB · Views: 78
  • dreamcat4-iMac.ioreg.zip
    722.2 KB · Views: 77
  • Terminal Saved Output.txt
    3.5 KB · Views: 115
  • System Info - USB 3.0 Device.png
    System Info - USB 3.0 Device.png
    180.2 KB · Views: 81
  • dreamcat4-iMac.spx.zip
    238.9 KB · Views: 76
Interesting... I test the speed in windows and its about 27MB/Sec. Which is still USB 2.0 Speeds. So I take out the 2.5 inch hdd and replace it with an ssd. Now says 180MB/sec in windows OK...

And 20MB/Sec in OS X:

Code:
ga-z170x-g3:log root# dd if=/dev/disk1 of=/dev/null bs=1m count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 5.010985 secs (20925547 bytes/sec)
ga-z170x-g3:log root# dd if=/dev/disk1 of=/dev/null bs=1m count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 4.876808 secs (21501276 bytes/sec)
ga-z170x-g3:log root# dd if=/dev/disk1 of=/dev/null bs=1m count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 4.985162 secs (21033940 bytes/sec)

Which is a little improvement over previous 14MB/sec.
 
OK, now booted into ubuntu 16.04.1 live cd, and plugged back the 60GB hard drive into the adaptor, and then a USB 3.0 port. Here is the speed on linux:

Code:
ubuntu@ubuntu:~$ sudo bash -l
root@ubuntu:~# dd if=/dev/sde of=/dev/null bs=1m count=100
dd: invalid number: ‘1m’
root@ubuntu:~# dd if=/dev/sde of=/dev/null bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 2.64053 s, 39.7 MB/s
root@ubuntu:~# dd if=/dev/sde of=/dev/null bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 0.0116124 s, 9.0 GB/s
root@ubuntu:~# dd if=/dev/sde of=/dev/null bs=1M count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 23.0552 s, 45.5 MB/s
root@ubuntu:~#
root@ubuntu:~# # that was the 60GB HDD. now swapped hdd for ssd
root@ubuntu:~# dd if=/dev/sde of=/dev/null bs=1M count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 5.32699 s, 197 MB/s
root@ubuntu:~#

To be clear - that is 45MB/Sec for this same HDD. And 200 MB/sec for the SSD. (over this cheap USB 3.0 sata enclosure). The speed on Mac OS X was 14MB/Sec and 20MB/Sec respectively.
 
That's true for Thunderbolt devices.

USB devices should work normally though. El Capitan (Mac OS X 10.11.6) will only allow devices connected to the Thunderbolt 3 chip as USB 2.0 "Up to 480 Mb/sec". Sierra (macOS 10.12.3) allows USB 3.1 gen 2 devices to work at "Up to 10 Gb/sec".

Hi Joe,

What did you do to make your USB-C/TB ports working as USB ports? Did you include them in your 15 max allowed USB ports in OSX?
I remember there were 2 weird looking ports(not called HS or SS) in ioreg, are these the USB-C ports? I've excluded them on my rig to stay within the 15 limit, does that matter? I would like to get these working.

Still interested in peripherals that work (or definitely don't) on the TB/USB-C ports.

Most of my TB1-2 gear works OK via a Startech adapter.
 
What did you do to make your USB-C/TB ports working as USB ports? Did you include them in your 15 max allowed USB ports in OSX?
I remember there were 2 weird looking ports(not called HS or SS) in ioreg, are these the USB-C ports? I've excluded them on my rig to stay within the 15 limit, does that matter? I would like to get these working.

zipb, the '2 weird port' are USR1 and USR2. Most likely from default iMac17,1 hardware profile (mac hardware specific), and definately nothing about the Thunderbolty. To get Thunderbolt 3 working (according to joevt say to me in a PM), you just need the latest sierra version 10.12.3. And to reboot the machine after plugging the TB device (or else plug device in on windows, then boot back from windows).

I already wrote everything that I know about this Alpine Ridge chip in my EFI/CLOVER folder. Its the exact same chip on your UD5 TH (just mine cheaper mobo is not enabled for TB3, only USB 3.1).

Here:


USB 3.1 Intel Ports
=======================

Google search terms: AppleUSBXHCIAR pci8086,15b6 AppleUSB30XHCIPort AppleUSB20XHCIPort

* As of 03/2017, the user joevt has recently been investigating about these intel usb 3.1 ports

Thread1: Hot-Plug doesnt work
https://www.tonymacx86.com/threads/...gigabyte-z170x-designare.211820/#post-1419530

Thread2:
https://pikeralpha.wordpress.com/2016/11/10/two-port-usb-3-1-gen-ii-pci-express-card/#comment-8800


* These USB 3.1 ports are hanging off an Intel Alpine Ridge Chip

* When thunderbolt (not this mobo!), then hot-plugging is not supported, a device must be plugged before boot
Perhaps this might / might not also imply a somewhat similar situation for the case of USB devices

* For example, if your USB devices also simply do not appear (when first hot-plugged) on the USB 3.1 ports

* There seems nothing new appear on the device tree
* However if plug in a certain device
(In my case, a 16GB Verbatim Store n Go USB 2.0 flash drive)

* Then the device tree gets populated / created
* After that initialisation is forced triggered, can then plug in other usb 2.0 and usb 3.0 devices

* Some devices (eg mass storage drive) will appear when hot-plugging
* a USB 2.0 mass storage device connects to AppleUSB20XHCIPort@00200000

* a USB 3.0 mass storage device connects to AppleUSB30XHCIPort@00400000
* however dd is reporting 14MB/sec read speed, should be about 70MB/sec
* So my USB3.0 data enclosure is stuck at USB 2.0 (or v1.1?) transfer speeds



Troubleshooting:
===================
* Symptom - Port seems broken, when plugging in your USB device, it does not appear

* Suggestion - plug in USB device before rebooting into MacOS (avoid hot-plugging)
* Suggestion - try to trigger creation of device tree with other kind of USB device



Device Memory Address Mapping
============================================

Appears in System Profiler as:

Code:
USB 3.1 Bus:

  Host Controller Driver:    AppleUSBXHCIAR
  PCI Device ID:    0x15b6
  PCI Revision ID:    0x0003
  PCI Vendor ID:    0x8086

In IOJones.app

Root > iMac17,1 > AppleACPIPlatformExpert > PCI0@0 > AppleACPIPCI > RP01@1C > IOPP > PXSX@0 > IOPP
> pic-bridge@2 > IOPP > pci8086,15b6@0 > AppleUSBXHCIAR@00000000 >

For USB 2.0 devices,

* USB_C.    = AppleUSB20XHCIPort@00100000
* USB3.1_A  = AppleUSB20XHCIPort@00200000

For USB 3.0 devices,

* USB_C.    = AppleUSB30XHCIPort@00300000
* USB3.1_A  = AppleUSB30XHCIPort@00400000
 
OK Thanks! This ^ above sentence is very easy to understand. Perhaps you could add in your post #1 for other people to know that.



OK so then I attach here all new latest Problem Reporting files. Plus in the Terminal Saved output it also include my DD speed test command and results 14MB/Sec. Also this IOReg is taken when my USB 3.0 device is still attached to USB port. So you can see it in there is attached to 'SS' something on 14.

You can also see in my clover folder the XOSI. There is also source .dsl file in __usb__ sub-folder.

BTW you didnt ask but I include a System Profile report too, because when I Screenshot the System Profiler, it seems to think its "USB 3.0, 5GB/s" for my attached USB 3.0 device. (which is supposed to be correct, and in other OS like linux when its transfer speed is about 70MB/Sec).

Anyway don't worry too much if you dont know / cannot answer about this slow USB 2.0 speeds. Many thanks for all your help already. Tomorrow I hope to take photos of verbose boot messages, because there may be some remaining acpi error reported in there. And in sierra I cannot find the OS X boot log (/var/log/kernel/log is totally missing). So I take a video and try to get screenshots that way instead.

Your ioreg shows no devices plugged on any SSxx port.
 
Status
Not open for further replies.
Back
Top