How can i get my USB wifi to work after a reboot?
Solution 1
First you need to identify the driver for your USB wifi adapter. Execute the following command to get the list of network adapters
lshw -C network
Following is the kind of output you might notice
*-network:0
description: Wireless interface
physical id: 1
bus info: usb@3:5
logical name: wlx542aa25b496d
serial: 54:2a:a2:5b:49:6d
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtl8xxxu driverversion=5.0.0-32-generic firmware=N/A ip=172.16.61.0 link=yes multicast=yes wireless=IEEE 802.11
Check the driver and note it down. Assume it is rtl8xxxu
and you can use following commands to unplug or plug the adapter via commands
sudo modprobe -r rtl8xxxu
sudo modprobe rtl8xxxu
Since this again is manual invocation, you can add the commands in /etc/rc.local
Add the following code just before exit 0
modprobe -r rtl8xxxu
sleep 1
modprobe rtl8xxxu
Int Ubuntu 18.04 the rc.local
file doesn't exists, so you can create with sudo nano /etc/rc.local
Add the following part which is taken from Ubuntu 16.04's stock /etc/rc.local
file to automate it on system boot
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0
Then add the uplug/plug code before exit 0
. You'll need to make the file executable by sudo chmod +x /etc/rc.local
.
Reboot and see if this works or not
Solution 2
You can activate the wlan by these commands instead of repluging:
sudo modprobe -r 8192eu
sudo modprobe 8192eu
You need change 8192eu to your own wlan name. If you don't know the name, search on google with keyword ID 148f:2070
(your usb wlan's id which can be found by command lsusb
).
Or you can just add the wlan name to /etc/modules
:
sudo -i
echo 8192eu >> /etc/modules
exit
Then the wlan will be activated automatically when system start.
Related videos on Youtube
Scott
Updated on September 18, 2022Comments
-
Scott over 1 year
I have a Wordpress website that has a horizontal menu bar with a drop down sub-menu that appears when hovering over the parent menu item. The links to the sub menu works in a regular browser, however, when using my iPhone, the links to the sub menu do not work. It previously worked only in a long press mode, but I didn't want the long press mode so I added the following code in my CSS to remove the long press mode:
.navWrap .top-bar2 li.menu-item { -webkit-user-select:none; -webkit-touch-callout: none!important; }
and I also added the following javascript (because the CSS didn't work and some people suggested the javascript solution):
<script type='text/javascript'>document.documentElement.style.webkitTouchCallout = "none";</script>
You can test this by going to the following link: http://sa4iserver1.com/~hoffer/ -- at this time, the only menu item that has a drop down sub-menu is the RENT menu item.
Any suggestions on how to make the sub-menu links clickable via iPhone/iPad would be greatly appreciated!
-
reukiodo over 2 yearsadding 'modprobe rtl8xxxu' into /etc/rc.local is the only thing that allowed my Edimax EW-7811UN to work on boot (fresh or reboot) every time without fail
-
reukiodo over 2 yearsadding 'rtl8xxxu' into /etc/modules did not work for me with Edimax EW-8711UN ... wifi was always unavailable after fresh boot - found out later that the module was blacklisted by default and had to remove the default blacklist from /etc/modprobe.d/blacklist-*.conf