Difference between revisions of "Thinkpad T61"

From Blue-IT.org Wiki

(Nvidia and Plymouth bootscreen)
(Links)
Line 312: Line 312:
 
* [http://www.thinkwiki.org/wiki/AD1984 Thinkwiki.org Intel Sound HDA AD1984]
 
* [http://www.thinkwiki.org/wiki/AD1984 Thinkwiki.org Intel Sound HDA AD1984]
 
* [http://www.thinkwiki.org/wiki/Installing_Ubuntu_10.04_(Lucid_Lynx)_on_a_ThinkPad_T61 Thinkwiki Ubuntu 10.04 on T61]
 
* [http://www.thinkwiki.org/wiki/Installing_Ubuntu_10.04_(Lucid_Lynx)_on_a_ThinkPad_T61 Thinkwiki Ubuntu 10.04 on T61]
 +
* [[Ubuntu Desktop]]
 +
* [[Ubuntu Multimedia]]

Revision as of 16:47, 10 October 2010

Introduction

Thinkpad T61 mit Ubuntu.jpeg

After using a very old Thinkpad R31 for a very long time and having a lot of trouble using this machine with linux, I decided to renew my Thinkpad experience with a newer and faster model. What i am writing about in this article is just, when some troubles occurred or I liked to modify something for better usage - in my opinion.

I bought this used T61 device at lap-works.de with a rest guaranty of 1 1/2 years (lenovo) which is pretty good.

What should I say: inserted Ubuntu 10.04, installed it and everything worked out of the box! Theres nothing more to say. This machine is awesome, the keyboard smooth as used to be for a Thinkpad, the Trackpoint is my favorite and the Thinklight my friend, when just a candle is flickering around in the room ...

And of course, one of the best features of newer Thinkpads is the coffee spill ability. It really works - unfortunately I had to test it with real coffee ...

T61 - coffee spill ability.jpg

Machine description

  • Model: Lenovo ThinkPad T61, model 6457BK3
  • BIOS: ThinkPad BIOS 7LETC6WW (2.26 ), EC 7KHT24WW-1.08
  • Processor: Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz, Intel 64 Technology, Enhanced Intel SpeedStep® technology1, Intel Dynamic Acceleration, Execute Disable Bit, Virtualization Technology, 800MHz system bus and 4MB shared L2 cache
  • Memory: Lenovo 2 x 2GB (PC2-5300 667MHz DDR2), dual-channel capable, two 200-pin SO-DIMM sockets
  • Display: 15.4" (391mm) WSXGA+ (1680x1050) color, anti-glare, 200 nits, 16:10 aspect ratio, 500:1 contrast ratio
  • Graphics: NVIDIA® Quadro® NVS 140M, PCI Express® x16, 128MB memory, TurboCache, DVI pass-through support to optional Advanced Mini Dock or Advanced Dock
  • PC Card: One slot (Type I, Type II), CardBus 32-bit
  • Multicard Reader 4-in-1 reader: MultiMediaCard, Memory Stick® PROTM, Secure Digital, xD-Picture CardTM
  • Ports: Three USB 2.0, DB-15 (external VGA monitor), RJ-11 (modem), RJ-45 (ethernet), IEEE 1394 FireWire 400 (4-pin connector; 1394a-2000 standard)
  • Wireless: 11a/b/g wireless4, ThinkPad 11a/b/g Mini PCIe Adapter
  • Bluetooth: Bluetooth 2.0 wireless, USB 2.0 interface via ICH8M, LED indicator
  • Ethernet: Gigabit ethernet, Intel 82566MM Nineveh (PHY), PCIe x1 (GLCI), PXE
  • Audio: High Definition (HD) Audio, AD1984JCP codec / stereo speakers, 1 watt / volume up, down, mute buttons / internal microphone, microphone input jack, headphone jack
  • EIDE DVD±RW DVD burner, Ultrabay Slim Burner (41N5643), dual-layer, removable from Ultrabay Slim
  • HDD: Hitachi SATA HTE723232L9A360 320 GB / 7200 UPM
  • Akku: Noname 12Cell (!) 10400 mAmpH (does NOT fit into a docking station - which i don't use)

Operating System

Ubuntu Logo

Please visit the page Ubuntu Desktop for my actual configuration.

Touchpad and Trackpoint

T61 - Pointing devices.jpg

For configuring the pointing devices I am using GPointing

sudo apt-get install gpointing-device-settings

I turn off the touchpad completely. This also disables the functionality of the FN+F8 Button (which indeed does not really work, because the touchpad enables itself after a certain time).

For the trackpoint I enable the very useful emulation of the mousewheel (keep pressed the middle keypad while using the trackpoint).

Sound

This machine uses an intel hda chip ( see Thinkwiki AD1984).

> lspci -v
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
       Subsystem: Lenovo Device 20ac
       Kernel driver in use: HDA Intel
       Kernel modules: snd-hda-intel
> head -n 1 /proc/asound/card0/codec* 
Codec: Analog Devices AD1984
> zcat /usr/share/doc/alsa-base/driver/HD-Audio-Models.txt.gz
[...]
AD1984
======
  basic	default configuration
  thinkpad	Lenovo Thinkpad T61/X61
  dell_desktop	Dell T3400
[...]


Module configuration

I modified the configuration of the snd-hda-intel module to be loaded correctly via alsa configuration file:

> sudo vim /etc/modprobe.d/alsa-base.conf

[...]
options snd-intel8x0m index=-2 model=thinkpad
[...]

Pulseaudio warnings

The system uses pulseaudio. I get some strange errors in dmesg:

[...]
Sep 26 12:16:41 server pulseaudio[1430]: ratelimit.c: 121 events suppressed
Sep 26 13:04:03 server pulseaudio[1430]: ratelimit.c: 120 events suppressed
Sep 26 13:07:28 server pulseaudio[1430]: ratelimit.c: 116 events suppressed
[...]

The system runs without any problems, so to get rid of this known bug I did the following:

> sudo vim /etc/pulse/daemon.conf

[...]
; log-target = auto
; log-level = notice
log-level = error
[...]

Then close all audio applications (!) and restart pulseaudio als normal (!) user (not root):

> pulseaudio -k

Bluethooth

Hardware switch for radio devices

T61 - radio switch.jpg

I don't use bluetooth often but it works quite well. For me most of the time it should be turned off for power saving and security reasons.

But if i switch the hardware button in front of my thinkpad - for both wlan and bluetooth - off and on, both devices come up again. The following procedure disables bluetooth by default, yet it does not disable the bluetooth device. So it is easy to switch it on via the gnome bluetooth icon. But be warned: this also disables toggling bluetooth via FN-F5!

Despite using TLP (thinkpad linux powersaving scripts) this hack is necessary to get rid of reactivated bluetooth when using the hardware switch.

The bluethooth device is from Broadcom and attached to the usb bus:

> udevadm monitor --udev
UDEV  [1285453647.905188] remove   /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.0/bluetooth/hci0 (bluetooth)
> udevadm info --attribute-walk --path=/sys/bus/usb/devices/3-1/3-1\:1.0
 looking at device '/bus/usb/devices/3-1/3-1:1.0':
   KERNEL=="3-1:1.0"
   SUBSYSTEM=="usb"
   DRIVER=="btusb"
   ATTR{bInterfaceNumber}=="00"
   ATTR{bAlternateSetting}==" 0"
   ATTR{bNumEndpoints}=="03"
   ATTR{bInterfaceClass}=="e0"
   ATTR{bInterfaceSubClass}=="01"
   ATTR{bInterfaceProtocol}=="01"
   ATTR{modalias}=="usb:v0A5Cp2110d0100dcE0dsc01dp01icE0isc01ip01"
   ATTR{supports_autosuspend}=="1"

Prevent bluetooth on system boot

You can achieve this either by using TLP (thinkpad linux powersaving scripts) OR adding a simple line into /etc/rc.local:

> vim /etc/rc.local

echo disable > /proc/acpi/ibm/bluetooth

Prevent bluetooth when using the hardware switch

Again: the usage of TLP (thinkpad linux powersaving scripts) will not hinder bluetooth from coming up again, when reenable the radio devices with the hardware switch. This also applies to the usage of FN+F5 .

Edit a custom udev rule

> vim /etc/udev/rules.d/10-disable-initial-T61-bluetooth

# Broadcom Bluetooth T61
SUBSYSTEM=="usb", KERNEL=="3-1:1.0", ACTION=="add", RUN+="/path/to/bin/disable_bluetooth"

Edit the according "bluethooth-disable" skript and make it runnable:

> vim /path/to/bin/disable_bluetooth

#!/bin/sh
echo disable  > /proc/acpi/ibm/bluetoot
> chmod 755 /path/to/bin/disable_bluetooth

Reload udev:

> sudo service udev reload && sudo udevadm trigger

Wlan Problems

I encountered some problems on Ubuntu Lucid / 10.04.1 64bit with my wlan and had some strange errors in dmesg:

Failed to get channel info ...

> dmesg
[...]
iwl3945 0000:03:00.0: Failed to get channel info for channel 100 [0]
iwl3945 0000:03:00.0: Failed to get channel info for channel 104 [0]
iwl3945 0000:03:00.0: Failed to get channel info for channel 108 [0]
iwl3945 0000:03:00.0: Failed to get channel info for channel 112 [0]
[...]

According to this opensuse bug i filed a solution in Ubuntu Bug #340418:

Add a new file to /etc/modprobe.d/:

> sudo vim /etc/modprobe.d/options-iwl3945.conf

options iwl3945 disable_hw_scan=0

For testing purpose do

> sudo rmmod -f iwl3945 && sudo modprobe iwl3945 disable_hw_scan=0

Wrong country DRCA

> dmesg
[...]
cfg80211: Leaving channel 5170 MHz intact on phy2 - no rule found in band on Country IE
cfg80211: Leaving channel 5180 MHz intact on phy2 - no rule found in band on Country IE
cfg80211: Leaving channel 5190 MHz intact on phy2 - no rule found in band on Country IE
[...]

Look at dmesg like this:

> dmesg | grep cfg | grep country
[...]
cfg80211: Calling CRDA for country: GB
cfg80211: Received country IE:
[...]

To set the right country for your card (here GB) you have to install the program iw

> sudo apt-get install iw

Then you can manually do

> sudo iw reg set GB

and you'll see in dmesg:

cfg80211: Regulatory domain changed to country: GB

To automate this process you can write a so called dispatcher script for network manager (according to [1] and [2]):

vim /etc/NetworkManager/dispatcher.d/01changeCRDA

and add

#!/bin/sh
INTERFACE=$1
ACTION=$2
CODE="GB" 

if [ "$ACTION" = "up" -a "$(echo $INTERFACE|grep wlan)" ];then
       iw reg set ${CODE}
fi

Now, if you switch on your radio devices via FN+F5 or the hardware switch, bluetooth will be disabled emediately.

HDAPS

HDAPS (harddisk active protection system) can be easily achieved via a special kernel module:

> sudo apt-get install tp-smapi-dkms hdapsd

Then reboot the machine for the hdaps device to be created.

For temporarily check if everything works you can do:

> sudo modprobe tp-smapi && sudo /etc/init.d/hdapsd restart

Save power

Some people say there is a big difference running on battery with Win* and Linux. This is indeed the case, but I can live with that. I am more interested in a stable system than in running 10 minutes more or less on battery ;)

TLP

UPDATE --Apos 23:14, 29 September 2010 (CEST)

I am using now the more convenient way with Thinpad Linux Powermanagement for Ubuntu which is pretty forward.

Please have a look at their webpage and ppa (german) for more information.

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tp-smapi-dkms smartmontools

For configuration issues please visit this section on the (german) website.

Things I changed in the configuration file:

> vim /etc/default/tlp

1. Because of a disturbing clicking sound of the Intel HDA Sound card

SOUND_POWER_SAVE=0

This will be probably fixed in Alsa 0.23 (Ubuntu 10.10).

2. I also enabled the power off function for the Ultrabay in battery mode:

BAY_POWEROFF_ON_BAT=1

3. However the problem with the bluetooth hardware switch as noticed above is not obsolete.

Manual power saving setting

If you don't like to use TLP you can use the following entries in /etc/rc.local [3]

# Laptop Mode
echo 2 > /proc/sys/vm/laptop_mode
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
echo 3000 > /proc/sys/vm/dirty_expire_centisecs

# SATA Link Power
for i in /sys/class/scsi_host/host* ; do 
        [ -f $i/link_power_management_policy ] && echo "min_power" >  $i/link_power_management_policy
done

# Intel HDA Powersave makes trouble with permanent and
# disturbing clicking sound (asla 0.22 / Ubuntu 10.04) 
# alsa 0.23 will probably solve this 
#echo 1 > /sys/module/snd_hda_intel/parameters/power_save
#echo Y > /sys/module/snd_hda_intel/parameters/power_save_controller 

# USB Suspend
for i in /sys/bus/usb/devices/*/power ; do
	if [ -f $i/autosuspend ]; then
		echo "0" > $i/autosuspend 
		echo "auto" > $i/level
	fi
done

I will test it ... and see if it fits over time ... --Apos 11:23, 29 September 2010 (CEST)

Nvidia and Plymouth bootscreen

Accdording to [4] and [5] I was able to use plymouth in ubuntu 10.10 (10.04 not tested, but should work too).

Here's what I did:

> sudo apt-get install v86d hwinfo
> sudo hwinfo --framebuffer | grep 1680 | grep 24
  Mode 0x0369: 1680x1050 (+6720), 24 bits
> sudo cp /etc/default/grub /etc/default/grub.orig
> gksudo gedit /etc/default/grub
  
  [...]
  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1680x1050-24,mtrr=3,scroll=ywrap"
  [...]
  GRUB_GFXMODE=1680x1050
  [...]
> sudo cp /etc/initramfs-tools/modules /etc/initramfs-tools/modules.orig
> gksudo gedit /etc/initramfs-tools/modules
 
  [...]
  uvesafb mode_option=1680x1050-24 mtrr=3 scroll=ywrap
> sudo update-grub
> sudo update-initramfs -u

Reboot and enjoy!

Links