USB device (wifi adapter) not starting on bootup

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jaydee3839

USB device (wifi adapter) not starting on bootup

Post by jaydee3839 »

Running Linux Mint 15 - MATE, relatively new to Mint.

I have a USB wifi adapter that does not load on bootup. If I run the command lsusb, it does show as recognized, but it will not show up under "ifconfig" or network manager, until I unplug it and plug it back in.

Is there a command or script I can run that will restart this device without me unplugging it and plugging it back in? Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
trapperjohn

Re: USB device (wifi adapter) not starting on bootup

Post by trapperjohn »

What driver does it use?

To find out, just before fresh-boot/unplug, then just after unplug/replug, run
lsmod

The second lsmod will show a new item in the list (it may be more than one).

Then, on a fresh reboot run
sudo modprobe yourDriver

Let's say for demonstration purposes the new item is b43. Using b43 as an example that is:
sudo modprobe b43

Does doing this make the adaptor work without the unplu/plug routine? If it does, then we can move to the automatic step. So, if it worked, what's the name of the driver that used with modprobe?
jaydee3839

Re: USB device (wifi adapter) not starting on bootup

Post by jaydee3839 »

Thank you for the reply. Unfortuantely, there was no change between running the "lsmod" on a fresh boot and running/ "lsmod" after unplug/replug the wifi adapter. It's a long list, so I'm not going to post it all here, but nothing jumps out at me as being definitely this USB wifi adapter. this line could be it?

cfg80211 510937 3 ath,ath5k,mac80211

If I run "lsusb", here's what I get (both before and after unplug/replug, there's no change), does this tell me anything about the driver?
Bus 001 Device 002: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter
trapperjohn

Re: USB device (wifi adapter) not starting on bootup

Post by trapperjohn »

OK, so it's a realtek device.
What does
lsmod | grep r
show before and after plug/unplug, and finaly, after complete removal?

Hopefully you will see a module (driver) that disappears after the final complete unplug.

From what I can tell, the ideal driver is r8712u. So, in the following I have used that name in sample commands. Substitute yours if it is different.

If it shows before plug/unplug, does
sudo modprobe -r r8712u
sudo modprobe r8712u
bring the device up?

also, what do you see when you run
sudo rfkill list all
at boot?
If you see a block, does
sudo rfkill unblock all
fix it?

is there any file in /etc/modprobe.d/
that blacklists your driver with a line of the form:
blacklist r8712u

Again, in the above examples I have assumed the optimum driver is r8712u. There may be another {rwxyz} appears when you run lsmod but goes away when unplugged. If so, it's the one we want to substitute in the above commands.
jaydee3839

Re: USB device (wifi adapter) not starting on bootup

Post by jaydee3839 »

Lsmod | grep r

Shows the r8712u driver as present on fresh boot, after unplugging/repluggling the usb wifi adapter and after removing it entirely. There was no change in the output.

The "modprobe" commands do indeed start up the device without the need to unplug/replug the adapter.

The "rfkill" command does not show any devices being blocked on fresh bootup.

I did not see the r8712u driver being blacklisted in any of the files in directory you referenced.

Thank you very much with your help, I am learning quite a bit with this exercise. I'm glad we have a way right now to bring up the device without unplugging it, replugging it in. Even better to do this on startup with an automated script. Best case scenario though is to eliminate the need for a script, and just "make it work". I brought in the adapter to work and plugged it into a Mint 15 Mate machine there and I did not have this problem curiously. That machine did not have a builtin wifi PCI-E card though so I wonder if the multiple wifi adapters in my laptop has something to do with it.
trapperjohn

Re: USB device (wifi adapter) not starting on bootup

Post by trapperjohn »

A script at boot is a hack that will work, but I agree with:
Best case scenario though is to eliminate the need for a script, and just "make it work".
The previous excercise just showed us that the driver was loading at startup and that it was in fact the correct driver. Too often problems have to do with a failue to do this. So, we're happy so far.

Next, we need to find the adaptor's state at boot.

At startup and (before modprobe -r r8712u/ sudo modprobe r8712u or unplug/plug), what do the following commands show:
sudo lshw -c network
ifconfig


lshw should show all of your network adaptors. Each adaptor will show a logical name in the output (eg wlan0, wlan1, eth0, etc).
ifconfig will show all of the adaptors that are "up." If your adaptor is showing in lshw but not in ifconfig, then run:
sudo ifconfig theLogicalName up

where theLogicalName is the logical name for the the adaptor that is present in lshw but not ifconfig (eg, sudo ifconfig wlan1 up).

Does doing this correct the problem during the current session? If it does, we need to bring the device up at boot... the next step.


BTW: I run both a wireless usb and pci and don't have a conflict. Mine do not use the same driver (do yours?). Another thing; did you, while setting up, install the driver package more than once by two different techniques?
jaydee3839

Re: USB device (wifi adapter) not starting on bootup

Post by jaydee3839 »

The USB wifi adapter does not show up with the "lshw -c network" command, nor the ifconfig command on fresh boot.

The built in PCI adapter is wlan0, the built in ethernet is eth0, and when I unplug/replug or run the "modprobe" commands, the USB wifi adapter shows as "wlan1".

The default Mint install already had the r8712u driver, so it recognized it immediately on install. Having these problems I am describing I did try to reinstall the driver (ndiswrapper) along the way, but it did not effect my problem, so I uninstalled it.

Thank you again.
jaydee3839

Re: USB device (wifi adapter) not starting on bootup

Post by jaydee3839 »

This is no longer an issue for me, my laptop and USB dongle were stolen before I could get it working...

But I do want to update this thread in case anyone else runs into this problem. Apparently it's not isolated to me and my (former) hardware. I came across this thread recently which described the same problem with someone with Ubuntu:

http://ubuntuforums.org/showthread.php?t=1948987
Locked

Return to “Hardware Support”