I'm trying to use the optical audio output of my motherboard to send the sound to my AV Receiver.
I only see the front channels received by my AV.
Indeed rear channels don't seem to be activated.
How can I activate the rear channels ?
You can't. S/pdif support PCM, AC3 and DTS (if your decoder support them) PCM only support stereo up to 24bit/192khz
AC3 and DTS support surround. But they are patented technologies and not open-source friendly. As far as I know, ther is no way to get Ubuntu to transcode on the fly to AC3 or DTS to feed S/PDIF
I have the same problem, I can see from your post it's since October 2013, hope it's not too late.
This post should solve your problem (theoretically), it didn't solve my problem however I have seen others who posted success results for applying that solution, worth trying.
After installing the AC3 plugin, you will need to keep pavucontrol up. That's right - Just don't close it.
Select one of the two Digital Surround 5.1 profile options (one includes Analog input) under the built-in audio section under the configuration tab of pavucontrol then DON'T CLOSE that app, you will get working 5.1 audio in all other programs.
If you close it, you won't get the surround sound.