1. Install the correct sound driver from the Motherboard vendor. Non vendor sound drivers may not work or work correctly. Here is the link to the ASUS site for the P5K motherboard. ASUS - - ASUS P5K
2. If the speaker plug is not fully inserted it can be intermittent or only one side. The green jack is the speaker jack on the rear.
3. Some audio control panels, such as the RealTek audio manager will allow disabling or enabling front panel connections. Front panel connection problems can also be the connection to the motherboard. Us the HD Audio connector if available in your case, if not then the older AC97 audio connection.