RT Cunningham

Blogging For As Long As I'm Able

Fixing My Wi-Fi Issues on Linux

Tagged with linux, wi-fi on March 5, 2024

Wi-Fi issues I’ve lived in the Philippines since 2006 (except for visits back to the United States), but I didn’t start using Wi-Fi here until 2015. I didn’t have any Wi-Fi issues at all from then until the day my wife and I left in 2018. Only my laptop computer started having Wi-Fi issues when Josie and I returned to the Philippines in 2022.

Router Location

From 2015 to 2018, I had a DSL connection to the router inside the master bedroom. I didn’t have any Wi-Fi issues at all because there was a line of sight from my laptop computer to the router, with nothing in between. For our phones, most of the house was covered, along with the front and the left side. A day or two after we left in 2018, one of our relatives turned in the router to the PLDT office.

While we were stuck in the United States during the pandemic, I had a relative set up a fiber connection with PLDT, with the router in the bedroom opposite to the master bedroom. That allowed all of my student nieces and nephews next door to have Wi-Fi access because all their classes were online.

The optimum place to put the router is back in the master bedroom, but there are students still using it since the pandemic. I like to use my phone while I’m on the right side of the house instead of the left (where no one hangs out), so I don’t see a problem with it. Well, as long as anyone else’s usage doesn’t interfere with mine.

The Laptop Computer and the Raspberry Pi 400

I had an aging laptop computer when I returned in 2022. The Wi-Fi adapter only supported 2.4 GHz. The signal was too weak for the adapter, or the adapter was too weak for the signal. Which one was which didn’t matter. Josie and I didn’t have any issues with that signal on our phones. I set up a hotspot on my phone, receiving the 5 GHz signal and sending the 2.4 GHz signal to my laptop computer.

That worked until I gave the laptop computer away. I used the Raspberry Pi 400 with the 5 GHz connection. It was a weak signal, but bearable. The signal had to travel through two cement walls.

I bought another laptop computer while I was in the United States, while we were away for seven months in 2023. Computers cost somewhere around twice as much in the Philippines for the exact same models. The Wi-Fi adapter inside this laptop computer isn’t well-supported on Linux. Sometimes it doesn’t recognize any connections after booting up or returning from suspend. Other times, it randomly disconnects, but thankfully not often.

The Fix for My Current Laptop Computer

Since I returned in October 2023, the only way to get the Wi-Fi to reconnect was to reboot the operating system. Strangely, I didn’t have this issue with Windows, but I hated using Windows and I eventually removed it completely. I continued to search, off and on, for a solution to the Wi-Fi disconnection issue on Linux.

I recently stumbled upon a forum thread, which started more than 10 years ago. It had some of the same recommendations I’d found on many other websites. Then I noticed the recommendation to reload the driver, something I had seen nowhere else. That was the only solution that actually worked.

The first thing I had to do was to run these in the terminal:

sudo apt install hwinfo
hwinfo

Once I obtained the driver name, “rtw88_8821cu”, I simply had to run these two commands:

sudo modprobe -r rtw88_8821cu
sudo modprobe rtw88_8821cu

The first command unloads the driver and the second command loads it. Simple, and I don’t even have to pause between commands. I put those commands in a bash file, made it executable, and linked to it in my menu. I tested it several times. Problem solved.

Image by Samuel1983 from Pixabay

← Previous ArticleNext Article →