I am sorry to hear you are having problems with your laptop. Since you have upgraded to Windows 8.1 from Windows 7 there maybe an issue with your graphics driver as you have experienced hang ups. You can try to update all drivers using the HPSA utility. This will scan your notebook and will detect any drivers that maybe out of date or did not successfully install.
+++If you find my solution acceptable please hit the KUDOS button+++
***I work on behalf of HP and these are my personal opinions