WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] wlan1 sometimes does not exist after boot  (Read 5335 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
[Solved] wlan1 sometimes does not exist after boot
« on: February 18, 2022, 08:19:50 AM »
I run TCL13 x86_64 on a laptop. Laptop has an internal wifi card (wlan0) but I prefer to use a wireless usb adapter (wlan1), which is always plugged in.

About half the time, after boot both wireless interfaces are recognized (e.g., "ifconfig -a" shows both wlan0 and wlan1) and all is well. The other half the time, only wlan0 is recognized and don't know how to make wlan1 show up short of rebooting and hoping that it will show up after the reboot.

Two questions: Is there something I can do after boot to make wlan1 show up? Is there something that can be done during boot to make wlan1 be recognized more consistently?

PS: I've seen the "waitusb" boot code. Does it exist exactly for the kind of problem I'm experiencing? I didn't want to assume.

PS2: The laptop is used as a router and is not in a very accessible place. Therefore, unplugging/replugging the device is not an option.
« Last Edit: February 20, 2022, 01:02:30 PM by Rich »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: wlan1 sometimes does not exist after boot
« Reply #1 on: February 18, 2022, 09:23:01 AM »
I just checked and can confirm that this machine already boots with "waitusb=5", so my problem occurs despite me already using that boot code.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: wlan1 sometimes does not exist after boot
« Reply #2 on: February 18, 2022, 10:49:58 AM »
waitusb is for slow usb sticks that you're using for tce/backup. For helping a wlan stick, it depends on why it's not showing up. For a driver issue, you can modprobe -r and modprobe the driver. If it drew too much power etc, you can disable and enable the usb hub/ports via /proc or /sys, I don't remember the details.
The only barriers that can stop you are the ones you create yourself.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: wlan1 sometimes does not exist after boot
« Reply #3 on: February 18, 2022, 10:55:40 AM »
curaga, thanks for clarifying the intended use for waitusb. Next time the problem occurs, I will try both approaches you recommended and will report back.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11636
Re: wlan1 sometimes does not exist after boot
« Reply #4 on: February 18, 2022, 11:47:12 AM »
Hi GNUser
The first thing I would do is grab copies of  dmesg  and  /var/log/messages*  when it works and again when it fails.
It's possible they will provide clues to why  wlan1  doesn't always come up.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: wlan1 sometimes does not exist after boot
« Reply #5 on: February 18, 2022, 12:37:32 PM »
Hi, Rich. I have rebooted over 10 times and cannot get it to show up at all. Maybe the device was on its last leg and now it's totally dead.

I replaced the device with a different one and now wlan1 shows up after boot 100% of the time. (Old device was Atheros, new one is Ralink--unfortunately this introduces a lot of variables. It would be interesting to see if a brand-new Atheros would also show up after boot 100% of the time, but I don't have any new Atheros ones on hand.)

If I discover anything interesting I will update the thread. Thank you both for all your help! :)

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11636
Re: wlan1 sometimes does not exist after boot
« Reply #6 on: February 18, 2022, 01:13:06 PM »
Hi GNUser
Logs of when it fails to show up could still provide clues. There just won't be good logs to compare against.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: wlan1 sometimes does not exist after boot
« Reply #7 on: February 18, 2022, 03:19:55 PM »
Hi, Rich. The usb adapter that acts up is made by Alfa and has an AR9271 chipset (one of these: https://tinyurl.com/5n6kkcsc). I grepped through the output of dmesg and these entries seem relevant:

Code: [Select]
usb 1-1: device descriptor read/64, error -110
usb 1-1: new high-speed USB device number 3 using ehci-pci
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/64, error -110
usb usb1-port1: attempt power cycle
usb 1-1: new high-speed USB device number 4 using ehci-pci
usb 1-1: device not accepting address 4, error -110
usb 1-1: new high-speed USB device number 5 using ehci-pci

Do these errors mean anything to you? A quick internet search suggests that the error has something to do with insufficient power (e.g., https://askubuntu.com/a/644014). The laptop is old and always has the wireless adapter as well as two other USB devices plugged in. Maybe the three devices together demand more power than the laptop can provide.

The replacement usb adapter that is working consistently is made by Ralink and has the RT5370 chipset (one of these: https://tinyurl.com/2p97tw34)


« Last Edit: February 18, 2022, 03:36:13 PM by GNUser »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 714
Re: wlan1 sometimes does not exist after boot
« Reply #8 on: February 18, 2022, 04:05:52 PM »
If you wish you could try to connect the adapter to Powered usb hub and then to the network adapter.
To amplify the power, to the network adapter.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11636
Re: wlan1 sometimes does not exist after boot
« Reply #9 on: February 18, 2022, 05:33:26 PM »
Hi GNUser
Error 110 is a timeout error which could be caused by many things, including a failing USB peripheral.
A powered USB hub could be used to confirm if it's a power issue. It could also be used to power all external
USB devices and remove that load from the laptop.

... PS2: The laptop is used as a router and is not in a very accessible place. ...
Some laptops have a little fan with vents on the bottom to pull in air. A side effect of this design is the laptop
functions as a mini vacuum cleaner, pulling in dust and increasing it's internal temperature. If yours is designed
this way, consider propping it up so there is a large open area around that intake. This will reduce how much
dust gets sucked in.
« Last Edit: February 20, 2022, 01:09:39 PM by Rich »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: wlan1 sometimes does not exist after boot
« Reply #10 on: February 18, 2022, 08:43:15 PM »
Thank you, patrikg and Rich, for the excellent advice. I have created some extra room around the laptop to increase cooling and decrease dust intake. I will look into getting a powered usb hub. I'll report back eventually. In the meantime, the Ralink device will tide me over.

Online gadget42

  • Hero Member
  • *****
  • Posts: 797
Re: wlan1 sometimes does not exist after boot
« Reply #11 on: February 19, 2022, 06:17:59 AM »
while looking into the exhaust side of the airflow path, shine a flashlight into the intake side. you should see an unobstructed path all the way across the radiator. pet hair is the great enemy of a cool running machine...go figure.

sharing is caring
The fluctuation theorem has long been known for a sudden switch of the Hamiltonian of a classical system Z54 . For a quantum system with a Hamiltonian changing from... https://forum.tinycorelinux.net/index.php/topic,25972.msg166580.html#msg166580

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: wlan1 sometimes does not exist after boot
« Reply #12 on: February 20, 2022, 12:53:10 PM »
A powered USB hub made wlan1 show up consistently. Plus I cleared some space around the laptop (including beneath it) to keep it cool. And I also stopped using the "waitusb" boot code now that I know it has nothing to do with this issue.

Thank you all so much for sharing your insights. You guys are one sharp bunch. The issue is 100% solved :)

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11636
Re: [Solved] wlan1 sometimes does not exist after boot
« Reply #13 on: February 20, 2022, 01:09:07 PM »
Hi GNUser
Thank you for the update and congratulations on your success.
Thread has been marked as solved.

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 765
Re: [Solved] wlan1 sometimes does not exist after boot
« Reply #14 on: February 21, 2022, 03:40:19 AM »
@GNUser: The concept of a wall-powered laptop not being able to power a radio (wifi) sounds rather odd, considering how much the average radio draws versus something like the CPU fan, which is likely to draw quite a bit more than something plugged into USB.  Since you have introduced a powered USB hub and seemingly have a working platform, you've added two new things to the mix: fresh copper pads (the USB sockets the radio plugs into) and Vcc (a secondary power supply).

The radio has four pins inside the connector, Vcc (5v "plus"), Ground, and the two pins in the middle are Data.  I'm betting one or both of the outside pins are oxidized, making a poor connection with the laptop's USB pins, which are also possible to have the same symptoms.

  • Power down the laptop and remove the battery (just for safety, some laptops have one or more USB ports that stay lit after the unit itself is shut off.)
  • A burnishing tool is normally used, which most people don't have in their homes, but 3,000 grit or higher sandpaper is now found in most local hardware stores (Home Depot, Lowe's, etc.) which would be my second choice.  Lightly sand the contacts (on the laptop) using a piece of folded high-grit sandpaper; it doesn't usually take much effort before the contacts are "shiny gold" in color.  Repeat this process on any USB devices whose USB contacts are dulled; this "dull" look is actually oxidation and can prevent a solid connection between the laptop and USB devices plugged into it.
  • Once "sanding" is complete, you'll want to clean out any dust/debris - Isopropyl (rubbing) alcohol on a Q-Tip (usually with some of the cotton removed so it fits nicely inside the USB connector) will help clean things up quite nicely.