I have a ROG G771JW and I usually swap between speakers and headset (speakers for music, headset for cs:go) and today I plugged in my speakers and no sound was coming out. I unplugged them and laptop's speaker worked just fine. I searched online how to solve this but I couldn't figure it out. I went in Control Panel Hardware and SoundManage audio devices and whenever I plugged anything in I receive the 'Realtek HD Audio Manager' dialog asking me what I plug in (headphone/speakers/headset) but it still doesn't recognize anything I plug in. I am using windows 8.1 pro.
It looks like there might be an issue with your audio drive and/or manager. Try to update the drive, reinstall it or roll back a version, to see if that fixes the things up. I'd recommend that you check the laptop manufacturer's webpage for the audio driver.