Realtek have a reputation for providing buggy drivers. I had a Realtek NIC driver that worked intermittantly . Good idea to get the latest driver you can download. Then look carefully at your Wifi config … especially wpa_supplicant
see reply no 18
and this is helpful