Configuring ThinkPad Yoga 12 with Ubuntu 15.10

IMPORTANT NOTE! This post is now very much out of date. Most of the features that the spin.py tool provided now work out of the box with Ubuntu 18.04, except palm rejection. Go to my github page for instructions on how to get palm rejection working.

Ignore the rest of this article, unless you’re trying to install an old distro on your lapotop.

A few months ago I got myself a new laptop, after my 9 year old trusty HP TC4400 was slowly falling apart, with display problems and getting overly hot when doing anything beyond typing working in the terminal. Then again, getting 9 years out of a laptop is pretty good, so I can’t really fault HP.

Picking a laptop for doing art and comics on Linux is a tricky proposition, especially if you want a convertible one with stylus support. Linux has gotten a lot better at supporting all kinds of new hardware, but with a new TabletPC you’re really pushing it. With a touchscreen, stylus, screens that can flip around, accelerometers that detect screen orientation and more to deal with, in addition to WiFi cards and trackpads, things can quickly become problematic.

I wanted a laptop that was powerful and light weight, a typical ultra book, but made for drawing. I considered many options, including the:

  • Dell XPS 13 with my Cintiq 13HD, a great machine with official Linux support, but not very portable when combined with a Cintiq.
  • The Asus ZenBook with intel core m. It’s less powerful, but also less expensive, than the Dell. On the plus side, it has no fans, so can run completely silently, but would require me to lug along the Cintiq.
  • The Cintiq Companion 2, looks like a great machine for drawing, but I needed a machine that was 50% for drawing, and 50% for typing…plus I couldn’t find much info about running Linux on it so was a bit skeptical if I would run into problems I couldn’t solve, and would be stuck with Windows.

Lenovo ThinkPad Yoga 12 (2nd gen)

What I wound up with was the ThinkPad Yoga 12 (2nd gen), with core i7 and 8G of RAM. It ticked most of the boxes, being powerful and light, and with Wacom support. The stylus that comes with it was a bit on the skinny side, so I bought a Wacom Bamboo Feel Carbon pen, which works great. It feels like I’m getting more accurate pressure support with the Bamboo stylus than the original, it seems to register strokes with a lighter touch. Still, neither pen is quite as good as the Cintiq 13HD one. You simply have better control over the pressure with it, especially when using light pressure, plus it has a double side switch.

I got the laptop about a month before Ubuntu 15.10 came out, and quickly found out that it required a newer kernel than the one found in 14.04 and 15.04. Instead of being adventurous and upgrading the kernel, or trying another bleeding edge distro, I decided to wait it out, and just use Windows 10 on it for a while. It also gave me an opportunity to see how the hardware was meant to function.

Installation

A while after Ubuntu 15.10 came out, I found the time to install it on my new laptop. I started by cloning the whole drive to another machine, just in case, and installed Ubuntu alongside Windows. This worked more or less out of the box, all I had to do was go into the BIOS and disable Secure Boot, and then just follow the onscreen instructions during the install. Even resizing the windows partition worked fine (it’s recommended that you defrag and run a file check on Windows before doing this).

What Works

After the installation, I found that a lot of things work out of the box. The stylus, touchscreen and touchpad all worked. In addition, the following special keys, just work:

  • Fn-Esc – Function lock
  • Fn-F1 – Mute sound
  • Fn-F2/3 – Adjust volume
  • Fn-F4 – Mute microphone
  • Fn-F5/F6 – Adjust screen birghtness
  • Fn-F8 – Toggle WiFi on/off
  • Fn-Space – Keyboard light
  • Fn-F12 – Opens the home folder

The following keys did not work out of the box, and I honestly haven’t tried to get them working:

  • Fn-F9 – System settings
  • Fn-F10 – Search
  • Fn-F11 – Swtich desktops (I think)

I haven’t tested Fn-F7, which is presentation mode, as it needs an external display or projector attached.

Battery Life

Out of the box, Ubuntu 15.10 was using up the battery quicker than Windows 10. This, I believe is mostly due to the default kernel settings, and is easy to fix. Just run the following commands:

sudo apt-get install powertop tlp tlp-rdw tp-smapi-* acpi-call-dkms
sudo tlp start

You can also run ‘sudo powertop’ to see what is draining your power. These changes gave me similar battery life to what I was seeing under Windows 10, at around 7.5 hours.

The Touch Screen and the Wacom Stylus

While the touch screen works out of the box, scrolling using touch did not work in Firefox. So I installed Google Chrome instead, which works great. Evince, the PDF viewer, on the other hand, supports both scrolling and pinch to zoom out of the box.

