Skip to content

Instantly share code, notes, and snippets.

@xanecs
Last active July 12, 2021 17:02
Show Gist options
  • Save xanecs/9c40670129fd23c973f545ae20c90894 to your computer and use it in GitHub Desktop.
Save xanecs/9c40670129fd23c973f545ae20c90894 to your computer and use it in GitHub Desktop.
elementaryOS Loki on Acer Chromebook C720

This guide will show you how to install and configure elementaryOS Loki on your Acer C720 or C720p. I'm assuming you have installed some sort of Linux on your Chromebook before and already know your way around in Developer Mode. If not, read and follow https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/acer-c720-chromebook sections "Developer Mode" and "Legacy Boot".

Installation

Nothing special here: Download the ISO from https://elementary.io (put in $0 as an amount to download the ISO for free, although you should consider donating)

Put in a USB drive, locate its device address (e. g. /dev/sdX on Linux, /dev/diskX on macOS). Then unmount it and use dd to write the iso to the drive:

sudo umount /dev/sdX #Linux
sudo diskutil unmountDisk # macOS

sudo dd if=Downloads/elementary.iso of=/dev/sdX bs=1M # Linux
sudo dd if=Downloads/elementary.iso of=/dev/rdiskX bs=1m # macOS

After that's done, plug the drive into your Chromebook, turn it on, wait for the scary white screen, then press CTRL + L to enter the SeaBIOS, press ESC and the number corresponding to your USB drive.

Click through the installer and reboot.

Fixing Chromebook specifics

Touchpad

Surprisingly works well out of the box. Only "issue" is that you need to physically depress the touchpad to do a click.

To change this go to System Settings > Mouse & Touchpad and enable Tap to click.

Suspend and Resume

Will not work out of the box. To get it working, do the following:

Edit /etc/default/grub and change GRUB_CMDLINE_LINUX_DEFAULT to

GRUB_CMDLINE_LINUX_DEFAULT="tpm_tis.force=1 quiet splash"

Download ehci-pci.sh from below, then move it to /lib/systemd/system-sleep/ehci-pci.sh and change its access rights to 755

sudo mv Downloas/ehci-pci.sh /lib/systemd/system-sleep/ehci-pci.sh
sudo chmod 755 /lib/systemd/system-sleep/ehci-pci.sh

Next you'll want to prevent the Touchpad from waking up the system from sleep as the screen often accidentally presses against the touchpad and causes this.

To do this download disable-touchpad-wakeup.conf from below and move it to /etc/tmpfiles.d/disable-touchpad-wakeup.conf

sudo mv Downloads/disable-touchpad-wakeup.conf /etc/tmpfiles.d/disable-touchpad-wakeup.conf

Power saving

While elementaryOS is not bad at being a low-power distro it still leaves a lot of room for improvement.

Wifi Powersave

Enable the powersave mode of the wifi card by downloading ath9k.conf from below and moving it to /etc/modprobe.d/ath9k.conf

sudo mv Downloads/ath9k.conf /etc/modprobe.d/ath9k.conf

Audio Powersave

Tell the audio card to turn off after 1 second of silence.
Download audio_powersave.conf from below and move it to /etc/modprobe.d/audio_powersave.conf

sudo mv Downloads/audio_powersave.conf /etc/modprobe.d/audio_powersave.conf

NMI Watchdog

Disable a kernel debugging feature.

Download disable_watchdog.conf from below and move it to /etc/sysctl.d/disable_watchdog.conf

sudo mv Downloads/disable_watchdog.conf /etc/sysctl.d/disable_watchdog.conf

Dirty Writeback

Write to disk less often

Download dirty.conf from below and move it to /etc/sysctl.d/dirty.conf

sudo mv Downloads/dirty.conf /etc/sysctl.d/dirty.conf

Laptop mode

Queue disk writes over several seconds, write them at once, then turn of the SSD. This is potentially risky, as the higher you set this setting, the more seconds of work you may loose in case of a system crash. Most people recommend a setting of about 5 (meaning 5 seconds) but you can turn this up to 5 minutes or more. When the battery is low, this setting will be overridden, so no danger here.

Download laptop.conf from below and move it to /etc/sysctl.d/laptop.conf

sudo mv Downloads/laptop.conf /etc/sysctl.d/laptop.conf

SATA Power management

WARNING This feature will cause issues if you have fitted your chromebook with a Transcend SSD. These contain a firmware bug that will cause your chromebook to freeze or crash if it puts the SATA interface into low power mode. If you have one of those SSDs, skip this step.

Download hd_powersave.conf from below and move it to /etc/udev/rules.d/hd_powersave.conf

sudo mv Downloads/hd_powersave.conf /etc/udev/rules.d/hd_powersave.conf

PCI Power management

Download pci_powersave.conf from below and move it to /etc/udev/rules.d/pci_powersave.conf

sudo mv Downloads/pci_powersave.conf /etc/udev/rules.d/pci_powersave.conf

Now reboot and you should be good to go.

options ath9k btcoex_enable=1 ps_enable=1
# If you don't need bluetooth change this to
# options ath9k ps_enable=1 bluetooth_ant_diversity=1
options snd_hda_intel power_save=1
vm.dirty_writeback_centisecs = 1500
w /proc/acpi/wakeup - - - - TPAD
kernel.nmi_watchdog = 0
#!/bin/bash
# Place into /lib/systemd/system-sleep/ehci-pci.sh
#
# Change access rights to 755:
# sudo chmod 755 /lib/systemd/system-sleep/ehci-pci.sh
case $1/$2 in
pre/*)
echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/unbind
;;
post/*)
echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci-pci/bind
;;
esac
ACTION=="add", SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="min_power"
vm.laptop_mode=5
ACTION=="add", SUBSYSTEM=="pci", ATTR{power/control}="auto"
@ksuhenyaw
Copy link

All I get is "Booting from Hard Disk..."
It never boots up. Any ideas?

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