~tim/ubuntu_on_surface_go

ref: cbbc62673e8213fec56598e0d4d20fa12d19bf9e ubuntu_on_surface_go/README.md -rw-r--r-- 3.6 KiB
cbbc6267Tim Morgan Formatting 1 year, 11 months ago

#Ubuntu Linux on the Surface Go Tablet

These are just my notes and settings for getting everything running nice on the Surface Go tablet.

As of this writing, I was using Ubuntu 18.10.

#Installation

Generally, you need to:

  1. Disable Secure Boot
  2. Boot from USB live media
  3. Choose to manually partition and create a swap partition at least the size of your ram. In my case, I made it 10 GiB because I have 8 GiB of ram. (I wasn't quite sure on the GiB/GB units, so I just rounded up to 10.)
  4. Install Ubuntu as usual.

Notes:

  • Since I totally wiped Windows from the tablet, I didn't have to deal with dual booting issues.
  • I chose not to enable LLVM, as it makes hibernation more difficult. The tablet needs hibernation for decent battery life when you throw it in your backpack.

#Display and Font Scaling

Once booted up for the first time, everything in the UI is huge and difficult to use. Open up the "Displays" config panel and change the scaling to 100%.

Once that is done, fonts are a bit hard to read. To increase font sizes, you can go to "Universal Access" and enable "Large Text."

Alternatively, you can run the following to set a specific font scaling factor:

gsettings set org.gnome.desktop.interface text-scaling-factor 1.4

#Fixing Wifi

This worked for me on the Surface Go 128gb and Ubuntu Linux 18.10. File paths will vary from version to version, so you may need to make some tweaks.

Run fix_wifi.sh and reboot.

If it doesn't work or you get errors running the script, open the fix_wifi.sh script and type the commands manually. Sometimes file paths change slightly and you can TAB your way through it.

After running updates on the system, the wifi firmware might get replaced, breaking your wifi. Just run the script again to fix it.

#Automatic Screen Brightness

I noticed that in certain light conditions, the display on my tablet would shift brightness lighter/darker and it was distracting. Disabling "Auto Brightness" in the "Power" config panel fixed this. I'll just control the brightness manually.

#Enable Hibernation

For the Surface tablet, Microsoft designed a special low power mode that is not compatible with standard "suspend" supported by Linux. As a result, when you close the tablet cover, the screen is disabled, but everything is still running. Batter life in this state is measured in hours -- not days.

As a workaround, you should enable hibernation and set the tablet to automatically hibernate after a reasonable period of inactivity.

  1. Run cat /etc/fstab and note the UUID of your swap partition.
  2. sudo vim /etc/default/grub and find the setting GRUB_CMDLINE_LINUX_DEFAULT.
  3. Inside the quotes of this setting, after any existing settings, put a space, then UUID=, followed by the UUID of your swap partition.
  4. Save the file and run sudo update-grub.

Test that hibernation works by running sudo systemctl hibernate. Wait a minute, then power on your tablet again and ensure that your previously open windows are restored.

#Automatically Hibernate When Idle

The system should enter a sort of "suspend" state (scare quotes because it's not really actually suspend) which saves some battery, but I wanted the system to hibernate after a longer period of inactivity. Below steps accomplish that:

  1. Add the following line to /lib/systemd/system/suspend.target:

    Requires=suspend-to-hibernate.service
    
  2. Copy the suspend-to-hibernate.service file in this repo to /etc/systemd/system/suspend-to-hibernate.service.

  3. Enable the service:

    sudo systemctl enable suspend-to-hibernate