When you say it doesn't produce sound in Windows as well it suggests hardware mixup (put output plug in microphone or something).
Can you post the output of the following command (in Ubuntu)?
I assume you have the speaker icon in your menu bar (in Ubuntu). Can you right click it and select "sound preferences"? Make sure the output volume is not mutes. Then start some program to play sound and check the applications tab. The application playing sound should be listed there (again with the options to change volume or mute it).
cat /proc/asound/card0/codec#* | grep Codec