Wednesday, July 20, 2011

wireless on suspend/resume

had a problem with some ubuntu upgrades hosing my ath5k wifi after resuming from a sleep. something was messed up with the power getting turned back on, i think, and it seemed to be something that would get fixed and rebroken judging from the dmesg errors and bugposts on kernel.org. downgrading my kernel didn't fix the problem. fortunately, i found that turning it off and on with rfkill avoided the problems, so i put it into a script to do it automatically. /etc/pm/sleep.d/50_wireless:
#!/bin/sh case "${1}" in suspend) #date >> /tmp/pm.log #echo ' suspend' >> /tmp/pm.log /usr/sbin/rfkill block wlan ;; resume) #date >> /tmp/pm.log #echo ' resume' >> /tmp/pm.log /usr/sbin/rfkill unblock wlan ;; hibernate) # nothing ;; thaw) # nothing ;; esac

No comments: