I am no stranger to diagnosing issues on Linux systems. Even although most of my skilled work over the previous few years has concerned virtualization, I nonetheless get pleasure from crouching underneath desks and fumbling round with gadgets and reminiscence modules. Well, aside from the “crouching under desks” half. But none of that signifies that persistent and mysterious bugs aren’t irritating. I lately confronted off in opposition to a type of bugs on my Ubuntu 18.04 workstation, which remained unsolved for months.
Here, I am going to share my downside and my many makes an attempt to resolve it. Even although you will most likely by no means encounter my particular difficulty, the troubleshooting course of is likely to be useful. And moreover, you will get to get pleasure from feeling smug at how a lot effort and time I wasted following ineffective leads.
It all started once I observed community latency and obtain speeds on my workstation have been terrible. Well, let me again up. It actually started a couple of years in the past once I moved and could not be bothered to run cable via my new dwelling to all of the rooms that would wish connectivity. Instead, I purchased a bunch of USB WiFi adapters. The efficiency wasn’t pretty much as good as Ethernet, but it surely was adequate—often between 2Mbps and 4Mbps between machines.
But then one gloomy winter day, my workstation connection deteriorated. As far as I might inform, it appeared to have hit across the time I briefly put my interface into monitor mode to experiment with community sniffing. Latency was now excessive, I used to be typically fortunate to get 300kbps obtain speeds, and ifconfig was reporting excessive numbers of switch errors. It was so unhealthy, I’d frequently obtain bigger internet-based packages to a laptop computer and switch them to my workstation utilizing a USB. What century is that this?
Eliminating the not possible
Could my USB WiFi interface have degraded over time? No downside: there are most likely 10 of them—all completely different fashions—scattered via the home. So I attempted two or three others, however with equally miserable outcomes.
While an extended shot, it could not damage to examine my ISP service connection. Multiple DSL velocity take a look at web sites all confirmed that my supplier was giving me the whole lot they mentioned they might. Perhaps the WiFi router offered by my ISP was guilty. Nope. The laptop computer was getting good connectivity to the identical router even whereas sitting proper subsequent to the workstation.
Was I positive it was a WiFi downside? Perhaps it was a common networking difficulty. To discover out, I mixed two previous CAT5 cables and ran them from the router, underneath the eating room desk, via the lounge, throughout a corridor, and into my workplace. Instant connection happiness: 25Mbps downloads. But I sensed that, over the long run, the spouse may not reply properly to the cable within the eating room. Not an answer, but it surely did affirm that the difficulty was WiFi-specific.
Did my transient swap to watch mode by some means mess with some obscure WPA_supplicant setting? (WPA_supplicant is a package deal for managing shopper connections utilizing the WPA, WiFi Protected Access, protocol.) The quickest solution to discover out for positive was as well my workstation to a stay USB Ubuntu session to get a pristine, out-of-the-box working system expertise. The consequence? Even utilizing the stay session, I used to be nonetheless getting poor connectivity. Which just about dominated out software program configurations, did not it?
So what’s left? In desperation, I emailed an previous buddy who gave me some logical strategies, together with checking dmesg for errors, lsmod for conflicting drivers, and the firmware variations of my wi-fi chipsets. Given how a lot progress has been revamped the previous few years incorporating such a variety of WiFi chipsets into the Linux kernel—and the way difficult it might be to dive down the firmware model rabbit gap—I skipped that final merchandise and hoped for the very best.
Finally, my buddy suggested me to purge wpa_supplicant and reinstall it. That “reinstall” bit might get difficult, contemplating that I might haven’t any WiFi connection at that stage. But it is doable. So I did it and, certainly, my connection improved… for per week or so. Then it was again to the darkish ages of 250kbps.
Desperate, I attempted uninstalling NetworkManager and changing it with the Wicd package deal. Two fascinating observations about that:
- Did you understand that uninstalling NetworkManager in GNOME three mechanically causes gnome-control-center to uninstall as properly? That’s considered a feature, by the way, not a bug.
- And do you know why Wicd is not the default WiFi instrument used with any Linux distros with which I am acquainted? I am now fairly positive that—whereas it may be a life-saver in some edge situations—it is as a result of the module is extra more likely to introduce a number of annoying buggy conduct.
New , usual downside
So there issues stood for a couple of uncomfortable weeks till, for largely unrelated causes, I made a decision to construct a substitute workstation.
Happily, my connection to the brand new machine was sturdy. Until it wasn’t.
Within a couple of days, I used to be again to watching the web via a thick fog. Speed exams confirmed me I used to be getting latency within the vary of 100ms, and switch speeds have been useless sluggish. What was occurring? The solely piece of that each machines shared was the facility provide, and there is not any means that was an element right here.
In reality, the workstation improve made issues easier for me, as a result of it dominated out nearly the whole lot. And, as Sherlock Holmes famously mentioned, if you’ve dominated out the not possible, what’s left is the possible.
So what was left? There was actually just one factor, but it surely took all these useless ends and failures to get me to it. Because my workstation lives underneath my desk, and since WiFi reception can undergo behind too many bodily limitations, I needed to elevate my USB WiFi adapter as excessive as I might. To do this, I related it to my workstation via a three-foot USB extender and sat it on the floor of my desk. On a hunch, I pulled the extender and plugged the adapter instantly into one of many built-in USB ports.
Instant success. Perhaps utilizing the extender was a foul concept from the beginning or, extra seemingly, it degraded over time, however the whole lot was buzzing alongside fortunately now. I am going to guess you did not guess that ending. I definitely did not.