My Site
Ubuntu 14.10 and the Lenovo ThinkPad x250

I recently purchased and received a Lenovo ThinkPad x250 and immediately proceeded to install Ubuntu over whatever version of Windows it came with.

Unfortunately, not everything works out of the box (multiple monitors using the ultradock, sound with external speakers and the ultradock, 3d video, and the trackpoint buttons). It's not very surprising, as these machines were just released in the US last week, and I'm sure the next version of Ubuntu will have much better support for them. In the mean time, however, I did get some things to work, and I'm providing some instructions for those here.

Multiple Monitors using the UltraDock

I've always loved ThinkPads, and most of my laptops have been one, but it's only been recently that they've been enough to replace my desktop needs. That happened for me because of the UltraDock, which allows you to use multiple monitors with your laptop. On my T410 (which had a different ultradock), it just worked out of the box. With the x250 and it's dock, X would see both monitors as one large monitor. This is because the new dock uses a DisplayPort 1.2 feature, which didn't make it into the Linux kernel until 3.17 (Ubuntu 14.10 uses 3.16). Following this guide fixed the problem for me, with one change. I used the 3.18.7 kernel instead of 3.17.1 as he describes in the article, because 3.18 just happens to help fix the trackpoint button problems as well.

Trackpoint Buttons

Doing what I describe here will make the trackpoint buttons work (including middle click scrolling), but it will completely disable the touchpad. I'm ok with that, touchpads aren't my favorite. First, follow this guide to update your kernel, but instead of 3.17.1, use kernel 3.18.7 instead. (If you're feeling brave, I've got precompiled debs here). Edit /etc/modprobe.d/psmouse.conf and add the following line:

options psmouse proto=imps

Update: Putting options psmouse=imps in /etc/modprobe.d/psmouse.conf seems to do nothign. Instead, add psmouse.proto=imps to your kernel cmdline, as directed below in the "Volume Control and Backlight Brightness Keys".

Then, create a file at /usr/share/X11/xorg.conf.d/90-evdev.conf

Section "InputClass"
 Identifier "Touchpad/TrackPoint"
 MatchProduct "PS/2 Synaptics TouchPad"
 MatchDriver "evdev"
 Option "EmulateWheel" "1"
 Option "EmulateWheelButton" "2"
 Option "Emulate3Buttons" "0"
 Option "XAxisMapping" "6 7"
 Option "YAcisMapping" "4 5"

Restart your X server, and your trackpoint buttons should work as expected.

Volume Control and Backlight Brightness Keys

To get the volume keys to work, I had to pass acpi_osi=Linux to the kernel boot options. Also, to get backlight control to work, add acpi_backlight=vendor as well. In /etc/default/grub, my GRUB_CMDLINE_LINUX_DEFAULT looks like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor psmouse.proto=imps"

After making those changes, run update-grub and reboot. This made the multimedia keys work for me, but the brightness controls still did not work. I installed a program called xbacklight and mapped the brightness controls to xbacklight -dec 10 and xbacklight -inc 10. There's some more work that could be done here (like automatically setting it to full brightness on AC power, etc), but this is good for now.

In Progress...

  1. The audio out jack on the Ultradock doesn't work at all, though the speakers on the laptop and the headphone port do work.

Update, Feb 21, 2015

I found the Padoka PPA here: Adding this PPA, running apt-get update && apt-get dist-upgrade eliminates the need to compile xf86-video-intel as directed in the "Multiple Monitors using the UltraDock" instructions, and makes 3d video work .

Still not working: the sound port on the UltraDock.

Update, Mar 01, 2015

I got the audio port on the ultradock working!

To make this work, create a file at /lib/firmware/x250.fw with the following contents:

0x10ec0292 0x17aa2226 0

0x16 0x21211010
0x19 0x21a11010

... then, create a file called /etc/modprobe.d/hda-intel.conf with the following contents:

options snd-hda-intel patch=x250.fw,x250.fw,x250.fw

Reboot, and the audio port on your dock should work. I imagine the process is the same for any of 2015 thinkpads. With each thinkpad, the only number that changes is the second one under the [codec] heading (in this case, 0x17aa2226). That information can be found by downloading this script:, and running it via bash as root. Search fo 0x17aa in the output, and you'll find the other half of the number you need.

Update Mar 2, 2015 - Fingerprint scanner works

Following the instructions found in this gist, I was able to get the fingerprint scanner to work. It doesn't work very well. I often have to try more than once to get it to recognize my fingerprint, and there doesn't seem to be any way to scan multiple images of your finger to improve reliability.

Coupled with the fact that the things are easy to fool, I will be disabling it.

View 30 Comments
Filed under: Linux

Awesome-wm screenshot hotkey

At Ender Labs, pretty much everyone but me uses a Mac. In the last year or so, I've started to realize that there must be some new Mac app or function that, via a hotkey, allows you to select an arbitrary region of your screen, create a screenshot, and then automatically uploads it to a hosting service. I know this, without doing any research, because in irc/slack/gtalk I've started receiving screenshots as responses to questions I ask. These screenshots arrive fairly quickly after said question is asked.

