Coder Social home page Coder Social logo

linux-surface's Introduction

Linux Surface

Linux running on the Microsoft Surface devices . Follow the instructions below to install the latest kernel and config files.

Supported Devices

  • Surface Book
  • Surface Book 2
  • Surface Go
  • Surface Laptop
  • Surface Laptop 2
  • Surface Pro 3
  • Surface Pro 4
  • Surface Pro 2017
  • Surface Pro 6
  • Surface Studio

What's Working

  • Keyboard (and backlight)
  • Touchpad
  • 2D/3D Acceleration
  • Touchscreen
  • Pen
  • WiFi
  • Bluetooth
  • Speakers
  • Power Button
  • Volume Buttons
  • SD Card Reader
  • Cameras (partial support, disabled for now)
  • Hibernate
  • Sensors (accelerometer, gyroscope, ambient light sensor)
  • Battery Readings
  • Docking/Undocking Tablet and Keyboard
  • Surface Docks
  • DisplayPort
  • USB-C (including for HDMI Out)
  • Dedicated Nvidia GPU (Surface Book 2)

What's NOT Working

  • Dedicated Nvidia GPU (if you have a performance base on a Surface Book 1, otherwise onboard works fine)
  • Cameras (not fully supported yet)
  • Connected Standby is not supported yet

Disclaimer

  • For the most part, things are tested on a Surface Book. While most things are reportedly fully working on other devices, your mileage may vary. Please look at the issues list for possible exceptions.

Download Pre-built Kernel and Headers

Downloads for ubuntu based distros (other distros will need to compile from source using the included patches):

https://github.com/jakeday/linux-surface/releases

You will need to download the image, headers and libc-dev deb files for the version you want to install.

Instructions

  1. (Prep) Install Dependencies:
 sudo apt install git curl wget sed
  1. Clone the linux-surface repo:
 git clone --depth 1 https://github.com/jakeday/linux-surface.git ~/linux-surface
  1. Change directory to linux-surface repo:
 cd ~/linux-surface
  1. Run setup script:
 sudo sh setup.sh
  1. Reboot on installed kernel.

The setup script will handle installing the latest kernel for you. You can also choose to download any version you want and install yourself: Install the headers, kernel and libc-dev (make sure you cd to your download location first):

sudo dpkg -i linux-headers-[VERSION].deb linux-image-[VERSION].deb linux-libc-dev-[VERSION].deb

Compiling the Kernel from Source

For Debian-Based Systems

If you don't want to use the pre-built kernel and headers, you can compile the kernel yourself following these steps:

  1. (Prep) Install the required packages for compiling the kernel:
sudo apt install build-essential binutils-dev libncurses5-dev libssl-dev ccache bison flex libelf-dev
  1. Clone the mainline stable kernel repo:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git ~/linux-stable
  1. Go into the linux-stable directory:
cd ~/linux-stable
  1. Checkout the version of the kernel you wish to target (replacing with your target version):
git checkout v5.y.z
  1. Apply the kernel patches from the linux-surface repo (this one, and assuming you cloned it to ~/linux-surface):
for i in ~/linux-surface/patches/[VERSION]/*.patch; do patch -p1 < $i; done
  1. Use config for kernel series (may need to manually change for your distro):
cp ~/linux-surface/configs/[VERSION]/config .config
  1. Compile the kernel and headers (for ubuntu, refer to the build guide for your distro):
make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-linux-surface
  1. Install the headers, kernel and libc-dev:
sudo dpkg -i linux-headers-[VERSION].deb linux-image-[VERSION].deb linux-libc-dev-[VERSION].deb

For Arch-Based Systems

Have a look at this repository.

Signing the kernel for Secure Boot

Please consult the SIGNING.md.

NOTES

  • If you are getting stuck at boot when loading the ramdisk, you need to install the Processor Microcode Firmware for Intel CPUs (usually found under Additional Drivers in Software and Updates).
  • Do not install TLP! It can cause slowdowns, laggy performance, and occasional hangs! You have been warned.

Support

If you have an issue with the kernel, please feel free to create on issue here to track it. If you have questions or need support, please use our Gitter Community!

Donations Appreciated!

PayPal: https://www.paypal.me/jakeday42

Bitcoin: 1AH7ByeJBjMoAwsgi9oeNvVLmZHvGoQg68

linux-surface's People

Contributors

64kramsystem avatar a avatar aporie avatar arcticxwolf avatar battaglia01 avatar casainho avatar dbugsy avatar ehotinger avatar geoffholden avatar jakeday avatar mr-remington avatar npjohnson avatar pierrepinon avatar qzed avatar tmarkov avatar zyfarok avatar

Watchers

 avatar  avatar  avatar

Forkers

shunsunsun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.