Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
How-to: patch, compile and install a working kernel for the Surface Pro 3 #8
**NOTE: if you're using kernel 3.19 or higher, then you only need to apply the camera patch if you want the cameras working. DON'T apply the Type Cover 3 patch if you're on 3.19 or higher as the Type Cover 3 is supported out-of-the-box.
_First off: what's important here is that I've based it off of my experience on Antergos. Antergos uses sudo by default. Pure Arch doesn't use sudo by default so you have to change to the root user. That means that the commands I'm giving in this how-to need to be copy and pasted w/o the sudo part if you're not on Antergos or haven't set up sudo on pure Arch. Also, this howto is as generic as possible so that you can use it for the foreseeable future._
1 Downloading the kernel
2 Patching it up
Still in the kernel source folder, open up the following file to add in support for the Surface Pro 3 cameras (rear and front):
Somewhere in between the listed products, for example at line 2342, add the following:
Save the file.
Now open up a terminal window and change to the kernel source directory using the cd command.
Now apply the Type Cover 3 patch using the following command:
(on the 3.18 kernel, you might get a small error after doing that, you can ignore that)
3 The actual compiling
Now issue the following command to copy over the current kernel config to the one you're about to compile:
If you're not an advanced user like me, just leave everything as it is and save the file using the corresponding button, then use the exit button to exit out of this.
Now that we've done this, the actual compiling can begin. This can take up to an hour so be patient. Issue the command for this:
Now that that's done, let's install the modules:
When that's done, do:
Now, everything should be in place. Check this by issuing:
Note the name of the kernel there. The name of the kernel is the name minus the vmlinuz part. So for example, if you've compiled the 3.18 rc5 kernel, you'll see vmlinuz-3.18.0-rc5-ARCH - _3.18.0-rc5-ARCH_ is the name of the kernel then.
4 Generating the RAM Disk image file
Don't question what it is, just do the following ;-)
In both places in the command, replace fullkernelname with the name you just noted from the /boot folder.
5 Finishing it up
followed by the last command (to inform GRUB of the changes - if you use LILO as your bootloader (at least Antergos uses GRUB by default), you don't have to issue this command):
Now reboot and you should be able to choose the kernel in your bootloader. It might take a couple of reboots after compiling before the Type Cover 3 starts working. I don't know why that is, seems like something kernel-related is a bit finicky.
In case the trackpad isn't working (correctly) after rebooting into the patched kernel, add the following to /etc/X11/xorg.conf: