Gentoo on Microsoft Surface Pro [3]

Gentoo on Microsoft Surface Pro [1,3]


This article was initially based on a work aimed to setup a Microsoft Surface Pro 1 as a portable digital audio workstation. The implementation was completed but no documentation was written about the topic, mostly for missing time, but also considering that the Surface Pro was essentially a 'standard' PC from the system point of view. Recently I searched for something potentially able to substitute my home workstation (quad core i7-3770 CPU @ 3.40GHz, 16GB RAM and 2TB storage in RAID1). The choice was the new Microsoft Surface Pro 3 with dual core i7-4650U CPU @ 1.70GHz, 8GB RAM and 512GB SSD storage.

HW tested

  • Microsoft Surface Pro 3 - dual core i7-4650U @ 1.70GHz, 8GB RAM, 512GB storage;
  • Microsoft Type Cover 3;
  • Microsoft Wedge Touch Mouse;
  • Microsoft Wedge Mobile Keyboard;
  • Microsoft Docking Station for Surface Pro 3;
  • Microsoft Bluetooth Pen for Surface Pro 3;


The targets are :

  • HW : support all the new HW features of the system with a single globlal patch to be applied to the kernel sources at least till when the new HW will be 'officially' supported on the mainstream Linux kernel. At the
  • implement a portable DAW with realtime audio based on Jack daemon;
  • to make a system usable at work so with:
    • Microsoft Lync compatible for audio / video conferences;
    • Support for Citrix client for accessing remote application;
    • all the Office suite;

Results till now

Actually the working functionality status is the following:

  • HW - mostly working
    • Multi touch screen: still unsatisfactory, actually nothing more then a 'touch' mouse pointer. In my previous implementation on Pro 1 I tested also the plasma active KDE, but due to the very early stage of development at the time of the test, I left. I'll check it again, maybe things are improved in the mean time;
    • Marvell wifi: working with all the limits of the opensource drivers for Marvell chips;
    • Marvell Bluetooth: working after having installed the Marvell's firmware;
    • Front and rear webcams: OK after patching the kernel sources;
    • Typecover 3 keyboard: OK after patching the kernel sources;
    • HW buttons management (volume UP/DOWN buttons) - Microsoft published a modified press/release HW event protocol for its HW. The problem is that with SP3 it seems they have newly modified it without any public documentation, the result is that - till now - the volume buttons are not managed by Linux kernel (there is a work in progress nevertheless on the mainstream kernel development);
  • DAW - to be implemented, actually I plan to setup exactly the same I relized on the 'old' Surface pro:
    • real time / low latency audio with Jack daemon
    • alsa loopback software card connected to jack daemon in order to make jackd working even with all the 'legacy' application that do not support it;
  • 'Office' client:
    • for Microsoft Lync compatibility I'm using Winc (linux native Lync client) but the plans are to 'dockerize' the application in order to have it working with pulse audio. The reason to proceed with the docker container is due to the fact that I do not want to install pulseaudio on the system as a default, since its terrible performances impacting on real time audio processing, so the idea is to launch it 'on demand' with Wync;
    • Citrix client: it's OK.
    • Office suite: I installed both LibreOffice binary edition and Calligra suite in order to cover the most of the existing Microsoft Office applications comprehensive of Visio support;

System installation

  1. Preparation / pre-requisites
    1. Windows 8 recovery unit;
    2. BIOS/UEFI settings modify;
  2. Installation
    1. Windows 8 removal and disk partitioning;
    2. LUKS partition creation;
    3. SSD optimizations;
    4. Kernel patching and initial RAM disk
    5. Grub2 setup
    6. Power management

Preparation / pre-requisites

The system installation will remove the Windows 8 from the SSD HD: simply I'm not interested with it.

Windows 8 recovery unit prepare

Follow the notes available in internet (there are plenty of them), even if not interested in using it, I'd like the idea to be able to reinstall it in case the Pro 3 will reveal not satisfactory for me.

BIOS / UEFI settings modifications

In order to be able to boot with a not TPM compliant OS, the firmware related setting must be modified.

  1. switch off the machine;
  2. press volume UP and - while keeping pressed - switch on
  3. as soon as the Surface logo appears release the volume up;
  4. disable the 2 options related to TPM;
  5. save the new BIOS settings;
  6. switch off;

Power Management

Power management under Surface Pro is a critical topic, it is even more critical on the Pro 3. The new processors are more performing and generally more efficient, but the decreases width of the system (less than 1cm) is really a challenge without a good system tuning.

Considering the processors models used in the old Surface Pro and in the new Pro 3:

Model Processor Code name Cores Thread Cache Clock (base) Clock (turbo) TDP Graphics
Surface Pro i5-3317U Ivy Bridge 2 4 3MB 1.7GHz 2.6GHz 17 Intel HD Graphics 4000 
Surface Pro 3 i7-4650U Haswell 2 4 4MB 1.7GHz 3.30GHz 15 Intel HD Graphics 5000

Scaling driver --> intel_pstate for both Ivy Bridge and Haswell processors. It is a 'must' and it is used by default on Sandy Bridge processors and beyond (even if other drivers are available). It can be disabled through a kernel boot option:


In order to check it execute the following command:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver

Through pstate it is possible to disable the Turbo Boost feature for keeping CPU-Temperatures low:

# echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo 

Scaling governor --> only performance and powersave are possible with Sandy Bridge and newer CPU. To activate a particular governor execute:

cpupower frequency-set -g <governor>

DTS sensors --> readeable from /sys/devices/platform/coretemp.x . These are available from lm_sensors also from coretemp-isa-0000/{Phisical id 0|Core 1|Core 2}

Zone sensors --> readeable from /sys/class/thermal/ interface. On both models there are defined 2 zones, the zone '0' with a 'hot' trip point and the zone '1' with a 'passive' trip point. The zone '0' on both the Surface model appears not to be usable (it shows a negative value). These acpi style zones are not used by thermald unless spcified in the XMP config file.



Joomla templates by a4joomla