I rarely take screenshots (unless I absolutely have to), because my process involves opening gimp, going to file->create->screenshot, selecting the "select region to grab" option, setting the delay to 2 seconds so I can get the gimp window out of the way, selecting the area I want to screenshot, exporting it to a jpeg, and then uploading it to my server. It's enough hoops to jump through that I usually just try to describe what I'm seeing rather than taking a screenshot.

I liked this instant screenshot idea, and went looking for something like it for Linux. I found a few apps, but nothing were exactly what I wanted, so I decided to write my own. It's just a short, dirty python script that uses ImageMagick's import command to screenshot a region, then automatically uploads the resulting jpeg to my server, and copies the url to X's primary clipboard with xclip. The python code is below.

#!/usr/bin/env python

import os
import os.path
import uuid
import urlparse

fn = "/tmp/%s.jpg" % str(uuid.uuid4())
sn = os.path.basename(fn)
os.system("import %s" % fn)
os.system("notify-send \"Uploading %s\" ..." % sn)
os.system("scp %s" % fn)

url = "" % sn

os.system("echo -n \"%s\" | xclip -selection primary" % url)

os.system("notify-send 'Copied to clipboard.'")

I saved the file to ~/bin/screenshot, made it executable, and then put the following in awesome-wm's rc.lua (keybindings section):

awful.key({ modkey, "Shift"   }, "s", function() awful.util.spawn("/home/synic/bin/screenshot", false) end),

Now, all I have to do is press Win+Shift+s, select a region of my screen, and the url is automatically copied to my clipboard. Neat!

Upgrade to Captcha

Welp, my simple human test, where you had to type “vim” to enter comments on this blog, finally failed to keep out the spam. Surprisingly, it did work for 6 years before I had problems.

Over the weekend, there was a steady stream of spam to the comments. Fortunately, I don’t get a lot of comments, so removing all comments after a certain date was sufficient.

I installed this to combat the problem:

Installation and usage is very simple. We’ll see how it goes from here.

Lute Society of America Seminar 2012

This year, I went to the Lute Society of America Seminar at Case Western Reserve University in Cleveland, Ohio. It was a lot of fun, and I'm going to share some of my experience here.

Getting there with a lute was quite an adventure. Lutes are terribly delicate instruments, even the larger ones weigh no more than a few pounds. Trusting the airline not to body slam a very expensive belonging like this pushes your limits. While my lute made it unharmed, it's case is marred all over now.

It was set up like a lot of the computer conferences that I've been to, UTOSC, Brainshare, etc, in that there are classes that you can choose to go through, you're surrounded by a bunch of people with a common interest, there's plenty of nerds about and only a few women, and you get to meet people at the top of food chain in the subject. The differences, though, were that at this "conference", I really had no idea about most of what they were talking about, it was a week long, and there were amazing concerts every night.

Every single day was exhausting. I would get up every morning at 6:30am (which is four hours earlier than I get up at home, due to the time change and general laziness) in order to be ready for breakfast at 7. Classes would start at 9am, go to 11:30, at which point you were on your own for lunch. Every other day there was an afternoon concert at 1pm. Classes resumed at 2:15 and ended at 5:30, dinner was served at 6pm, and then the night concert went from 7:30 to 9:30. After that there was socializing and practicing until you went to bed, and then you'd do it all over again in the morning.

Because I am new to the lute, and there weren't many beginner classes, I usually went to whatever master class was going on during a specific hour. In a master class, one or two people volunteer to play a piece for the lecturer (who is an expert on the instrument at hand), and then they receive instruction on how they can do better. I found these classes to be very informative on technique, playing with feeling, etc. Also, it was very good just to see the masters at work. Even the very best attendee's skills paled in comparison.

The concerts were absolutely amazing. The audience, all being lute lovers themselves, were entirely captivated... not a cough or sneeze could be heard. Every single one I'd just sit there in awe with goosebumps up and down my arms.

One thing I learned by meeting Paul O'dette, Robert Barto, Nigel North, Eduardo Eguez, is that what I thought was the entire corpus of knowledge before I went, was really just scratching the surface of what there is to know. Not only are these people fantastic musicians, but they are all historians when it comes to early music. They know which composer was where when he wrote what piece, and why. It was quite overwhelming at times, but always very interesting.

Here are some pictures from the events:

View 2 Comments
Filed under: Music

Exaile needs a team leader

Due to the recent news Regarding Stallman’s heart attack, I ended up on the wikipedia page for The Cathedral and the Bazaar, and I was reading the “Guidelines for creating good opensource software”. Number 3 says:

“When you lose interest in a program, your last duty to it is to hand it off to a competent successor.”

I have shirked my duty. I should have done this a long time ago. It’s not necessarily that I have lost interest, though that is part of it (I’ve gone the route of cloud music, such as spotify and google music), I really don’t have the time anymore.

Had I done this a year or two ago, I can think of a few people who would have taken the reins. Now, though, there’s hardly anyone left who has any time anymore. Perhaps everyone is going the route of cloud music, I have no idea.

Anyway, I posted a “help wanted” listing of sorts, asking for someone to step up as the team leader. We’ll see where that leads us :)