OpenBSD (not) on the Surface Pro 4

I recently had access to a Surface Pro 4 and tried to boot OpenBSD on it. It did not go well, so I am just putting this here for posterity.

The 2016 Surface Pro 4 is basically just a keyboard-less x86 (Core i5 on the model I had) tablet with some tightly integrated (read: not upgradeable) components. Its optional Surface Type Cover is just a USB-attached keyboard and trackpad, which magnetically secure to the bottom of the device.

To get started, enter the BIOS/EFI setup which is done by holding the volume down and power buttons at the same time to power it on, then release the volume down button after the Surface logo appears. Disable Secure Boot, which will then show a big red bar across the screen on every subsequent boot, in case you somehow forgot that you did that (argh).

With an OpenBSD USB key or isostick plugged into the single USB A port on the right side, the machine should boot to the OpenBSD prompt. Conveniently, the Surface's EFI implementation shows an on-screen keyboard while at the OpenBSD bootloader, though letting it timeout to boot the kernel should work fine. Once the kernel loads, the onboard keyboard disappears, which is unfortunate.

With the kernel booted all the way to the installer prompt, the kernel then starts flooding the console with "uhub0: port 0 reset failed" messages. Guessing it was related to the Type Cover keyboard, I detached it and the messages stopped. Of course, now there is no keyboard input. I unplugged the isostick and plugged in a regular USB keyboard, which produced more uhub spam. For some reason, OpenBSD's USB stack didn't like whatever the Surface Pro was doing for USB 1 and 2 devices. When I plugged in a USB 3 memory stick or ethernet adapter, they both attached fine. Any non-USB 3 device or hub would not work.

I tried a few more things with a kernel built with some more verbose logging and hacks like increasing device timeouts, but none could get any working keyboard devices (I don't have a USB 3 keyboard - do they even exist?)

Since the Surface Pro 4 has a Marvell wireless chip and it is not removable, it does not bode well for running OpenBSD on it even if the USB issues were resolved. Its Linux driver looks less terrible than the Broadcom driver, though it is GPL-only.

Surface Hardware

OpenBSD aside, the Surface Pro 4 seems like a high quality device and a very solid build quality. The Type Cover keyboard has a nice tactile, though typing on it in its elevated position is a bit flimsy because there's nothing under it for support. The trackpad has a decent feel, though its physical button sounds a bit loud/cheap feeling.

It has a HiDPI 2736x1824 12" touchscreen (3:2 ratio) with Intel graphics. It only has one USB port (type A), a Mini DisplayPort port, and a headphone jack. Its charger is a proprietary magnetic thing that awkwardly clips vertically along the side near the bottom, making it angle out sharply when charging it in its upright position on a desk.

The kickstand on the rear of the device is very sturdy and has a huge range of adjustability, though it is kind of awkward to initially pull it away from the rear of the tablet. Also, because there is basically no surface area touching the desk, it has a tendency to slide around a bit, and makes a bad scraping noise from the edge of the kickstand.

In summary, the Surface Pro seems like a nice tablet, but a sub-par laptop (or whatever you want to call a portable desktop computer that would get used a lot on a desk while plugged in).

Questions or comments?
Please feel free to contact me.