I have exactly this problem. I retype some of it in case link goes offline. I have notebook lenovo E540. I think I'm using 14.04.1 LTS (didn't check) and kernel 3.13.0-35. My wifi stoped working after few minutes and I could not get it going. So I googled for the solution. I found this:
From there I tried the solution in #29
I have tried the following on several kernels (under 12.04 and 14.04) and so far it has worked well :sudo apt-get install linux-headers-generic build-essential git # needed only if you don't have yet that package git clone http://github.com/lwfinger/rtl8723be # needed only if you don't have yet downloaded rtl8723be cd rtl8723be git checkout 604aa9058fb9e5bb1cf571c99989d081f8fc8b9 make clean make sudo make install sudo modprobe rtl8723be echo "options rtl8723be fwlps=0" | sudo tee /etc/modprobe.d/rtl8723be.conf
But it broke my system. I get kernel panic because of rtl8723be driver. I try to load to recovery mode -> root shell and run:
modprobe -r rtl8723be
No output. Didn't help. How do I remove that driver from system? I would like to avoid reinstalling whole system.