I’ve had the 2017 Surface Pro for a number of years now and I’ve always been pretty happy with its ability to run Ubuntu/Linux.

However, this does not mean everything works right after a fresh install. When you first install Ubuntu there are a number of issues, including:

Battery stats are unavailable

Sleep mode is broken

Wifi is flaky

Screen rotation doesn’t always sync with touch input orientation

On-screen keyboard doesn’t always render the keys

I’ve managed to fix most of the above problems. Hopefully some of what I have found can be useful to others.

If anybody has a fix for the on-screen keyboard sometimes not showing the keys I’d love to hear it!

Ubuntu 19.10 running on the 2017 Surface Pro

Install qzed’s kernel

The most important step in making your Surface work better with Ubuntu is to install a kernel that is intended to be used with a Surface. Being a such a unique device the default kernel doesn’t fully support all of the Surface’s hardware. Changing your kernel to a more Surface friendly version will get you battery stats, a semi-working hibernation mode, better wifi stability, and touch input.

The most popular kernel is jakeday’s, but I found when I upgraded to Ubuntu 19.10 that his 5.1 kernel wasn’t as up to date as the 5.3 kernel that 19.10 expects to be able to use. The project also hasn’t been updated since June so I am not sure whether Jakeday is still actively maintaining the kernel or not. While I am sure it is possible to use a 5.1 kernel in 19.10 I decided to look for an alternative.

qzed’s kernel is a fork of jakeday’s and has been updated to use the 5.3 kernel. I’ve had great success with this kernel and strongly suggest that if you’re using a Surface Pro with Linux to give it a try.

Increase wifi’s stability by disabling ASPM

Even with a new kernel I was still having troubles with wifi stability. Every half an hour or so my wifi driver would fail and I would be unable to bring it back up without restarting my machine.

Turns out that I needed to disable the Marvell wireless ASPM in order to make my wifi adapter work consistently. Since qzed’s kernel is frequently updated this change may no longer be necessary, but when I was setting up my machine I found it fixed all of my wifi stability woes.

tbombadil’s post on a github issue of Jakeday’s kernel hleped to fix this for me. It involves making a systemd file and making your machine run it on startup.

Create a file at /etc/systemd/system/disable-mrvl-wireless-aspm.service with these contents:

[Unit] Description=Disable Marvell Wireless ASPM (pci device: 01:00) [Service] ExecStart=setpci -s 01:00 0x80.B=0x0:3 [Install] WantedBy=multi-user.target Alias=disable-mrvl-wireless-aspm

Once you’re done the above, run the following commands in your terminal to enable the service file and have it run on startup: