Black screen with movable cursor…

I received a couple of question this month and one of them jumps out; Stuck on a black screen with a movable cursor.

Ok. I think I know what you mean and this is my work around for it (mentioned before in one of my replies in a blog post):

1.) Press enter (background image flashes shortly).

2.) Enter you password (screen is still black).

3.) There is your desktop.

Well. That’s it. Works every time for me. No matter what display connector that I use (HDMI, DVI or VGA).

p.s. You may run into this black screen with movable cursor if your PC failed to wake up, after you’ve used the on/off switch to boot again.

Update: Apple change something in 10.12.3 Beta (16D30a) and as a result the screen is no longer black.

Booting without monitor (cable) attached…

I tried to boot my Skylake setup without a monitor (cable) attached and it failed, up until the moment that I connect the monitor cable. It didn’t even (try to) load the boot loader from the M2 SSD. What I noticed was a flashing cursor at the top left corner, and only then did it load the boot loader from the M2 SSD. This is a serious BIOS bug.

Three questions:

1.) Can you boot (your Skylake setup) without a monitor attached?

2.) If yes, is that with an NVIDIA (or AMD) dGPU or the IGPU?

3.) Do you happen to know a work around for this problem?

Edit: It boots up with the monitor cable attached, even if the monitor is switched off – the BIOS may want to read the EDID and use the power from the DVI cable.

Breaking news…

Tim Cook said that Apple is still committed to the Mac and specifically mentioned the desktop aka iMac. What does this mean for us? Well. I am sitting on a flight right now in the USA – with a couple of other people – and am listening to two people, talking about a new Apple keyboard… with an on-off switch.

Let’s see if this in flight Internet thing works… Ok. Cool. It actualy works.

Edit: the next iPad and iPhone is said to come with some form of wireless charging, and the iMac stand should support that, and work as a two way charger; burst mode for iPhone and iPad, and a slower (normal?) mode for the new keyboard and magic trackpad. They also talked about pairing the TouchID (read our fingerprint) with your Apple ID, so that you can use it anywhere in the world on all supported Mac’s. Though Apple is said to still investigate the legal and privacy implications of it.

Hardware support for TouchID is backed in on the motherboard, just like the new Macbook Pro, and the new keyboards will not work with current Mac models. It can also only power on/off the Mac that it is paired with.

The two people do not believe that the current Mac Pro will be sold in 2017; a new power desktop should replace it, or “the memo to employees” should stop Apple from exploring this path.

Apple is also working on a “Hub” to interact with smart devices in our homes, and it should also work as backup facility and WiFi access point.

It is four people (two are obvious developers) with Apple badges in one and the same plane. Sounds great, but let’s just see if anything actually ends up in our hands 😉

Update:

What are they chances that you ever get to meet Apple engineers in an airplane, or anywhere else for that matter, and then they also talk openly about unreleased products. Zero you say. And you are right!

So Pike are you saying that it never happened? Correct! I hereby retract my blog post. I’ll keep it up, but with this note:

We since learned that the people in this airplane were ex-Apple employees. People who started their own company, so that they could design and produce products for Apple customers. They have nothing to do with Apple.

Ok. There you have it. This is the note that I have to post here. Go figure!

Installing updates from sucatalog.gz

We’ve been discussing the CatalogURL a couple of times already, but people seem to have no idea how they should install, say macOS Sierra 10.12.3 from it.

Long story short; you can now find an example in one of my github repositories (HandyScripts).

You can use my script and change it for any of the packages that you would like to install (from the command line). There are three variables (key, url and packages) that you should keep in line with what the used sucatalog.gz is telling you to use. That’s it. Ok. You may want to change the language (distribution) but that’s about it.

Edit: You can cd to /tmp and edit the downloaded .dist file and run:

productbuild --distribution 031-91606.English.dist --package-path 031-91606 installer.pkg

This should create a working installer PKG.

Have fun 😉

Hacking the Intel HD Graphics frame buffer kext…

There is one thing that I’d like to see fixed, and soon, and that is the problem with the Intel HD Graphics hanging when it sleeps/wakes up.

I had looked at it months ago already, and quickly identified the problematic kext – AppleIntelSKLGraphicsFramebuffer.kext – and yesterday evening I used a good 30 minutes to nop/0x90 out some parts in the binary and the hang is gone.

Not only can I wake it up, but now I can also connect to it with screen-sharing/remote desktop. The latter did not work. Not without the modified bits, so this is good news. This also confirms that I am looking at the right spots.

The crappy part of the good news is that I have to find a good solution, one that works, and I think to have a good idea. Thanks to a not so good night of sleep – I probably kept working on it some time when I tried to sleep, because I woke up with a lightbulb moment. Yeah. Good news. New ideas!

Keep you posted 😉

Two Port USB 3.1 GEN II PCI Express Card

Anyone else ordered a 2 Port USB 3.1 GEN II (10Gbps) PCI Express Card 1 USB Type C and 1 USB Type A Port (USB 3.1 A + C) from AliExpress.com?
2portusb31pciecard
Seem like they have one on sale for $26.99 in 19 hours from now. Ok. Let’s buy one and see what we get – they say that it works with OS X 10.6 and greater.

Update: Here is a first benchmark with a Sandisk 64GB USB3.1 type C flash drive.
orico_pa31-ac_sandisk64gb
I only installed the card and connected the SATA power cable to it. I did not modify anything. Worked out of the box, but this flash drive does not support 10Gbps. To test that I first need a new generation II device, which I do not have at the moment.

Update-2: I found some interesting lines in the log:

kernel: (kernel) 000003.592134 PEGP@00000000: AppleUSBXHCI::createPorts: port 1 unsupported protocol USB 03.01
kernel: (kernel) 000003.615236 PEGP@00000000: AppleUSBXHCI::createPorts: created port 1

kernel: (kernel) 000003.615527 PEGP@00000000: AppleUSBXHCI::createPorts: port 2 unsupported protocol USB 03.01
kernel: (kernel) 000003.615633 PEGP@00000000: AppleUSBXHCI::createPorts: created port 2

kernel: (kernel) 000003.615887 PEGP@00000000: AppleUSBXHCI::createPorts: created port 3
kernel: (kernel) 000003.616282 PEGP@00000000: AppleUSBXHCI::createPorts: created port 4

This is not good. Time for a tiny SSDT. Here is mine:

DefinitionBlock ("ssdt_usb-iMac171.aml", "SSDT", 2, "APPLE ", "Xhci", 0x00001000)
{
    External (_SB_.PCI0.PEG0, DeviceObj)
    External (_SB_.PCI0.PEG0.PEGP, DeviceObj)

    Scope (\_SB.PCI0.PEG0)
    {
        Scope (PEGP)
        {
            Name (_STA, Zero)  // _STA: Status
        }

        Device (XHC2)
        {
            Name (_ADR, Zero)  // _ADR: Address

            Device (RHUB)
            {
                Name (_ADR, Zero)
                Device (SSP1)
                {
                    Name (_ADR, One)
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        0x09, 
                        Zero, 
                        Zero
                    })

                    Name (_PLD, Package (0x01)
                    {
                        Buffer (0x10)
                        {
                            /* 0000 */    0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                            /* 0008 */    0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                        }
                    })

                    Method (_DSM, 4, NotSerialized)
                    {
                        If (LEqual (Arg2, Zero))
                        {
                            Return (Buffer (One)
                            {
                                0x03
                            })
                        }
                        Return (Package (0x02)
                        {
                            "UsbCPortNumber", 
                            One
                        })
                    }
                }

                Device (SSP2)
                {
                    Name (_ADR, 0x2)
                    Name (_UPC, Package (0x04)
                    {
                        0xFF,
                        0x09,
                        Zero,
                        Zero
                    })

                    Name (_PLD, Package (0x01)
                    {
                        Buffer (0x10)
                        {
                            /* 0000 */    0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            /* 0008 */    0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                        }
                    })

                    Method (_DSM, 4, NotSerialized)
                    {
                        If (LEqual (Arg2, Zero))
                        {
                            Return (Buffer (One)
                            {
                                0x03
                            })
                        }
                        Return (Package (0x02)
                        {
                            "UsbCPortNumber",
                            0x02
                        })
                    }
                }

                Device (HS01)
                {
                    Name (_ADR, 0x03)
                    Name (_UPC, Package (0x04)
                    {
                        0xFF, 
                        0x09, 
                        Zero, 
                        Zero
                    })

                    Name (_PLD, Package (0x01)
                    {
                        Buffer (0x10)
                        {
                            /* 0000 */    0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                            /* 0008 */    0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                        }
                    })
                }

                Device (HS02)
                {
                    Name (_ADR, 0x04)
                    Name (_UPC, Package (0x04)
                    {
                        0xFF,
                        0x09,
                        Zero,
                        Zero
                    })

                    Name (_PLD, Package (0x01)
                    {
                        Buffer (0x10)
                        {
                            /* 0000 */    0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                            /* 0008 */    0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
                        }
                    })
                }
            }
        }
    }
}

I may want/need to change my initial SSDT later on, but at least the errors are gone now.

Also. Note that my card is installed in the first/primary slot (PEG0) of the motherboard, but your card may – most likely – use another slot. In short; don’t forget to change the device name 😉

Update-3: And here is a screenshot of a Samsung T3 (500GB) device in action:
samsung_t3_500gb
This is not a second generation USB 3.1 device, but already quite a bit faster than the Sandisk that I used previously for testing. Also. When you are going to use some external M.2 B key enclosure, then keep in mind that it will be limited to 500~550 MB/Sec due to SATA. Which is not a whole lot faster.

A better option would be some RAID enclosure with two SATA devices, or a M.2 M key device (non-SATA). These two can, at least in theory, use the 10 Gbps (up to 6 Gbps for SATA) of the USB 3.1 Gen 2 port.

Flashing Power LED…

I am looking for people with a Skylake build with a flashing power LED in sleep state. Do you have a flashing power LED, then please comment here what motherboard/processor/GPU you have. Please also link to your ACPI files.

Thanks!

Properly Formatted Properties…

Some time last week I replied to telepati and mentioned that some of the device properties were broken in his setup.

The Problem

Sometimes you want (property name) Data <“desired text”> instead of (property name) Data <646573697265642074657874>. This is possible. If you know how to do it. I do as can be seen on the following screenshots:
properlyformattedproperties

properlyinjectedtextstringproperties
Anyway. I happen to have a little script for it that I like to share with you today. Here it is:

!/bin/bash

#
# Script (str2base64.sh) to convert a string to base64 data in a way that it can be
# used for properties as text instead of hex data.
#
#
# Version 1.1 - Copyright (c) 2013-2016 by Pike R. Alpha
#

#
# Get input from user.
#

read -p "Enter string to convert: " string

#
# Convert to postscript format.
#

data=$(echo -n "${string}"|xxd -ps|tr -d '\n')

#
# Add "00" to the data and convert it to base64 data.
#

echo -n "${data}00"|xxd -r -p|base64

You can get this script, which I called str2base64.sh, from my Github repository. Run it. Fix your property string data like a pro. This way you won’t have to scratch your head when you see those funny hex characters 😉

Edit: You can also use my script for the following device-properties:

booter-name
booter-version
booter-build-time