UPDATE: latest version of ubuntu 22.04 does not have this problem, just install updates. Original answer follows, then detail of which version fixed it for me.
I think it is likely that you are hitting a bug with the 5.15 kernel (linked below) that is used by Ubuntu 22.04. If so you can only fix the problem today by changing to another kernel version without that bug (this can be done without changing anything else). The fix is already available in the kernel sources for 5.15, but downgrading until it is available in the ubuntu 5.15 packages is a reasonable workaround.
Based on dates and schedule only (the upstream fix was committed 28-Mar, after the previous ubuntu kernel commit deadline but before the start of current cycle), I am hopeful that the next scheduled Ubuntu kernel release on 09-May will fix your problem. Source: https://kernel.ubuntu.com/
My experience
I had exactly the same issue with 22.04 - everything else fine, but I had slow wifi that would regularly silently disconnect. I was dual-booting with an existing Ubuntu 21.10 installation which continued to show no similar problems, so I knew that the problem was specific to the updated OS.
This was with a "TP-LINK TL-WDN4800 N900" PCI-e wireless card, with Qualcomm Atheros driver.
I then saw exactly the same wifi behaviour when using the 5.15 kernel in manjaro. The smoking gun here - in my view - is the exact same BAD WIFI behaviour newly occurring over two linux distributions where pretty much the only thing they had in common was kernel version. I've tested each of these:
- 5.17.1-3 with manjaro - GOOD
- 5.15.32-1 with manjaro - BAD WIFI
- 5.15 with ubuntu 22.04 - BAD WIFI
- 5.13 with ubuntu 21.10 - GOOD
- 5.10.109-1 with manjaro - GOOD
I know wifi issues can have many causes, and my answer is not perfect - particularly since I haven't reinstalled ubuntu 22.04 and installed a different kernel to verify the fix, but this setup has been rock-solid over many operating systems over the past few years, and this was the first time I've seen behaviour exactly as you did. Since it took me a while to track down, I thought I'd share. Hope it helps. I'll try 22.04 again after the next kernel update - if you're still interested, let me know and I'll let you know the results.
Update with confirmed fix
Using ubuntu's kernel version numbers, the original was 5.15.0.25.27 with broken wifi. On 13 May, the update to 5.15.0.30.33 also had broken wifi. Now on 20 May an update to 5.15.0.33 was offered and it definitely fixes the wifi problems I was having.
Above version numbers are those reported by "Software Updater". For the first fixed version uname -r
reports 5.15.0-33-generic
Links
I believe these are what you are seeing:
- The kernel bug "ath9k frequent connection problems after kernel upgrade": https://bugzilla.kernel.org/show_bug.cgi?id=215703 - notice "The same change that affects 5.16.15 was also incorporated into the 5.15 tree: 5.15.28 works, whereas 5.15.29 and 5.15.30 don't."
- Discussion of behaviour on arch forum: https://bugs.archlinux.org/task/74187?project=1 - notice "Last night's push of 5.17.1-arch1-1 clearly fixed all the problems I was having with my Qualcomm Atheros AR93xx Wireless card". Different kernel version (5.17.1) but same module, and the same bug exists in 5.15 as shown in previous link.