I bought a TP-Link wireless nano USB adapter (TL-WN725N V2) to replace a malfunctioning PCI wireless card on my desktop computer. When I plug the USB adapter, the system recognizes all available networks, but it won't connect. It asks me for my password, start connecting... and then my password again, as if I'd put a wrong one. But I'm sure the password is ok.
The PCI card has been removed.
I use Lubuntu 16.04.02, and have a dual boot with Windows 7. In windows the adapter works fine.
There seems to be a problem with Realtek wifi drivers on Ubuntu 16.04.+. I found a deb package with new drivers wile reading this thread on Ubuntu Mate forums. The package is this.
Installing this package solved my problem.