Code Monkey home page Code Monkey logo

repo's Introduction

Linux Surface

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

Announcements and Updates | Upstream Status

Why / About this Project

These days, Linux supports a lot of devices out-of-the-box. As a matter of fact, this includes a good portion of the Microsoft Surface devices—for most parts at least. So why would you need a special kernel for Surface devices? In short, for the parts that are not supported upstream yet.

Unfortunately, Surface devices tend to be a bit special. This is mostly because some hardware choices Microsoft made are rarely (if at all) used by other, more "standard", devices. For example:

  • Surface devices (4th generation and later) use their own embedded controller (the Surface Aggregator Module, or SAM). In contrast to other devices, however, some newer Surface devices route their keyboard and touchpad input via this controller. Unfortunately, every new Surface device requires some (usually small) patch to enable support for it, since devices managed by SAM are generally not auto-discoverable.
  • Surface devices (4th generation and later, excluding the Go series) use a rather special system for touch and pen input. In short, this requires user-space processing of touch and pen data to enable multitouch support and has not been upstreamed yet.
  • Surface devices rely on Intel's ISP for camera image processing. This means that the webcam also requires some user-space processing. While patches are being upstreamed, not all devices are supported (even with this project), and more work remains to be done.

We aim to send all the changes we make here upstream, but this may take time. This kernel allows us to ship new features faster, as we do not have to adhere to the upstream release schedule (and, for better or worse, code standards). We also rely on it to test and prototype patches before sending them upstream, which is crucial because we maintainers cannot test on all Surface devices (which also means we may break things along the way).

So should you install this custom kernel and the associated packages? It depends: We generally recommend you try your standard distribution kernel first. If that works well for you, great! But if you're missing any features or experiencing issues, take a look at our feature matrix and give our kernel and packages a try. If your device is not listed as supported yet, feel free to open an issue.

Supported Devices

  • Surface Book
  • Surface Book 2
  • Surface Book 3
  • Surface 3
  • Surface Go
  • Surface Go 2
  • Surface Go 3
  • Surface Laptop
  • Surface Laptop 2
  • Surface Laptop 3
  • Surface Laptop 4
  • Surface Laptop 5
  • Surface Laptop Go
  • Surface Laptop Go 2
  • Surface Laptop Studio
  • Surface Pro 1
  • Surface Pro 3
  • Surface Pro 4
  • Surface Pro (5th Gen) / Surface Pro 2017
  • Surface Pro 6
  • Surface Pro 7
  • Surface Pro 7+
  • Surface Pro 8
  • Surface Pro 9
  • Surface Studio

Features / What's Working

See the feature matrix for more information about each device.

Disclaimer

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

Installation and Setup

We provide package repositories for the patched kernel and other utilities. Please refer to the detailed installation and setup guide. There, you may also find device-specific caveats. In case you have disk encryption set up or plan to use it, take care to follow the respective instructions in the installation guide and have a look at the respective wiki page. After installation, you may want to have a look at the wiki and the contrib/ directory for useful tweaks.

If you want to compile the kernel yourself (e.g. if your distribution is not supported), please have a look at the wiki.

Additional Information

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).
  • Using TLP can cause slowdowns, laggy performance, and occasional hangs if not configured properly! You have been warned.
  • If you want to use hibernate instead of suspend, you need to create a swap partition or file, please follow your distribution's instructions (or here).

Support

If you have questions or need support, please join our Matrix Space! This space contains

License

This repository contains patches, which are either derivative work targeting a specific already licensed source, i.e. parts of the Linux kernel, or introduce new parts to the Linux kernel. These patches fall thus, if not explicitly stated otherwise, under the license of the source they are targeting, or if they introduce new code, the license they explicitly specify inside of the patch. Please refer to the specific patch and source in question for further information. License texts can be obtained at https://github.com/torvalds/linux/tree/master/LICENSES.

repo's People

Contributors

qzed avatar stolld avatar surfacebot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

repo's Issues

Can't upgrade `surface-control` as my distro doesn't have `libudev`

The latest surface-control version isn't installable for me.

My distro doesn't have libudev:

# apt install libudev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libudev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libudev' has no installation candidate

