2

I never used Ubuntu before. I just loaded Ubuntu onto my Dell XPS One 2710 All-in-One

Intel i5 CPU

Intel 7 Series/C216 Chipset Family High Definition Audio Controller (driver = snd_hda_intel)

Everything works fine except there is no sound from the speakers (no system sounds, no web video sound, no Spotify, nothing).

I've looked online, investigated a few things, and collected the following information:

  1. Sound Settings: "Speakers - Built-in Audio" is the only device for sound output, and they are selected, not muted, and output volume is maximum. The only profile available is "Analog Stereo Output". When I use the "Test Speakers" button, no sound results.

  2. If I plug headphones into the computer, I can hear the system sounds, web videos and Spotify on the headphones.

  3. When I ran the pavucontrol program from the terminal, the "Output Devices" tab shows the Port as "Speakers." There is also a "Headphones (unplugged)" option in the dropdown menu. If I change the port to "Headphones (unplugged)," THEN THE SPEAKERS WORK, I can hear the system sounds, Spotify etc.

This solves the problem until I restart the computer, at which point I have to re-run pavucontrol again and make the same change.

How can I fix this so that the computer restarts with the speakers enabled, so I don't have to manually run pavucontrol and reset the port? It seems like there's a setting or driver issue.

1 Answer 1

1

It seems PulseAudio is not recognizing in a proper way your Speakers, so it uses the headphones output for both: headphones (when plugged in) and speakers (when plugged out)

Since by default PulseAudio is using the "Speakers - Built-in Audio" and your speakers work properly when you select "Headphones (Unplugged)" in pavucontrol you can tweak PulseAudio so it sets by default the Headphones option, even if it is unplugged.

First you need to identify the output device using pactl. Run: pactl list short sinks on a Terminal. You should see a list of all your output devices. Maybe you could not get at first which is the correct device, but you can guide with the name.

In my case I get this:

$ pactl list short sinks 0 alsa_output.pci-0000_00_1f.3.analog-stereo module-alsa-card.c s16le 2ch 44100Hz IDLE 1 PulseEffects_apps module-null-sink.c s16le 2ch 44100Hz RUNNING 2 PulseEffects_mic module-null-sink.c s16le 2ch 44100Hz IDLE 3 bluez_sink.C0_28_8D_93_25_42.a2dp_sink module-bluez5-device.c s16le 2ch 44100Hz RUNNING

Run pactl set-default-sink 'copy-paste-here-the-device-name'. This will set as default the device you have chosen before. If you chose the correct one your speakers should begin working.

In my case (using the 1st sink): $ pactl set-default-sink 'alsa_output.pci-0000_00_1f.3.analog-stereo' works for my speakers.

Now you have recognized the correct output device for your speakers you can tweak PulseAudio so it by defaults use it.

Use a text editor as superuser and open this file: /etc/pulse/default.pa. Usually gedit works on Ubuntu. Scroll to the bottom of the file where two lines starting with set- will be commented out.

Example

Uncomment the set-default-sink output by removing the # icon at the beginning. Replace the word output with the number of the source you want to be the default.

In my case it worked with: 0 alsa_output.pci-0000_00_1f.3.analog-stereo for my speakers. So the uncommented line would look like this:

example finished

After doing this, delete the ~/.config/pulse directory, and then reboot the system. Once the system comes back up, the appropriate devices should now be set as the defaults.

The downside to this approach, will be that if the device list changes, the indexes of the devices may also change, meaning this process may need to be repeated.

I used this guide to answer this question.

Hope it helps!

9
  • I'm curios, does this only happen on Ubuntu? Jan 24, 2020 at 7:14
  • Also: what Ubuntu version did you install? This is likely a quite recent model, so chances are good this issue will be ironed out with updates or newer Ubuntu versions.
    – vanadium
    Jan 24, 2020 at 8:48
  • The Ubuntu version I installed is Ubuntu 18.04.3 LTS. Jan 24, 2020 at 15:03
  • Thank you Christian Caro Vargas. I tried your suggestion above and it did not work. Here is what I did: Jan 24, 2020 at 15:03
  • 1
    When you run pactl set-default-sink 'alsa_output.pci-0000_00_1b.0.analog-stereo', do the speakers work? Jan 24, 2020 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .