Lenovo Yoga 900 screen auto-rotation and touchpad

With the patches so far mentioned on top of Linus’ tree, almost all of the Yoga 900’s hardware works. But there were two pain points:

  • Screen rotation
  • Trackpad on suspend/resume

For the first, I posted several questions to LKML/linux-iio/linux-input because it seemed like `watch -n 0.1 cat /sys/bus/iio/devices/iio\:device*/*raw*` was not updating on my system. It definitely did at some point, but most recently it was not. Well, I went and grabbed iiotools and after building it with some changes (no longer defined constants), it seems like `lsiio` caused the IIO sensors to unstick. But the /dev/ nodes were still not producing output. Discussing this further upstream, it seemed like a new quirk was needed. After updating my system to Gnome 3.18 with the PPAs for gnome3 and gnome3-staging, and installing iio-sensor-proxy, auto-rotation worked!

For the second, I again worked a bit upstream. It sounds like Linus had hit something pretty similar and a hack/workaround was proposed. A more complete fix (but not yet final) is here, but I expect there to be another version based upon Benjamin Tissoires‘ reply, which will finally close the race with suspend/resume.

This makes me rather hopeful that 16.04 out of the box (well, except maybe the DisplayLink drivers) will be have all the hardware on the Yoga 900 enabled!

Ubuntu GNOME 15.10, Lenovo Yoga 900 & Dell D3100 USB Docking Station

With my previous foray into getting most of the base hardware with my Yoga 900 working, I wanted to look at hooking up some of my accessory purchases, a Dell 3100 USB 3.0 docking station (including 3 video outputs, which is the maximum for the SkyLake generation of integrated video as I understand it) and a 4K external monitor (I also have an older 28″ external monitor I’d like to keep using, but it’s still hooked up to my to-be-reinstalled-upon-leaving-my-current-job desktop).

First complication was the display output of the Yoga 900, which is over the brand-new USB-C port. The cables that came with both my docking station and monitor, for high-speed video over USB, were standard USB cables. Radioshack sells (for $29.99, which seems bit steep, but I was in a rush) a USB-C to USB adapter. Without the adapter, you can plug the D3100 into one of the other super-speed USB ports, but you won’t see the DisplayLink interfaces in lsusb’s output (the dock also has 3 super-speed USB ports, 2 normal USB ports, an Ethernet port, and a 8mm headphone jack).

So, get the adapter (or something similar) and now all of the ports show up in dmesg and lsusb. Except that Linux can’t talk to the DisplayLink devices. Turns out, though, DisplayLink is working on a driver (not yet investigated if they are going to upstream this themselves or not…) for Ubuntu. The script they ship claims to only work with up to 3.19, but 4.4-rc4 seems fine (just not officially supported). Also, the underlying installer script only knows about 14.04.x and 15.04, and I’m on 15.10. It only needs to detect this version string, though, for determining whether to use upstart or systemd configurations. A trivial change the embedded installer script to use systemd on 15.10 and everything seems to work.

Note that by default, the Ubuntu kernel .config signs kernel modules. And this module is not signed using DKMS (as I understand it), so you’ll need to make sure your .config doesn’t have kernel module signing enabled.

But once you have that all installed, and plug in the USB-C adapter, the display(s) immediately are recognized and placed next to the built-in display’s screen. Could be a lot harder!

Ubuntu GNOME 15.10 on a Lenovo Yoga 900

As I begin to transition away from my current job, I figured I’d take advantage of my little IBM discount on Lenovo products and order myself a snappy new laptop. I chose a Lenovo Yoga 900 and was very impressed immediately by the size and quality of the product. And, of course, I immediately wanted to get rid of Windows.

I had a Ubuntu GNOME 15.10 image already on my USB key, so I simply needed to figure out how to get to the BIOS or Boot Menu. Turns out there, is a small button on the right side of the Yoga 900, called the Novo button, which when used to power on the system allows you to access the BIOS menus. Worked like a charm!

Out of the box, Ubuntu 15.10 installed fine, although the /boot partition selected by the auto-partitioner is so small as to be useless if you want to actually build multiple kernels on the system (and you are going to need to for 15.10!). So I resized it up to 1GB and moved on.

Most of the basic hardware worked, except:

  • wireless
  • touchscreen
  • touchpad

So, maybe not “most” in some sense, but hey.

Luckily, the wireless fixes were already upstream, so it was just a matter of putting an appropriate .deb from http://kernel.ubuntu.com/~kernel-ppa/mainline/ on the USB key and installing it. Rebooting and I had wireless. Note, the reason for this is because the Yoga 900 does not have a hardware rfkill switch like some Lenovo products do. So without a quirk for the Yoga 900, the kernel was interpreting the rfkill switch as always being on, and failing to enable the wireless.

With wireless working, I could do my normal

apt-get update; apt-get upgrade

to pull in any fixes since I made my USB key. Since I wasn’t going to be currently using the Ubuntu-provided linux-image-generic kernels, I went ahead and removed those packages first, to minimize the download size.

To get the touchscreen and touchpad working, I needed to apply the 16-patch series posted at https://lkml.org/lkml/2015/11/30/441. I git-cloned Linus’ tree and applied the series, building a 4.4-rc4-based tree. That series is planned for v4.5, btw, so the patching should only be necessary for one more cycle.

Booting into that kernel, the touchscreen and touchpad worked! I proceeded to remove the kernel from the PPA, since it wasn’t fully functional, and now I’ve got a pretty nice setup.

Remaining on my list:

I also purchased a new external monitor and USB docking station from Dell. Based upon my reading of the specs, I think they should work, once I get a USB-C (the only video output on the Yoga 900) to standard USB adapter (the docking station and monitor both came with the rest of the cables). That’ll be my next post!