First you need to import the keys we use to sign packages.
wget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc \
| gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/linux-surface.gpg
After this you can add the repository configuration and update APT.
echo "deb [arch=amd64] https://pkg.surfacelinux.com/debian release main" \
| sudo tee /etc/apt/sources.list.d/linux-surface.list
sudo apt update
If you encounter any issues reading "Error 401 Unauthorized" during
the update or the installation below, please have a look at this.
Now you can install the linux-surface kernel and its dependencies.
sudo apt install linux-image-surface linux-headers-surface libwacom-surface iptsd
Important: Support for iptsd only goes back to the latest LTS release
at the time of writing (Debian 11 and Ubuntu 22.04). If you are using
an older release, and the above command fails, then please remove
iptsd
from it. You will still be able to use basic singletouch through
the kernel driver, but multitouch and the stylus will not work.
After that you can install our secureboot key. This will import the
key that the linux-surface kernel is signed with into your bootloader,
so that the kernel is bootable without disabling secureboot.
sudo apt install linux-surface-secureboot-mok
This package will print instructions to the terminal. In case you
missed those: It will ask you to reboot. Then, upon reboot, a blue
menu should pop up, asking you whether you want to enroll the key.
Confirm with ok
/yes
and when asked for a password enter surface
. In
case you missed the menu or accidentally chose the wrong options, you
can uninstall (fully) and then reinstall the package and reboot to
trigger the menu again.
Note that this will only work if your Debian derivative supports
secure boot out-of-the-box. If if not, please consult the wiki of your
distribution and set up secure boot for distro/stock kernels first.
You also want to skip installing the package for now and only install
it after you have set this up.
The linux-surface kernel will be installed alongside the default
kernel provided by the distribution. This way you have a backup kernel
you can use if something goes wrong. The bootloader will pick up the
kernel by default, but you should update its configuration to make
sure it was recognized.
sudo update-grub
Finally, reboot your system and you should boot into the linux-surface
kernel. Please make sure you are actually using the right kernel by
checking if the output of uname -a
contains the string surface
. If it
doesn't contain that string, you are still using the default kernel
and need to configure your bootloader.