How to install Ubuntu on Acer Spin 5 (SP513-54N) for the perfect Linux 2-in-1

(You can skip ahead to the install guide.)

I like to draw on my laptop. I like to code on my laptop. I like to stream on my laptop. And I like to use my laptop for a long time between charges. You can find a lot of laptops that do a few of these things really well, but usually not all of them. It’s even harder to find one that does all of these things well on Linux.

If you can find a laptop with great pen support, it probably doesn’t have a great keyboard. If you can find one with Thunderbolt 3 support for eGPUs, it probably doesn’t have great battery life. If you can find one that hits all the marks, it probably doesn’t play nice with Linux. Etc, etc. Well, I think Acer solved all my problems.

For two years, I’ve been using the Dell XPS 2-in-1s. I started on the 2018 15″ model, and Linux worked great on that, with one exception. The fingerprint reader didn’t work. Last year I upgraded to the 2019 13″ model. It, too, worked great, with two exceptions. The fingerprint reader and the camera didn’t work. What the fuck, Dell? You make that laptop with Ubuntu pre-installed! Ok, whatever, I just used an external webcam for the past year. This year, I decided I’ve been burned by Dell too much, and I switched teams to Acer with the Spin 5.

Much to my suprise (and glee), everything works on Linux! Everything! The camera, the fingerprint reader, the Thunderbolt ports, auto-rotation, multi-touch gestures, the pen (including tilt support)! It works with my existing Dell Active Pen, too. And the keyboard is a lot better on the Acer than on the Dells. It’s got a lot more feedback.

Buuuuut, here’s the catch. It’s not exactly easy right now to get everything working.

Ubuntu Linux Install Guide

Out of the box, getting Linux installed is a little tricky.

  1. Hit F2 on boot to get into the BIOS.
  2. Enable the F12 boot menu setting.
  3. On the “Main” tab, hit CTRL+S to unlock the settings that Acer thinks should be hidden for some reason.
  4. Set the SATA Mode to AHCI and the trackpad to PS/2. (The trackpad won’t work in I2C mode without a kernel parameter. You’ll change that setting back later after you add the parameter.)
    Note: If you want to dual boot with Linux and Windows, you’ll need to follow the procedure for changing to AHCI in Windows, because Windows will break if you don’t.
  5. Set a supervisor password to unlock the Secure Boot setting.
  6. Disable Secure Boot.
  7. Save the settings and reboot with your Ubuntu USB boot stick in.
  8. Use F12 during boot to select the Linux boot loader.
    … (Install Ubuntu as you normally would.) …
  9. Once it’s done and you’ve booted into your new installation, open up a terminal.
  10. Edit your GRUB config.
    sudo gedit /etc/default/grub
  11. Add pci=nocrs to the end of the options for GRUB_CMDLINE_LINUX_DEFAULT. It should look something like this:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nocrs"
  12. Save and close.
  13. Update GRUB.
    sudo update-grub
  14. Reboot back into BIOS with F2.
  15. Use CTRL+S on the Main tab and set the Trackpad back to I2C. (You need to set it back to have pen and multi-touch support.)
  16. (While you’re in the BIOS, I would suggest you switch the function keys to be function first/media second, because I haven’t found a way to disable the F1 sleep key.)

The trackpad should be working now. The camera works, too. The Thunderbolt ports work. The pen works really well in Krita, and if you use a pen that has tilt, that works too. It’s a fantastic machine for digital painting, especially with the 3:2 aspect ratio and HiDPI display.

The pen works!

Fractional Scaling in Wayland

If you use Wayland as your display server, you might want to turn down the scaling a bit, because the default 200% is aggressive. But the only other option is 100%! Let’s fix that.

  1. Enable fractional scaling and get a nice 125% or 150%.
    gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"

Steam with Fractional Scaling

If you use Steam, and it doesn’t scale properly for you, do this.

  1. Edit the global environment variable file.
    sudo gedit /etc/environment
  2. On a new line at the end of that file, add the following.
    GDK_SCALE=2
  3. Save and close.
  4. Reboot your laptop.
    sudo reboot

