Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1012  / 2 Years ago, fri, march 11, 2022, 10:40:26

I'm running Ubuntu 11.04 on a laptop, and quite often (but not always), if I open the lid to wake the computer from Suspend, the wireless connection finds nothing.



I've tried using ifup and ifdown, but to no avail. The only solution I've found is to reboot the whole system.



Any solution - a setting somewhere, a text file to edit or a script to run?



Thanks.


More From » wireless

 Answers
4

First find out what your wireless kernel driver you use:



Run



sudo lshw -class network


Then look for "driver=xxxxx" e.g.



enter image description here



Now create a text-file called "reset_wireless.sh" with the following:



#!/bin/sh
service network-manager stop
modprobe -r brcm80211
modprobe brcm80211
service network-manager start


obviously change "brcm80211" with your driver.



Give it execute rights i.e.



chmod +x reset_wireless.sh


Now right-click and create a launcher on your desktop with the command:



gksudo reset_wireless.sh


Now when you awaken you can reset your wireless by double-clicking on the new launcher.



Automating



You can try the following to automate the above script on resume:



Move the file to a known location e.g.



sudo mv ~/resume_wireless.sh /var/local


Now create a new script:



#!/bin/sh
case "$1" in
thaw|resume)
/var/local/resume_wireless.sh
/var/local/resume_wireless.sh
;;
*)
;;
esac
exit $?


save this script in the folder /etc/pm/sleep.d called 99wireless-resume and give it execute rights.



technique borrowed from here and here


[#43405] Sunday, March 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bathtusain

Total Points: 380
Total Questions: 124
Total Answers: 111

Location: Trinidad and Tobago
Member since Sat, Apr 9, 2022
2 Years ago
bathtusain questions
Sun, Jul 17, 22, 03:13, 2 Years ago
Sun, Oct 3, 21, 00:24, 3 Years ago
Sat, Apr 22, 23, 00:24, 1 Year ago
Fri, Jul 22, 22, 12:01, 2 Years ago
Sun, Jun 27, 21, 02:31, 3 Years ago
;