In a 5.1 set up, the 'rear' pair is actually the side pair. This can be demonstrated by selecting 7.1 and clicking the new rear speakers - it will test the sound from them, and work fine. To fix this issue, right click the rear analog back panel port you have your 'rear' speakers plugged into, it will give you a box asking what device you plugged in. Tick the Side speakers. Then swap it back to 5.1 and test.
Failing that, plug the rear speaker cable into the side speakers port in the back of your computer. Achieves the same result.