For periods of time, up to about 24 hours, all will be fine and I can reliably ping the Wifi router over 5GHz Wifi, but then things will slow down and I can see terrible ping loss as shown on the right.
As you can imagine, this causes all sorts of trouble using the machine on the internet.
Searching for a fault with an Apple product, or probably any product, makes you feel that the problem is incredibly widespread but I think that it's just the illusion of being able to find similar stories with great ease on a search engine.
I have found many similar stories and tried all of the suggestions. Finally, I've found a workaround that is working for me. I have tried:
- Rebooting everything (Wifi router, Mac)
- Moving the Wifi router to get a better signal (RSSI -65, Noise -90)
- Using a different Wifi router (Telstra modem and I tried a Google Wifi)
- Turning off Bluetooth (there are stories of it interfering with Wifi)
- Wiping the Mac and doing a clean install of macOS 10.15.6 Catalina (This seemed to work for about a day)
- Unplugging USB devices (Again, stories of interference)
- Running the built-in diagnostic, which found no hardware faults
In the end the solution for me is simply not to use Wifi.
I have an old Thinkpad X230 on my desk running Ubuntu 20.04.1 LTS which is used for WSPR, Fldigi, and other ham radio software. Following the instructions at Cesariogarcia I ran nm-connection-editor (which was already installed) and (slightly varying those instructions) edited the ethernet interface to set it's IPv4 settings to make it "Shared to other computers".
Open the Ethernet interface:
I also changed the name so I'd remember. A pity this option isn't in the Sharing settings.
The Mac is plugged in with a normal Ethernet cable. (All recent Macs figure out if they need to cross over.) When I saved the setting on Linux the interface changed from "self assigned IP" to 10.42.0.42 with the router as 10.42.0.1.
I'd rather the laptop used bridge mode but I haven't figured that out yet.
Speed test isn't quite as fast as I can get when the Wifi was working reliably but it's much better than it was with 30% packet loss.
You can no doubt use a Raspberry Pi for this task and there are little Wifi routers that can do this too. The Thinkpad barely idles even when running a speed test.
I hope this helps someone else with this issue. Incidentally, the Mac mini is out of warranty and I fear that if I take it to Apple it will work perfectly while they have it. I know I should give it a shot and I have had great experiences with the Genius folks in the past.
I've been monitoring with PeakHour and you can clearly see that ping loss (blue graph) has stopped since adding the linux gateway to the mac's network.
Apple has some tips on resolving Wifi and Bluetooth interference issues but this hasn't helped in my case. It might be worth trying before following my radical path.