Running Linux on my Surface Pro 2

The Surface Pro 2 is a sweet piece of hardware. But many pieces of its hardware, including the type cover and wireless network interface, do not have excellent firmware for Linux as of today. I decided to give another route a try, and the results are very interesting.

tl;dr:: I installed CrunchBang Linux (a Debian-based distro) in VMWare, closed all unneeded Windows processes (including explorer.exe), and my battery life improved, despite running an OS on top of an OS.

If you're curious about running off the metal (no virtual machine), see here.

Here's the gist. By installing Linux in a virtual machine, I can bypass all the networking problems because Windows is connected to the network, and VMWare hooks into these interfaces and exposes a virtual device to the VM. It also has the nice advantage of creating share folders between my Windows and Linux environments.

But I had always felt that this would completely destroy my battery life on the machine. As it turns out, my preliminary findings over the last week and a half suggest the battery life is actually better using my virtual machine than the Windows environment.

Why? My hypothesis is this: Because I'm closing explorer and all unneeded Windows services, background apps, etc., I'm removing the cost of Windows' heavy interface, OneDrive syncing in the background, apps updating their tiles, search indexing, and whatever the heck else Windows does in the background.

I'm also running all my tools (nginx, Node.js, gVim, etc) on Linux, so I can avoid the extra bloat of compatibility layers that make it possible to run these Linux-esque applications on Windows. I'm also using an Openbox environment, which is significantly lighter than explorer.

So if you've been wanting to run Linux on your Surface Pro [2], I suggest giving this route a try. It might not be as bad as you think. A couple of points, though:

  • I use VMWare because VirtualBox was consistently crashing when I opened Chromium on my 4k monitor. Mileage varies.
  • Hyper-V is not good for hosting graphic environments. You'll need to disable it with bcdedit before you can install/run VMWare.
  • There are some things I have yet to iron out, such as touch support, random network disconnects, etc. I'll update when I find solutions of those.

There are also a number of advantages to having your development environment virtual:

  • You can easily suspend your environment to disk and use your machine for something else, then return back to that state.
  • You can easily copy your environment to another machine with no additional setup.
  • When Windows' hibernation decides to wipe out your hibernation state, your development environment is still suspended to disk, so you can reboot the host machine as much as you want. Sweet.
  • You can snapshot the development machine after you have it set up, in case something goes horribly awry.
  • You can easily backup your entire virtual machine filesystem to an external hard drive.
  • You can easily switch between Windows and Linux; this is nice, because I can use my SP2 as an actual tablet, do normal Windowsy stuff on it, let people borrow it, etc., with my development environment completely separate.

There are, of course, plenty of disadvantages, almost all related to the extra layer of emulation between your dev environment and the metal. But so far, this has been pretty unnoticeable to me.

Add this to the list of awesome things this machine can do.

Update: I now run Ubuntu Linux full time on my Surface.

See also: Running Ubuntu on a Surface Pro 2, off the metal.