ThinkPad

Lenovo ThinkPad L512
http://thinkwiki.de/L512

Lenovo ThinkPad L520
http://thinkwiki.de/L520

# ThinkVantage button
http://www.thinkwiki.org/wiki/ThinkPad_Button
http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work
http://www.thinkwiki.org/wiki/Installing_Ubuntu_11.04_%28Natty_Narwhal%29_on_a_ThinkPad_X220
xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
156 XF86Launch1
# start calc
gsettings set org.gnome.settings-daemon.plugins.media-keys calculator 'Launch1'

thinkfan
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/installit/master/hardware/install.thinkfan.sh -O - | bash -

#!/bin/bash

# install
sudo apt-get install -y thinkfan

# configure kernel module
echo "options thinkpad_acpi fan_control=1" | sudo tee /etc/modprobe.d/thinkpad_acpi.conf

# reload kernel module
sudo modprobe -r thinkpad_acpi && sudo modprobe thinkpad_acpi

sudo sed -i 's|START=no|START=yes|' /etc/default/thinkfan
sudo sed -i 's|DAEMON_ARGS="-q"|DAEMON_ARGS="-q -b 1 -s 15"|' /etc/default/thinkfan

cat <<EOF | sudo tee -a /etc/thinkfan.conf
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
(0,	0,	65)
(1,	65,	70)
(2,	70,	75)
(3,	75,	80)
(4,	80,	85)
(5,	85,	90)
(7,	90,	32767)
EOF

# start on Ubuntu Vivid
if [ $(lsb_release -rs | tr -d ".") -ge 1504 ]; then
    sed -i '$i /etc/init.d/thinkfan restart' /etc/rc.local
fi

# OPTIONAL: install lm-sensors to monitor temperatures
apt-get install -y lm-sensors

# manually set fan speed
echo level 0 | sudo tee -a /proc/acpi/ibm/fan

# read current fan settings
cat /proc/acpi/ibm/fan

# GNOME Sensors Applet
sudo apt-get install sensors-applet

# Links
http://thinkwiki.de/Thinkfan
http://zmalltalker.com/zlog/thinkfan.html
http://www.thinkwiki.org/wiki/Thermal_Sensors
http://www.thinkwiki.org/wiki/How_to_control_fan_speed
https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon#WWAN_.28Mobile_broadband.29