Gentoo on Microsoft Surface Pro [3]

Categoria: Projects
Pubblicato Venerdì, 26 Dicembre 2014 11:45
Scritto da Giampiero Gabbiani
Visite: 6004

Gentoo on Microsoft Surface Pro [1,3]

Introduction

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

Target

The targets are :

Results till now

Actually the working functionality status is the following:

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:

intel_pstate=disable

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.

Software

thermald,cpupower,