Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2660  / 2 Years ago, fri, february 25, 2022, 11:56:15

Sometimes my wireless loses connection and will not reconnect. However, I find it will reconnect when I open terminal and run



sudo modprobe -r nameOfDriver
sudo modprobe nameOfDriver


However, going to Network Manager and un-checking enable wireless and enable wireless does not fix the problem.



Is there any way to have network manager remove the driver via modprobe? What exactly is disabling in network manager (or with the hardware/keyboard switch) do?


More From » wireless

 Answers
7

  • Disabling a wireless connection in Network Manager deactivates the wireless interface (similar to ifdown or ifconfig down), and then soft-blocks (turns off) the hardware device. It does not unload the wireless driver (kernel module).

  • The hardware/keyboard wireless switch will also soft-block (or hard-block, i.e. cut power) the internal wireless card.

  • You can customize -- to a limited degree -- what happens when Network Manager enables/disables an interface by editing scripts in /etc/NetworkManager/dispatcher.d; see man NetworkManager for more info.


    • BUT this cannot be used to load/unload the driver via modprobe, because once Network Manager unloads the driver, the interface ceases to exist and it won't be able to bring it back up! (notice when you modprobe -r that the Wireless options completely disappear from the drop-down menu)




So, the best option is to setup a custom keyboard shortcut to a script which unloads/loads the driver; you can add that script to the sudoers file such that no sudo is needed for it. See this question for details.


[#36020] Sunday, February 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ippalogu

Total Points: 215
Total Questions: 127
Total Answers: 146

Location: Denmark
Member since Tue, Jul 19, 2022
2 Years ago
ippalogu questions
Tue, Jan 4, 22, 21:49, 2 Years ago
Tue, Sep 21, 21, 09:12, 3 Years ago
Wed, May 19, 21, 02:24, 3 Years ago
Mon, Dec 27, 21, 01:44, 2 Years ago
;