I have a libudev1 package though.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu Hirsute Hippo (development branch)
Release:        21.04
Codename:       hirsute

Expected Behaviour

It should install like usual.

Actual Behaviour

# apt upgrade surface-control
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 surface-control : Depends: libudev but it is not installable
E: Broken packages

Provide linux-surface-keyring for Archlinux

It would be nice if linux-surface-keyring is provided for Arch Linux. It can free the users from the burden of key management and it's easy to implement, To write PKGBUILD and linux-surface-keyring.install, the following modified from official Arch Linux repo can be used as a reference,:

PKGBUILD:

pkgname=linux-surface-keyring
pkgver=1
pkgrel=1
pkgdesc='Linux Surface PGP keyring'
arch=(any)
url='https://github.com/linux-surface/linux-surface/'
license=(GPL)
install=$pkgname.install
source=('linux-surface.gpg::https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc')
sha256sums=('SKIP')
validpgpkeys=('SKIP')

package() {
  echo "87DEFA4AB94A99A4C8C3112556C464BAAC421453:4:" > linux-surface-trusted
  export PREFIX=/usr
  export DESTDIR="$pkgdir"
  install -dm755 ${DESTDIR}${PREFIX}/share/pacman/keyrings/
  install -m0644 linux-surface.gpg ${DESTDIR}${PREFIX}/share/pacman/keyrings/
  install -m0644 linux-surface-trusted ${DESTDIR}${PREFIX}/share/pacman/keyrings/
}

.install

post_upgrade() {
	if usr/bin/pacman-key -l >/dev/null 2>&1; then
		usr/bin/pacman-key --populate linux-surface
		usr/bin/pacman-key --updatedb
	fi
}

post_install() {
	if [ -x usr/bin/pacman-key ]; then
		post_upgrade
	fi
}

Fedora kernels out of date

There have been 3-4 Fedora kernel releases since this repo has been updated.

As of now, Fedora is at 5.6.19-300, surface 5.6.15.

Fedora 39 Packages

Update to Fedora 39 currently is not possible as the packages are not available

Build kernel with f2fs module

I have switched my filesystem over to f2fs, as it results in great performance on the EMMC storage of my Surface Go 1 4GB, but had to install a different kernel, as building linux-surface with the f2fs module would take very long on my Surface and I like to keep my kernel up-to-date. Therefore, it would be nice to have the f2fs module included in the linux-surface repository binaries (at least for the arch-repo).

Edit: I hope this is the right place to post this.

Kernel upgrade not possible in Fedora 38

I was looking into why my system fails to upgrade to Fedora 39 or 40, and it seems that it fails to upgrade the kernel.
sudo dnf --refresh upgrade fails with the error

Error:
 Problem: The operation would result in removing the following protected packages: kernel-surface

using the options --skip-broken or --nobest also doesn't solve this.

Updating Debian package does not remove /boot/initrd.img

When updating the Debian package (both 4.19-lts and 5.6), the file initrd.img-xxx from the old package stays behind. I just found 5 of those outdated files.

Is there a chance to include the removal in the Debian packages?

Use metapackages for Debian/Ubuntu

The linux-image-surface package should use a metapackage like how Debian/Ubuntu do for the official linux-image-generic.

Using a metapackage would let users update their systems without worrying that their system becomes unbootable. While a broken userland could be troubleshooted with init=/bin/bash, a broken kernel needs a working kernel to fix. The metapackage would allow multiple kernels, especially the previously working kernel, to be installed at the same time.

The metapackage would look like this: linux-image-surface would not contain any files but rather depend on linux-image-5.5.10-surface. linux-image-5.5.10-surface and linux-image-5.5.9-surface would contain the actual files and be installable side-by-side.

Build and publish `linux-tools-surface`

It would be nice if a linux-tools-surface package was built and published.

I am trying to profile one of my programs. On a standard kernel, I can apt install linux-tools-generic, but with this kernel, there is no linux-tools-surface. That prevents perf from working and me from profiling my program

Fedora 38 Packages

I wanted to update to Fedora 38 today, but I got this message:
image
And it seems like there arent any packages for fedora 38 for surface linux stuff in the repo here yet, when are those going to be added?

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.