Multi-Touch Right and Middle Click

Your trackpad supports multi-touch, but for some reason it defaults to area based right/middle clicking. Let’s fix it!

  1. Install Gnome Tweaks.
    sudo apt install gnome-tweaks
  2. Open the Tweaks app.
  3. Under “Keyboard & Mouse” -> “Mouse Click Emulation” choose “Fingers”.

Now you can click with two fingers for right click and three fingers for middle click.

Touchscreen and Multi-Touch Support in Firefox

Since you’re using a touch screen and multi-touch trackpad, you probably want Firefox to respond correctly to touch input, so let’s make sure it does.

  1. Edit the global environment variable file.
    sudo gedit /etc/environment
  2. On a new line at the end of that file, add the following.
    MOZ_USE_XINPUT2=1
  3. Save and close.
  4. Reboot your laptop.
    sudo reboot
  5. Open Firefox and go into Preferences.
  6. Search for and uncheck “Use smooth scrolling” which is there for older scrolling input methods, and causes a weird delay with the two finger scroll and xinput2. (Also, you should turn on Two Finger Scrolling in the Settings app if you like.)

Fingerprint Reader

Next up is the fingerprint reader, and it’s the hardest. You’ll need to uninstall the existing library and build it from source with a modification. (Unless it’s now the future and the patch has been merged upstream.) If you run lsusb, you’ll see that the fingerprint reader is:
Bus 003 Device 002: ID 04f3:0c4f Elan Microelectronics Corp. ELAN:Fingerprint
Well, libfprint supports Elan fingerprint readers, but hasn’t added the device ID 0c4f yet. So here’s what you do:

  1. Uninstall fprintd and libfprint, and their requirements.
    sudo apt purge --auto-remove fprintd libfprint-2-2
  2. Clone the repos for those two projects and checkout the version tags.
    sudo apt install git
    git clone https://gitlab.freedesktop.org/libfprint/fprintd.git
    cd fprintd && git checkout 1.90.1 && cd ..
    git clone https://gitlab.freedesktop.org/libfprint/libfprint.git
    cd libfprint && git checkout v1.90.5 && cd ..
  3. Edit the Elan header file to add the device ID.
    gedit libfprint/libfprint/drivers/elan.h
    Find this line (line 218):
    {.vid = 0, .pid = 0, .driver_data = 0},
    And insert this line above it:
    {.vid = ELAN_VEND_ID, .pid = 0x0c4f, .driver_data = ELAN_ALL_DEV},
    It should be at the end of a long list of other device ID entries like that.
    Save and close.
  4. Install all the development dependencies.
    sudo apt install build-essential cmake gettext libdbus-1-dev libdbus-glib-1-dev libdebconfclient0 libgirepository1.0-dev libglib2.0-dev libgusb-dev libnss3-dev libpam-wrapper libpam0g-dev libpixman-1-dev libpolkit-gobject-1-dev libsystemd-dev meson python3-dbusmock python3-pip python3-pypamtest
  5. Build and install the library and daemon.
    meson libfprint libfprint/_build
    sudo ninja -C libfprint/_build install
    meson fprintd fprintd/_build
    sudo ninja -C fprintd/_build install
  6. Reboot your laptop.
    sudo reboot

Hopefully you won’t run into any errors with the build. If you did, it likely means I forgot to list one of the dependencies. Please leave a comment saying whether this worked or not for you.

After you reboot, you should now see a fingerprint setting in your user settings page. Note that this fingerprint reader is designed for you to slide your fingertip across it, not just press it. If you do press it when it’s asking for a fingerprint, fprintd tends to stop working for some reason. It works again after a reboot.

Fingerprint login enabled.

You can use the fprintd tools like fprintd-enroll and fprintd-verify to manage your fingerprints too.

Fingerprint matched!

Multi-Touch Gestures (Optional)

The last part is totally optional, but it makes the experience better, IMHO. By default, Gnome supports touch screen multi-touch gestures, but not trackpad multi-touch gestures. Depending on which display server you want to use, setting up gestures is different.

