Fix for Thinkpad T400 WWAN on Ubuntu 9.10

The builtin WWAN modem of Lenovo ThinkPad T400 laptops does not seem to wake properly when the laptop is suspended on Ubuntu.

I have written a small Power Manager script to fix this problem, it seems that Ubuntu 9.10 (Karmic Koala) does not support wakeup scripts in /etc/acpi/resume.d anymore.

Although it tires me a bit how much Ubuntu seems to break in new releases lately, it was worthwhile to search for the mechanism “du jour”. It seems that scripts need to be placed in /etc/pm/sleep.d nowadays.

Add the script below to a new file, /etc/pm/sleep.d/10_thinkpad_wwan, and it should be called upon suspend and resume to revive your modem on resume.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# Action script to reinitialize built-in WWAN of Lenovo ThinkPads
# on resume
#
# Hessel Schut, hessel@isquared.nl, 2010-02-25
#

PATH=/sbin:/usr/sbin:/bin:/usr/bin

case "${1}" in
        hibernate)
                # unload cdc_wdm module
                rmmod cdc_wdm
  ;;

        resume|thaw)
                # revive RF and reload cdc_wdm module
                echo 1 > /sys/devices/platform/thinkpad_acpi/rfkill/rfkill1/state
                modprobe cdc_wdm
  ;;
esac

Comments