You should appreciate the beauty of the problem and the solution...
After thinking it had to be a software issue (because the sound worked as long as I turned the screen off) and finding no one at all who knew what to do I was about to give up on the sound on my g tablet.
But then I had a crazy thought - what if it was a hardware issue where either a contact on the motherboard melted together or somehow the sound cable was interfered with by a loose connection.
If you open the gtablet case - Gulp! Its actually not that bad...
Using an eyeglass repair kit screwdriver, gently remove the rubber circular pads on the back of the tablet.
Underneath you will discover screws that the eyeglass screwdriver can unscrew.
After unscrewing all four, use a credit card to gently slot between the seals of the casing all the way around. eventually the casing will separate without problems.
Once open, and with the tablet now facedown on your lap. look at the lower right section of the motherboard for a thin brown wire that is connected near the 3.5 mm jack up and connected on the other end near the middle right of the motherboard.
Mine was untaped and loosly laying over two contacts of the motherboard. All I did was gently position that little wire away from those two contacts to the left (right of the metal screen backing wall) so they would not touch those contacts.
Believe it or not - that solved the problem. Turns out that the two contacts when touched by the wire cause the sound to short off. But when not touching them, everything works fine.
The reason the sound would work before when the screen was turned off in sleep mode was because IF THE SCREEN IS OFF THERE IS NO LONGER A CURRENT GOIND THROUGH THE CONTACTS!!! Beautiful....
gently snap the cover back on and ensure it all snaps back all the way around, reinsert the screws and replace the little rubber backings and turn you tablet back on.
Good luck!
What was that? I can't hear you over my newly working tablet speakers!!!