Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save metaspartan/ab7baae60fd2c45bb518aadcba94712e to your computer and use it in GitHub Desktop.
Save metaspartan/ab7baae60fd2c45bb518aadcba94712e to your computer and use it in GitHub Desktop.
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. Because of the stupidity that is UEFI (specifically it's "Safe boot" feature) we can't just boot from any USB stick we want.

Also, because someone thought putting a 32-bit UEFI on a 64-bit system was a good idea.

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

##What doesn't work:

  • Screen brightness (always max)
  • Sound
  • HDMI output
  • Micro SD reader (read only)

NOTE: The Acerium project by AndyLavr has a few more features working, but I haven't had much luck with it myself.

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

  • USB flash drive (at least 4GB)
  • USB OTG adapter
  • USB Keyboard (not needed since 16.04)
  • USB Hub
  • A lot of coffe, because it's gonna be a long night
  • USB WiFi or Ethernet card (that supports Linux) (can be done without)
  • Rufus
  • Ubuntu ISO 64-bit (tested with 15.04, but anything with kernel 3.19 or higher should work)

##Preparing the USB stick ###Installing the ISO

  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, you can just download the file here, but remember, downloading binaries from random strangers on the internet is not a good idea. I do promise there are no viruses in it.

To build GRUB, run the following commands in a Linux shell (VirtualBox?):

# 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 that file 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

##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
  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 remove the SD card.

##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 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 ###Wireless

####BRCM80211

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

####RTL8723BS If you don't have a USB Wi-Fi card, you can clone/download the repo on your PC and transfer it with a flash drive. Then open a terminal in the folder and run the last 2 commands.

# Clone the driver repo
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 needed on new versions) 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

@WenqingZong
Copy link

Hi friend,

I followed your steps, but I'm stuck in booting ubuntu, I run set root=(hd1,gpt5) and linux /vmlinux root=/dev/mmcblk0p5, but my computer complains that disk hd1,gpt5 doesn't exist. I tried hd2, gpt4 then and this time it says cannot find file /vmlinux. Can you help me with that?

Regards,
Neville

@austinpowers41
Copy link

austinpowers41 commented Sep 23, 2019

you can boot in live to identify your location with the disk app. mmcblk1p2 for me
then reboot and press c
put "ls" for list the devices
i have try "set root=" for eatch gpt occurrences

I have no error with " linux /vmlinuz root=/dev/mmcblkXpX"

@meurisa
Copy link

meurisa commented Oct 22, 2019

Hi friend,

I followed your steps, but I'm stuck in booting ubuntu, I run set root=(hd1,gpt5) and linux /vmlinux root=/dev/mmcblk0p5, but my computer complains that disk hd1,gpt5 doesn't exist. I tried hd2, gpt4 then and this time it says cannot find file /vmlinux. Can you help me with that?

Regards,
Neville

do ls in the grub promt, there you will see the different options for you, for example do ls (hd1,1)/ for all the drives until you see the one where the linux is installed. (=the one where you can see vmlinuz)
For the root=/dev/x you can check the do somthing else tab of the installation disk, there the boot partiotions will be listed

for a more profound explanation you can look here
https://www.linux.com/tutorials/how-rescue-non-booting-grub-2-linux/

hope this helps @NevilleZong

@drlr85
Copy link

drlr85 commented Jul 18, 2020

Hi guys,
for anyone still interested in this convertible - there is a way to get backlight working! It saves battery life in a big way (and your eyes too).
On Ubuntu 20.04 just download kernel from ubuntu mainline ppa v5.7 (maybee v5.6 is enough) (https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7.9/).

Download custom dsdt img from Hans de Goede
(https://fedorapeople.org/~jwrdegoede/initramfs-acer-sw10-sw5-012-dsdt-overlay.img)

After ppa kernel is installed, copy initramfs-acer-sw10-sw5-012-dsdt-overlay.img into your /boot and then:

mv initrd.img-current_version initrd.img-current_version.orig
cat initramfs-acer-sw10-sw5-012-dsdt-overlay.img initrd.img-current_version.orig > initrd.img-current_version

You need to do this every time you update initrd.img and every time you install new kernel (maybe there is some hook, that can do this automatically)

This should be enough for Ubuntu 20.04. Now reboot into ppa kernel, and you should be able to control backlight using DE slider, or
echo $value_0-100 > /sys/class/backlight/intel_backlight/brightness )

(for people compiling own kernel - ACPI_TABLE_UPGRADE kernel config must be enabled, and also keep in mind that you must have i915 build as module, and lpss drivers in initrd (/etc/initramfs-tools/modules) or build-into kernel, so that lpss drivers are loaded before i915 driver)

One question for you guys. How do you "right click" on touchscreen? I was unable to get any gestures working when using touchscreen. Any help appreciated.

Thank you

@HillQi
Copy link

HillQi commented Oct 16, 2020

Hi guys,
for anyone still interested in this convertible - there is a way to get backlight working! It saves battery life in a big way (and your eyes too).
On Ubuntu 20.04 just download kernel from ubuntu mainline ppa v5.7 (maybee v5.6 is enough) (https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7.9/).

Download custom dsdt img from Hans de Goede
(https://fedorapeople.org/~jwrdegoede/initramfs-acer-sw10-sw5-012-dsdt-overlay.img)

After ppa kernel is installed, copy initramfs-acer-sw10-sw5-012-dsdt-overlay.img into your /boot and then:

mv initrd.img-current_version initrd.img-current_version.orig
cat initramfs-acer-sw10-sw5-012-dsdt-overlay.img initrd.img-current_version.orig > initrd.img-current_version

You need to do this every time you update initrd.img and every time you install new kernel (maybe there is some hook, that can do this automatically)

This should be enough for Ubuntu 20.04. Now reboot into ppa kernel, and you should be able to control backlight using DE slider, or
echo $value_0-100 > /sys/class/backlight/intel_backlight/brightness )

(for people compiling own kernel - ACPI_TABLE_UPGRADE kernel config must be enabled, and also keep in mind that you must have i915 build as module, and lpss drivers in initrd (/etc/initramfs-tools/modules) or build-into kernel, so that lpss drivers are loaded before i915 driver)

One question for you guys. How do you "right click" on touchscreen? I was unable to get any gestures working when using touchscreen. Any help appreciated.

Thank you

Hi,

Long press the item until it pops a right click menu.

@HillQi
Copy link

HillQi commented Oct 16, 2020

I found it works on some items well not on others.

@ScumCoder
Copy link

Hi guys,
for anyone still interested in this convertible - there is a way to get backlight working! It saves battery life in a big way (and your eyes too).
On Ubuntu 20.04 just download kernel from ubuntu mainline ppa v5.7 (maybee v5.6 is enough) (https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7.9/).

Download custom dsdt img from Hans de Goede
(https://fedorapeople.org/~jwrdegoede/initramfs-acer-sw10-sw5-012-dsdt-overlay.img)

There is an extremely important thing that everyone planning to replace Windows with Linux on this tablet should know: this hack only works with BIOS v1.20, and it's impossible to update BIOS unless Windows is installed.
See the original article by Hans de Goede for details.
Unless you want to install Windows back just to update BIOS and finally get your backlight PWM working, update BIOS before installing Ubuntu.

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