I just installed Ubuntu 18.04. (In dual boot)
The speakers are recognized in settings: it says "speakers – built-in audio" under Settings-Sound. However, they do not work.
Headphones do work for system sounds and in Chromium, but they do not work in Firefox.
Any other information, please ask. I am new at this and don't really know what is necessary to give.
This worked for a few days, but then it stopped working:
I turned off fast startup on Windows following No sound from laptop speakers in Ubuntu 14.04 after booting into Windows 8.1. Now my speakers are working except on firefox: so now the only problem was that neither the speakers nor the headphones work with firefox.
Using pavucontrol as in https://askubuntu.com/a/822196/679786 I managed to get the sound right in firefox too.
But now the problem is back.
Best Answer
I had this same problem and it was driving me nuts trying to fix it because whenever I booted into Windows 10, sound worked fine. Meanwhile, on Ubuntu 18.04, I found a number of helpful web pages with suggestions for troubleshooting audio problems.
The suggestion that worked for me was running 'sudo alsamixer' in a terminal window. I didn't even have success with this until I started to approach the problem with the expectation that things were gonna work realized I needed to be able to tell when they did.
I have provided some very basic instructions below that I hope might help someone troubleshooting audio problems. While steps 3 and onward are specific to alsamixer (version 1.1.3), steps 1 and 2 may help a person detect when things are working for other changes. If you are already familiar with alsamixer, then I'm sure you will understand that we are looking for any playback settings that may be muting output or producing output at a volume to low to be heard. In my case, it was the muting of one particular item that actually produced audio through the speakers.
sudo alsamixer
We're gonna change the volume level or mute status of various items to see if the change causes audio to come through the speakers. The currently selected item is the one on the left. By moving the right arrow key we can select the item to its right. We will slowly explore each item until we go all the way to the right. You will see the name of the currently selected item appear in the upper right of the screen next to "Item:"
My apologies if you get all the way to the right without any improvement in your audio configuration.
In my case, I have an ancient Creative Labs SoundBlaster Audigy 2 ZS sound card. Everything worked right out of the box when I first installed Ubuntu, but some later actions on my part broke the audio configuration to where I could hear audio through headphones but nothing came through the speakers, even if I physically disconnected the headphones (which I also tried since some cards auto-toggle speakers when headphones are connected/disconnected).
When I followed the steps above, I came to the item: Audigy Analog/Digital Output Jack, which was set to "0" (enabled), I toggled to mute ("MM"), thereby turning the item "[Off]". The moment I did this, I actually got sound output through the speakers. Makes no sense to me at all why enabling this item would DISABLE output to speakers and vice-versa, but I'm so happy to have finally found this setting and fixed my audio configuration, and can now listen through speakers or headphones as I choose.