https://wiki.archlinux.org/api.php?action=feedcontributions&user=Ad1217&feedformat=atomArchWiki - User contributions [en]2024-03-28T18:41:30ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Microsoft_Surface_Pro_3&diff=409017Microsoft Surface Pro 32015-11-12T15:45:31Z<p>Ad1217: fix name of Type Cover</p>
<hr />
<div>[[Category:Laptops]]<br />
{{Style|[[Help:Style#Language register]]}}<br />
This aims to document things to be taken into account when using Archlinux in a Microsoft Surface Pro 3 device. Can't guarantee the result in other devices.<br />
<br />
Using a microSD as the installation medium and leaving the USB port free for a keyboard is recommended, although you may also use a USB hub for this. As of 2015.05.01, the Type Cover 3 is working with the 4.0.1-1 kernel.<br />
<br />
== Backup recommended ==<br />
<br />
The warranty of the device is only valid if the OEM image of Windows is still present. A dual boot, however, will not invalidate the warranty as explained [http://answers.microsoft.com/en-us/surface/forum/surfpro-surfusingpro/would-dual-booting-the-surface-pro-void-its/da549e24-f986-4984-b081-25c029882163?auth=1 here].<br />
<br />
== Booting into the installer ==<br />
<br />
To boot from USB, you will need to instruct the table to boot from USB or SD Card. Also, you will need to disable [[UEFI#Secure_Boot|Secure Boot]] to boot into archlinux, or enroll the efi file into the Secure Boot hashes (latter prefered). Do either one or the other.<br />
<br />
There are three types of boots in the surface pro 3 [http://www.microsoft.com/surface/en-us/support/storage-files-and-folders/boot-surface-pro-from-usb-recovery-device explained here]:<br />
# Normal mode<br />
## Just leave the computer go. You can change it from "Alternate Boot order" in the UEFI Setup<br />
# Boot into the UEFI Setup<br />
## With the device powered off (or rebooting, but better play safe)<br />
## Press & hold Volume up<br />
## Press power button<br />
## Wait until the surface logo appears<br />
## Release Volume up<br />
## You will be presented with the UEFI Setup Menu<br />
# Boot into the USB/SD card<br />
## Power off the device<br />
## Press & hold Volume down<br />
## Press power button<br />
## Wait until the surface logo appears<br />
## Release Volume down<br />
<br />
=== Disable Secure Boot ===<br />
<br />
{{Note|This will cause a red background before the logo when booting.}}<br />
<br />
Boot into the UEFI setup, and select ''Secure Boot Control > Disable''. Now continue with the installation. See the [http://www.microsoft.com/surface/en-sg/support/warranty-service-and-recovery/how-to-use-the-bios-uefi Microsoft steps] for more information.<br />
<br />
=== Boot with Secure Boot ===<br />
<br />
See [[Unified Extensible Firmware Interface#Secure Boot]].<br />
<br />
== Installation ==<br />
<br />
{{Merge|UEFI#Secure Boot|This steps are on how to support Secure Boot for Arch Linux, need to try it in a regular computer.}}<br />
<br />
I have done the installation with systemd's bootctl [[Systemd-boot]] (old [[Gummiboot]]). After doing all the steps of installation within the [[Beginners' guide]], you should do two more things. Booting in Secure Boot won't work for the new installation, as the vmlinuz hasn't been registered within it's loader.<br />
<br />
The easiest way is to do all the setup is the following, just before rebooting:<br />
<br />
# Exit from the chroot but don't umount anything<br />
# Move /mnt/boot/EFI/boot/bootx64.efi to /mnt/boot/EFI/boot/loader.efi<br />
# Copy /boot/EFI/boot/bootx64.efi and HashTool.efi to /mnt/boot/EFI/boot/<br />
<br />
(If you are unable to find HashTool in /boot, try in /usr/run)<br />
<br />
Here, we have enabled Preloader to boot our gummiboot loader, and if it detects that something hasn't been signed, it will boot the HashTool.efi to sign the vmlinuz-image binary.<br />
<br />
The idea is, we take the systemd bootloader and make it the one that PreLoader will boot (the one in it's same folder, named loader.efi). Then, we copy both the PreLoader (which is the archiso's bootx64.efi) and the HashTool (already with that name).<br />
<br />
This way, with Secure Boot enabled, you will be able to boot your kernel whenever you wish to, signed or not, repeating the hash storing procedure on the next boot.<br />
<br />
== Extra steps ==<br />
<br />
Although in the latest kernel you have support for the touchpad, the screen, etc. It doesn't have support for stuff like the webcam, etc. A github repo to track the support of the Surface Pro 3 in Archlinux was created: [https://github.com/nuclearsandwich/surface3-archlinux], where you can check for the status.<br />
<br />
Other resource, listed in the github repo, is a surface pro 3 specific linux kernel package, with support for these devices. It is available in the AUR [https://aur.archlinux.org/packages/linux-surfacepro3]. You can check there the support for the different modules available, or take the patch from upstream.<br />
<br />
=== Compile Kernel with Patches ===<br />
Ref: [[Kernels/Compilation/Traditional#Build configuration]]<br />
<br />
{{Note|The most up-to-date source at the time of writing for the kernel patches is [https://github.com/shvr/fedora-surface-pro-3-kernel/ shvr's github repository].<br />
*Latest stable kernel release: [https://github.com/shvr/fedora-surface-pro-3-kernel/commits/f23 f23 branch]<br />
*Latest RC: [https://github.com/shvr/fedora-surface-pro-3-kernel/commits/master master branch]}}<br />
<br />
==== Surace Pro 3 Linux Kernel Hardware Patches ====<br />
*[https://github.com/shvr/fedora-surface-pro-3-kernel/blob/f23/surface-pro-3-Add-support-driver-for-Surface-Pro-3-b.patch Camera patch]<br />
*[https://github.com/shvr/fedora-surface-pro-3-kernel/blob/f23/Add-Microsoft-Surface-Pro-3-camera-support.patch Hardware Buttons patch]<br />
*[https://github.com/shvr/fedora-surface-pro-3-kernel/blob/f23/Add-multitouch-support-for-Microsoft-Type-Cover-3.patch Type Cover patch]<br />
<br />
{{Note|These patches can be automatically applied using {{ic|git-apply}} from the [[Git]] package.}}<br />
<br />
=== Enabling Touchpad ===<br />
Ref: [https://www.reddit.com/r/SurfaceLinux/comments/3lbgs4/ubuntu_gnome_1510/ Reddit]<br />
<br />
[[Install]] the {{Pkg|xf86-input-synaptics}} package, as well as add the following to the end of {{ic|/usr/share/X11/xorg.conf.d/10-evdev.conf}}:<br />
<br />
Section "InputClass"ยทยท<br />
Identifier "Surface Pro 3 cover"<br />
MatchIsPointer "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Driver "evdev"<br />
Option "vendor" "045e"<br />
Option "product" "07dc"<br />
Option "IgnoreAbsoluteAxes" "True"<br />
EndSection<br />
<br />
=== Booting with Secure Boot Enabled ===<br />
{{Merge|UEFI#Secure boot|Generic instructions}}<br />
The recommended bootloader for UEFI with Secure Boot enabled is [[systemd-boot]]<br />
<br />
To boot with Secure Boot, you will need the following packages: {{Pkg|efibootmgr}} {{Pkg|prebootloader}}<br />
<br />
Ref: [https://bbs.archlinux.org/viewtopic.php?pid=1570523#p1570523 Surface Pro 3 and Secure Boot post-install]<br />
<br />
Copy {{ic|/usr/lib/prebootloader/HashTool.efi}} and {{ic|/usr/lib/prebootloader/PreLoader.efi}} to {{ic|/boot/EFI/systemd/}}<br />
Create an NVRAM entry for PreLoader.efi:<br />
efibootmgr -d /dev/sd'''X''' -p '''Y''' -c -L Preloader -l /EFI/systemd/PreLoader.efi<br />
{{Note|'''Y''' is the partition number of the /boot partition.}}<br />
Verify the entry was made and that it is first in the boot order:<br />
efibootmgr<br />
Enrolling your kernel in the bootloader: [[Unified Extensible Firmware Interface#Secure Boot]]<br />
Enroll HashTool.efi and vmlinuz-linux, and then reboot to system.<br />
You should now be able to boot with Secure Boot enabled.<br />
{{Note|Since PreLoader.efi is the default boot option per {{Pkg|efibootmgr}}, if you change the kernel you will be presented with PreLoader to enroll the new kernel with HashTool again}}<br />
{{Note|Ensure that you add the entry in {{ic|/boot/loader/entries/}} so that you are presented the option to boot with the new kernel}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Invalid signature detected check secure boot policy in setup ===<br />
<br />
This happened to me after deleting the Secure Boot database and initializing it with Microsoft & CAs. I also had to do the recovery of the bitlocker partition, but I would follow these steps:<br />
<br />
# After the reset, switch off and try to boot from the sd/usb. If you don't succeed and get the message many times:<br />
## Leaving all TPM & SecureBoot enabled and SSD Only alternate system order<br />
## Do another database reset<br />
## Enroll the Microsoft and CAs again<br />
## reboot into sd/usb with volume down<br />
## It should work now<br />
# Follow steps in the Secure Boot installation<br />
# After the full installation of archlinux, when you have it working, do the BitLocker recovery<br />
<br />
If after doing these steps doesn't still work. Flash the archiso image once more and try again,<br />
<br />
=== Keyboard Cover not working ===<br />
<br />
I found that this happened sometimes when I rebooted. The solution was to shutdown and reboot.</div>Ad1217