Difference between revisions of "Thinkpad T61"

From Blue-IT.org Wiki

(Ubuntu Linux Operation System - the One and only)
(Introduction)
 
(176 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
== Warning about T61 with Nvidia Graphics ==
 +
--[[User:Apos|Apos]] 22:42, 27 January 2012 (CET)
 +
 +
A few days ago my T61 died unexpectadely. The graphic chip had burned. Please be aware that this is a problem that this model series had (my dealer told me) and don't by a T61 with a nvidia graphic card! It might brake. You should always buy the ones with Intel graphics. Should have known this 2 years ago.
 +
 
== Introduction ==
 
== Introduction ==
[[File:Thinkpad_T61_mit_Ubuntu.jpeg|300px]]
+
<gallery widths=300px heights=200px perrow=2>
 +
Image:Thinkpad_T61_mit_Ubuntu.jpeg|My System with [[Ubuntu Desktop|Ubuntu Linux Desktop]]
 +
Image:Thinkpad-on-ISS-400px-TORU_docking_system.jpg|Thinkpads are the only notebooks certified for the longterm flights on ISS, see [http://en.wikipedia.org/wiki/Thinkpad#Model_information ThinkPads on ISS], also see [http://www-03.ibm.com/ibm/history/exhibits/space/space_thinkpad.html ThinkPads in space]
 +
</gallery>
 +
 
 +
[http://www.youtube.com/watch?v=5wjBQE0_ejQ Cola or Cofee]
 +
[http://lenovoblogs.com/yamato/?p=892&language=en]''
  
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.
+
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 only about when some troubles occurred or I liked to modify something - in my opinion - for better usage.
  
 
I bought this used T61 device at [http://www.lap-works.de lap-works.de] with a rest guaranty of 1 1/2 years (lenovo) which is pretty good.  
 
I bought this used T61 device at [http://www.lap-works.de lap-works.de] with a rest guaranty of 1 1/2 years (lenovo) which is pretty good.  
Line 8: Line 19:
 
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 ...
 
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) ...
+
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 ...
 
 
[[Image:T61_-_coffee_spill_ability.jpg|270px]]
 
  
 
=== Machine description ===
 
=== Machine description ===
Line 30: Line 39:
 
* Akku: Noname 12Cell (!) 10400 mAmpH (does NOT fit into a docking station - which i don't use)
 
* Akku: Noname 12Cell (!) 10400 mAmpH (does NOT fit into a docking station - which i don't use)
  
=== Ubuntu Linux Operation System - the One and only ===
+
=== Operating System ===
 
 
 
[[Image:Ubuntu_orange_hex.jpg|alt=Ubuntu Logo|200px|link=http://wiki.ubuntuusers.de/Was_ist_Ubuntu]]
 
[[Image:Ubuntu_orange_hex.jpg|alt=Ubuntu Logo|200px|link=http://wiki.ubuntuusers.de/Was_ist_Ubuntu]]
  
* [http://wiki.ubuntuusers.de/Downloads/Lucid_Lynx Download Ubuntu 10.04 LTS 64bit]
+
Please visit the page "[[Ubuntu Desktop]]" for my actual configuration.
* [http://wiki.ubuntuusers.de/Was_ist_Ubuntu What is Ubuntu (German)]
 
  
 
== Touchpad and Trackpoint ==
 
== Touchpad and Trackpoint ==
[[file:T61_-_Pointing_devices.jpg|250px]]
 
  
For configuring the pointing devices I am using '''GPointing'''
+
[[Image:T61_-_Pointing_devices.jpg|250px]]
 +
 
 +
=== Configure via GUI ===
 +
For configuring the pointing devices you can use '''GPointing'''
 
  sudo apt-get install gpointing-device-settings
 
  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).
 
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).
+
For the '''trackpoint''' I always enable the ''very'' useful emulation of the mousewheel (keep pressing the middle keypad while using the trackpoint).
 +
 
 +
''Suspend problem'': It seems, that doing a suspend disables the middle-mouse button scroll function. The next solution does not have this problem.
 +
 
 +
=== Configure via Xorg files ===
 +
Edit the file
 +
sudo vim /usr/share/X11/xorg.conf.d/20-trackpoint.conf
 +
with the following content.
 +
 
 +
Section "InputClass"
 +
        Identifier      "Trackpoint Wheel Emulation"
 +
        MatchProduct    "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device|Composite TouchPad / TrackPoint"
 +
        MatchDevicePath "/dev/input/event*"
 +
        Option          "EmulateWheel"          "true"
 +
        Option          "EmulateWheelButton"    "2"
 +
        Option          "Emulate3Buttons"      "false"
 +
        Option          "XAxisMapping"          "6 7"
 +
        Option          "YAxisMapping"          "4 5"
 +
EndSection
 +
 
 +
Reboot or restart your Xserver.
  
 
== Sound ==
 
== Sound ==
Line 77: Line 106:
  
 
=== Pulseaudio warnings ===
 
=== Pulseaudio warnings ===
 +
==== Update Ubuntu 10.10 ====
 +
Problem seems to be resolved. But pulseaudio seems to write a lot of messages into syslog. So you can leave the log-level on "error".
 +
 +
==== Ubuntu 10.04 ====
 
The system uses pulseaudio. I get some strange errors in ''dmesg'':
 
The system uses pulseaudio. I get some strange errors in ''dmesg'':
 
  [...]
 
  [...]
Line 93: Line 126:
 
  [...]
 
  [...]
  
Then close all audio applications (!) and restart pulseaudio als normal (!) user (not root):
+
Then close '''all''' audio applications (!) and restart pulseaudio als normal (!) user (not root):
 
  > pulseaudio -k
 
  > pulseaudio -k
  
== Hardware switch for radio devices - prevent bluetooth ==
+
== Bluethooth ==
 +
=== Hardware switch for radio devices ===
 
[[file:T61_-_radio_switch.jpg|300px]]
 
[[file:T61_-_radio_switch.jpg|300px]]
  
I don't use bluetooth often and it works quite well. But most of the time it should be off for power saving and security reasons.
+
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 (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!  
+
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!  
  
The bluethooth device is a Broadcom one and and attached to the usb bus:
+
Despite using [[Thinkpad T61#TLP|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 (but thats not important for us here, I just want to mention it):
 
  > udevadm monitor --udev
 
  > udevadm monitor --udev
 
  UDEV  [1285453647.905188] remove  /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.0/bluetooth/hci0 (bluetooth)
 
  UDEV  [1285453647.905188] remove  /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.0/bluetooth/hci0 (bluetooth)
Line 121: Line 157:
 
     ATTR{supports_autosuspend}=="1"
 
     ATTR{supports_autosuspend}=="1"
  
=== Prevent bleutooth on system boot ===
+
=== Prevent bluetooth on system boot ===
On boot i prevent bluetooth from coming up via:
+
You can achieve this either by using [[Thinkpad T61#TLP|TLP (thinkpad linux powersaving scripts)]] '''OR''' adding a simple line into ''/etc/rc.local'':
  > vim /etc/rc.local
+
  > sudo vim /etc/rc.local
 
+
 +
# Only necessary if NOT using TLP!
 
  echo disable > /proc/acpi/ibm/bluetooth
 
  echo disable > /proc/acpi/ibm/bluetooth
  
=== Prevent bluetooth when turning on the device ===
+
=== Prevent bluetooth when using the hardware switch ===
This also applies to the usage of ''FN+F5 ''.
+
Again: the usage of [[Thinkpad T61#TLP|TLP (thinkpad linux powersaving scripts)]] will not hinder bluetooth from coming up again, when reenabling the radio devices with the hardware switch. This is also the case for ''FN+F5''.
  
Edit a custom ''udev'' rule
+
So triggering the start of the wlan network device with disabling bluetooth does the trick:
> vim /etc/udev/rules.d/10-disable-initial-T61-bluetooth
 
  
# Broadcom Bluetooth T61
+
'''First''', edit a custom NetworkManager dispatcher script (as we used to do for the wlan problems). It assumes, that your network card is shown as ''wlanX'' in the ''iwconfig'' or ''ifconfig'' command (if this is not the case, please change the name ''wlan'' according to the name of your wlan device):
'''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:
+
  > sudo vim /etc/NetworkManager/dispatcher.d/01disable_bluetooth
  > vim '''/path/to/bin/'''disable_bluetooth
+
 
 +
(1) This disables bluetooth, when the wlan device comes to be ready:
 +
  #!/bin/sh
 +
INTERFACE=$1
 +
ACTION=$2
 +
 +
if [ "$ACTION" = "up" -a "$(echo $INTERFACE | grep '''wlan''')" ];then
 +
echo disable  > /proc/acpi/ibm/bluetooth
 +
fi
  
 +
(2) or in any case NetworkManager comes up:
 
  #!/bin/sh
 
  #!/bin/sh
  echo disable  > /proc/acpi/ibm/bluetoot
+
  echo disable  > /proc/acpi/ibm/bluetooth
  
  > chmod 755 '''/path/to/bin/'''disable_bluetooth
+
Now make the script executable:
 +
  > sudo chmod 755 /etc/NetworkManager/dispatcher.d/01disable_bluetooth
  
Reload udev:
+
That's it ;)
sudo service udev reload && sudo udevadm trigger
 
  
That's it ;)
+
But remember: You are not able to use the ''FN+F5'' switch to enable bluetooth. You have to use your bluetooth indicator with your mouse.
  
 
== Wlan Problems ==
 
== Wlan Problems ==
I encountered some problems on Ubuntu Lucid / 10.04.1 64bit with my wlan and had some strange errors in '''dmesg''':
+
I encountered some problems on Ubuntu Lucid / 10.04.1 64bit and 10.10 with my wlan and had some strange errors in '''dmesg''':
  
=== The first problem was: ===
+
=== 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 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 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 108 [0]
 
  iwl3945 0000:03:00.0: Failed to get channel info for channel 112 [0]
 
  iwl3945 0000:03:00.0: Failed to get channel info for channel 112 [0]
 +
[...]
  
 
According to [http://lists4.opensuse.org/opensuse-bugs/2010-08/msg00974.html this opensuse bug] i filed a solution in [https://bugs.launchpad.net/linux/+bug/340418 Ubuntu Bug #340418]:
 
According to [http://lists4.opensuse.org/opensuse-bugs/2010-08/msg00974.html this opensuse bug] i filed a solution in [https://bugs.launchpad.net/linux/+bug/340418 Ubuntu Bug #340418]:
  
 
Add a new file to ''/etc/modprobe.d/'':
 
Add a new file to ''/etc/modprobe.d/'':
  sudo vim /etc/modprobe.d/options-iwl3945.conf
+
  > sudo vim /etc/modprobe.d/options-iwl3945.conf
 
+
with the following content
 
 
  options iwl3945 disable_hw_scan=0
 
  options iwl3945 disable_hw_scan=0
  
 
For testing purpose do
 
For testing purpose do
  sudo rmmod -f iwl3945 && sudo modprobe iwl3945 disable_hw_scan=0
+
  > sudo rmmod -f iwl3945 && sudo modprobe iwl3945 disable_hw_scan=0
  
=== The second problem was: ===
+
=== Wrong country [http://linuxwireless.org/en/developers/Regulatory/CRDA DRCA] ===
 +
> dmesg
 +
[...]
 
  cfg80211: Leaving channel 5170 MHz intact on phy2 - no rule found in band on Country IE
 
  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 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
 
  cfg80211: Leaving channel 5190 MHz intact on phy2 - no rule found in band on Country IE
 +
[...]
  
 
Look at dmesg like this:
 
Look at dmesg like this:
Line 202: Line 252:
 
         iw reg set ${CODE}
 
         iw reg set ${CODE}
 
  fi
 
  fi
 +
 +
Now, if you switch on your radio devices via FN+F5 '''or''' the hardware switch, bluetooth will be disabled emediately.
  
 
== HDAPS ==
 
== HDAPS ==
Line 211: Line 263:
 
For temporarily check if everything works you can do:
 
For temporarily check if everything works you can do:
 
  > sudo modprobe tp-smapi && sudo /etc/init.d/hdapsd restart
 
  > sudo modprobe tp-smapi && sudo /etc/init.d/hdapsd restart
 +
 +
== Fan Control - [http://thinkpad-wiki.org/Thinkfan Thinkfan] ==
 +
Despite the very recommended procedure, to blow away the dust out of the cooling plates at the left back of the Thinkpad - at least once a year (!!!) - it is possible to adjust the conservative settings for the fan control of this device.
 +
 +
If you have a model with a nvidia card it is possible that the device get very hot (over 75 degrees Celsius). Therefore it is possible to install [http://thinkpad-wiki.org/Thinkfan Thinkfan].
 +
 +
Installation:
 +
sudo apt-get install thinkfan
 +
 +
Activate:
 +
sudo vim /etc/modprobe.d/thinkfan.conf
 +
options thinkpad_acpi fan_control=1
 +
 +
sudo modprobe -rv thinkpad_acpi
 +
sudo modprobe -v thinkpad_acpi
 +
 +
sudo vim /etc/default/thinkfan
 +
START=yes
 +
 +
All settings go into:
 +
sudo vim /etc/thinkfan.conf
 +
You can leave the latter as is!
 +
 +
My settings are:
 +
sensor /sys/class/hwmon/hwmon1/device/temp1_input
 +
 +
(0, 0,  36)
 +
(1, 36, 48)
 +
(2, 48, 54)
 +
(3, 54, 56)
 +
(4, 56, 58)
 +
(5, 58, 60)
 +
(6, 60, 62)
 +
(7, 62, 32767)
 +
 +
Now temperatures won't go very much over 60 degrees, which is very healthy for the GPU (nvidia graphics card) ;)
 +
 +
== 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 ;)
 +
 +
=== Suspend and Hibernation ===
 +
Generally works out of the box. There are only some drawbacks concerning the wlan and the integrated card reader (Ricoh chipset).
 +
 +
''Hibernation'' is working, but it takes a ''very'' long time to resume. The laptop seams to freeze for a long time, then ''beeps'' two times and resumes. The whole procedure takes about 3 minutes which is far more than shutting down the machine. But it works!!!
 +
 +
''Suspend'' is no problem at all, but to avoid troubles I did the following:
 +
 +
==== Wlan and cardreader drivers ====
 +
Wlan might not recover reliably. So it is necessary to reload the driver. Problems also accur, when a SD-Card is placed in the memory slot. It will hinder suspend or hibernation.
 +
 +
Putting these modules into the corresponding file will solve this issues ;)
 +
> sudo vim /etc/pm/config.d/00sleep_module
 +
 +
SUSPEND_MODULES="$SUSPEND_MODULES iwl3945 usb_storage sdhci sdhci_pci"
 +
 +
===== Update ubuntu 10.10 =====
 +
Don't remove iwl3945 any more, or suspend will not work / hang:
 +
> sudo vim /etc/pm/config.d/00sleep_module
 +
 +
SUSPEND_MODULES="$SUSPEND_MODULES '''usb_storage sdhci sdhci_pci'''"
 +
 +
==== Running virtual machines (VirtualBox) ====
 +
When you are running a virtual machine inside ubuntu and you are going to suspend or hibernate the notebook it leaves your (virtual!) machine unusable! So we have to add a script that ensures, that a virtual machine is set either into ''pause mode'' (supend) or is ''saved to disk'' (hibernation).
 +
 +
> sudo vim /etc/pm/sleep.d/90virtualbox
 +
 +
#!/bin/sh
 +
#
 +
# 90vbox: scan for active virtual machines and pause them to avoid seizing on host suspend
 +
 +
if ( ps aux |grep VirtualBox | grep -v grep )
 +
then
 +
for USR in "$(ps aux |grep VirtualBox |grep -v grep |cut -f1 -d' '| uniq)"; do
 +
      case "$1" in
 +
          suspend)
 +
          for VMS in "$(su - $USR -c 'VBoxManage list runningvms | egrep ^\"*\" | cut -d"\"" -f2 | sed s/\"//g')"; do
 +
              su - $USR -c "VBoxManage controlvm \"$VMS\" pause"
 +
          done
 +
          ;;
 +
 +
          hibernate)
 +
          for VMS in "$(su - $USR -c 'VBoxManage list runningvms | egrep ^\"*\" | cut -d"\"" -f2 | sed s/\"//g')"; do
 +
              su - $USR -c "VBoxManage controlvm \"$VMS\" savestate"
 +
          done
 +
          ;;
 +
 +
          thaw|resume)
 +
          for VMS in "$(su - $USR -c 'VBoxManage list runningvms | egrep ^\"*\" | cut -d"\"" -f2 | sed s/\"//g')"; do
 +
          su - $USR -c "VBoxManage controlvm \"$VMS\" resume"
 +
          done
 +
          ;;
 +
 +
          *) exit $NA
 +
          ;;
 +
      esac
 +
done
 +
fi
 +
 +
> sudo chmod 755 /etc/pm/sleep.d/90virtualbox
 +
 +
=== TLP ===
 +
I am using now the more convenient way with [http://thinkpad-wiki.org/TLP_-_Stromspareinstellungen_fuer_Ubuntu Thinpad Linux Powermanagement for Ubuntu (TLP)] which is pretty forward.
 +
 +
Please have a look at their [http://thinkpad-wiki.org/TLP_-_Stromspareinstellungen_fuer_Ubuntu 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 [http://thinkpad-wiki.org/TLP_Einstellungen 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).
 +
 +
Update: Not fixed in 10.10!
 +
 +
2. Don't use the '''power off function for the Ultrabay''' in battery mode, because the dvd does not come up always:
 +
BAY_POWEROFF_ON_BAT=0 # which is default
 +
 +
3. However the problem with the [[Thinkpad T61#Prevent bluetooth when using the hardware switch|bluetooth hardware switch as noticed above]] is not obsolete.
 +
 +
=== Manual power saving setting ===
 +
 +
==== Update ====
 +
After testing: these entries are absolute obsolete when using [[Thinkpad T61#TLP|TLP]]. Works flawlessly in Ubuntu 10.04 and 10.10.
 +
 +
--[[User:Apos|Apos]] 15:42, 11 October 2010 (CEST)
 +
 +
 +
----
 +
 +
 +
If you '''don't like to use [[Thinkpad T61#TLP|TLP]]''' you can use the following entries in ''/etc/rc.local'' [http://forum.ubuntuusers.de/topic/akkulaufzeit-lenovo-t61-energiemanagement/#post-2273546]
 +
# 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 ...
 +
 +
--[[User:Apos|Apos]] 11:23, 29 September 2010 (CEST)
 +
 +
== Nvidia and Plymouth bootscreen ==
 +
See: [http://www.wiki.blue-it.org/Ubuntu_Desktop#Nvidia_and_Plymouth_bootscreen Nvidia and Plymouth bootscreen]
  
 
== Links ==
 
== Links ==
Line 216: Line 436:
 
* [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]]
 +
 +
[[Category:Hardware]]
 +
[[Category:Thinkpad]]
 +
[[Category:Ubuntu]]

Latest revision as of 15:48, 5 January 2014

Warning about T61 with Nvidia Graphics

--Apos 22:42, 27 January 2012 (CET)

A few days ago my T61 died unexpectadely. The graphic chip had burned. Please be aware that this is a problem that this model series had (my dealer told me) and don't by a T61 with a nvidia graphic card! It might brake. You should always buy the ones with Intel graphics. Should have known this 2 years ago.

Introduction

Cola or Cofee [1]

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 only about when some troubles occurred or I liked to modify something - in my opinion - for better usage.

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 ...

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

Configure via GUI

For configuring the pointing devices you can use 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 always enable the very useful emulation of the mousewheel (keep pressing the middle keypad while using the trackpoint).

Suspend problem: It seems, that doing a suspend disables the middle-mouse button scroll function. The next solution does not have this problem.

Configure via Xorg files

Edit the file

sudo vim /usr/share/X11/xorg.conf.d/20-trackpoint.conf

with the following content.

Section "InputClass"
       Identifier      "Trackpoint Wheel Emulation"
       MatchProduct    "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device|Composite TouchPad / TrackPoint"
       MatchDevicePath "/dev/input/event*"
       Option          "EmulateWheel"          "true"
       Option          "EmulateWheelButton"    "2"
       Option          "Emulate3Buttons"       "false"
       Option          "XAxisMapping"          "6 7"
       Option          "YAxisMapping"          "4 5"
EndSection

Reboot or restart your Xserver.

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

Update Ubuntu 10.10

Problem seems to be resolved. But pulseaudio seems to write a lot of messages into syslog. So you can leave the log-level on "error".

Ubuntu 10.04

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 (but thats not important for us here, I just want to mention it):

> 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:

> sudo vim /etc/rc.local

# Only necessary if NOT using TLP!
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 reenabling the radio devices with the hardware switch. This is also the case for FN+F5.

So triggering the start of the wlan network device with disabling bluetooth does the trick:

First, edit a custom NetworkManager dispatcher script (as we used to do for the wlan problems). It assumes, that your network card is shown as wlanX in the iwconfig or ifconfig command (if this is not the case, please change the name wlan according to the name of your wlan device):

> sudo vim /etc/NetworkManager/dispatcher.d/01disable_bluetooth
 

(1) This disables bluetooth, when the wlan device comes to be ready:

 #!/bin/sh
INTERFACE=$1
ACTION=$2

if [ "$ACTION" = "up" -a "$(echo $INTERFACE | grep wlan)" ];then
	echo disable  > /proc/acpi/ibm/bluetooth
fi

(2) or in any case NetworkManager comes up:

#!/bin/sh
echo disable  > /proc/acpi/ibm/bluetooth

Now make the script executable:

> sudo chmod 755 /etc/NetworkManager/dispatcher.d/01disable_bluetooth

That's it ;)

But remember: You are not able to use the FN+F5 switch to enable bluetooth. You have to use your bluetooth indicator with your mouse.

Wlan Problems

I encountered some problems on Ubuntu Lucid / 10.04.1 64bit and 10.10 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 [2] and [3]):

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

Fan Control - Thinkfan

Despite the very recommended procedure, to blow away the dust out of the cooling plates at the left back of the Thinkpad - at least once a year (!!!) - it is possible to adjust the conservative settings for the fan control of this device.

If you have a model with a nvidia card it is possible that the device get very hot (over 75 degrees Celsius). Therefore it is possible to install Thinkfan.

Installation:

sudo apt-get install thinkfan

Activate:

sudo vim /etc/modprobe.d/thinkfan.conf
options thinkpad_acpi fan_control=1
sudo modprobe -rv thinkpad_acpi
sudo modprobe -v thinkpad_acpi
sudo vim /etc/default/thinkfan
START=yes

All settings go into:

sudo vim /etc/thinkfan.conf

You can leave the latter as is!

My settings are:

sensor /sys/class/hwmon/hwmon1/device/temp1_input

(0, 0,  36)
(1, 36, 48)
(2, 48, 54)
(3, 54, 56)
(4, 56, 58)
(5, 58, 60)
(6, 60, 62)
(7, 62, 32767)

Now temperatures won't go very much over 60 degrees, which is very healthy for the GPU (nvidia graphics card) ;)

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 ;)

Suspend and Hibernation

Generally works out of the box. There are only some drawbacks concerning the wlan and the integrated card reader (Ricoh chipset).

Hibernation is working, but it takes a very long time to resume. The laptop seams to freeze for a long time, then beeps two times and resumes. The whole procedure takes about 3 minutes which is far more than shutting down the machine. But it works!!!

Suspend is no problem at all, but to avoid troubles I did the following:

Wlan and cardreader drivers

Wlan might not recover reliably. So it is necessary to reload the driver. Problems also accur, when a SD-Card is placed in the memory slot. It will hinder suspend or hibernation.

Putting these modules into the corresponding file will solve this issues ;)

> sudo vim /etc/pm/config.d/00sleep_module

SUSPEND_MODULES="$SUSPEND_MODULES iwl3945 usb_storage sdhci sdhci_pci"
Update ubuntu 10.10

Don't remove iwl3945 any more, or suspend will not work / hang:

> sudo vim /etc/pm/config.d/00sleep_module

SUSPEND_MODULES="$SUSPEND_MODULES usb_storage sdhci sdhci_pci"

Running virtual machines (VirtualBox)

When you are running a virtual machine inside ubuntu and you are going to suspend or hibernate the notebook it leaves your (virtual!) machine unusable! So we have to add a script that ensures, that a virtual machine is set either into pause mode (supend) or is saved to disk (hibernation).

> sudo vim /etc/pm/sleep.d/90virtualbox 

#!/bin/sh
#
# 90vbox: scan for active virtual machines and pause them to avoid seizing on host suspend

if ( ps aux |grep VirtualBox | grep -v grep )
then
for USR in "$(ps aux |grep VirtualBox |grep -v grep |cut -f1 -d' '| uniq)"; do
     case "$1" in
         suspend)
         for VMS in "$(su - $USR -c 'VBoxManage list runningvms | egrep ^\"*\" | cut -d"\"" -f2 | sed s/\"//g')"; do
             su - $USR -c "VBoxManage controlvm \"$VMS\" pause"
         done
         ;;

         hibernate)
         for VMS in "$(su - $USR -c 'VBoxManage list runningvms | egrep ^\"*\" | cut -d"\"" -f2 | sed s/\"//g')"; do
             su - $USR -c "VBoxManage controlvm \"$VMS\" savestate"
         done
         ;;

         thaw|resume)
         for VMS in "$(su - $USR -c 'VBoxManage list runningvms | egrep ^\"*\" | cut -d"\"" -f2 | sed s/\"//g')"; do
         su - $USR -c "VBoxManage controlvm \"$VMS\" resume"
         done
         ;;

         *) exit $NA
         ;;
      esac
done
fi
> sudo chmod 755 /etc/pm/sleep.d/90virtualbox

TLP

I am using now the more convenient way with Thinpad Linux Powermanagement for Ubuntu (TLP) 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).

Update: Not fixed in 10.10!

2. Don't use the power off function for the Ultrabay in battery mode, because the dvd does not come up always:

BAY_POWEROFF_ON_BAT=0 # which is default

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

Manual power saving setting

Update

After testing: these entries are absolute obsolete when using TLP. Works flawlessly in Ubuntu 10.04 and 10.10.

--Apos 15:42, 11 October 2010 (CEST)




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

# 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

See: Nvidia and Plymouth bootscreen

Links