5.9 KiB
creation date | tags | ||||
---|---|---|---|---|---|
2022-09-02 |
|
A guide for the Surface Pro 8. Based on https://github.com/linux-surface/linux-surface/wiki.
This guide is for ArchLinux and improves the instructions to be more structured and suited for the SP8.
Prerequisites
- USB adapter cable for USB A to USB C
- USB Drive, see KB/Linux/Desktop/Archinstall for getting an ISO onto USB
- External keyboard, because Type Cover will not work without custom kernel
Prepare
- If Windows is still on disk, boot into it and update everything, so Surface firmware gets updated
- Head into BIOS to change boot order and disable Secure Boot
- Shut down device
- Press and hold Volume up and in parallel hit power button once until boot logo appears
- Keep Volume up pressed
- Disable Secure Boot entirely
- Change boot order by drag'n'drop USB Drive to first position, maybe uncheck all other options
Install
Boot from USB drive and edit ISO live boot options to copy USB drive contents to RAM, because you need to plug in an external keyboard for installation
- Press e during selection of Arch ISO
- Add
copytoram=y
as option - Exit with CTRL+x
Proceed with install like you would usually do. KB/Linux/Desktop/Archinstall is an easy way with little configuration to get an install up and running.
This installation uses systemd-boot
as bootloader. Your experience of the tutorial may vary if you pick another one.
In generel, you should pick wayland. It has much better touch, gesture and pen support.
Post install
After you've successfully booted into your installation, some additional steps need to be performed to get your Type Cover and touchpad etc. working.
Disclaimer: Don't mix the iptsd
of the official repository with the iptsd
mentioned here, they're different and may soon get merged.
pacman repository
Let's add the the official pacman repository of linux-surface
curl -s https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc sudo pacman-key --add -
sudo pacman-key --finger 56C464BAAC421453
sudo pacman-key --lsign-key 56C464BAAC421453
Edit /etc/pacman.conf
:
[linux-surface]
Server = https://pkg.surfacelinux.com/arch/
Refresh by invoking sudo pacman -Syu
Install required packages
Install the following packages, some of them are also in the AUR.
# the actual kernel and their headers
linux-surface
linux-surface-headers
# SP 8 is an Intel device
intel-ucode
# needed for later compiling modules
dkms
meson
Make touchpad work and allow Type Cover during early boot (luks)
Touchpad will not work out of the box. The SP8 needs a different touchpad module and the proper iptsd
, not the one from the official linux-surface repository.
Ensure that dkms
and meson
are installed.
- Clone
git clone https://github.com/quo/ithc-linux
cd ithc-linux
- Execute
sudo make dkms-install
- Clone
git clone https://github.com/quo/iptsd
cd iptsd
- Execute the following commands in order
meson build --wrap-mode=forcefallback --buildtype=debugoptimized -Dmarch=native
ninja -C build
sudo build/src/daemon/iptsd
sudo ninja -C build install
sudo systemctl daemon-reload
sudo systemctl enable iptsd.service
- For _ ithc_ to load properly, you need to edit kernel parameters in your
entries/....conf
file and addintremap=nosid
. Add a.conf
for the SP8 if not already present. - You also need to edit the
MODULES
in your/etc/mkinitcpio.conf
so that type cover will also work during early encryption dialog
MODULES=(btrfs i915 surface_aggregator surface_aggregator_registry surface_aggregator_hub surface_hid_core 8250_dw surface_hid surface_kbd intel_lpss intel_lpss_pci pinctrl_tigerlake)
- Regenerate initramfs with
mkinitcpio -P
- Reboot, you should no longer need your external keyboard
pen
Install libwacom-surface
from the AUR.
screen rotation
Install iio-sensor-proxy
.
120hz display
Follow instructions here to extract the EDID. Ensure you're in X.org.
Afterwards, your entries/....conf
systemd-boot entry could look like
title Arch Linux (linux-surface)
linux /vmlinuz-linux-surface
initrd /intel-ucode.img
initrd /initramfs-linux-surface.img
options ... intremap=nosid drm_kms_helper.edid_firmware=eDP-1:edid/edid.bin
In addition, your /etc/mkinitcpio.conf
needs FILES=(/usr/lib/firmware/edid/edid.bin)
and ensure you re-generate initramfs with mkinitcpio -P
.
Fix Type Cover suspend
If suspended via Type Cover, Touch might not work. Prevent this by editing /etc/libinput/local-overrides.quirks
and add the following contents
[Microsoft Surface Cover]
MatchName=*Microsoft Surface *Cover*
MatchDMIModalias=dmi:*svnMicrosoftCorporation:*
AttrKeyboardIntegration=internal
ModelTabletModeNoSuspend=1
Reboot.
Recommended software
KB/Linux/GNOME has wonderful support for touch devices. You should probably use it.
Useful GNOME extensions
- improved gestures
gestureImprovements@gestures
(https://extensions.gnome.org/extension/4245/gesture-improvements/) - improved on screen keyboard
improved-osk
(https://extensions.gnome.org/extension/4413/improved-osk/)
List of extensions personally used:
[
"appindicatorsupport@rgcjonas.gmail.com",
"dash-to-dock@micxgx.gmail.com",
"gestureImprovements@gestures",
"improvedosk@nick-shmyrev.dev",
"launch-new-instance@gnome-shell-extensions.gcampax.github.com",
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
]
xournal
is a wonderful program for you pen.