X11

In X11 (Xorg), you can use libinput-gestures and the Gestures app. Follow their instructions from their repositories here:

Wayland

Use the icon in the bottom right of the login screen to choose “Ubuntu on Wayland”. In Wayland, to enable multi-touch trackpad gestures, install the Extended Gestures Gnome extension. Now, from the Extensions app, you can edit the extension’s settings to your liking.

Finished!

Congratulations on your fully functional Ubuntu 2-in-1!

Conclusion

This machine really is the best Linux laptop I’ve ever had. It’s a dream to code on this thing, to draw on it, to stream on it, to type on it, etc. If you’re in the market for a Linux laptop for creators and/or coders, this is definitely my current recommendation. One last thing…

The battery life in Ubuntu is really good too!

References

These are some of the resources I used to get everything working:

Join the Conversation

28 Comments

  1. everything worked perfectly except during the install of the fingerprint reader i get these 2 errors

    ninja: error: loading ‘build.ninja’: No such file or directory

    and

    ERROR: Neither directory contains a build file meson.build.

      1. hey! im just seeing this, gonna run it on my lunchbreak and ill provide an update, thanks for the super speedy response!

  2. Reading this post makes me want to buy one of these things refurbished. Worth the price of admission?

  3. YES

    i can pull atleast 13 hours battery life out of this depending on what im doing and working on. I always shutdown when im done using because it only takes about 10 secs to boot.

    this post helped me so much as it was posted the day after i got it in the mail and was having trouble installing linux.

    thanks hunter!

    1. That’s awesome! I’m so glad to hear it helped. Yeah, this thing is blazing fast with the NVMe drive.

  4. Hi Hunter,
    Many thanks for the detailed instructions. I purchased the SP513-54n-74v2 model after reading your instructions. ACER should credit you for this sale. I decided to try fedora 33 instead and I’m extremely happy with the results. Some comments and questions:
    BIOS (version 1.05):
    My only options were AHCI and Optane without RAID. I went with AHCI and somewhat regret not trying the other option. Do you think Optane without RAID might be an option?
    Enabling the boot menu seems to do nothing.
    In terms of secure boot, there’s no option to disable, just to reset secure boot and to select images in the EFI partition. I did nothing an fedora installed without problems.
    I used grubby to add the boot parameter: https://docs.fedoraproject.org/en-US/Fedora/23/html/System_Administrators_Guide/sec-Configuring_GRUB_2_Using_the_grubby_Tool.html
    I haven’t tried the fingerprint reader nor steam for a lack of interest. Everything else works and fedora 33 is an option for those who prefer it.
    My main questions are about an active pen purchase. The included pen works fine, but it’s not comfortable and it doesn’t support tilt (I think). ACER lists it as AES 1.0.
    Which pen are you using? Since you mention tilt support, are you referring to the Dell premium active pen (https://www.dell.com/en-us/shop/dell-premium-active-pen-pn579x/apd/750-abeb/handhelds-tablet-pcs)? Do you recommend any alternatives?
    Sorry for my lack of knowledge, but is AES 1.0 vs. 2.0 just a feature of the pen, or also a feature of the screen? Are any of the budget active pens on Amazon (and similar sites) and good? I wouldn’t mind purchasing one really good pen and a second for everyday use as I tend to misplace things like that.
    Again many thanks, Frank

  5. Hi Hunter,
    thank you for this article.
    I followed your how-to and everything is working great but the fingerprint.
    I tried to build fprintd several times (reformatting my test partition each time), had to fight with missing dependencies but finally managed to compile sources in a venv session. Now I can enroll fingerprints but fprintd-verify fails every single time.
    I would like to ask if you can send me or upload somewhere the files you compiled and that are working for you. I need these 2:
    /usr/lib/x86_64-linux-gnu/libfprint-2.so.2.0.0
    /lib/udev/rules.d/60-libfprint-2.rules

    I would like to add something about FireFox.
    In the “/etc/environment” file add “export MOZ_ENABLE_WAYLAND=1
    ” to make Firefox work in Wayland and enable the kinetic scrolling.To make it more pleasant (default is too “fast”) find in “about:config” the line “mousewheel.default.delta_multiplier_y” and change value from 100 to 30.
    It works just like it should!

    Thank you again.

  6. Hi, it’s crysman here, I am the one who reported the “Spin 5 SP513-54N NX.HQUEC.003 touchscreen/stylus, touchpad and installation issues on Ubuntu 20.04” issue and related bug #1884232 on launchpad.

    Glad you have extended the guide to make best use out of this machine we’re enjoying.

    Unfortunately, there is one thing I have not resolved yet, and I would like you to help me with that, if interested – and that is the external microphone not working issue. I would really love to use my laptop with external mic (whether via BT or classic cable combo jack), but no luck…

    I’ve already asked both here:
    https://askubuntu.com/questions/1305942/external-headset-microphone-not-working-in-ubuntu-20-10-not-even-wired-cable-h
    and here:
    https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1912052

    What do you do with your mic, Hunter? Thanks a lot #crysman

  7. Hello Hunter, my comment from January 23, 2021 at 6:11 am got stuck, still in “awaiting moderation” state – could you please check Akismet SPAM or so? Thanks, crysman

  8. I really have no words to express to you my gratitude for your “Ubuntu Linux Install Guide” above. My Spin5 was a brick for me until you told me how to get on board the Kubuntu OS I wanted. Now, it is the finest computer I’ve ever owned, and I am way beyond delighted.

    Thank you!

  9. Hi, it’s crysman here, I am the one who reported the “Spin 5 SP513-54N NX.HQUEC.003 touchscreen/stylus, touchpad and installation issues on Ubuntu 20.04” issue and related bug #1884232 on launchpad.

    Glad you have extended the guide to make best use out of this machine we’re enjoying.

    Unfortunately, there is one thing I have not resolved yet, and I would like you to help me with that, if interested – and that is the external microphone not working issue. I would really love to use my laptop with external mic (whether via BT or classic cable combo jack), but no luck…

    I’ve already asked both here:
    – h t t p s: //askubuntu.com/questions/1305942/external-headset-microphone-not-working-in-ubuntu-20-10-not-even-wired-cable-h
    and here:
    – h t t p s ://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1912052

    (have to obfuscate hyperlinks in order to have it published here through spam filters)

    What do you do with your mic, Hunter? Thanks a lot #crysman

  10. Great instructions! Thanks for posting. I ran into 2 issues with the build:
    1) doc/meson.build:26:6: ERROR: Program(s) [‘gtkdoc-scan’] not found or not executable

    2) meson.build:74:0: ERROR: Dependency “libfprint-2” not found, tried pkgconfig and cmake

  11. Great guide! Everything but the fingerprint worked!
    With the fingerprint setup I had the following problems:

    Running meson libfprint libfprint/_build I got two lines in red:
    ¨Run-time dependency cairo found: NO (tried pkgconfig and cmake)¨
    ¨doc/meson.build:26:6: ERROR: Program(s) [‘gtkdoc-scan’] not found or not executable¨

    Then, when running sudo ninja -C libfprint/_build install I got
    ninja: Entering directory `libfprint/_build’
    ninja: error: loading ‘build.ninja’: No such file or directory

    Thanks!

  12. Thanks a lot for your write up! Worked like a charm and I just got started with my device. Using Xournal for simple sketches and notes, any other suggestions?

  13. Thanks for this guide Hunter! I was wondering what kind of battery life you get with this on Linux?

  14. Thanks a lot for this very detailed guide. I’m now the happy owner and user of a Spin5 and I couldn’t agree more : it’s the best linux laptop ever, and the easiest to install (with your help of course). I was desperately in search for a 2-in-1 laptop for grading papers and it’s just perfect. The only thing not working so far is the fingerprint reader : each enrollment fails. But that’s a fix for later.

Leave a comment

Leave a Reply to ant Cancel 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.