Debian on a £190 Lenovo ThinkPad X1 Yoga Gen 2

I’ve wanted a ThinkPad X1 Yoga for a while, and I found one on eBay for a price I was willing to pay: £190. It even came with a charger…

Back in 2017, it was - since it has some upgrades - somewhere in the region of $2000.

For my £190, I got an i5 laptop with a nice, bright touch screen, with 16GB of RAM, and a 512GB SSD. I’ve used it for a week or so now, and, wow, that’s a lot of computer for the money.

It’s not in pristine condition, but it’s close to perfect. There are a couple of marks on the screen, where it has rubbed against the buttons above the trackpad, but those are not noticeable in use, fortunately.

Even the battery life is pretty good for the money, holding 84% of the original capacity.

It didn’t have the (non-standard) Ethernet adapter with it, but, since it has two USB-C ports, I can just use a USB-C hub with an RJ45 socket it in when I need it.

It’s amazing how much computing power you can get for relatively little money these days, if you are willing to take a risk on a second hand machine.

Installing Debian

Debian installed without a hitch. I didn’t do anything special (but see below about “Firmware update”), other than using the non-free installer.

The only things which did not work out of the box were the fingerprint reader and the WWAN cellular modem.

Firmware update

Initially, I installed using BIOS mode.

But, to update firmware with fwupdmgr, I needed to have used UEFI mode.

So I changed the mode in the BIOS, and reinstalled Debian.

Now, fwupdmgr worked, and I could install the firmware updates - and there were a few, with quite significant version changes.

WWAN cellular modem

The WWAN cellular modem wasn’t working out of the box.

It turns out it doesn’t have one.

I wasn’t expecting one, but I saw the SIM slot, and got excited.

So that explains why it wasn’t working by default.

Fingerprint scanner

I didn’t fancy my chances of getting the fingerprint scanner working, but it actually took just a few minutes.

Getting it working

Here is a great set of instructions.

Just in case that site goes down, the gist is this:

sudo wget 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2937db010da51096cd4277ff8d4c774ba6d18f90' -O /etc/apt/trusted.gpg.d/uunicorn.asc

echo -e 'deb [signed-by=/etc/apt/trusted.gpg.d/uunicorn.asc] https://ppa.launchpadcontent.net/uunicorn/open-fprintd/ubuntu kinetic mainn#deb-src [signed-by=/etc/apt/trusted.gpg.d/uunicorn.asc] https://ppa.launchpadcontent.net/uunicorn/open-fprintd/ubuntu kinetic main' | sudo tee /etc/apt/sources.list.d/uunicorn-open-fprintd.list

sudo apt update && sudo apt install -V open-fprintd fprintd-clients python3-validity

I also needed the troubleshooting advice here, in particular:

It systemctl status python3-validity complains about errors on startup, you may need to factory-reset the fingerprint chip. Do that like so:

sudo systemctl stop python3-validity
sudo validity-sensors-firmware
sudo python3 /usr/share/python-validity/playground/factory-reset.py

# At some of the above points you may get a 'device busy' error,
# depending on how systemctl plays along. Kill offending processes if
# necessary, or re-run the systemctl stop python3-validity command, 
# in case it has automatically been restarted, or or kill other
# offending processes.

sudo systemctl start python3-validity

And, for persistence after suspend:

$ sudo systemctl enable open-fprintd-resume open-fprintd-suspend

And, bingo, it worked. I could enroll my right index finger.

Enrolling fingerprints

To enroll another finger, the command is:

fprintd-enroll -f name-of-finger

It also looks like I can enrol prints through the GNOME settings user panel, but I have not tried this.

Good for unlocking, but not logging in

It works for logging in (via sudo pam-auth-update), but it does not unlock the keychain (unlike logging in using a password).

This is expected because of the way the keychain security works, and, frankly, I’d rather than it was not possible to log in to the machine using a fingerprint at all. I’ve yet to look into whether I can disable this.

Using a fingerprint to unlock a logged-in session works fine.

Enable for sudo

sudo pam-auth-update also covers enabling authentication for sudo, which is convenient.

Fingerprint scanner after suspend

The command above - sudo systemctl enable open-fprintd-resume open-fprintd-suspend - is flaky.

I’ve tried replacing the ExecStart line in /usr/lib/systemd/system/open-fprintd-resume with:

ExecStart=systemctl restart open-fprintd.service python3-validity.service

The touchscreen

This just worked.

There’s a bit of a knack to folding it back into tablet mode, as I’ve found that I can only change the screen orientation by rotating the laptop if the screen is open more than 180 degrees. Not a problem, I just need to remember to rotate the screen back to landscape before closing it from tablet mode into laptop mode, as otherwise the screen is stuck in portrait mode.

I like Xournal++ for scribbling on PDFs.

The small pen which comes with the X1 Yoga again worked out of the box. It’s not as comfortable as the pen for Microsoft Surface devices, but it has the distinct advantage of being there, and charging while docked.

It’s possible to buy larger pens, but working out which one I need is a nightmare, as there appears to be multiple different types, which are not all compatible. And, for now, I’m going to see how I get on with the integrated pen.

Removing gnome-documents

gnome-documents was using a lot of CPU - 300% ish - so I removed that:

apt remove gnome-documents -y

I don’t really see the point of it anyway, to be honest.

So, yes, so far, so good!