Comment 0 for bug 94133

Revision history for this message
9johnny (s.j.) wrote : ipw3945 nneds to be unloaded before suspend/hibernate, the userspace daemon needs to be stopped before that.

I have version0.14.0-6ubuntu1 of powersave, my system is up-to-date. This is a brand new install of feisty.
It's pretty simple: ipw3945 doesn't know how to suspend, so it needs to be unloaded. The problem is, that it has a userspace daemon running too (/sbin/ipw3945d-2.6.20-12-generic), so one needs to first kill that program, then unload the module. I did a google on this problem and it gave me this: http://<email address hidden>/msg01778.html . I adapted it to my system, where /sbin/service is I don't know what, so I used simply killall. Here is the script I put in /usr/lib/powersave/scripts/ipw3945 :

==snip==

#!/bin/sh

case "$1" in
        hibernate|suspend)
                /sbin/lsmod | grep -q ipw3945 || exit 0
                { killall ipw3945d-2.6.20-12-generic && rm /var/run/ipw3945d.pid ; } 2>/dev/null
                ;;
        thaw|resume)
                { /sbin/modprobe ipw3945 && /sbin/ipw3945d-2.6.20-12-generic ; } 2>/dev/null
                ;;
        *)
                ;;
esac

exit $?

==snip==

It now works perfectly well.