The stylus worked out of the box too, but there are a few issues with it. Firstly, the calibration seems broken. Sometimes it will be unable to finish, and if it does, the calibration gets worse each time you run it. You can run ‘xsetwacom –set “Wacom ISDv4 EC Pen stylus” ResetArea’ to reset the calibration for the current session.

Secondly, there is no palm rejection, so if you rest your hand on the screen while drawing, it will register multiple touches all over the place and mess everything up. Luckily I found wdbm/spin on github, which solved this and other problems, but it didn’t do quite what I wanted. Since it was open-source, I simply forked it and made the changes I needed to get it working the way I wanted. You can find my fork here https://github.com/ragtag/spin

What this gives you is manual toggle between laptop and tablet mode, automatic screen rotation when in tablet mode and screen rotation locking if needed. It also includes palm rejection when using the stylus, and disables the touchpad and nipple, when in tablet mode (I believe the keyboard is disabled in the kernel). See my github page, for instructions on how to set it up and use it.

I really wanted to trigger the switching between laptop and tablet mode by flipping the screen backwards, but have yet to figure out how to get this working properly.Currently I can’t detect any difference between going from tent mode to tablet mode, and going from tent mode to laptop mode, so the solution was to do this manually for now, either using a desktop icon you can add to the Unity launcher, or running spin.py with the –mode option.

I haven’t tested this extensively yet, as I just finished coding it a couple of days ago, but so far it seems to be working fine. The only problem I’ve found, is that I sometimes get a unity-settings error, when screen rotation is changed too rapidly, though this error doesn’t seem to cause any problems. If you do find any problems with it, please let me know.

Look Ma, No Keyboard

With the tablet mode working, you quickly find you miss having a keyboard. You can, of course, connect a wireless or USB keyboard, but for ultimate portability it would be good to do without. I’ve found the Onboard keyboard, that comes with Ubuntu 15.10, to be pretty nice. You can set it to be a full keyboard with function keys, and by checking “Show floating icon when Onboard is hidden” in the Onboard General Preferences, you get a small icon you can place anywhere on the screen, to quickly access the keyboard. With a multi touch screen, you can even type reasonably quickly on it.

On my old laptop, that had a Wacom pen, but no touch screen, so I used CellWriter instead. This is a nice alternative to Onboard, that includes both an on-screen keyboard and hand writing recognition.

Another essential tool, that can replace keyboard shortcuts when drawing, is Easystroke gesture recognition software. It lets you assign different mouse/pen gestures to keyboard shortcuts or commands. You can even assign the same gesture to different things in different software. When using it you simply hold in the side switch on the pen and draw a shape on the screen to trigger a keyboard shortcut, such as drawing an S to save, or a straight line down, to Undo. It’s very snappy, and you’ll find that all you need is just a handful of gestures.

Drawing Software

Since I only got all of this working a few days ago, I really haven’t had the time to do a lot of real work on it yet, but I’ve done some quick tests with the Gimp, Krita and MyPaint. All work nicely with the pen, but none work great with the touch screen yet. Krita has got preliminary support for touch to zoom/pan on Windows only, while with both the Gimp and MyPaint you’ll find yourself finger painting if you try to touch the canvas. Hopefully we’ll see improvements there soon, as moving around the canvas is with no keyboard and thus no modifier keys, can be problematic and more and more devices are getting touch screens.

I worked a bit in Clip Studio Paint under Windows, and it has really great touch support by comparison, with touch to pan, zoom and rotate the canvas, plus a GUI that can optionally be optimized for touch screens, with bigger buttons, special sliders, toolbar with frequently used actions and more.

Conclusion

It’s been an interesting experience to get my ThinkPad Yoga 12 up and running on Linux, and it was honestly a lot more work than I expected, but I’m pretty happy with the result. When I bought it I didn’t think I would use the touchscreen much, I was mostly getting it for the pen support, but now I find myself using the touchscreen all the time, I even reach for the screen on other laptops that do not have a touchscreen. It just feels natural. 🙂

When it comes to drawing it’s very good, just not quite as good as a Cintiq. I recently finished a painting on it done on the go in Krita (under Windows as my Linux setup wasn’t ready), and printed it on canvas at 40x50cm. I did miss my calibrated 30″ screen for previewing it on, but the end result came out just fine. This machine can definitely be used for professional work, especially when on the go, but if you draw full time, you’ll probably want a bigger screen/cintiq at home.

December 25, 2015

29 responses to Configuring ThinkPad Yoga 12 with Ubuntu 15.10

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.