Skip to content

Instantly share code, notes, and snippets.

@adamjohnson
Last active August 29, 2015 14:13
Show Gist options
  • Save adamjohnson/b8a597a07f2a0934d793 to your computer and use it in GitHub Desktop.
Save adamjohnson/b8a597a07f2a0934d793 to your computer and use it in GitHub Desktop.
Acer C720 ElementaryOS Touchpad Fix

Lots of folks note how Kernel 3.17 is supposed to fix trackpad issues. So, I initially installed 3.18 and found that my sound didn't work (? YMMV). Indeed, my trackpad did work, but my sound didn't. I then reinstalled elementary via elementaryos-chromebook and didn't update the kernel. Not updating the Kernel is reccommended:

http://shnatsel.blogspot.com/2013/12/why-you-should-not-upgrade-kernel-on.html

Here's what I did to get things working:

  1. Installed elementaryos-chromebook
  2. Booted into Elementary via Ctrl + L. Went through prompts.
  3. Went to Applications > Update Manager. Installed all updates.
  • Installed Hardware updates first. Rebooted.
  • Then installed software updates. Rebooted.
  1. Touchpad still didnt work. At this point, running uname -r in terminal returns 3.13.0-43.
  2. I followed the first part of step 5 from the following URL to get the touchpad to work:
  • http://realityequation.net/installing-elementary-os-on-an-hp-chromebook-14
  • NOTE: You'll notice the author of that post installed 3.12.5-trusty whereas, if you installed all your updates, you'll already be past that version.
  • NOTE 2: In light of this, I changed anywhere it said linux-3.12.5 to linux-3.13.11.
  • I then ran the script by cding into the directory and typing bash cron-haswell-modules.sh and rebooted.
  • Touchpad works.
    • I didn't have to adjust the sensitivity as the second part of step 5 notes.
  1. The last thing I did was bind the Volume up and down buttons. Go to System Settings > Keyboard > Media > Volume Up/Down.
# Create a temp directory for our work
tempbuild=`mktemp -d`
cd $tempbuild
# Determine kernel version (with and without Ubuntu-specific suffix)
mykern=${1:-$(uname -r)}
mykernver=linux-$(echo $mykern | cut -d'-' -f 1)
# Install necessary deps to build a kernel
sudo apt-get build-dep -y --no-install-recommends linux-image-$mykern
# Grab Ubuntu kernel source
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.11.tar.xz
tar -xJf linux-3.13.11.tar.xz
cd linux-3.13.11
if [ -f drivers/platform/x86/chromeos_laptop.c ]; then
platform_folder=x86
elif [ -f drivers/platform/chrome/chromeos_laptop.c ]; then
platform_folder=chrome
fi
# Use Benson Leung's post-Pixel Chromebook patches:
# https://patchwork.kernel.org/bundle/bleung/chromeos-laptop-deferring-and-haswell/
for patch in 3078491 3078481 3074391 3074441 3074421 3074401 3074431 3074411; do
wget -O - https://patchwork.kernel.org/patch/$patch/raw/ \
| sed "s/drivers\/platform\/x86\/chromeos_laptop.c/drivers\/platform\/$platform_folder\/chromeos_laptop.c/g" \
| patch -p1
done
# Need this
cp /usr/src/linux-headers-$mykern/Module.symvers .
# Prep tree
cp /boot/config-$mykern ./.config
make oldconfig
make prepare
make modules_prepare
# Build only the needed directories
make SUBDIRS=drivers/platform/$platform_folder modules
make SUBDIRS=drivers/i2c/busses modules
# switch to using our new chromeos_laptop.ko module
# preserve old as .orig
sudo mv /lib/modules/$mykern/kernel/drivers/platform/$platform_folder/chromeos_laptop.ko /lib/modules/$mykern/kernel/drivers/platform/$platform_folder/chromeos_laptop.ko.orig
sudo cp drivers/platform/$platform_folder/chromeos_laptop.ko /lib/modules/$mykern/kernel/drivers/platform/$platform_folder/
# switch to using our new designware i2c modules
# preserve old as .orig
sudo mv /lib/modules/$mykern/kernel/drivers/i2c/busses/i2c-designware-core.ko /lib/modules/$mykern/kernel/drivers/i2c/busses/i2c-designware-core.ko.orig
sudo mv /lib/modules/$mykern/kernel/drivers/i2c/busses/i2c-designware-pci.ko /lib/modules/$mykern/kernel/drivers/i2c/busses/i2c-designware-pci.ko.orig
sudo mv /lib/modules/$mykern/kernel/drivers/i2c/busses/i2c-designware-platform.ko /lib/modules/$mykern/kernel/drivers/i2c/busses/i2c-designware-platform.ko.orig
sudo cp drivers/i2c/busses/i2c-designware-*.ko /lib/modules/$mykern/kernel/drivers/i2c/busses/
sudo depmod -a $mykern
echo "Finished building Chromebook modules in $tempbuild. Reboot to use them."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment