The easiest way to install thinkpad-scripts on Ubuntu, Arch Linux, Fedora and openSUSE is with your package manager, as described in From Package. If you are on another distribution, then you can build and install it manually using the instructions in Build Manually.
On Ubuntu and its derivatives, you can install from Martin’s PPA:
$ sudo -s # add-apt-repository ppa:martin-ueding/stable # apt-get update # apt-get install thinkpad-scripts
I, Martin Ueding, just (2015-01-24) tried out to package this for Fedora using the Open Build Service.
As far as I have understood and tested this, you have to download
/etc/yum.repos.d/. Then you can use
yum to install thinkpad-scripts.
$ sudo -s # wget http://download.opensuse.org/repositories/home:/martinueding/Fedora_21/home:martinueding.repo -O /etc/yum.repos.d/home:martinueding.repo # yum install thinkpad-scripts
I only have a Fedora 21 VM right now, so I could only test it there. The
virtual screen of the virtual machine could not be rotated, so I got an error
xrandr. It seems like it would work on a real machine. I would
be very grateful if somebody could test this and tell me about it.
First install all the dependencies, listed in Dependencies. Then, you can build and install with:
$ make # make install # ./setup.py install
To make the ACPI hooks take effect, you will need to restart
acpid with the
following on SysVinit/Upstart systems:
# service acpid restart
or on systemd systems:
# systemctl restart acpid
Packagers will also need to add the following line, run as root, to their post
installation hook to update the udev hardware database with the information in
# udevadm hwdb --update
Alternatively, you can use
make full-install which does that restarting for
you. However, this does not work when
DESTDIR is set to something! For a
direct installation, use
make full-install, for packaging, just use
These dependencies refer to Debian and Arch Linux packages, but should have
similar names in other distributions.
yum in Fedora and
openSUSE have a search for “provides”. In openSUSE, you could use the
tool to find out the package.
These programs are needed during the build process.
|Needed Program||Debian package||Arch Linux package||Fedora package||openSUSE package|
These programs are required for the execution of the scripts.
|Needed Program||Debian package||Arch Linux package||Fedora package||openSUSE package||Version|
|linux||>= 3.11.0-17 |
The Ubuntu Kernel with version
openSUSE and other distributions are not patching the 3.?.0 kernel, but ship a 3.?.? kernel. So users of distributions other than Ubuntu (maybe even Debian) would have to check whether their kernel has the acpi patch.
These programs enhance the functionality of the scripts, but are not strictly required.
|Needed Program||Debian package||Arch Linux package||For|
|gsettings||libglib2.0-bin||glib2||subpixel anti-alias order with GNOME/XFCE|
|lsusb||usbutils||usbutils||docking detection with a USB device|
|pactl||pulseaudio-utils||libpulse||volume control when docking|
|xsetwacom||xserver-xorg-input-wacom||xf86-input-wacom||Wacom device rotation|
thinkpad-scripts includes files that hook into various hardware events:
- a udeb hwdb file that allows proper operation of the bezel buttons on ThinkPad X220 and X230 Tablet computers
- udev rules to automatically run thinkpad-dock when docking and undocking
- ACPI hooks to automatically call thinkpad-rotate when the screen is rotated/unrotated
All of these files should be installed as part of the installation process. If acpid is not enabled by default on your computer (which is the case for Arch Linux), you need to enable and start it for the ACPI hooks to work. Additionally, after installing thinkpad-scripts, you may need to restart udev and acpid for the new rules and hooks to take effect.
After following the configuration instructions above, you generally will not need to call any of the scripts manually. However, in case you do, this is a synopsis of each command:
thinkpad-dock [on|off] thinkpad-mutemic thinkpad-rotate [direction] thinkpad-touch [on|off] thinkpad-touchpad
See the Manual Pages for more details.
You can modify the default configuration for things such as the screen
brightness to set when docking, the relative positions of displays, and the
direction of screen rotation by placing configuration scripts in
$HOME/.config/thinkpad-scripts. See the Manual Pages for
You may need to modify some of the parameters depending on your hardware. See Hardware-Specific Configuration for more details.
thinkpad-scripts fixes the bezel buttons so that they work, but it does not bind
anything to them by default. If you’d like, you can bind the
script (or any other program for that matter) to one of the bezel buttons using
your desktop environment. For example, under GNOME, go to “Settings” →
“Keyboard” → “Shortcuts” → “Custom Shortcuts” and add a new “shortcut”.
thinkpad-scripts includes a script,
thinkpad-touch, to make it easy to toggle the
touchscreen of the X220 Tablet on/off. If you want to disable your touch screen
on startup, use your desktop environment to call
thinkpad-touch off when
Under KDE, it is convenient to place all of the scripts in a drawer so that you can access them quickly. See Script Drawer For KDE Plasma Panel for instructions to do this.