You are not logged in.

#1 2020-05-05 15:09:53

KredikShaw
Member
Registered: 2019-10-06
Posts: 16

Pulseaudio: Microphone loud static & systemctl pulseaudio doesn't work

Hi!, i'm using pulseaudio for a while now and i have this awfull static noise in the microphone waving. I tried to follow some other posts and when i did 'sudo systemctl --user status pulseaudio' i got

$ sudo systemctl --user status pulseaudio.service 
Failed to connect to bus: No such file or directory 

And after any systemctl command i execute for pulseaudio i get that error. I tried two different microphones and both have this problem. I don't know what is it.

I've applied this from the wiki:

/etc/pulse/daemon.conf
-------------------------------
resample-method = src-sinc-best-quality
default-sample-format = s16le
default-sample-rate = 48000

and this:

/etc/pulse/default.pa
---------------------------
load-module module-udev-detect use_ucm=0 tsched=0

but it stays the same.

Also aplay -l outputs this:

**** List of PLAYBACK Hardware Devices ****
ALSA lib control.c:1379:(snd_ctl_open_noupdate) Invalid CTL hw:0
aplay: device_list:283: control open (0): No such file or directory
ALSA lib control.c:1379:(snd_ctl_open_noupdate) Invalid CTL hw:1
aplay: device_list:283: control open (1): No such file or directory

Edit: I was trying some configs from the internet and stumbled upon this:


# /etc/pulse/

# Create a source using left channel of the built-in mic
load-module module-remap-source source_name=record_mono master=alsa_input.pci-0000_00_1f.3.analog-stereo master_channel_map=front-left channel_map=mono

# Create another source using the source we created above. This will be referred to as echo cancelling input.  
load-module module-echo-cancel source_name=record_mono aec_method=webrtc format=s16le rate=44100 channels=1

# Set the echo-cancelling input as the default input.
set-default-source record_mono

I tried it, restarted pulseaudio with pulseaudio --k and pulseaudio --start and now the system can't detect any soundcard, even after i undid the changes. Pavucontrol shows a dummy and nothing works. Had to reboot to get it back working. systemctl pulseaudio still doesn't work and the microphone still have the noise.

Last edited by KredikShaw (2020-05-05 15:43:26)

Offline

#2 2020-05-05 15:45:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,381

Re: Pulseaudio: Microphone loud static & systemctl pulseaudio doesn't work

That systemctl command doesn't work because you are invoking it with sudo while it should be ran as your normal user (as implied by the --user argument)

That entire progression reads like you  try every piece of configuration you find, that's seldomly going into a useful direction. Get some diagnostics to your hardware state before trying to apply random snippets from the internet to your situation. That's especially a dangerous thing to do in regards to linux/pulseaudio/alsa configuration, because everyone is an "expert", posts whatever they did in a blog and for some reason that blog still gets found by people even though it's several years out of date.

Revert all of these config changes including whatever is in your /etc/asound.conf .asoundrc or .asound.conf reboot.

On a now hopefully properly cleaned slate, post

arecord -l
amixer -c0 #Replace this with the correct card index from the record output if necessary
pacmd list-cards
#During recording
sudo fuser -v /dev/snd/*
pacmd list-sources
pacmd list-source-outputs

as well as the current contents of your /etc/pulse/default.pa /etc/pulse/daemon.conf

Last edited by V1del (2020-05-05 15:51:27)

Offline

#3 2020-05-05 16:04:48

KredikShaw
Member
Registered: 2019-10-06
Posts: 16

Re: Pulseaudio: Microphone loud static & systemctl pulseaudio doesn't work

Thanks!
I did run the systemctl --user status pulseaudio and it returned that error.

Ok!  i reverted everything, removed asoundrc and asound.conf, the only file is the default /etc/pulse/daemon.conf and the cookies in .config/pulse/


Ouput of:

arecord -l

**** List of CAPTURE Hardware Devices **** 
ALSA lib control.c:1379:(snd_ctl_open_noupdate) Invalid CTL hw:0 
arecord: device_list:283: control open (0): No such file or directory 
ALSA lib control.c:1379:(snd_ctl_open_noupdate) Invalid CTL hw:1 
arecord: device_list:283: control open (1): No such file or directory 

Amixer -c0 returned:

[razor@Kredik ~]$ amixer -c0 
ALSA lib control.c:1379:(snd_ctl_open_noupdate) Invalid CTL hw:0 
amixer: Mixer attach hw:0 error: No such file or directory 

amixer -c1 returned exactly the same

amixer -c3 returned this:

Invalid card number. 
Usage: amixer <options> [command] 
Available options: 
  -h,--help       this help 
  -c,--card N     select the card 
  -D,--device N   select the device, default 'default' 
  -d,--debug      debug mode 
  -n,--nocheck    do not perform range checking 
  -v,--version    print version of this program 
  -q,--quiet      be quiet 
  -i,--inactive   show also inactive controls 
  -a,--abstract L select abstraction level (none or basic) 
  -s,--stdin      Read and execute commands from stdin sequentially 
  -R,--raw-volume Use the raw value (default) 
  -M,--mapped-volume Use the mapped volume 
Available commands: 
  scontrols       show all mixer simple controls 
  scontents       show contents of all mixer simple controls (default command) 
  sset sID P      set contents for one mixer simple control 
  sget sID        get contents for one mixer simple control 
  controls        show all controls for given card 
  contents        show contents of all controls for given card 
  cset cID P      set control contents for one control 
  cget cID        get control contents for one control 

pacmd list-cards returned:

2 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_00_01.1>
	driver: <module-alsa-card.c>
	owner module: 6
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA ATI HDMI"
		alsa.long_card_name = "HDA ATI HDMI at 0xfeb64000 irq 35"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:01.1"
		sysfs.path = "/devices/pci0000:00/0000:00:01.1/sound/card0"
		device.bus = "pci"
		device.vendor.id = "1002"
		device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
		device.product.id = "1308"
		device.product.name = "Kaveri HDMI/DP Audio Controller"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Audio Interno"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: no)
		output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: no)
		output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: no)
		off: Apagado (priority 0, available: unknown)
	active profile: <off>
	ports:
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
    index: 1
	name: <alsa_card.pci-0000_00_14.2>
	driver: <module-alsa-card.c>
	owner module: 7
	properties:
		alsa.card = "1"
		alsa.card_name = "HD-Audio Generic"
		alsa.long_card_name = "HD-Audio Generic at 0xfeb60000 irq 16"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:14.2"
		sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card1"
		device.bus = "pci"
		device.vendor.id = "1022"
		device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
		device.product.id = "780d"
		device.product.name = "FCH Azalia Controller"
		device.form_factor = "internal"
		device.string = "1"
		device.description = "Audio Interno"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		input:analog-stereo: Estéreo Analógico Input (priority 65, available: unknown)
		output:analog-stereo: Estéreo Analógico Output (priority 6500, available: unknown)
		output:analog-stereo+input:analog-stereo: Estéreo Analógico.Duplex (priority 6565, available: unknown)
		output:iec958-stereo: Estéreo Digital (IEC958) Output (priority 5500, available: unknown)
		output:iec958-stereo+input:analog-stereo: Estéreo Digital (IEC958) Output + Estéreo Analógico Input (priority 5565, available: unknown)
		off: Apagado (priority 0, available: unknown)
	active profile: <output:analog-stereo+input:analog-stereo>
	sinks:
		alsa_output.pci-0000_00_14.2.analog-stereo/#0: Audio Interno Estéreo Analógico
	sources:
		alsa_output.pci-0000_00_14.2.analog-stereo.monitor/#0: Monitor of Audio Interno Estéreo Analógico
		alsa_input.pci-0000_00_14.2.analog-stereo/#1: Audio Interno Estéreo Analógico
	ports:
		analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-linein: En línea (priority 8100, latency offset 0 usec, available: no)
			properties:
				
		analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-speakers"
		analog-output-headphones: Auriculares analógicos (priority 9900, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
		iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
			properties:
				

note: i only have one card as far as i know so maybe there is something wrong there?

pacmd list-sources:

 
2 source(s) available.
    index: 0
	name: <alsa_output.pci-0000_00_14.2.analog-stereo.monitor>
	driver: <module-alsa-card.c>
	flags: DECIBEL_VOLUME LATENCY 
	state: IDLE
	suspend cause: (none)
	priority: 1030
	volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
	        balance 0,00
	base volume: 65536 / 100% / 0,00 dB
	volume steps: 65537
	muted: no
	current latency: 0,00 ms
	max rewind: 17 KiB
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Estéreo
	used by: 0
	linked by: 0
	fixed latency: 100,14 ms
	monitor_of: 0
	card: 1 <alsa_card.pci-0000_00_14.2>
	module: 7
	properties:
		device.description = "Monitor of Audio Interno Estéreo Analógico"
		device.class = "monitor"
		alsa.card = "1"
		alsa.card_name = "HD-Audio Generic"
		alsa.long_card_name = "HD-Audio Generic at 0xfeb60000 irq 16"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:14.2"
		sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card1"
		device.bus = "pci"
		device.vendor.id = "1022"
		device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
		device.product.id = "780d"
		device.product.name = "FCH Azalia Controller"
		device.form_factor = "internal"
		device.string = "1"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
  * index: 1
	name: <alsa_input.pci-0000_00_14.2.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
	state: RUNNING
	suspend cause: (none)
	priority: 9039
	volume: front-left: 30421 /  46% / -20,00 dB,   front-right: 30421 /  46% / -20,00 dB
	        balance 0,00
	base volume: 6554 /  10% / -60,00 dB
	volume steps: 65537
	muted: no
	current latency: 0,01 ms
	max rewind: 0 KiB
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Estéreo
	used by: 1
	linked by: 1
	fixed latency: 100,14 ms
	card: 1 <alsa_card.pci-0000_00_14.2>
	module: 7
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC887-VD Analog"
		alsa.id = "ALC887-VD Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "1"
		alsa.card_name = "HD-Audio Generic"
		alsa.long_card_name = "HD-Audio Generic at 0xfeb60000 irq 16"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:14.2"
		sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card1"
		device.bus = "pci"
		device.vendor.id = "1022"
		device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
		device.product.id = "780d"
		device.product.name = "FCH Azalia Controller"
		device.form_factor = "internal"
		device.string = "front:1"
		device.buffering.buffer_size = "17664"
		device.buffering.fragment_size = "2944"
		device.access_mode = "mmap"
		device.profile.name = "analog-stereo"
		device.profile.description = "Estéreo Analógico"
		device.description = "Audio Interno Estéreo Analógico"
		alsa.mixer_name = "Realtek ALC887-VD"
		alsa.components = "HDA:10ec0887,1458a182,00100302"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-linein: En línea (priority 8100, latency offset 0 usec, available: no)
			properties:
				
	active port: <analog-input-rear-mic>

sudo fuser -v /dev/snd/* returns:

 
                     USER        PID ACCESS COMMAND 
/dev/snd/controlC0:  razor     F.... pulseaudio
/dev/snd/controlC1:  razor     F.... pulseaudio
/dev/snd/pcmC1D0c:   razor     F...m pulseaudio
/dev/snd/pcmC1D0p:   razor     F...m pulseaudio
/dev/snd/timer:      razor     f.... pulseaudio

pacmd list-source-outputs:

1 source output(s) available.
    index: 0
	driver: <protocol-native.c>
	flags: 
	state: RUNNING
	source: 1 <alsa_input.pci-0000_00_14.2.analog-stereo>
	volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
	        balance 0,00
	muted: no
	current latency: 0,00 ms
	requested latency: 100,14 ms
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Estéreo
	resample method: (null)
	owner module: 9
	client: 31 <WEBRTC VoiceEngine>
	properties:
		media.name = "recStream"
		application.name = "WEBRTC VoiceEngine"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.process.id = "2590"
		application.process.user = "razor"
		application.process.host = "Kredik"
		application.process.binary = "Discord"
		application.language = "es_AR.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "f07b29abb18f0814e29c71365e9ea7a1"
		application.process.session_id = "1"
		module-stream-restore.id = "source-output-by-application-name:WEBRTC VoiceEngine"

Here is my /etc/pulse/default.pa:

#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect use_ucm=0 tsched=0
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
load-module module-dbus-protocol
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GSettings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gsettings.so
.nofail
load-module module-gsettings
.fail
.endif


### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply



# # Create a source using left channel of the built-in mic
# load-module module-remap-source source_name=record_mono master=alsa_input.pci-0000_00_1f.3.analog-stereo master_channel_map=front-left channel_map=mono
#
# # Create another source using the source we created above. This will be referred to as echo cancelling input.  
 #load-module module-echo-cancel source_name=record_mono aec_method=webrtc format=s16le rate=44100 channels=1
#
# # Set the echo-cancelling input as the default input.
 #set-default-source record_mono



### Make some devices default
#set-default-sink output
#set-default-source input
#
### Enable Echo/Noise-Cancellation
#load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0\ digital_gain_control=1" source_name=echoCancel_source sink_name=echoCancel_sink
#set-default-source echoCancel_source
#set-default-sink echoCancel_sink

and here is the daemon.conf:

# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
## more information. Default values are commented out.  Use either ; or # for
## commenting.

; daemonize = no
; fail = yes
; allow-module-loading = yes
; allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; enable-memfd = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

; high-priority = yes
; nice-level = -11

; realtime-scheduling = yes
; realtime-priority = 5

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

#; resample-method = speex-float-1
; resample-method = src-sinc-best-quality
; avoid-resampling = false
; enable-remixing = yes
; remixing-use-all-sink-channels = yes
; enable-lfe-remixing = no
; lfe-crossover-freq = 0

flat-volumes = no
; flat-volumes = yes

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 200000

; default-sample-format = s16le
#; default-sample-rate = 44100
; default-sample-rate = 48000
#; alternate-sample-rate = 48000
; alternate-sample-rate = 44100
; default-sample-channels = 2
; default-channel-map = front-left,front-right

; default-fragments = 4
; default-fragment-size-msec = 25

; enable-deferred-volume = yes
; deferred-volume-safety-margin-usec = 8000
; deferred-volume-extra-delay-usec = 0

I hope i didn't missed anything, thanks for the help!

Edit: i forgot to mention, i don't know if it is relevant at all but i do use two sinks, one for the front jack for headphones and another one from the back that i use for speakers.

Edit2: I also removed the cookies and everything in the .config directory, I did again all the outputs and edited it. Looks like the same.

Edit3: I tried with a third microphone and its the same issue so im 100% sure it's a linux problem.

Last edited by KredikShaw (2020-05-05 18:34:04)

Offline

Board footer

Powered by FluxBB