You are hereAtheros AR5212 not working after suspend with pm-utils (gnome-power-manager)

Atheros AR5212 not working after suspend with pm-utils (gnome-power-manager)


By thomas - Posted on 24 January 2008

My ath0 device wasn't working after resuming from a suspend on Fedora 8. modprobe -r ath_pci followed by modprobe ath_pci fixed the problem. I decided to automate that, so I read a bit of the pm-utils scripts and wrote the following simple script in /etc/pm/sleep.d/wireless #!/bin/bash . /usr/lib/pm-utils/functions case "$1" in resume|thaw) modprobe ath_pci ;; suspend|hibernate) modprobe -r ath_pci ;; esac exit $? NetworkManager picks up the reload of the module and works perfectly.
Tags

Hello,

I had the same problem with atheros equipped PCMCIA card in my notebook, I found your solution, but in my case card is not always sitting in the notebook, so I decided to modify your script a little. Now the script checks if the card was in use or not before a hibernation. Here is the result:

#!/bin/bash

. /usr/lib/pm-utils/functions

case "$1" in
resume|thaw)
ath_sleep=`grep sleep /tmp/atheros_sleep | wc -l`
if [ $ath_sleep -gt 0 ]; then
modprobe ath_pci
rm /tmp/atheros_sleep
fi
;;
suspend|hibernate)
ath_pci=`lsmod | grep ath_pci | wc -l`
if [ $ath_pci -gt 0 ]; then
modprobe -r ath_pci
echo "atheros sleep" >/tmp/atheros_sleep
fi
;;
esac

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options