Installing Debian testing (jessie) on a Lenovo Thinkpad T440

Share your own howto's etc. Not for support questions!

Installing Debian testing (jessie) on a Lenovo Thinkpad T440

Postby simen » 2014-02-03 22:21

Overview

I recently purchased a Thinkpad T440, and wanted to install Debian on it. Searching the web for installation guides on this particular machine, I didn't find much, so I decided to add to the scarce literature by writing an installation report myself. Note, I found a lot of useful info in this reddit piece

For details about installing Debian in general, of course, visit: http://www.debian.org/releases/wheezy/amd64/

I'll outline the basic installation steps for the benefit of new users. If you're familiar with installing Debian, you'll probably want to read the following summary, then skip to the end of the document for tips on how to configure the hardware after the system has been installed.

Most of the hardware works out of the box, but there are some fixes to be made. To get the wireless card working, you can install the package firmware-iwlwifi (from the non-free Debian repository). Also, you'll probably want to edit the file /ush/share/X11/xorg.conf.d/50-synaptics.conf to tweak how the touchpad works. I did experience and a few display bugs (flickering green lights in the Activities menu and such), which were mostly fixed by help of a gnome extension called Impatience. More on all of this near the end of this document.

The hardware/software

The basic hardware specs can be found here. I got my machine fitted with the i5-4200U processor and a 120 GB SSD.

As for the Debian version, I'm opting for Debian Testing (currently Jessie), which strikes a good balance between stability and uptodate-ness. Current Stable (Wheezy) might have trouble with some of the hardware, although I couldn't say for sure, not having tried it. I'm using the "netinst" installer, which puts a pretty bare-bones OS in place, to be complemented according to the needs and tastes of the user.

You will write the installer to an usb disk from a disk image (file with *.iso extension). Installation iso images for Testing netinst can be found here: http://www.debian.org/devel/debian-installer/ The architecture you're after would be amd64.

Note that you probably want a wired internet connection to use the netinst iso, as the installer presupposes that you are connected to the internet, and the wireless network card is not working out of the box. If you can't hook your computer up with a regular LAN connection on a cable, and you don't want to install firmware-iwlwifi manually without an internet connection, consider looking for a hd-media iso rather than the netinst iso.

Getting started, making a bootable usb stick

Standard caveat: If you want to keep existing data on the disk, back up all your valuable files before proceeding! It's rare to accidentally lose data during an install, but you're better safe than sorry. If the machine has a preinstalled OS you plan on keeping, take a note (pen and paper, please) of the size of the partition containing that system. This will help you when repartitioning the disk.

With that out of the world, the first thing you'll need to do, is make a bootable usb stick containing the Debian installer. Doing so is trivial these days, and you'll find lots of applications and tutorials online. If you're on Windows, see here for a simple tutorial on how to create a bootable usb with a GUI application called win32diskimager.

unetbootin seems to be a popular alternative that works in Linux, OS X and Windows. It can be found in Debian's software repositories. A boon of unetbootin if you want the hd-media installer (providing a more fleshed-out OS out of the box than netinst), is that it can automatically download and write the installer to the pendrive. If you prefer netinst, you'll have to provide your own iso (hear, hare, here).

If you have a machine running Linux or OS X already, you can just do
Code: Select all
dd if=debian-testing-amd64-netinst.iso of=/dev/sd?

in a terminal, replacing /dev/sd? with the actual path to your plugged-in (but not mounted!) usb drive.

Writing the installer to the usb drive will take a little while, so you can go put on the kettle now.

Installation

If possible, connect your computer to a wired Internet connection. Reboot with the usb thingie in place, and press Enter as soon as you see the first boot splash screen. As prompted, press F12 to choose an alternative boot device, and choose your usb stick from the ensuing menu. This should drop you in the installer's boot menu. For a quick installation, just choose the default option. "Expert Install" is good, for non-experts who want to learn, as well as people with particular tastes in boot loaders and such.

You can mostly Enter-surf through the installation process, opting for the default option when in doubt. Novices: Make sure to remember the password you give for the administrator account! You'll need this to install software and do other important stuff. When asked to make a user account, give your own name and a different password, which you'll be using to log in to the computer.

Next should come partitioning. I usually choose to partition manually, and this is what you'll have to do if you want to keep an existing installation of another OS. Use the partitioner tool to shrink the partition with your legacy OS and move it the far end of the disk. Computers preinstalled with MS Windows tend to keep some scattered partitions for god knows which reasons. Just delete them :) You'll still be able to boot into Windows.

For Debian, you'll probably want three partitions: A root partition, called / (with the actual OS), a home partition mounted at /home (where you put all your stuff), and a swap partition (to honor the Old Ones). Some of you will have other partition needs, of course, but this setup is easy to make, and it's never a bad idea to have a separate /home partition. On my 120GB disk, I gave the root partition 20 GB. This should be ample space for many years ahead. Swap got 4.4GB, slightly more than my physical RAM. To be able to hibernate, your swap partition must be at least as big as your physical memory. If you're not interested in hibernation, you can probably safely go with a lower number, something in the vicinity of 2GB. The /home partition is where you need storage, it should get whatever is left of the disk. My partitioning ended up looking like this:
Code: Select all
/dev/sda1 * 20 GB * Ext4 * mount as: /
/dev/sda2 * 4.4 GB  * swap *
/dev/sda3 * 96 GB * Ext4 * mount as: /home


Once you choose to go through with the repartitioning, the installer should start to do its magic. At some point, you'll be prompted for a network mirror to download software (Enter-surf your way), and prompted to install so-called tasks. I usually go with a very minimal install, just the base system, deselecting stuff like desktop and printer server for now. Once the system is in place, GRUB will be installed as the bootloader. Any OSs you kept from earlier should be autodetected by GRUB.

You can now reboot to Debian.

Post installation: Wireless networking and a desktop.

The first thing you want to do, is to install certain important software packages. In a terminal where you have administrator access, this is done like:
Code: Select all
apt-get install package-name1 package-name2 package-name3 […] package-nameN


If you already have a desktop installed, and you prefer to use a GUI, start by installing the application Synaptic, which you can then search for in your main menu, or whatever.
Code: Select all
su
Passord: (type in your administrator password when you see this prompt)
apt-get update
apt-get install synaptic
exit


If you didn't install a desktop already, you probably want to do that. I give GNOME as an example here. It's Debian's default, and what I personally use. You also want a package called firmware-iwlwifi, which makes your wireless card work. Let's say for the sake of agrument, you want Synaptic as well. When you come to the login prompt of the terminal, give "root" as user name and your administrator password, then execute the following:
Code: Select all
apt-get update
apt-get install gnome-core firmware-iwlwifi synaptic


If the "apt-get install" command returns with an error, it's probably because if can't find the firmware package. This doesn't meet Debian's official standards for openness, and can be found in the non-free repositories. To enable them from a root terminal, open the relevant config file by typing:
Code: Select all
nano /etc/apt/sources.list


Make sure the terms "non-free" and "contrib" appear in the file, as per this example:
Code: Select all
deb http://ftp.de.debian.org/debian/ jessie main non-free contrib
# deb-src http://ftp.de.debian.org/debian/ jessie main non-free contrib

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


When you're done, press Control-X to save the file, and start over with the "apt-get" commands. Once everything has been successfully installed, reboot with the command:
Code: Select all
shutdown -r now


Installing wireless firmware with Synaptic
Choose Settings -> Repositories, and for each active repository, make sure the entry "Section(s)" reads "non-free contrib main". Then click "Reload" in the main menu; you should find and install the firmware-iwlwifi package now.

Post-installation: Fixing the GNOME desktop

On my machine, the desktop animations sometimes flickered ugly grey-green. I found a workaround here. In summary, you need to make two adjustments.

First, install the software package gnome-tweak-tool with Synaptic or apt-get (to get administrator privileges in a terminal, type "su" and give your root password. Always drop back to normal user mode with "exit" when you're done being root). Once gnome-tweak-tool is installed, head over to https://extensions.gnome.org and install the extension called Impatience. In the GNOME Activities menu, search for Tweak Tool and choose the "Shell Extensions" option on the left side. Impatience should show up with a clickable icon to set it's preferences. Here, you want to set Speed scaling to 0.

Second, open a terminal and type/paste in the following command (as a normal user):
Code: Select all
gsettings set org.gnome.shell.overrides attach-modal-dialogs false


This makes modal dialogs (typical "click OK or Cancel"-dialogs) movable independently of their mother windows, which also fixes some more graphical artifacts. For the record, I do still get some hardly noticeable glitches in the Activities menu.

Configuring the Touchpad

Unless you are utterly insane, you'll be unhappy about how the touchpad is configured. I found a workaround here. You need to edit a file called /usr/share/X11/xorg.conf.d/50-synaptic.conf. Don't forget to backup the old file in case something goes boink. Open a terminal and do:
Code: Select all
su
Password: (type root password)
cd /usr/share/X11/xorg.conf.d/
cp 50-synapticconf 50-synapticconf.bak
nano 50-synapticconf


If anything goes wrong, you can restore the default configuration with the following terminal command:
Code: Select all
cp /usr/share/X11/xorg.conf.d/50-synapticconf.bak /usr/share/X11/xorg.conf.d/50-synapticconf


Anyway, you should now be in nano's beautiful editing interface. Here is how my setup looks at the moment. It enables two-finger clicking to emulate the right mouse button, as well as two-finger scrolling. Options that need editing include "SoftButtonAreas" and "AreaTopEdge".

Code: Select all
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option "OptionName" "value"
#
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
    Option "TapButton1" "1"
        Option "TapButton 2" "3"
        # uncommenting this should make three finger click the middle button
        # Option "TapButton 3" "2"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
        MatchDevicePath "/dev/input/event*"
EndSection

Section "InputClass"
        Identifier "touchpad ignore duplicates"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/mouse*"
        Option "Ignore" "on"
EndSection

# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "60% 0 0 5% 40% 60% 0 5%"
#       To disable the bottom edge area so the buttons only work as buttons,
#       not for movement, set the AreaBottomEdge
        Option "AreaTopEdge" "4%"
EndSection

# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Disable clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection


Loose ends

Sound, batteries, keyboard, trackpoint, graphics card, webcam, all seem to be working okay. Hibernation doesn't work on my machine, but I frankly don't care so much, so I haven't looked into it yet. Things I've yet to try include the microphone, bluetooth, fingerprint reader, and hotwapping the battery.

To tune your system for an SSD drive, there are howtos galore on the web. Read this, for instance. At least, you should edit /etc/fstab to add the optoins discard and noatime.

If you want to view Flash content in your browser, try installing the package called browser-plugin-gnash for a free alternative, or flashplayer-nonfree to get Adobe's version (see here for more info). Both of these packages can be installed with apt-get or Synaptic. Some other interesting packages from Debian's repositories include:
abiword or libreoffice (to edit word files),
emacs or gedit (to edit text files),
dict with dict-gcide and dict-mobythesaurus (English dictionaries in a terminal),
epiphany-browser (GNOME's browser),
gimp and/or inkscape (for image editing),
vlc and rhythmbox (for basic multimedia needs),
laptop-mode-tools and powertop (tools to increase battery life, I'm too lazy to dig up more links for you now)



Good luck, and have fun.

(edit: typos)
User avatar
simen
 
Posts: 206
Joined: 2005-07-02 15:00
Location: Berlin

Re: Installing Debian testing (jessie) on a Lenovo Thinkpad

Postby simen » 2014-02-06 13:22

And another thing:

Fixing video tearing
If you experience tearing during video playback in GNOME, try creating/modifying the file /etc/environment and adding the following lines:

Code: Select all
CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True


For a generic (non-GNOME) solution to this problem with integrated Intel graphics, check out this quick fix. Note that /etc/X11/xorg.conf.d/ is probably not the correct path for 20-intel.conf in Debian. I'd guess that file goes in /usr/share/X11/xorg.conf.d/

Kind regards,
Simen
User avatar
simen
 
Posts: 206
Joined: 2005-07-02 15:00
Location: Berlin

Re: Installing Debian testing (jessie) on a Lenovo Thinkpad

Postby buffalo » 2014-02-08 08:17

Hello simen,

I have purchased a T440s in December and I installed Debian Jessie on it. Runs very well except that I have a problem with the network card. When booting (cold or warm boot) most of the time I do not have a wired network, the card is not ready. I get the following:
Code: Select all
root@picard:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether yy:yy:yy:yy:yy:yy brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
    inet 172.16.0.51/16 brd 172.16.255.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 scope link
       valid_lft forever preferred_lft forever

The approriate kernel module is loaded:

Code: Select all
root@picard:~# lspci -v
[...]
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I218-LM (rev 04)
   Subsystem: Lenovo Device 2214
   Flags: bus master, fast devsel, latency 0, IRQ 58
   Memory at f0600000 (32-bit, non-prefetchable) [size=128K]
   Memory at f063e000 (32-bit, non-prefetchable) [size=4K]
   I/O ports at 3080 [size=32]
   Capabilities: [c8] Power Management version 2
   Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
   Capabilities: [e0] PCI Advanced Features
   Kernel driver in use: e1000e
[...]

Sometimes it helps to unload and reload the kernel module or to do a reboot (warm boot), but most of the time this does nor help.

If the card is recognised it works perfectly (until a change in power situation is done) and WiFi is working correctly. I have found some older messages like this in the web, but I could not find any workaround that helps.

Do you have observed any problems like this?

Ciao,

Karsten
buffalo
 
Posts: 5
Joined: 2012-02-07 21:23

Re: Installing Debian testing (jessie) on a Lenovo Thinkpad

Postby mardybear » 2014-02-08 23:59

See how easy linux is to install :wink:

mardybear
800mhz, 512mb ram, dCore-jessie (Tiny Core with Debian Jessie packages) with BusyBox and Fluxbox.
Most don't have computer access, reuse or pay forward an old computer.
User avatar
mardybear
 
Posts: 994
Joined: 2014-01-19 03:30

Re: Installing Debian testing (jessie) on a Lenovo Thinkpad

Postby simen » 2014-02-09 09:14

Hello Karsten,
I haven't been using the ethernet card much after the initial install, but it seems to be working ok here. If you're letting Network-manager handle the wired connection, maybe try adding "iface eth0 inet dhcp" to /etc/network/interfaces, and start connecting with "ifup eth0" instead? Network-manager actually kind of s0xx, so may be causing (part of) the problem. Sorry I can't be of more help.

Kind regards,
Simen
User avatar
simen
 
Posts: 206
Joined: 2005-07-02 15:00
Location: Berlin

Re: Installing Debian testing (jessie) on a Lenovo Thinkpad

Postby simen » 2014-02-09 09:28

mardybear wrote:See how easy linux is to install :wink:


Child's play. And fun, too, even moreso than rearranging the toilet paper in your bathroom :)

Kind regards,
Simen
User avatar
simen
 
Posts: 206
Joined: 2005-07-02 15:00
Location: Berlin

Re: Installing Debian testing (jessie) on a Lenovo Thinkpad

Postby buffalo » 2014-02-10 17:05

simen wrote: If you're letting Network-manager handle the wired connection, maybe try adding "iface eth0 inet dhcp" to /etc/network/interfaces, and start connecting with "ifup eth0" instead? Network-manager actually kind of s0xx, so may be causing (part of) the problem.


Hello Simen,

Thank you for your reply.

I have tried this before (and now again - just to be sure). The problem stays the same: in some rare cases this work, most of the time it does not. It seems, this is a bug which was fixed some time (a year or more) but now it is back. I will search the bug reports the next weeks. That's the problem with (too) new hardware. :(

BTW: WiFi is handled perfectly by Networkmanager.

Greetings,

Karsten
buffalo
 
Posts: 5
Joined: 2012-02-07 21:23

Re: Installing Debian testing (jessie) on a Lenovo Thinkpad

Postby paperclip » 2014-12-29 18:55

Do you have an updated version of code for configuring the thinkpads touchpad? Similar to the touchpad's behavior as if it were in windows 8.
paperclip
 
Posts: 18
Joined: 2014-12-29 05:35


Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable