Linux – Distortion At High Volume On Headphones

alsaaudiolinuxpulseaudio

I’m wondering if there’s a way to get rid of audio distortion at high volume levels on headphones. When I dual booted Linux with Windows I’d usually just boot into Windows before booting back into Linux to fix my issues and not get any distortion at higher levels on headphones.

Now I just have a machine with Linux on it and can’t seem to stop the sound from distorting at higher levels whenever I plug in headphones since I’ve messed with the alsa mixer pcm volume, changed the headphone volume in alsamixer, and also tried different headphones.

Even when I get distortion to stop by adjusting the headphone, master, or pcm volumes, the sound tends to be somewhat weak even when I turn my headphones all the way up. I’m also wondering if I need to wait for a firmware/kernel update since I’m using relatively new hardware, with a Realtek ALC 295 sound-card, or just change out the card even though I’m not sure if I should do this yet if there’s simpler ways to fix the issue.

Thanks!

Best Answer

Turning all hardware mixers up worked.

Edit: Actually just found another, slightly hacky, work around to this issue after it came back a few boots later by using an ladpsa amplifier and compressor in Arch. Something similar to this could probably work in other distros too.

  1. Install ladspa plugins:

pacman -S ladspa-plugins

  1. Create an .asoundrc file in the home folder:

  2. Paste this code into the .asoundrc file:

    pcm.pulse {
        type pulse
    }

ctl.pulse { type pulse } pcm.default pcm.pulse ctl.default ctl.pulse
  1. paste these commands into /etc/pulse/default.pa:

load-module module-ladspa-sink sink_name=ladspa_output.fastLookaheadLimiter label=fastLookaheadLimiter plugin=fast_lookahead_limiter_1913 control=20,0,0.3 load-module module-ladspa-sink sink_name=ladspa_output.dysonCompress label=dysonCompress plugin=dyson_compress_1403 master=ladspa_output.fastLookaheadLimiter control=0,0.5,0.5,0.99 set-default-sink ladspa_output.dysonCompress

  1. Remove pulseaudio-alsa since it conflicts with ladpsa-plugins

  2. Reboot!

  3. Turn volume down

Edit 2: Just added some slightly tuned default.pa settings to help eliminate distorted frequencies. It's not perfect but worked fairly well on my hardware:

load-module module-ladspa-sink sink_name=ladspa_output.fastLookaheadLimiter label=fastLookaheadLimiter plugin=fast_lookahead_limiter_1913 control=5,0,0.8 load-module module-ladspa-sink sink_name=ladspa_output.dysonCompress label=dysonCompress plugin=dyson_compress_1403 master=ladspa_output.fastLookaheadLimitercontrol=-14,1,0.5,0.99 set-default-sink ladspa_output.dysonCompress

Related Question