Thinkpad T61

From Blue-IT.org Wiki

Revision as of 10:31, 26 September 2010 by Apos (talk | contribs) (The second problem was:)

Wlan / bluetooth switch - prevent bluetooth from starting

I don't use bluetooth. But if i switch the hardware button in front of my thinkpad for both radio devices off and on, both devices come up. the following procedure disables bluetooth, but keeps the device running. 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:

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

On boot i prevent bluetooth from coming up via:

vim /etc/rc.local
echo disable > /proc/acpi/ibm/bluetooth

So edit a custom udev rule

vim /etc/udev/rules.d/10-disable-initial-T61-bluetooth
# Broadcom Bluetooth vom T61 abschalten
SUBSYSTEM=="usb", KERNEL=="3-1:1.0", ACTION=="add", RUN+="/path/to/bin/disable_bluetooth"

Edit the according bluethooth-disable skript and make it accessible:

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

That's it ;)

Wlan Problems

Ubuntu Lucid / 10.04.1 64bit

I encountered some problems with my wlan and had some strange errors in dmesg:

The first problem was:

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

with the following content

options iwl3945 disable_hw_scan=0

For testing purpose do

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

The second problem was:

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

You'll see something like this

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