Home

last update: 2024-04-26 at 16:00:23 CEST

Installing Debian Stretch on a Thinkpad X240

Installation

I installed Debian 8 with the LXDE desktop via an USB stick and updated to Stretch by replacing jessie with stretch in /etc/apt/sources.list

deb http://ftp.de.debian.org/debian/ stretch main non-free contrib
deb-src http://ftp.de.debian.org/debian/ stretch main non-free contrib

deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free

# stretch-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian/ stretch-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ stretch-updates main contrib non-free

Then do a apt-get update && apt-get dist-upgrade

Brightness Keys

Brightness keys do not work out-of-the-box. I openend up lxhotkey and bound:

  • F5 to xbacklight -10

  • F6 to xbacklight +10

You have to install xbacklight for that

xbacklight seems to not find the correct directory in /sys so create/edit the file /usr/share/X11/xorg.conf.d/20-intel.conf

Section "Device"
    Identifier  "card0"
    Driver      "intel"
    Option      "Backlight"  "intel_backlight"
    BusID       "PCI:0:2:0"
EndSection

This works for me

Install Apps

tools
sudo apt-get install chromium icedove gimp asciidoc source-highlight \
        mc bc blender cups curl darktable dstat \
        ffmpeg gphoto2 powertop imagemagick lame \
        lftp vlc mplayer nload nmap rsync sshfs tree
dev-tools
sudo apt-get install vim tmux cmake g++ clang gdb libboost-all-dev openssl \
        ninja-build libcurl4-openssl-dev libssl-dev

Icon Theme

I like the Papirus icon theme. Installation is as simple as

sudo tee /etc/apt/sources.list.d/papirus-ppa.list << EOF
deb http://ppa.launchpad.net/papirus/papirus/ubuntu xenial main
EOF

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E58A9D36647CAE7F
sudo apt-get update
sudo apt-get install papirus-icon-theme

Powersafe

I set all tunables to good in powertop except my logitech usb mouse receiver (it takes too long time to wakeup). Append these lines to sudo vim /etc/rc.local

powertop --auto-tune
echo 'on' > '/sys/bus/usb/devices/1-1/power/control'
exit 0

Thinkfan Fan-Control

sudo apt-get install thinkfan lm-sensors
sudo vim /etc/modprobe.d/thinkfan.conf

# add the line
options thinkpad_acpi fan_control=1

sudo vim /etc/default/thinkfan

# add line
START=yes

sudo sensors-detect

sudo service kmod start

sensors

find /sys/devices -type f -name "temp*_input"

# add the sensors from the command above to:
sudo vim /etc/thinkfan.conf
my /etc/thinkfan.conf
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input

(0, 0,  55)
(1, 48, 60)
(2, 50, 61)
(3, 52, 63)
(4, 56, 65)
(5, 59, 66)
(7, 63, 32767)

reboot

test thinkfan in the foreground

sudo thinkfan -n

If its working enable and run the service

sudo systemctl enable thinkfan.service
sudo /etc/init.d/thinkfan start