Thursday, February 4, 2021

Chromebook Linux Update

My three Acer C720 Chromebooks running Linux are still giving yeoman service, although for obvious reasons I'm not travelling these days. But it is time for an update to 2017's Travels with a Chromebook. Below the fold, an account of some adventures in sysadmin.

Battery Replacement

The battery in C720 #1, which is over six years old, would no longer hold a charge. I purchased a Dentsing AP13J3K replacement battery from Amazon. I opened the C720, removed the old battery, inserted the new one, closed up the case, and all was well. It was an impressively easy fix.

Sleeping & Waking

Sometime around last October Linux Mint 19 switched from kernels in the 5.0 series to kernels in the 5.4 series. Mint 20 uses 5.4 series kernels. The 5.0 kernels on the C720 went to sleep properly when the lid closed, and woke properly when the lid opened. The 5.4 kernels appeared to go to sleep correctly, but when the lid opened did a cold boot. Because this problem happens immediately on wake, and because sleep appears to work correctly, there is no useful information in the logs; this appears to be a very hard problem to diagnose.

Here is my work-around to use the 5.0.0-3265 kernel (the last I installed via updates available) on a vanilla Linux Mint installation:
  • Install Linux Mint 20.1 MATE edition.
  • Add repositories using Administration/Software Sources:
    • deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
    • deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
    • deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
  • Install kernel 5.0.0-3265-generic:
    sudo apt-get install linux-headers-5.0.0-65 linux-headers-5.0.0-65-generic linux-image-5.0.0-65-generic linux-modules-5.0.0-65-generic linux-modules-extra-5.0.0-65-generic
  • Edit /etc/default/grub to show the menu of kernels:
    GRUB_TIMEOUT_STYLE=menu
    GRUB_TIMEOUT=15
  • Edit /etc/default/grub so that your most recent choice of kernel becomes the default:
    GRUB_SAVEDEFAULT=true
    GRUB_DEFAULT=saved
  • Run update-grub
After you choose the 5.0.0-3265 kernel the first time, it should boot by default, and sleep and wake should work properly. The problem with ehci-pci on wakeup has gone away, there is no need to install the userland files from galliumos.

Disk & Home Directory Encryption

Note that you should ideally install Linux Mint 20.1 with full-disk encryption. The release notes explain:
The move to systemd caused a regression in ecrypts which is responsible for mounting/unmounting encrypted home directories when you login and logout. Because of this issue, please be aware that in Mint 20 and newer releases, your encrypted home directory is no longer unmounted on logout: https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1734541.
Mint 19 with a full-disk encryption had this problem but I haven't and I have been able to reproduce it with Mint 20 and the 5.0.0-32 and 5.0.0-65 kernels, so it isn't usable. Home directory encryption works, but will leave its contents decrypted after you log out, rather spoiling the point.

Touchpad

As I described here, the touchpad isn't one of the C720's best features, and it is necessary to disable it while typing, or while using a mouse such as the excellent Tracpoint. I use Ataraeo's touchpad-indicator, but this doesn't seem to work on Mint 20.1 out of the box, using X.org's libinput driver. The release notes discuss using the synaptics driver instead. I installed it and, after creating the directory ~/.config/autostart the touchpad-indicator starts on login and works fine.

Update: I updated the post to reflect my mistake about full-disk encryption and to recommend the 5.0.0.65 kernel

2 comments:

David. said...

I've narrowed down the Linux Mint "wake-from-suspend" failure on the C-720s a bit more. Kernel 5.0.0-65 does not have the problem. It was the last of the 5.0 kernels Mint shipped. Kernel 5.3.0-19 does have the problem. It was the first of the 5.3 kernels Mint shipped. They don't seem to have shipped anything between 5.0.0-65 and 5.3.0-19.

Unknown said...

I tried this but was stuck on the login page for some reason! I installed Linux Mint 19.1 to get round the problem :)