Hello sukaina,
Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
I understand you are having issues with your HP Pavilion g6 computer after upgrading to Windows 8.1. Since there are numerous version of the HP Pavilion g6 computer I would encourage you to post your product number for your computer. I am linking an HP Support document below that will show you how to find your product number. As with this we can provide you with accurate information.
How Do I Find My Model Number or Product Number?
Please re-post with the requested information and I would be happy to provide you with assistance. Thank you for posting on the HP Forums. Have a great day!