my nexus 5 d820 16 gigs would randomly shutdown for no reason, it wouldn't turn on without plugging it in. i was rooted and running cm11, then i tried carbon ROM, then c-ROM. c-ROM started to give me problems so i factory reset and switched to carbon but the problems remained. then i unrooted, thinking that root was the problem but no signs of improvement, so i re-locked the bootloader but still the problem remained. it would sometimes also shut down if i unplug it and would always forget my WiFi connection for some reason. help me please. thanks in advance.