Dual boot Gnome Ubuntu 15.04 on a Surface Pro 3

update 6: I have rolled a new kernel surface-pro-3-linux-kernel-4.2.0-34.40

Good news everyone! the latest version of Ubuntu 15.04 works really good with the Surface Pro 3

Things that immediately work

The TypeCover Keyboard
The TypeCover backlight can be adjusted by pressing F1 and F2
The mute button in the TypeCover F3 works
The WiFi is stable now
The Touch Screen works – with gnome you have similar gestures as windows 8 like pulling from the left , etc.
No need to disable the secure boot

Things that don’t work

The touch pad needs some minor set up
The battery is not recognized
Volume buttons don’t work
buttons in the pen still not working

What you need

A USB Flash drive with at leas 2Gigs of space
A copy of ubuntu 15.04 I used Gnome Ubuntu you can get it here http://ubuntugnome.org/download/
Universal USB Installer http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

Before the install

First we need to disable hibernation, for that open a command prompt window as administrator and run

powercfg -hibernate off

Next we need to make room for ubuntu by:

  1. Open the Disk Management utility 
  2. Find Windows C: and Right-click and select Shrink Volume 
  3. In the next dialog window shrink the partition by at least 20 GB. If you have the larger SSD then give it more space

Create a bootable USB Driver by following these instructions


Installing Ubuntu

The set up is quite simple

Boot to the USB Drive

  1. Swipe from the right to display the charms bar
  2. Press Settings
  3. At the bottom press Change PC settings
  4. Go to Update and recovery
  5. Go to Recovery
  6. Click Restart now
  7. A blue screen will display some boot options, choose “Use a device”

Installing Ubuntu

remember that the touch pad doesn’t work but the touch screen does. Use the touch screen to click on the screen.

  1. You should be greeted by the grub menu
  2. Select “Install Ubuntu alongside windows boot manager” and click install
  3. the installer will automatically detect the space you created and automatically create the main and swap partitions
  4. click continue
  5. follow the installer instructions and you are done!

Installing the touchpad

  1. in ubuntu open the terminal
  2. edit the following file with sudo privileges for example
    sudo nano /usr/share/X11/xorg.conf.d/10-evdev.conf
  3. Add this to the end of the file
    Section "InputClass"  
            Identifier "Surface Pro 3 cover"
            MatchIsPointer "on"
            MatchDevicePath "/dev/input/event*"
            Driver "evdev"
            Option "vendor" "045e"
            Option "product" "07dc"
            Option "IgnoreAbsoluteAxes" "True"
  4. Restart

You should be now greeted by the grub menu with ubuntu and windows entries


Annoying things

  • Some times the computer hangs on the “Surface” screen. Just doing a  Ctrl+Alt+Del will make things work again
  • When booting on ubuntu after using windows will cause the touchpad to stop working. just restart one more time and it should work again


update: I took these setting from running_ubuntu_1404_on_surface_pro_1_full_time

Adding Proper Power Management through TLP. It will default to battery setting when no power source is identified. This is useful since the battery is not properly detected

  • sudo add-apt-repository ppa:linrunner/tlp
  • sudo apt-get update
  • sudo apt-get install tlp tlp-rdw
  • sudo apt-get install ethtool
  • open /etc/default/tlp and change the following:
    • CPU_SCALING_GOVERNOR_ON_AC=performance
  • sudo tlp start
  • you can monitor power consumption using powertop

update 2: for those brave enough to try it, you can build your own kernel and patch it to add support for hardware buttons and track pad multi touch, battery display and sleep
Just follow the instructions here https://github.com/neoreeps/surface-pro-3

update 3: I built a custom kernel for the surface and it works fantastic. I could not be happier. I followed the instruction here but used the patches from here. I got everything working except for the trackpad multitouch.  All hardware buttons work. Sleep works. battery indicator works. both cameras work. it is fantastic.

update 4: I have written a post explaining how to build and install your own kernel
Building and installing a patched ubuntu kernel for the surface pro 3

update 5: I have uploaded a kernel with all the patches already applied surface-pro-3-linux-kernel-3.19.0-27.29

update 6: I have rolled a new kernel surface-pro-3-linux-kernel-4.2.0-34.40


  1. Is the sleep function working for you? I’ve read quite a lot that in the beta version of 15.04 sleep was not working properly. Also, did you try the buttons of the pen?



    1. Hi Einari
      Unfortunately sleep still doesn’t work
      Also realized the battery indicator doesn’t work either
      I haven’t tried the button on the pen. I will update the post as I find out.

      It is still not perfect but it is a lot better than 14.04


        1. I just updated the post with more info on power management. I am researching how to enable hardware buttons by adding some patches to the kernel. I hope to have that done and tested this week


  2. With the new kernel, can you provide a list of instructions for a noob what does one need to do for a fresh install of Ubuntu 15.04 on Surface Pro 3?


    1. I followed the instructions in the link in update 3. They are easy to follow


      1. Hi,
        I am also finding the instructions to be quite difficult to follow. I have successfully installed Ubuntu 15.04 (64bit). Then I tried to understand the instructions from Update 3 (which also leads to Update 2). From update 2’s instructions I managed to get the kernel to my home directory, but I got stuck at the applying the patches.

        I downloaded the patches to home directory (later also to / directory). Then I went to that directory and used this command:

        patch -p1 –ignore-whitespace -i battery.patch

        but I get this error:

        can’t find file to patch at input line 5
        Perhaps you used the wrong -p or –strip option?
        The text leading up to this was:
        |diff –git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
        |index a362f20..220d640 100644
        |— a/drivers/acpi/ec.c
        |+++ b/drivers/acpi/ec.c
        File to patch:

        I wasted a whole day trying to figure it out, but I have failed. At the end I tried to make the touchpad work. I copied the lines to 10-evdev.conf using nano editor, but after rebooting, the surface could not start in GUI. So I removed those lines and Ubuntu starts normally again.

        I would be grateful if you could post the step by step commands for the whole thing. Thank you


        1. Check back in a couple of days. I will make a new post for just creating and installing the kernel


          1. Please write an easy article on how to create and install the custom kernel,
            you will really be my hero if you do it! :)))

          2. Alright, check update 4

  3. Did anyone try using it with multiple monitors yet?
    My problem is that the pen cursor location is no longer reliable. When I move the pen to the edge of my primary screen, the cursor is shown at the edge of the second screen.


    1. I haven’t done it. I haven’t had a need for it but I recall someone having that problem somewhere. I think the solution was to reduce the resolution on the surface screen. I am not sure, I will try to find the thread


  4. How about the “Annoying things” now?Has it been fixed?


    1. With the custom kernel the only annoying thing is that after sleep, the touch screen stops working. You have to log out to get it working again


      1. I see. I haven’t installed the kernel because the package is so big and the terrible download speed will drive me mad. Each time when I restart from ubuntu,my sp3 will hang on the “Surface” logo and I have to press the key combination Ctrl+Alt+Del. I’m afraid it does harm to my sp3, maybe more severe than the touch screen stop working. Thanks for your reply and your blog! They help me a lot.


        1. Any chance you want to post that custom kernel on github or dropbox? It would be great if we didn’t have to all go through the trouble of building the custom kernel.


          1. I will try to build a new one with a more recent kernel release. I will post the link soon

  5. I don’t know if it would be helpful to anyone but I have been working exhaustively to make a script to carry out all of these commands and do it for other Ubuntu kernels not just the 15.04’s 3.19.x. version. I have been successful in creating the 4.16 stable from kernel.org with all the Ubuntu patches plus the Surface pro 3 patches aligning it with what you would download with Ubuntu directly. If someone wants to host it I can provide the 4.1.6 kernel that has everything working including the multi-touch patch which is amazing. Once I finish the script I’d be happy to post it as well though I’m not sure if I will finish it and be able to test it properly before school starts for me next week.


    1. I’d love the script/instructions to build. I can publish it to S3 or even better, try to create a PPA.


    2. Hi could you send me .deb files for your current 15.04 ubuntu kernel, Mine has an error because i couldn’t install a package because my kernel wasn’t correct. or should I compile my own kernel, i just don’t have much downloads because I use mobile phone downloads.


  6. On initial boot up of the live disk and after installing with the updates option checked, my keyboard is still not recognized, will a sudo apt-get upgrade do the trick you think or is my question missing some info?


  7. I am going to have to work on the script again. Now that the linux kernel has moved into the 4.3 stage I have to update it. The problem I have is that the drivers have to be updated to work with each kernel version. I most likely will have to create separate scripts for each stable version though now that school is in session I am going to have very limited time to handle this task.


  8. As far as the type cover is concerned it is likely that you are still on an early kernel and an Apt-get update will likely update you to one that supports it. If you install the kernel posted in the OP you will gain access to the type cover among other features.


  9. I decided to try to make some edits to the script (I needed an excuse to procrastinate for my homework) I am attaching a link to the script out of my dropbox. This file needs to be edited before use and I HIGHLY recommend that you have a fair amount of experience with the terminal before attempting to make edits. This file will provide a compile of the 4.2 and 4.3RC kernels with Ubuntu additions. I have not tested the 4.2 or 4.3 kernels since 4.2 became stable and 4.3 became the daily yet due to a lack of time and recommend only the 4.2 at this moment as it should compile correctly. I will make some adjustments to the script as I have time to make sure that it provides a stable kernel however if anyone else wants to either create a ppa and/or a .deb that would allow this to autocompile for ubuntu much like they have for fedora I think a lot of people would be thrilled. One other disclaimer, this script pulls files from the work done for fedora in the copr repositories and surface driver credit goes to them. Another item to note is that they may from time to time update their file names and/or locations which may break the script. Now that all of that is out of the way here is the link https://www.dropbox.com/s/ajfozr5g0lbjcel/ubuntu-kernel-compiler-v10rc6.sh?dl=0 This file can be run from terminal however you MUST change permissions once it is downloaded to add execution on your computer. I take no responsibility for any damage your use of this script may cause and recommend backing up any important data prior to this files use.


  10. Bare with me please, I’m a beginner. I just installed Ubuntu (unity) on my SP3 and would like to apply the patches. If I now install the custom kernel you describe in update 5, will that overwrite my existing ubuntu installation? Right now when I boot my pc I see 2 options on grub: Ubuntu and Windows. If I install the kernel, will I see another third option for it? Also, I only partitioned 25 GB for my Ubuntu installation. Will installing the kernel take even more space? Thanks!


  11. To answer your question UbuntuUser35. No applying the patches above will not overwrite your existing installation of Ubuntu. This process will update your grub entries automatically with the new kernel and move your old kernel to the advanced option in your grub bootloader. 25gb should be enough storage depending on what you are planning on installing on Linux and the patched kernel should only result in 100-300mb of extra space used after installation. Also if you are using Ubuntu version 15.04 only use the patches provided by the original post in update 5. The link I provided to a script is not functioning correctly and I need to update the file before use and I only recommend someone with a lot of terminal experience to use it. I will try to post an updated version later today that will make the process easier though that process needs 11gb to complete though after completion you can delete the extra data keeping only the 300mb updated kernel. Hopefully this helps you. On a final note you may want to consider using the beta 2 of Ubuntu 15.10 as it includes many of the patches save for the trackpad and volume buttons though power and other functions now work.


  12. Update script attached to link here: https://www.dropbox.com/s/zl8q2w4lwdewbzt/ubuntu-kernel-compiler-v11.sh?dl=0

    You must change permissions allowing the script to be run as an application. This can be done by changing to the directory the script is saved to and then chmod ax “path to file” without the parenthesis or right clicking on the file then click on permissions and add the application permissions

    Lastly due to compatibility with the current drivers this file will no longer create kernels below 4.2. If you are fluent with kernel patching the commands are commented in the script to give you an idea on how to make it yourself though at this point 4.2 or higher is better for a stable system. 4.2 should work well on 15.04 though is best on 15.10 and 4.3 is in release candidate status as of this writing so be aware bugs could exist where 4.2 is in stable release. The script is fairly depending on other references files and can be broken by removal of the patches and a new kernel being added to mainline though I attempted to account for this issue though will attempt to update when I can if it does become broken..


  13. I am going to try this process on a surface book…I see no reason why it shouldn’t work (except for sp3 kernel and patches…)


  14. Total newbie here. I tried the update 5. Everything worked smoothly till the last part. When I try to install the kernel, I get error messages, this is the entire log:

    marioc3@marioc3-Surface-Pro-3:~/surface-pro-3-linux-kernel-3.19.0-27.29$ sudo dpkg -i linux-headers* linux-image*
    (Reading database … 236980 files and directories currently installed.)
    Preparing to unpack linux-headers-3.19.0-27-generic_3.19.0-27.31_amd64.deb …
    Unpacking linux-headers-3.19.0-27-generic (3.19.0-27.31) over (3.19.0-27.31) …
    Preparing to unpack linux-image-3.19.0-27-generic_3.19.0-27.31_amd64.deb …
    Examining /etc/kernel/preinst.d/
    run-parts: executing /etc/kernel/preinst.d/intel-microcode 3.19.0-27-generic /boot/vmlinuz-3.19.0-27-generic
    Unpacking linux-image-3.19.0-27-generic (3.19.0-27.31) over (3.19.0-27.31) …
    Examining /etc/kernel/postrm.d .
    run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.19.0-27-generic /boot/vmlinuz-3.19.0-27-generic
    run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.19.0-27-generic /boot/vmlinuz-3.19.0-27-generic
    Preparing to unpack linux-image-extra-3.19.0-27-generic_3.19.0-27.31_amd64.deb …
    Unpacking linux-image-extra-3.19.0-27-generic (3.19.0-27.31) over (3.19.0-27.31) …
    dpkg: dependency problems prevent configuration of linux-headers-3.19.0-27-generic:
    linux-headers-3.19.0-27-generic depends on linux-headers-3.19.0-27; however:
    Package linux-headers-3.19.0-27 is not installed.

    dpkg: error processing package linux-headers-3.19.0-27-generic (–install):
    dependency problems – leaving unconfigured
    dpkg: dependency problems prevent configuration of linux-image-3.19.0-27-generic:
    linux-image-3.19.0-27-generic depends on module-init-tools (>= 3.3-pre11-4ubuntu3); however:
    Package module-init-tools is not installed.

    dpkg: error processing package linux-image-3.19.0-27-generic (–install):
    dependency problems – leaving unconfigured
    dpkg: dependency problems prevent configuration of linux-image-extra-3.19.0-27-generic:
    linux-image-extra-3.19.0-27-generic depends on linux-image-3.19.0-27-generic; however:
    Package linux-image-3.19.0-27-generic is not configured yet.

    dpkg: error processing package linux-image-extra-3.19.0-27-generic (–install):
    dependency problems – leaving unconfigured
    Errors were encountered while processing:

    Any ideas, on how may I fix it?


    1. Package module-init-tools is not installed. Install that first. Some errors might show but most time it finishes fine.


  15. Hi,will this work for surface pro 1?



    1. No, this is specific to the SP3


  16. Thank you. The input definition works great with kubuntu 16.04 on an i5 SP3. Volume, wifi and touch is working well with touchegg via touchegg-gce. We’re on our way 🙂


    1. Every ubuntu iteration we get a little bit more working 🙂


  17. I can’t get the type cover working at all, but I am using a surface pro 3, with a 4 type cover. any chance that might be supported in the near future?


    1. you should at least have keyboard support. the part that is usually missing is the touchpad


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.