5

I've tried reinstalling alsa and pulseaudio and that didn't fix it.

Output also doesn't work after I reboot (no speaker in tray) but I can fix that with a pulseaudio -k - Edit: this doesn't happen anymore after reinstalling kubuntu

Edit 2: I was wrong. This still happens.

I am on Kubuntu 20.10 running on a nvidia optimus laptop (acer predator 300 to be exact).

Things I've tried:

  • Removing pulseaudio config files
  • tried adjusting sliders in alsa-mixer
  • reinstalled pulseaudio and alsa after removing them
  • Reinstalled kubuntu. Livecd doesn't pick up the headphone audio, Laptop only does this after installing which makes me think this is a driver/kernel issue (that I don't know how to fix)

How I know that it's a software problem and not a mic/headphone problem:

  • tried using different headphones/earphones
  • connected earphones through a splitter so that the mic input from the earphones get ignored. Laptop somehow still picked up the system output which is only possible if it was looping it back.
  • The audio which is looping back is very clear. If it was picked up on the earphone mic it would be of noticeably low quality

Thanks.

contents of:
/etc/pulse/default.pa
pactl list short sources
arecord -l

  • 1
  • 1
    Go to option #3 and rebuild pulseaudio configuration. If pulseaudio -k fix it partially, that should help. – Raffa Mar 01 '21 at 10:54
  • @Raffa thanks, but that didn't work. I even tried removing alsa and pulseaudio and reinstalling them. – dangerman Mar 01 '21 at 19:19
  • 1
    Please add the output of cat /etc/pulse/default.pa to your question and let us know if you have installed any audio connecting or mixing software like JACK for example. – Raffa Mar 01 '21 at 19:39
  • @Raffa added output in question. No, I haven't installed anything like JACK. This issue is also happening after a fresh install. – dangerman Mar 01 '21 at 19:58
  • 1
    /etc/pulse/default.pa looks OK. No extra configuration present that might cause the issue. This could be caused by NVIDIA drivers (are NVIDIA proprietary drivers installed?). Please add the output of pactl list short sources and arecord -l. – Raffa Mar 01 '21 at 20:17
  • @Raffa added those outputs – dangerman Mar 02 '21 at 02:54
  • @Raffa yes Nvidia proprietary drivers have been installed... but this issue kept occurring even before I installed the drivers. – dangerman Mar 02 '21 at 04:15
  • Play audio on your desktop while speaking in the microphone and run parec -d alsa_output.pci-0000_00_1f.3.analog-stereo.monitor --file-format=wav ~/1.wav for a few seconds then close it then run parec -d alsa_input.pci-0000_00_1f.3.analog-stereo --file-format=wav ~/2.wav then close it then run arecord ~/3.wav then close it. Play 1.wav, 2.wav, 3.wav located in your home directory and tell us what you hear in each of the three recordings. – Raffa Mar 02 '21 at 12:52

2 Answers2

1

Sometimes the problem depends on the settings in your recording application. However, you can control the system side using the PulseAudio Volume Control application (not installed by default). The main thing is, you do not want recording, capture, or input devices set to loopback and/or monitor.

setup:

First, install pavucontrol-qt by running the following commands.

sudo apt update
sudo apt install pavucontrol-qt

note: if you are not using Kubuntu, you can install pavucontrol (GTK version) instead of pavucontrol-qt so that you don't have to pull all the QT dependencies.

Next, open the PulseAudio Volume Control application.

There are tabs for input devices, recording, etc. Here you can control the volume of what is recorded and which devices are used.


select the recording input deivice:

First, open your recording application and begin recording.

Then, on the recording tab of your PulseAudio Volume Control application, it should list "capture from" or something similar where you can select the input device. You do NOT want this set to "monitor".

Finally, don't forget to check your input devices tab where you can select, mute, and adjust the volume for various inputs.


use ALSA controls:

You can also install alsa-utils and use the alsamixer command to adjust various volume settings not available through PulseAudio. This doesn't have the option to select or disable the recording or input device but there are options to adjust microphone boost, input volume, etc.

mchid
  • 43,546
  • 8
  • 97
  • 150
0

Your sound devices appear to be normal.

It might be unnoticed but, microphones can pick up all sorts of background noises including your speakers' sound and even more if you use a headset with integrated speakers and microphone, in this case sound from your speakers can travel to your microphone through the wires as solids conduct sound far more efficiently than air.

Different audio drivers / applications may implement some sort of background noise cancellation and you can do so in PulseAudio via module-echo-cancel by following instructions in this answer.

That should improve the recorded audio quality and help reduce background noises including from your speakers.

If that was not enough, add a standalone external high quality microphone and use some high quality headphones that do not leak much audio to the surrounding environment.

Raffa
  • 32,237