Recovering from a broken frame buffer

Someone e-mailed me with this request for help:


I changed the frame buffer of my Skylake setup in an attempt to fix the artefacts and now I am getting a KP at boot time, and I only have one drive/partition and no backup. Now what?

Ouch. You should always have a backup or secondary boot option handy, but try this; boot with -DisableIOFB (in single user mode first for example) and see if that helps. Will be slower than usual, so give it some time, but it should get you past the KP.

By the way. I have QE/CI working on a friends PC, but Metal is acting up. First Apple tried to load libMTLIGCCompilerPlugin.dylib instead of libMTLIntelCompilerPlugin.dylib (from AppleIntelSKLGraphicsMTLDriver.bundle) and now the filename error is fixed and the error is no longer there in /var/log/system.log but the Metal compiler is still broken – Apple may fix this in 10.11.3 but I haven’t even downloaded the 10.11.3 DP (next week perhaps) so we’ll have to wait and see what is next.

Oh and you may also want to play with the following preferences:

defaults read/write MTLIRDumpEnable [0/1]
defaults read/write MTLIGILInjectionEnable [0/1]
defaults read/write MTLCB2CREnable [0/1]

Check /tmp/MTLIntelCompilerDumps/ for output!

One of the settings may work with ‘DumpMetal’ and/or ‘ShaderDumpEnabled’.

Hope that this helps. Have to get back to my family now…

Skylake Bus Speed Tip

Here is a quick tip:

System Information > Hardware Overview should not list “Bus Speed: 400 MHz” for Skylake processors, and in case you (still) see that, then please ask the developers of the used boot loader to fix this (SMBIOS) issue for you.

Note: sysctl hw should not report:

hw.busfrequency: 400000000
hw.busfrequency_min: 400000000
hw.busfrequency_max: 400000000


hw.busfrequency: 100000000
hw.busfrequency_min: 100000000
hw.busfrequency_max: 100000000

But there is more. Check the value of the IOService:/clock-frequency and IOService:/cpuN@N/bus-frequency properties, with either IORegistryExplorer or ioreg, and note that they are also wrong.

Background information

Here is a bit of background information. We already know that the AppleSMBIOS.kext binary fetches the bus transfer rate from a SMBIOS type 132 structure, which is optional, and when that is missing in the SMBIOS, then it assumes that a quad pumped bus is used and multiplies the frequency by 4, as can be seen in the source code snippet from AppleSMBIOS:

    // Fetch cpu and bus nominal frequencies.

    if (findSMBIOSStructure(&anchor, kSMBTypeProcessorInformation,
        const SMBProcessorInformation * cpuInfo =
            (const SMBProcessorInformation *) anchor.header;

        cpuSpeedMHz = cpuInfo->maximumClock;
        DEBUG_LOG("SMBIOS: CPU speed (MHz) = %u\n", cpuSpeedMHz);
        if (busSpeedMTs == 0)
            busSpeedMTs = cpuInfo->externalClock;
            busSpeedMTs *= 4;  // Assume quad-pumped FSB
            DEBUG_LOG("SMBIOS: FSB speed (MT/s) = %u\n", busSpeedMTs);

Giving you the 400MHz instead of the expected 100MHz. Old stuff by now.

Simple Workaround

There are different ways of checking what frequency we should use, and one of the things that you can do is to check register ecx of CPUID leaf 0x16 which in this case will return a value of 100(MHz).

A simple workaround is to check whether or not a SMBIOS type 132 structure is injected, and if not then you divide the value of the External Clock frequency in your SMBIOS type 4 structure by 4.

Anyway. This information should help Slice and the Chameleon developers to fix this issue in their code πŸ˜‰

Edit: Sorry. I asked Jens – a friend of mine – to update this blog article for me, but as usual… I didn’t make myself clear so he ended up mixing up stuff – the ARTFrequency was meant to become a next blog article. This was clearly my mistake, for which I apologise, because all Jens tried to do was help me. And he surely did.

Thank you Jens, for helping me during the holidays. We’re almost home – having a coffee in Madrid and I cannot wait to begin hacking the science out some of the unsolved problems πŸ˜‰

My initial ElCapitan USB workaround…

Someone e-mailed me and asked me how I worked around the initial USB problems after the introduction of the Skylake motherboard/processors. Well. This was actually easier than you may think and this is what I used:

DefinitionBlock ("ssdt_usb.aml", "SSDT", 2, "APPLE ", "Xhci", 0x00001000)
    External (_SB_.PCI0.XHC_)
    External (_SB_.PCI0.XHC_._ADR)

    Scope (\_SB)
        Method (_INI, 0, NotSerialized)  // _INI: Initialize
            Store ("Method \\_SB._INI Called", Debug)

            Store (Zero, \_SB.PCI0.XHC._ADR)
            Store (Zero, \_SB.PCI0.XHC)

What I did, basically, was to nullify the namespace of Device (XHC) in the ACPI tables so that the Apple USB drivers could add the USB ports for me. And it did. This will however not solve the USB problems, as you will likely still hit the USB port limit of 15 ports, but this gave me all enabled USB 2.0 ports and a number of USB 3.0 ports, which I used to make the following scheme for the ports on the backplate:
And this one for the USB ports coming from the 20-pin front connector on the motherboard:
The next step was to write a XHCI SSDT to enable all the ports that I needed – I only skipped the port for the onboard F_USB2 connector to get to the maximum supported port numbers and have every port working. Oh and I also added this little snippet:

Method (MBSD, 0, NotSerialized)
    Return (One) // Let AppleUSBODD know that USB SuperDrive is supported on this Mac!

Not too many people know about this requirement so here it is.

p.s. I’m still on holidays (we’re in Germany now) and I will add the SSDT when I am back home again.

Meeting The National Dialogue Quartet (Nobel Peace Prize Winners of 2015)

Wow. We had a the opportunity to meet and greet The Tunisian National Dialogue Quartet – awarded with the 2015 Nobel Peace Prize – and here is a picture of them (Uppsala Universitet).
So yeah we are feeling pretty lucky, again… and yup we are back in Sweden once again, but we got here a bit late due to a speeding ticket, and thus our seats were given away to other people.

Now we are ready to visit the Ice Hotel in the north of Sweden. Thanks to mom and dad for this surprise!!! The next one on my our TODO list πŸ˜‰

Note: This blog post was posted by Jens – sorry for the typos Pike.

xnu-3247.1.106 source code released

Apple released the xnu-3247.1.106 source code that is used (?) for OS X 10.11 El Capitan – among others – at the time that we were driving to Denmark.
Can someone please turn off the wind. It’s mad around here. Oh. I may have more pictures sometime later.

Edit: Or not. The iPad I have here no longer starts up. The trouble started with the volume buttons (going nuts like it was constantly pressed) and uploading pictures to a friend, to let him upload them for me (like this edit) doesn’t work.

My first time in Sweden

We are currently in Sweden and for the folks wondering where exactly, since Sweden is a rather large country, this is the place I am visiting at the moment.
Not the best picture (quality) but daylight is short and little around here (taken the night before). Oh. And this is the view from the SciLifeLab building to the other side of the road (towards Upsalla Science Park).
There isn’t much to look at. Except for the Christmas lights up in the trees maybe. And not just these but everywhere. I mean people in Sweden must love to put up lights in trees. Don’t get me wrong. I love it. And not just that. Look at this picture.
Note the text: “Alltid ΓΆppet” or “Always open”. Yup. The McDonalds, BurgerKing, MAX and sometimes PizzaHut and KFC as well (or was that that when we drove through Denmark?) can be found everywhere. Especially next to tank stations, and they are open 24/7. Man. I have never seen this much of them when we drove through a country. Not that I get much junk food but anyway. Oh by the way. This picture was taken at the time that I was cleaning the car windows (our car was shipped to Hamburg before we booked our tickets).

Well. This has to be it for now… back to the seminar (preparations). Later folks!

p.s. Oh. You may wonder what I am doing here. Well. I’m not ‘just a developer’ but I also have a PhD in something totally unrelated to computer science (et all) and that is part of who I am and what I do for a living. I know. Questions… questions and more questions. Good luck puzzling (to some of you).

Edit: It is great to be here and to be able to visit friends in Denmark, and a long time friend in Darmstadt Germany afterwards. Yeah Sweden… definitely a country to come back to. Next year already.

Yeah. I certainly want to do something for human mankind, and I should, and if that means that I will have little to no time left for the ‘hackintosh community’ then so be it. Thing is. I got carried away and somehow felt like it was my fault that the bone marrow transplantation of my sister failed. I am over it now so it is time for me to act and carry that Doctor badge that I worked so hard for, and carry it with pride on my chest, and do what I was meant to be… Not to hide in vain and rot away.

I’d like to thank Google Inc. for taking me up in time of need and helping me, guiding me through what I think was the toughest period of my life. We’ll depart with pride, and I will always be grateful to all of you – you know who you are. Always and forever, with pride,

Dr. Pike R. Alpha