Skip to content

Instantly share code, notes, and snippets.

@franga2000
Last active November 25, 2023 16:19
  • Star 81 You must be signed in to star a gist
  • Fork 15 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Ubuntu on Acer Aspire Switch 10

Ubuntu on Acer Aspire Switch

The problem

What's the problem with this tablet? Why can't I just insert the USB and mash F12 until it boots? The tablet is made to run Windows 8.1 and Windows 8.1 only. Some absolute genius at Acer decided to put a 32-bit UEFI on a 64-bit system, which no reasonable Linux distro supports out-of-the-box.

NOTE: This guide focuses on installing Ubuntu alongside Windows. If you're trying to replace Windows, then I assume you know enough about Linux to know which parts to change.

What works:

  • Keyboard
  • Trackpad
  • Touchscreen
  • Sound (usually)
  • Backlight control (with a patch)

What doesn't work:

  • HDMI output
  • Micro SD reader (read only)

Requirements

Before you start, there's a few things you need:

  • USB flash drive (at least 4GB)
  • USB OTG adapter (not always necessary, but recommended)
  • 32-bit GRUB UEFI binary (explained below)
  • 64-bit Ubuntu ISO
  • BIOS v1.20 installed (required for backlight fix - you can only update BIOS from Windows, so do it now!)
  • Rufus (or an equivalent image writer)
  • USB WiFi or Ethernet card (in case your Wi-Fi doesn't work)

Preparing the USB stick

Installing the ISO (Rufus)

  1. Open Rufus
  2. Select the correct USB Stick
  3. Select "GTP for UEFI computers" as the partition table (if available)
  4. "Select the Ubuntu 64-bit iso
  5. Click "Create"

Building the 32-bit UEFI GRUB bootloader

If you trust me (and the owner of that repo), you can just download the file here, but remember, downloading binaries from random strangers on the internet is not a good idea.

Building it yourself

To build GRUB, run the following commands in a Linux shell:

# Install build dependencies and tools
sudo apt-get install git bison libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev flex libfont-freetype-perl automake autotools-dev libfreetype6-dev texinfo
# Clone the GRUB repo
git clone git://git.savannah.gnu.org/grub.git
cd grub
# Configure GRUB
./autogen.sh
export EFI_ARCH=i386
./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix=""
make
cd grub-core
# Build the GRUB image
../grub-mkimage -d . -o bootia32.efi -O i386-efi -p /boot/grub ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd xfs xnu part_bsd part_gpt search search_fs_file chain btrfs loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart scsi loopback normal configfile gzio all_video efi_gop efi_uga gfxterm gettext echo boot chain eval

This will create a file called "bootia32.efi".

Copy "bootia32.efi" to "/EFI/Boot/" on your flash drive.

Booting from the USB

  1. Open the "BIOS" (F2 when you see the Acer logo)
  2. Under "Security" set a supervisor password
  3. Under "Boot" set "Secure boot" to disabled
  4. Set the USB stick to boot first
  5. Press F10 to save changes and reboot

If your USB doesn't show up, try to plug it in to the body directly using an OTG adapter, not via the keyboard dock).

Installing Ubuntu

  1. The laptop should automatically boot into GRUB
  2. In the GRUB menu choose "Try Ubuntu without installing"
  3. Open the terminal and run ubiquity --no-bootloader to start the installer (--no-bootloader isn't usually necessary, but if your installation fails with some bootloader-related error, try this)
  4. When prompted, select "Something else" to manually partition the drive
  5. Add a root (ext4, "/") and swap (swap, "swap") partition
  6. Finish the installation and hope for the best

Booting Ubuntu

In order to boot the Ubuntu we just installed, we need to use the USB GRUB again. Just let the laptop automatically boot from the USB. When in GRUB, press C to open a command line. Run the following commands:

set root=(hd1,gpt5)
linux /vmlinux root=/dev/mmcblk0p5
initrd /initrd.img
boot

If it doesn't work, try with /dev/mmcblk1p5 and/or booting without an SD card inserted.

Permanently installing GRUB

Obviously we can't use the USB GRUB to boot forever. Let's install GRUB: Open the terminal and run the following commands:

# Get the 32-bit UEFI GRUB package
sudo apt-get install grub-efi-ia32 grub-efi-ia32-bin 
# Mount your EFI partition 
mkdir /boot/efi # if the dir already exists, skip the mount command
sudo mount /dev/mmcblk0p1 /boot/efi
# Install GRUB
grub-install --target=i386-efi --efi-directory=/boot/efi/

If the 32-bit grub package doesn't exist, you can compile it yourself like this:

# Get build dependencies
sudo apt-get install autoconf
# Get the GRUB source
git clone git://git.savannah.gnu.org/grub.git
# Compile 32-bit UEFI GRUB
cd grub/
./autogen.sh
./configure --with-platform=efi --target=i386
# Install GRUB
sudo grub-install --target=i386-efi --efi-directory=/boot/efi/

Adding GRUB to the bootloader

Reboot the laptop and press F12 to go into the boot menu. If you see an option called "ubuntu" and it works, you can skip this part.

  1. Go into BIOS
  2. Under "Boot" set "Secure boot" to enabled
  3. Press F10 to save changes and reboot
  4. Go into BIOS again
  5. Under "Security", click "Add trusted executable"
  6. Navigate to *\HD0\EFI\ubuntu* and select grubia32.efi
  7. Enter the name for the bootloader entry and press OK
  8. Press F10 to save changes and reboot
  9. Go into BIOS for the last time
  10. Under "Boot" set "Secure boot" to disabled
  11. Press F10 to save changes and reboot

You should not see the entry in the boot menu (F12)

Making things actually work

Screen backlight

See this comment. Note that this will only work if you're on BIOS v1.20.

Wireless

A lot of this has since been upstreamed, so if it works for you, you can safely skip this section.

BRCM80211

I don't have it so if someone got it working, please comment below so I can add it

RTL8723BS

The drivers for this card have been merged into the kernel, so it should work automatically.

If it doesn't work for you:
# Clone the driver repo - if you don't have a wifi card, do this step onto a USB stick from another device
git clone https://github.com/hadess/rtl8723bs
# Build and install the driver
cd rtl8723bs
make
sudo make install
sudo modprobe r8723bs

If it doesn't work immediately, reboot.

Keyboard

Not required on modern kernels

To make the keyboard work you need to modify the kernel source and recompile it. Before compiling the kernel, open the file include/linux/hid.h and change the value of MAX_HID_USAGES (default is 12288) to 65536 (On aproximately line 346). Then compile and install the kernel.

To see how to do this, read my other guide.

Sources

@funder7
Copy link

funder7 commented Apr 19, 2023

Hi @masakk1, ventoy is a great tool, I think that it wasn't available when this article was posted originally.
Anyway I don't own the computer anymore, but I've found this link which should give you a lot of info about the installed hardware, and what to configure: https://bugs.freedesktop.org/show_bug.cgi?id=90075

Which version of Fedora did you install?

@masakk1
Copy link

masakk1 commented Apr 19, 2023

Which version of Fedora did you install?

Fedora 37, and I will check that link in a sec. Thanks!

Also, sound is not working and I can't find any information about it. Not sure if I'm missing some audio codecs but when i tried to install the gstream... whatever it was called, fedora told me that I already had those. I'm guessing the suggested kernel there is going to fix it though. I'll give you an update as soon as I can.
I mean my audio jack is broken too!

Edit: Seems like not even they know how to fix it. It's a conversation from over 4 years and they were not able to get it working.

@funder7
Copy link

funder7 commented Apr 20, 2023

Uhm.. Fedora 37 is the latest, it should have a good configuration to start with. Anyway you can check the boot log, to see if you can spot any error when the OS starts.

Well, if the jack is broken that’s not the best situation :-D
There’s a easy check that to do in this case: try to adjust the volume with the respective hotkeys..if you see the volume bar moving on the screen, then the sound card is ok; if you cannot adjust the volume, it’s a good symptom of wrong soundcard config.

This computer requires a lot of patience… maybe you can sell it and buy a newer and well supported one, in case you need linux 100%

@masakk1
Copy link

masakk1 commented Apr 21, 2023

try to adjust the volume with the respective hotkeys

Yeah this works! The volume buttons and the audio jack are both broken (didn't work in windows either), but shortcuts work just fine.

maybe you can sell it

Well yeah, I might do that. Family is using it for studying so I guess I gotta wait a month but other than that. How much would you price it for

@funder7
Copy link

funder7 commented Apr 22, 2023

Yeah this works! The volume buttons and the audio jack are both broken (didn't work in windows either), but shortcuts work just fine.

Fine, so it’s an hardware problem, Fedora detected the sound card correctly

Well yeah, I might do that. Family is using it for studying so I guess I gotta wait a month but other than that. How much would you price it for

To be honest, having those hardware problems would lower the price too much!

Now that the audio problem is ok, you can try this solution to see if backlight can be adjusted (I tried myself on another pc and it worked):

  1. try to exec in terminal: cd /sys/class/backlight/intel_backlight/
  2. if the directory doesn’t exists, then you have found the problem: something has not been initialized correctly (try to do dmesg | grep -i backlight .. do you see any error? If yes share the log snippet here, we will see what is going on)
  3. if the directory exists, then it shouldn’t be bad as it seems. Now run sudo cat /sys/class/backlight/intel_backlight/max_brightness -> this command will return a number, which corresponds to the maximum value for the backlight (100%)
  4. Let’s say you’ve got 500 in return from the previous command: remove a good 25% and use the number into this command: echo 370 | sudo tee /sys/class/backlight/intel_backlight/brightness
  5. Decide if the brightness is ok or in case lower the number until you reach a good brightness.

Be careful! Proceed by small steps, especially when the screen is not very bright: remember that you don’t have any other solution other than this command at the moment, so if the screen goes black, it’s difficoult to run the command again :-)

Anyway, I suspect that you will stop at point #1, otherwise the backlight would be already working

@itsabinash
Copy link

Hi, I have this device and I have tried all versions of Linux but there is only one that make it works flawlessly that too from initial install that is Kubuntu any version above 20.04 works. Only thing we have to do is select the right ufi in the BIOS. My sound works, Wifi works, Camera works. Brightness controls works. Touchscreen works!!!

Please give Kubuntu a try. I have no idea why other version of Ubuntu do not have drivers for this laptab when Kubuntu does. Well if it works then it works, right ?

@funder7
Copy link

funder7 commented May 5, 2023

Oh yes.. that's the important part :-)
Well nowadays Linux in general supports many devices out of the box, it's strange that you need Kubuntu, it should be a regular ubuntu release with KDE already set up as desktop environment!

@Crare
Copy link

Crare commented May 25, 2023

Had to go through one more extra loop: bitlocker in main partition of system.(C:) It disables resizing the partition size, leaving no empty space for the ubuntu.

steps I did:
In Windows, open command-prompt with admin-rights and type manage-bde -status to see status of bitlocker
use manage-bde -off <drive letter>: in my case manage-bde -off C: to decrypt the partition.
after that do the status command until it shows that the partition is completely decrypted, saying "percentage encrypted 0%" and then continuing with the install.

EDIT1:
on grub commands I used, instead of the mentioned booting-ubuntu-section:

linux /boot/vmlinuz root=/dev/mmcblk0p5
initrd /boot/initrd.img

@aymaliev
Copy link

Hi, I have this device and I have tried all versions of Linux but there is only one that make it works flawlessly that too from initial install that is Kubuntu any version above 20.04 works. Only thing we have to do is select the right ufi in the BIOS. My sound works, Wifi works, Camera works. Brightness controls works. Touchscreen works!!!

Please give Kubuntu a try. I have no idea why other version of Ubuntu do not have drivers for this laptab when Kubuntu does. Well if it works then it works, right ?

I can confirm most of this!
Kubuntu 22.04 LTS - camera does not work, but sound works on both speakers and 3.5mm jack and adjustable via shortcuts, wifi works, brightness works and adjustable via shortcut, battery indicator works, on-screen keyboard, touchscreen
FYI Kubuntu 20.04.6 (the previous version) had no sound

Thank you @itsabinash, magic person from the internet.

@harmanjitkapoor
Copy link

Thanks for the helpful instructions! A couple of notes to those still looking here. Acer SW5-012 does not support WPA3 as far as I could see. There is some talk of sending the broadcom wifi chip some additional blob/firmware but no need to mess around if you have a WPA2 network, that just works.

I used Ventoy on USB to test various Linux liveCDs and install things. The USB boots fine if secure boot is disabled, so I am guessing Ventoy already uses 32-bit Grub. Lubuntu was installed fine and after doing the EFI authorization on the /boot/efi ia32 file in BIOS, it booted fine.

My goal is to install Q4OS-Trinity, since that is apparently much leaner and faster than a full-blown Ubuntu or Lubuntu.

So, booted that using the live-CD image on Ventoy USB. WiFi connected, everything looks good (including audio etc.), started the calameras install, chose the existing lubuntu ext4 partition to format and install on, installation proceeded fine till the end where it failed at grub installation.

Never mind. Rebooted into USB Q4OS-Trinity live-CD, restarted install, but this time installed grub-efi-ia32 packages before running Calameras installer. Again the installer barfed at installation of Grub. So I manually installed grub:

grub-install --target=i386-efi --efi-directory=/tmp/calamaresxxx/boot/efi --boot-directory=/tmp/calamaresxxx/boot

Grub install succeeded. Now the /tmp/calamaresxxx/boot/efi contains three directories: EFI, q4os, ubuntu.

Booted again but just got grub command line :-( But that's fine, we can handle it. Gave it the root= linux and initrd parameters and it booted into Q4Os just fine. Then it was just a matter of doing update-grub and on next boot I got the proper Grub menu for Q4OS and automatic boot into Q4OS. Cheers.

@masakk1
Copy link

masakk1 commented Nov 11, 2023

I started tinkering with this computer again. Apparently Fedora 38 and 39 don't like being booted with ventoy, but burning the .iso into a USB manages to boot without any issues. After installing Fedora 39, go to BIOS > enable secure boot > in security, click on add new bios trust thing whatever it was > search fedora, efi, and grubia32.efi > disable secure boot again.
I'm unsure whether secure boot has to be disabled or on but I still do it anyway.

With that done Fedora 39 runs pretty well. However I do find myself with the same problems as last time: brightness, volume, rotation. Sorry for taking like almost a year to answer @funder7 !

1. try to exec in terminal: `cd /sys/class/backlight/intel_backlight/`
2. if the directory doesn’t exists, then you have found the problem: something has not been initialized correctly (try to do `dmesg | grep -i 

Anyway, I suspect that you will stop at point #1, otherwise the backlight would be already working

Like you suspected, intel_backlight isn't a thing in that folder, only acpi_video0.
Here are the logs:

[   18.251118] audit: type=1130 audit(1699729465.242:43): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-backlight@backlight:acpi_video0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 1597.389316] video LNXVIDEO:00: Restoring backlight state
[ 1652.339794] video LNXVIDEO:00: Restoring backlight state
.
.
.

That last line is repeated a bunch more times, it appeared after I click on "suspend" which works super weird when closing/opening the lid.
I will try to do a little research on getting these things working, this is what I have for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment