Default Optimus G pro

My LG Optimus G Pro F240L turns off automatically. Don't know what's wrong. Is it software problem or hardware problem?
If I turn off screen for like 5 minutes and then turn back on, it does not open instead it restarts if pressed for long. I am so worried don't know what's wrong. Somebody please tell.
If I flash AOSP Based ROM like SlimKAT, will it resolve the issue?
PS: I have recently used KDZ to go to Stock KitKat.