Menu
Research

Linux on Microsoft Surface 2

How we got simultaneous Wi-Fi and Bluetooth, both cameras, the GPU and hardware video working on a 2013 tablet.

The Microsoft Surface 2 came out in 2013 with Windows RT, an NVIDIA Tegra 4, 2 GB of RAM and a 1920×1080 screen. Today it is a handsome and nearly useless tablet: Windows RT is long out of support, the app store is dead and the browser fails on half the web. We wanted to see whether it could become a real Linux computer.

When we started, the kernel, the desktop and some devices worked. Bluetooth and both cameras did not. Memory ran at half speed, the CPU clock never changed, and most programs rendered on the CPU. This is the story of how that was fixed, what came out of it and what refused to work.

The result in short

AreaBeforeAfter
BluetoothNot workingWorks through BlueZ
Wi-Fi and Bluetooth togetherImpossibleWork at the same time, 65–117 Mbit/s
Rear cameraNo driver1280×720 at 30 fps, up to 2560×1920
Front cameraNo driver1152×648 at 30 fps, up to 2304×1536
Memory408 MHz792 MHz, memcpy up 42 %
CPUFixed clock204–1320 MHz with voltage scaling
Dragging a window38–51 fps59 fps

We searched public sources for reports of working cameras on the Surface 2 and of Wi-Fi and Bluetooth running together under Linux, and found none. The Open Surface RT community documents this tablet's hardware but not these results. If you know of earlier work, tell us and we will add a link.

Where we started

The Open Surface RT community opened up Linux booting on these tablets. We built on their 5.17-next kernel with the Grate driver, with Raspbian 12 and GNOME 50 as the base system.

The best hardware documentation turned out to be the tablet itself. The ACPI tables describe all the wiring: which GPIO does what, which camera sits on which bus, even the memory timings. That turned much of the work from guessing into reading documentation Microsoft accidentally left inside the device.

We set one rule from day one: any risky test runs as a one-time boot with automatic rollback. The tablet hung many times, but it never turned into a brick.

Wi-Fi and Bluetooth: one firmware for two radios

This is the most interesting part. The tablet has a Marvell 88W8797 combo chip with one firmware for both radios. The trap looked like this:

  • Firmware from linux-firmware exposes Bluetooth over SDIO, but this board wires it to UART.
  • The Surface 2's own firmware uses UART, but its Wi-Fi half speaks a different protocol that mwifiex does not understand.

Each known firmware gave one radio. We went through the history of linux-firmware, ChromiumOS, Steam Link and TI builds: none has a UART build for the 8797.

The answer came from the older sibling. The first Surface RT has the same chip, and its FP62_WIN7 14.62.17.p215 firmware is built for the classic Marvell protocol while still using UART Bluetooth. After a small driver patch, both radios came up. A separate surprise was why Bluetooth had been silent before: the tablet simply never raised RTS.

Full walkthrough with code: Wi-Fi and Bluetooth together.

Cameras: a driver that did not exist

Linux had no video input driver for Tegra 114, so we wrote one from T20/T30 and NVIDIA's sources. The rear camera came up first, while the front camera refused to send a single packet. The cause was neat: on T114, port CSI-B takes its lanes from a new CIL-C block rather than CIL-B as on earlier chips, and UEFI leaves that block powered down.

Register-level walkthrough: cameras on Tegra 114.

Performance: 8 ms to copy one texture

Interface speed surprised us most. Windows stuttered while dragging, and 80–87 % of GNOME Shell's main thread went to memcpy. The driver allocated textures with a 32-byte row pitch while the hardware sampler needs 64, so every texture was copied again for every draw.

There was more. Memory ran at half its rated clock while the real timing tables sat in ACPI. On some boots UEFI left the CPU at 3/4 speed without the system noticing: it reported 1320 MHz while really running at 990.

Walkthrough: GPU, memory and clocks.

What still does not work

  • USB 3.0, HDMI and sleep.
  • Hardware video encoding. The encoder firmware starts but rejects every frame with error e2640010. This took the most time, and the cause is still unknown.
  • Browsers run but are not smooth. The GPU is GLES2 only, and modern Chromium expects GLES3.
  • 5 GHz Wi-Fi was not validated, and Wi-Fi power saving had to be turned off because the firmware can hang with it.

How to reproduce it

All code, patches and tools are in one archive on this page. The order is:

  1. What you need and where to get firmware
  2. Install guide

This is for experienced users: changing the boot chain can leave the tablet unbootable, and you do this at your own risk. The full sequence has not yet been repeated on a second, clean device, so expect to adapt it.

The archive contains no Microsoft, Marvell or NVIDIA files. This project is not affiliated with or endorsed by those companies.

Thanks to the Open Surface RT community, the grate-driver project and the Linux, Mesa and libcamera developers, without whom this work would not exist.

In-depth guides