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:

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

  1. For the guys who hava an external mic not working issue, you can just add the following line to /etc/modprobe.d/alsa-base.conf:

    options snd-hda-intel model=alc255-acer,dell-headset-multi

    My laptop model is SP513-41N with ubuntu 20.04, kernel 5.13+.

  2. THanks for htis guide – it convinced me to buy the Apin 5 and insatll Ubuntu. I’m very happy with the former decition becuase it’s such a nice machine. However, the Ubuntu aspect is not yet 100%, because of the following problems:

    1. The cursor lags and jumps.
    2. The super key stopped working (it worked for a while)
    3. In tent mode, the Screen controls stop responding (sometimes); the only way to recover is reboot.

    (I also tried Linux Mint but the touchpad doesn’t work at all.)

    I’ve searched a lot of sites for answers, but in vain so far. Maybe some of the users here have solved these problems and could share their tips?

    Cheers!

  3. Thanks for your guide! It was very helpful in getting Pop OS 22.04 working on this computer (Acer Spin 5 54N), and I agree with you that this is close to the perfect linux laptop! Just adding my own experience (from a hobbyist point of view) in case others are hoping to do the same.

    I initially tried Ubuntu 22.04, but I found that the kernel parameter ‘pci=nocrs’ was causing a crash at boot. As other commenters here have said, this seems specific to the version 5.15 linux kernel (which Ubuntu 22.04 uses). Pop OS 22.04 uses version 5.16, which seems to not crash with that parameter.

    I basically followed all of your steps outlined above and got a dual boot Pop OS 22.04 and Windows 11 machine working, but there were additional quirks that had to be addressed.

    After installation, pressing F2 at boot would cause the machine to freeze, essentially locking me out of the BIOS. To get around this I had to delete the systemd-boot entry for Pop_OS, as detailed here:
    https://www.reddit.com/r/pop_os/comments/smssso/cant_access_bios_after_installing_popos/

    This allowed me to access the BIOS, make the necessary changes outlined in your steps, and change the boot order so that the HD partition containing Pop OS would boot before Windows Boot Manager.

    Since Pop OS uses systemd-boot instead of grub, I used these instructions to add the ‘pci=nocrs’ kernel parameter on boot:
    https://wiki.archlinux.org/title/kernel_parameters
    (Note that the location of the config file in Pop OS 22.04 is /boot/efi/loader/entries/Pop_OS-current.conf)

    Fractional scaling seems to work out of the box, but for some reason the setting would reset on reboot. To get it to stick, I disabled the HiDPI Daemon located under Settings > Displays.

    The time in Windows kept changing after booting from Pop OS. Apparently this is a known issue, as detailed at the end of this article:
    https://support.system76.com/articles/windows/

    Anyway, hope that adds another point of data for those looking to use linux on this laptop. Thanks again for your guide!

  4. Juergen R. Luedicke

    Hello, everything works fine with Kubuntu 21.10. I install it, after I buy the Acer spin5 in dec. 2021. Now, with Kubuntu 22.04 i2c do not work. To install Kubuntu 21.10 again, with the same procedure do not work again :-(-

  5. Have you attempted 22.04 yet? I am having trouble with the pci=nocrs causing a failure to boot. Seems to impact all kernels starting at 5.15.
    Removing pci=nocrs allows it to boot but then the touchpad and touchscreen do not work.

    Wondering if you have any other tips that will help with newer kernels?
    I did read that if you have to use `pci=nocrs` then you should file a bug – unsure with whom though.

    1. I haven’t tried Ubuntu 22.04, but I’m currently running Manjaro with the Linux 5.16 kernel on it. That kernel param still works and boots with touchpad working. I believe 22.04 upgraded to Linux 5.17, so it could be an issue on that version specifically.

      1. Juergen R. Luedicke

        Hi Hunter,
        thanks a lot for the great inspiration! Manjero works fine with Acer Spin 5.
        Without stylus-support, yet (maybe later). pci=nocrs entry works first time with manual edit grub entry on start. (etc/default/grub do not load the entry – first time)
        Best regards,
        Juergen

      2. Julien Cubizolles

        By default, 22.04 ships with 5.15 which has the pci=nocrs bug. I tried installing the 5.17.6 kernel with mainline but the bug remains: won’t boot without pci=nocrs but with pci=nocrs, touchpad isn’t working. So far I’ve marked kernel 5.13.0-40 et 5.13.0-41 on hold to make sure subsequent upgrades won’t remove them.

            1. Julien Cubizolles

              Very good news on this front : the pci=nocrs is no longer needed to get the touchpad and touchscreen working as of kernel 5.19-rc3. Ubuntu users can install it with no hassle through the mainline package.

        1. This was the solution that ended up working for me (holding the 5.13 kernel). Thank you! Until a fix is implemented in the latest kernel, this is the way to go.

    2. I tried Ubuntu 22.04 with kernel 5.13 on SP513-54N. Touchpad, touchscreen, and stylus all work, but Wi-Fi does not work.

  6. Thanks so much, Hunter, for this page! Even though after an installation of Fedora 35 everything actually works out of the box, your description helped me a lot – in particular in deciding for this machine.

  7. Thanks a lot Hunter. Your solution works like magic on my Acer Spin 5, and I installed Xubuntu 20.04. However, I have one problem. After I add the kernel parameter as suggested, and reboot, the touchpad works but not the wireless mouse. Please help.

  8. Thanks a lot for the guide! I installed Pop OS and it worked perfectly.
    However, I’m curious on what the “pci=nocrs” does. My google search says it “Ignore PCI host bridge windows from ACPI”. Is it used just because of some special hardware config on Spin5? Also, would you like to share how you discovered this solution? (I probably need to troubleshoot similar problems in the future)

    1. Basically, the Spin’s UEFI system doesn’t report certain hardware addresses correctly. This flag tells Linux to ignore what the UEFI reports and use its own addressing. That’s as much detail as I can go into, because I don’t really understand it myself. There is a link in the references (I forget which one) where I learned that particular flag.

  9. Eric Gourgoulhon

    Thanks a lot for your guide!
    We’ve just bought a newer version of the Acer Spin 5, namely the SP513-55N, equipped with a Core i7-1165G7 + Intel Iris Xe Graphics. It turns out that installing Ubuntu 20.04.2 on that machine was even simpler than on the SP513-54N! Indeed, the steps 4 and 9 to 15 of your guide were not necessary. In particular, the trackpad can be left in the I2C mode and there is no need to change the mode for the SSD disk: the default “VMD enabled” is fully supported by Ubuntu (actually there is no AHCI option in the BIOS of the SP513-55N ). Everything (touchscreen, pen) works out of the box! It is a pleasure to use Xournal++ in tablet mode on that laptop.

    1. That’s awesome! I might upgrade to a similar one in the future, since the Iris Xe graphics I’ve heard are worth it.

    2. Same here. Spent some time with the SATA/AHCI issue wondering why the latest BIOS doesn’t have even the hidden the option. Should have read these comments until the end first. Great laptop running Ubuntu Studio here.

  10. Thank you very much. I will try. I will work with this laptop most of the time in Linux, but from time to time I need to do some client work in Windows: Photoshop, Indesign. Do you know if this is possible in a VM on this computer? I’ve had problems doing this on my desktop, with crashes especially in Photoshop, etc. Can you confirm that the machine is quiet even under load?

    1. I’d imagine you would be better off installing Ubuntu next to Windows. It can virtualize Windows just fine, but Photoshop (at least in my past experience) doesn’t run very well under virtualization. At least not well enough to draw.

      1. Hi Hunter, Hi all. I bought a SP513-55N Machine and everything works out of the Box in Ubuntu 20. Its fantastic. I dualboot with W10. The W10 experience is bad. Bloatware, 188 Processes and permanent 3.5GB usage without any Program open. Ubuntu runs smooth. Is there a solution to kill the Fan? It is not the loudest but would be very nice, fancontrol didn’t work for me.

        1. I’m not sure. Maybe there would be a way to turn down the wattage of the CPU in the UEFI. That would make the fan not come on as often, but it would also reduce the system’s performance.

        1. I imagine the installation procedure would be mostly the same. You can have a go at it. If it doesn’t work, you can always install something else. 🙂

  11. For all of you who get an error with gtkdoc-scan… You need to install the gtk-doc-tools which include the gtkdoc-scan.

  12. Julien Cubizolles

    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.

    1. Julien Cubizolles

      For those following on this issue, there is no need anymore to manually build libfprint and fprintd, this device is now managed (as of v 1.90.9-1). However, each enrollment attempt fails with:
      Enroll result: enroll-unknown-error.

    1. I’ve found it really good. 🙂 If I’m not doing much (ie just browsing the web) I get about 9 to 10 hours at 1/3 screen brightness (which is plenty). If I’m watching YouTube/Netflix/etc., I get about 6 to 7. If I’m playing Minecraft, I get about 3 to 4.

  13. 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?

  14. 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!

  15. 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

  16. 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

  17. 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!

  18. 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

  19. 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

  20. 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.

  21. 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

  22. 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!

  23. 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.

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