Install linux on surface

1) Shrink the windows partition.

Go to Control Panel -> System and Security -> Administrative Tools -> Computer Management -> Storage -> Disk Management. Then right click on the windows partition and go shrink volume as much as you’d like (a minimum of 50 GB is recommended).

2) Make a bootable Ubuntu usb drive.

3) Have a USB-hub ready (refer to the «State of Surface-Series Devices» thread linked above to see if your keyboard will work OOB).

If it is reported to not work OOB, plug in an external keyboard/mouse as necessary, but be sure to leave a USB port open.

4) Boot from USB.

Turn the Surface off and then hold the volume up button while powering on to boot to USB.

5) Install Ubuntu.

You should be able to boot off the Ubuntu usb stick now. I chose all the default options and installed alongside Windows 10. Reboot and enjoy Ubuntu.

6) Install a patched kernel (optional: some devices, really the SP3 and older really don’t need the added functions anymore because they’ve been mainlined).

You should now be able to boot to a working Ubuntu. If you choose to install a patched kernel (see the «State of Surface-Series Devices» to see if your device needs one to enable functionality), please see the below:

Читайте также:  Fork and exec in linux

6a) Compile your own kernel from source.

This is recommended if you have the time/are willing to learn. Most of the modifications/patches you will need can be found detailed in these three Github pages. I will be compiling a guide to build/install your own in the coming weeks when I have free time.

  • https://github.com/jimdigriz/debian-mssp4
  • https://github.com/ipts-linux-org/ipts-linux-new/wiki
  • https://github.com/tiggerite/mint-17.3-for-surface-pro-3

6b) Install u/npjohnson1’s kernel. — 4.6.y

This kernel gets the touchscreen working, and the physical buttons. It targets the Surface Book, but works well on SP4 and all other devices.

This kernel uses the old (and currently more reliable IPTS driver, hence it is stuck at Linux 4.6.y before the massive Intel-DRM overhaul in Linux 4.8+). Details on the new IPTS driver (4.10) is linked below.

To install the kernel check this thread and download the newest version of the linux-image and linux-headers. Now open a terminal cd to the location of the files and install them by going

6c) Install u/cantenna1’s kernel. — 4.4.y

This kernel gets the touchscreen working, but the physical buttons will not work and the i915 GuC version used is a little buggy and caused me some issues with external monitors.

Futher details on this kernel can be found in this post https://www.reddit.com/r/SurfaceLinux/comments/4vbzki/androidx86_with_the_new_ipts_driver/d5xs969 and in the comments by u/cantenna1 and u/arda_coskunses in this post. Details on the patch for the touch support can be found at https://github.com/ipts-linux-org/ipts-linux/wiki . The patch for wifi is from https://github.com/matthewwardrop/linux-surfacepro3/blob/master/wifi.patch and the patch for the cover is from https://github.com/jimdigriz/debian-mssp4/blob/master/patches/0001_typing-cover.patch .

To install the kernel download this file https://mega.nz/#!nJJ2DSJZ!4BYSRvzp3hb6NxU5X6_38xFkpuUEmSNvRo2px2TCDqc and extract its contents. Now open a terminal cd to the location of the files and install them by going

  • sudo dpkg -i ‘./linux-headers-4.4.0-rc8touchkernel+_1_amd64.deb’
  • sudo dpkg -i ‘./linux-image-4.4.0-rc8touchkernel+_1_amd64.deb’

6d) Install u/fridgecow’s kernel. — 4.8.y

This was made using this guide https://github.com/jimdigriz/debian-mssp4 and the ipts-linux-new kernel https://github.com/ipts-linux-org/ipts-linux-new/wiki for the touchscreen support. Note: When using an external monitor I have experienced infrequent cases of the display freezing.

To install the kernel download the files found here https://drive.google.com/drive/folders/0Bw1woTKAWzFAb0hkaUtDUVVoQVU . Now open a terminal cd to the location of the files and install them by going

  • sudo dpkg -i ‘./linux-headers-4.9.0-rc8-mssp4+_4.9.0-rc8-mssp4+-10.00.Custom_amd64.deb’
  • sudo dpkg -i ‘./linux-image-4.9.0-rc8-mssp4+_4.9.0-rc8-mssp4+-10.00.Custom_amd64.deb’
Читайте также:  Добавить репозитории альт линукс

6e) Install tigerites kernel — 4.4.y based.

https://launchpad.net/~tigerite/+archive/ubuntu/kernel . This was mainly setup for the surface 3, but still works on the surface 4. This kernel is the easiest to install, but does not make the touchscreen work and may have some wifi issues.

To install this kernel open up a terminal and type:

  • sudo add-apt-repository ppa:tigerite/kernel
  • sudo apt-get update
  • sudo apt-get install linux-surface

Now reboot and everything should work except for the pen and touchscreen.

6f) Install SuperKernelTouch+ kernel. — 4.9.y

This was made using this guide https://github.com/jimdigriz/debian-mssp4 and the ipts-linux-new kernel https://github.com/ipts-linux-org/ipts-linux-new/wiki for the touchscreen support.

To install the kernel download the files found here: mega.nz/#!KQ4CmQCR!vYcyTWD-KWDuYhnZ6cFsw6eq1XSnXvjgR-S64MQKsDU Now open a terminal cd to the location of the files and install them by going

  • sudo dpkg -i linux-headers-4.9.3-superkerneltouch+_1_amd64.deb
  • sudo dpkg -i linux-image-4.9.3-superkerneltouch+_1_amd64.deb

Note: To enable touch on this kernel (because touch being enabled on boot was reported to be semi-buggy), you’ll need to manually enable it via the sysfs node:

7) If you’re on an IPTS device (SP4/SB and newer), copy binary files needed by the IPTS driver.

To work, the IPTS driver needs some information stored in binaries on your windows partition. You now need to copy them over to the Ubuntu partition and ensure the drivers can find them. Where these files go depends on which kernel you chose (if you chose Tigerite’s kernel, you can skip this step, as it doesn’t support IPTS).

Note: If you cannot find the files or have deleted your windows partition you can download them here https://www.microsoft.com/en-us/download/details.aspx?id=49498 . Select the zip download option and once downloaded you will find the files in the Drivers/System/SurfaceTouchServicingML folder.

7a) u/cantenna1’s kernel & SuperKernelTouch+ & u/npjohnson1’s kernel:

To do this first ensure your windows partition is mounted (the easiest way to do this is just to open it in the files browser). Now create a folder named ‘itouch’ in your root directory and copy the binaries to it

  • sudo mkdir /itouch
  • cp /media/YOUR_USERNAME_HERE/Windows/Windows/INF/PreciseTouch/Intel/* /itouch

You now need to create links to the files giving them names that match what the driver will search for

  • sudo ln -sf /itouch/SurfaceTouchServicingKernelSKLMSHW0078.bin /itouch/vendor_kernel_skl.bin
  • sudo ln -sf /itouch/SurfaceTouchServicingSFTConfigMSHW0078.bin /itouch/integ_sft_cfg_skl.bin
  • sudo ln -sf /itouch/SurfaceTouchServicingDescriptorMSHW0078.bin /itouch/vendor_descriptor.bin
  • sudo ln -sf /itouch/iaPreciseTouchDescriptor.bin /itouch/integ_descriptor.bin
Читайте также:  Vino server настройка astra linux

7b) u/fridgecow’s kernel:

To do this first ensure your windows partition is mounted (the easiest way to do this is just to open it in the files browser). Now create a folder named ‘/lib/firmware/intel/ipts’ and copy the binaries to it

  • sudo mkdir -p /lib/firmware/intel/ipts/
  • cp /media/YOUR_USERNAME_HERE/Windows/Windows/INF/PreciseTouch/Intel/* /lib/firmware/intel/ipts/

You now need to create links to the files giving them names that match what the driver will search for

  • sudo ln -sf /lib/firmware/intel/ipts/SurfaceTouchServicingKernelSKLMSHW0078.bin /lib/firmware/intel/ipts/vendor_kernel_skl.bin
  • sudo ln -sf /lib/firmware/intel/ipts/SurfaceTouchServicingSFTConfigMSHW0078.bin /lib/firmware/intel/ipts/integ_sft_cfg_skl.bin
  • sudo ln -sf /lib/firmware/intel/ipts/SurfaceTouchServicingDescriptorMSHW0078.bin /lib/firmware/intel/ipts/vendor_descriptor.bin
  • sudo ln -sf /lib/firmware/intel/ipts/iaPreciseTouchDescriptor.bin /lib/firmware/intel/ipts/integ_descriptor.bin

This kernel also needs a 5th binary file to be downloaded and placed in this folder (though some people have reported that touch works without it). Download it by typing:

  • sudo wget -O /lib/firmware/intel/ipts/ipts_fw_config.bin https://github.com/ipts-linux-org/ipts-linux-new/raw/master/firmware/intel/ipts/ipts_fw_config.bin

finally this kernel may also require you to update your graphics from here https://01.org/linuxgraphics/intel-linux-graphics-firmwares . Download Skylake GuC 6.1 and DMC 1.26, extract and run the install script. (u/fridgecow just copied the binaries to the appropriate place, but I found that GuC had an error at startup if I did this). I did this by running the following:

  • cd ~/Downloads
  • wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/sklgucver61.tar_6.bz2
  • tar xf sklgucver61.tar_6.bz2
  • sudo ./skl_guc_ver6_1/install.sh —install
  • wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/skldmcver126.tar_1.bz2
  • tar xf skldmcver126.tar_1.bz2
  • sudo ./skl_dmc_ver1_26/install.sh —install

8) Change the kernel that boots by default.

Everything is now installed, however there is a good chance that your laptop won’t boot the right kernel by default. You can select it manually in grub at boot by going Advanced options for Ubuntu -> Ubuntu, with Linux 4.4.0-rc8touchkernel+. To switch out the default you will need to edit grub (I did this with grub-customizer http://www.howtogeek.com/howto/43471/how-to-configure-the-linux-grub2-boot-menu-the-easy-way/ followed by sudo update-grub)

9) (Optional)

9)a) Swap Suspend (S3 — Sleep) for hibernation (see the «State of Surface-Series Devices» thread above for reasoning):

    1. sudo rm -Rf /etc/systemd/system/suspend.target && sudo ln -sf /usr/lib/systemd/system/hibernate.target /etc/systemd/system/suspend.target
  • 2) sudo rm -Rf /etc/systemd/system/systemd-suspend.service && ln -sf /usr/lib/systemd/system/systemd-hibernate.service /etc/systemd/system/systemd-suspend.service

This will replace suspend with hibernate system wide and will prevent any program from suspending as the units the system uses to suspend will call hibernate instead. If you just want to disable sleep without substituting hibernate, just mask suspend.target and systemd-suspend.service instead.

9)b) Disable Lid-Wake if you find lid-events to cause sleep issues.

Источник

Оцените статью
Adblock
detector