15

I've had a mildly annoying problem with my sound for quite awhile now, and I've finally decided it's time to do something about it.

Every time I adjust the main volume slider in the toolbar, or use my volume hotkeys on my laptop, Ubuntu adjusts my mixer levels in a strange way. When I open GNOME ALSA Mixer, I notice that there are three output sliders for my SigmaTel STAC9200: Master, PCM, and LFE. Master and LFE both have Mute checkboxes.

When I press my volume up hotkey once, Master and LFE unmute, and the sliders for PCM and LFE jump up about halfway. The Master slider stays at zero. Another press brings PCM and LFE up to about 4/5, and Master remains unmoved at the bottom.

Ubuntu doesn't move Master until PCM and LFE are maxed out, which occurs between about 15%-20% on the main output mixer.

The effect of this is that I don't get any sound at all until about 15%-20% (since Master is at zero), and when I cross that threshold, I immediately get a loud bassy sound (from the LFE apparently). If I use headphones, I still don't get any sound until that threshold, but at least it doesn't blast me when I do get sound.

Is there anything in PulseAudio configuration or anywhere else that could change the behavior of my output mixer?

3
  • 1
    The wiki.ubuntu.com article was perfect. You should have posted that as an answer.
    – DLH
    Nov 27, 2010 at 4:30
  • 2
    Daniel T Chen: Please post your comment as an answer. Better yet, quote the relevant section in case the link doesn't work some day. Nov 27, 2010 at 10:44
  • Sorry, I've moved the response to the (more) appropriate section. Also, I have intermittent Internet access, so I can't immediately address issues. Thanks for understanding. Nov 29, 2010 at 16:48

2 Answers 2

24

There are many layers in the audio stack that could contribute to this symptom. Most directly is the behavior that PulseAudio defaults to, and you can read about that at http://pulseaudio.org/wiki/PulseAudioStoleMyVolumes. You can work around some instances using the instructions I contributed at https://wiki.ubuntu.com/DebuggingSoundProblems/KarmicCaveats#Volume%20range%20anomalies:

Volume range anomalies

The latest version of PulseAudio tries to control the volume of the sound card using its mixer controls. Usually this works just fine, but in some cases this does not work properly. (Whether this is PulseAudio's or ALSA's fault is beyond the scope of this wiki page. Some more background information is here.)

Diagnosis

You experience any of the following:

  • Jumps in volume, e g if everything below 20% is muted, and 21% is very loud.
  • Overdriven (distorted sound) if the volume is set above a certain (low) level
  • No volume changes in parts of the range, e g if 20% is just as loud as 70%.

Fix / Workaround

There are a few variables which control how PulseAudio controls the volume. You can either edit /etc/pulse/default.pa (you'll have to be root to do that) to change the behavior for all users, or copy that file to ~/.pulse/default.pa and then edit that file, to change behavior for the current user only.

Open the file mentioned above. Find the row saying load-module module-udev-detect and change it to:

load-module module-udev-detect ignore_dB=1

To try your changes, restart PulseAudio with the following command:

killall pulseaudio

PulseAudio will then autospawn (restart itself).

You may find that the above workaround is insufficient, in which case you may configure PulseAudio to control only one mixer control, e.g., PCM (cf. alsamixer). Find the row saying #load-module module-alsa-sink and change it to:

load-module module-alsa-sink control=PCM

(remember to remove the # in the beginning of the row!) Optionally replace PCM with the mixer control you want PulseAudio to control.

You will then need to killall pulseaudio as above and allow the daemon to autospawn.

Finally, whether this anomaly is actually a bug requires you to use ubuntu-bug alsa-base.

4
  • Changing those two lines in default.pa worked perfectly. Thanks!
    – DLH
    Nov 30, 2010 at 6:40
  • I have the same audio chipset, and the line load-module module-alsa-sink control=PCM gave me smooth audio (i did not need ignore_dB=1). This does seem to be a bug with this chipset. Oct 2, 2012 at 2:13
  • 1
    Thanks, but this is far from an optimal solution. Firtsly, it completely messes up the audio devices in the Ubuntu System Settings Sound panel. And secondly, it doesn't seem to persist for me.
    – thnee
    Oct 7, 2013 at 10:58
  • You sir are a genius! I have had one of those problems (no sound below like 20% ish) with all the external audio adapters I have tried (3+). Until now. OMG. All I needed was the ignore_dB=1 flag. The other one did nothing. I am so grateful. That flag should be on by default since I had the same problem with so many external audio adapters (ranging from $10 to $50). (I experienced none of the problems @thnee described). Worth noting is that I've had these problems on Ubuntu 16.04 and onwards. I am currently on 17.04. Jul 17, 2017 at 22:54
2

For me, the current top answer of adding ignore_dB=1 to PulseAudio's config, fixed volume the level starting from 0 but it still got loud way too quickly.

After some more playing I found my generic USB audio device had multiple output "profiles", with names like "analog-stereo" and "iec958-stereo". Even though the physical device just has a 3.5mm jack output changing to the "iec958-stereo" profile fixed both the volume scaling and offset problems.

I played with the different profiles using the pavucontrol GUI tool. Profile selection is in the "Configuration" tab. I then used advice in this post to make things permanent: https://unix.stackexchange.com/questions/462670/set-default-profile-for-pulseaudio

1
  • This worked for me as well with a "XtremPro X1 USB DAC" Oct 2, 2020 at 4:32

You must log in to answer this question.

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