Ubuntu 14.04 : My computer sees the wireless network, but won't connect to it, keeps asking for the WPA password

So, my issue was fixed. I'm not extremely sure how, but here is what I did:

sudo service network-manager restart

Maybe that will help others who have this problem, if that was the solution of course.


Please excuse the lack of formality in this answer - just a quick notice to others for the only thing that worked for me after hours of searching and trying different stuff.

I spent ages trying to get something to work - in the end it became obvious that actually the network card itself worked (because it was fine on another OS); that the wifi network worked (because I could sit there on my phone using it just fine); that the password was correct; and that I could connect to the internet through my wired connection.

The problem it turned out for me was that the network card I have is a bit... not that awesome.

First I found out here what my network card was

sudo lshw -class network

(It's a Realtek RTL8821AE 802.11ac PCIe Wireless Network Adaptor, so I used "RTL8821AE" in my searches)

Then I searched for the driver and it took a while but eventually I found this thread which said that there was a new... I'm gonna say driver (?!) ... and followed the instructions. It was only through the github link that I could actually work out where the ... I'm gonna say driver (?!) ... was and downloaded it on my laptop, unzipped it and copied it over on a USB stick. Then I just did the make commands etc. Boom! it worked :)

And I also had to use this command sometimes to clear a cache or whatever:

sudo service network-manager restart