You are not logged in.

#1 2020-01-07 11:29:13

x4dr
Member
Registered: 2016-02-05
Posts: 7

Sound vanishes in pulseaudio after alsa corking/rewind

Symptoms: sound randomly stops during playback (currently only occured with internet video, but thats currently above 95% of sound output i have) and while pavucontrol shows the sound being played, alsamixer is not muted, and i can restart pulseaudio all i want, its not coming back. Video playback continues (for example youtube "buffers" or errors out when it cannot communicate with pulseaudio) so everything is there and should work, except it doesn't.

i started pulseaudio with -vvv and captured the log from when the event occured:
sink-input.c: Requesting rewind due to corking
https://pastebin.com/iWSPSVDE

Workaround:
At first i just updated all my packages and did a reboot. sound returned, but at a random point during video playback it vanished again. (happens during all sorts of videos not just one "corrupted" file i could upload here)
Then closing and opening laptop also restored sound
now i have a systemctl suspend button and suspend/unsuspend the laptop every 5-10 minutes if i want sound. This works but oh boy is it annoying.


Stats:
Lenovo Thinkpad T510
uname -a
Linux Deimos 5.4.8-arch1-1 #1 SMP PREEMPT Sat, 04 Jan 2020 23:46:18 +0000 x86_64 GNU/Linux
pacman -Syu done less than 24 hours ago

Sound system is just alsa pulseaudio with bluez i think

Behaviour is not linked to a specific browser (occurs in chrome and firefox) and i have not tested vlc/moc and so on because i dont think its related to that

P.S.: some slight superstition has formed within me that it is linked to system temperature and increases in frequency the hotter my system

Offline

#2 2020-01-07 13:12:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,496

Re: Sound vanishes in pulseaudio after alsa corking/rewind

Corking means a "phone" stream appeared that lead to muting of your other sources (do you perhaps have skype teamspeak discord or some such open in the background?), post/check

pacmd list-sink-inputs
pacmd list-source-outputs

when this happens. If it's indeed just a corking event, the simplest way to prevent this is to comment/remove

load-module module-role-cork

in your /etc/pulse/default.pa

If it isn't post a dmesg during reproduction of the issue the output of the pacmd commands and additionally

amixer -c0
pacmd list-sinks

Offline

#3 2020-01-11 14:14:32

x4dr
Member
Registered: 2016-02-05
Posts: 7

Re: Sound vanishes in pulseaudio after alsa corking/rewind

First output is before event, everything after that is after event

maric@Deimos ~ % pacmd list-sink-inputs
pacmd list-source-outputs
1 sink input(s) available.
    index: 380
	driver: <protocol-native.c>
	flags: START_CORKED 
	state: RUNNING
	sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo>
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 33.56 ms
	requested latency: 23.22 ms
	sample spec: float32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: copy
	module: 11
	client: 618 <Chromium>
	properties:
		application.icon_name = "chromium-browser"
		media.name = "Playback"
		application.name = "Chromium"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.process.id = "44201"
		application.process.user = "maric"
		application.process.host = "Deimos"
		application.process.binary = "chromium"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "ea9f08ce009f49fb820ad1da6ed7d6e9"
		application.process.session_id = "1"
		module-stream-restore.id = "sink-input-by-application-name:Chromium"
0 source output(s) available.
maric@Deimos ~ % pacmd list-sink-inputs
pacmd list-source-outputs
1 sink input(s) available.
    index: 476
	driver: <protocol-native.c>
	flags: START_CORKED 
	state: RUNNING
	sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo>
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 29.21 ms
	requested latency: 23.22 ms
	sample spec: float32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: copy
	module: 11
	client: 757 <Chromium>
	properties:
		application.icon_name = "chromium-browser"
		media.name = "Playback"
		application.name = "Chromium"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.process.id = "48220"
		application.process.user = "maric"
		application.process.host = "Deimos"
		application.process.binary = "chromium"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "ea9f08ce009f49fb820ad1da6ed7d6e9"
		application.process.session_id = "1"
		module-stream-restore.id = "sink-input-by-application-name:Chromium"
0 source output(s) available.
maric@Deimos ~ % amixer -c0
pacmd list-sinks
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 74
  Mono: Playback 69 [93%] [-5.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 74
  Mono:
  Front Left: Playback 0 [0%] [-74.00dB] [off]
  Front Right: Playback 0 [0%] [-74.00dB] [off]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 74
  Mono:
  Front Left: Playback 74 [100%] [0.00dB] [on]
  Front Right: Playback 74 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 4
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Mic Mute-LED Mode',0
  Capabilities: enum
  Items: 'On' 'Off' 'Follow Capture' 'Follow Mute'
  Item0: 'Follow Mute'
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Beep',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 7
  Mono: Playback 1 [14%] [-24.00dB] [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 80
  Front Left: Capture 80 [100%] [6.00dB] [on]
  Front Right: Capture 80 [100%] [6.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 4
  Front Left: 2 [50%] [24.00dB]
  Front Right: 2 [50%] [24.00dB]
1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 9039
	volume: front-left: 52357 /  80% / -5.85 dB,   front-right: 52357 /  80% / -5.85 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
	card: 0 <alsa_card.pci-0000_00_1b.0>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "CX20585 Analog"
		alsa.id = "CX20585 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel MID"
		alsa.long_card_name = "HDA Intel MID at 0xf2620000 irq 33"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "3b56"
		device.product.name = "5 Series/3400 Series Chipset High Definition Audio"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "352800"
		device.buffering.fragment_size = "176400"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Built-in Audio Analog Stereo"
		alsa.mixer_name = "Conexant CX20585"
		alsa.components = "HDA:14f15069,17aa218b,00100302 HDA:80862804,17aa21b5,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-speakers"
		analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-speaker>

have now edited default.pa and will keep an eye on if it happens again

Offline

#4 2020-01-14 15:31:08

x4dr
Member
Registered: 2016-02-05
Posts: 7

Re: Sound vanishes in pulseaudio after alsa corking/rewind

it indeed keeps happening
pacmd list-sink-inputs
lists the same sink from above (other process ids and stuff)
pacmd list-source-outputs lists nothing while its working and while its not
i would be interested in what happens to fix it on suspend/resume so at least i can build an automated workaround

Offline

#5 2020-01-14 15:44:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,496

Re: Sound vanishes in pulseaudio after alsa corking/rewind

What else is kind of worrying is the fact that your index number is 300 this suggests some autodetection fault that constantly disabling and reenabling (on normal systems this should be pretty stable and in the low 10s at most) your stream. The other two outputs would be nice as well, but if it's indeed some auto detection going haywire you might want to additionally uncomment/remove

load-module-module-switcch-on-port-available
...
load-module module-switch-on-connect #That one might not necessarily be present

Offline

#6 2020-01-18 02:15:48

x4dr
Member
Registered: 2016-02-05
Posts: 7

Re: Sound vanishes in pulseaudio after alsa corking/rewind

1 sink input(s) available.
    index: 642
	driver: <protocol-native.c>
	flags: START_CORKED 
	state: RUNNING
	sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo>
	volume: front-left: 66443 / 101% / 0.36 dB,   front-right: 66443 / 101% / 0.36 dB
	        balance 0.00
	muted: no
	current latency: 29.93 ms
	requested latency: 23.22 ms
	sample spec: float32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: copy
	module: 10
	client: 926 <Chromium>
	properties:
		application.icon_name = "chromium-browser"
		media.name = "Playback"
		application.name = "Chromium"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.process.id = "42733"
		application.process.user = "maric"
		application.process.host = "Deimos"
		application.process.binary = "chromium"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "ea9f08ce009f49fb820ad1da6ed7d6e9"
		application.process.session_id = "1"
		module-stream-restore.id = "sink-input-by-application-name:Chromium"

index seems to increment every time i open another youtube video/reload the page or have it paused for long enough, not when the event happens

pacmd list-source-outputs                                                                                                                                                 :(
3 source output(s) available.
    index: 0
	driver: <protocol-native.c>
	flags: DONT_MOVE 
	state: RUNNING
	source: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
	volume: mono: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 15.35 ms
	requested latency: 40.00 ms
	sample spec: float32le 1ch 25Hz
	channel map: mono
	             Mono
	resample method: peaks
	owner module: 10
	client: 116 <PulseAudio Volume Control>
	properties:
		media.name = "Peak detect"
		application.name = "PulseAudio Volume Control"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.id = "org.PulseAudio.pavucontrol"
		application.icon_name = "audio-card"
		application.version = "4.0"
		application.process.id = "7217"
		application.process.user = "maric"
		application.process.host = "Deimos"
		application.process.binary = "pavucontrol"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "ea9f08ce009f49fb820ad1da6ed7d6e9"
		application.process.session_id = "1"
		module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol"
    index: 1
	driver: <protocol-native.c>
	flags: DONT_MOVE 
	state: RUNNING
	source: 1 <alsa_input.pci-0000_00_1b.0.analog-stereo>
	volume: mono: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 0.00 ms
	requested latency: 40.00 ms
	sample spec: float32le 1ch 25Hz
	channel map: mono
	             Mono
	resample method: peaks
	owner module: 10
	client: 116 <PulseAudio Volume Control>
	properties:
		media.name = "Peak detect"
		application.name = "PulseAudio Volume Control"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.id = "org.PulseAudio.pavucontrol"
		application.icon_name = "audio-card"
		application.version = "4.0"
		application.process.id = "7217"
		application.process.user = "maric"
		application.process.host = "Deimos"
		application.process.binary = "pavucontrol"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "ea9f08ce009f49fb820ad1da6ed7d6e9"
		application.process.session_id = "1"
		module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol"
    index: 566
	driver: <protocol-native.c>
	flags: DONT_MOVE 
	state: RUNNING
	source: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
	volume: mono: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 15.37 ms
	requested latency: 40.00 ms
	sample spec: float32le 1ch 25Hz
	channel map: mono
	             Mono
	resample method: peaks
	owner module: 10
	client: 116 <PulseAudio Volume Control>
	direct on input: 642
	properties:
		media.name = "Peak detect"
		application.name = "PulseAudio Volume Control"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.id = "org.PulseAudio.pavucontrol"
		application.icon_name = "audio-card"
		application.version = "4.0"
		application.process.id = "7217"
		application.process.user = "maric"
		application.process.host = "Deimos"
		application.process.binary = "pavucontrol"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "ea9f08ce009f49fb820ad1da6ed7d6e9"
		application.process.session_id = "1"
		module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol"

while its not working

 pacmd list-source-outputs
3 source output(s) available.
    index: 0
	driver: <protocol-native.c>
	flags: DONT_MOVE 
	state: RUNNING
	source: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
	volume: mono: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 12.90 ms
	requested latency: 40.00 ms
	sample spec: float32le 1ch 25Hz
	channel map: mono
	             Mono
	resample method: peaks
	owner module: 10
	client: 116 <PulseAudio Volume Control>
	properties:
		media.name = "Peak detect"
		application.name = "PulseAudio Volume Control"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.id = "org.PulseAudio.pavucontrol"
		application.icon_name = "audio-card"
		application.version = "4.0"
		application.process.id = "7217"
		application.process.user = "maric"
		application.process.host = "Deimos"
		application.process.binary = "pavucontrol"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "ea9f08ce009f49fb820ad1da6ed7d6e9"
		application.process.session_id = "1"
		module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol"
    index: 1
	driver: <protocol-native.c>
	flags: DONT_MOVE 
	state: RUNNING
	source: 1 <alsa_input.pci-0000_00_1b.0.analog-stereo>
	volume: mono: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 0.00 ms
	requested latency: 40.00 ms
	sample spec: float32le 1ch 25Hz
	channel map: mono
	             Mono
	resample method: peaks
	owner module: 10
	client: 116 <PulseAudio Volume Control>
	properties:
		media.name = "Peak detect"
		application.name = "PulseAudio Volume Control"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.id = "org.PulseAudio.pavucontrol"
		application.icon_name = "audio-card"
		application.version = "4.0"
		application.process.id = "7217"
		application.process.user = "maric"
		application.process.host = "Deimos"
		application.process.binary = "pavucontrol"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "ea9f08ce009f49fb820ad1da6ed7d6e9"
		application.process.session_id = "1"
		module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol"
    index: 566
	driver: <protocol-native.c>
	flags: DONT_MOVE 
	state: RUNNING
	source: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
	volume: mono: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 17.69 ms
	requested latency: 40.00 ms
	sample spec: float32le 1ch 25Hz
	channel map: mono
	             Mono
	resample method: peaks
	owner module: 10
	client: 116 <PulseAudio Volume Control>
	direct on input: 642
	properties:
		media.name = "Peak detect"
		application.name = "PulseAudio Volume Control"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.id = "org.PulseAudio.pavucontrol"
		application.icon_name = "audio-card"
		application.version = "4.0"
		application.process.id = "7217"
		application.process.user = "maric"
		application.process.host = "Deimos"
		application.process.binary = "pavucontrol"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "ea9f08ce009f49fb820ad1da6ed7d6e9"
		application.process.session_id = "1"
		module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol"

 pacmd list-sink-inputs        
1 sink input(s) available.
    index: 642
	driver: <protocol-native.c>
	flags: START_CORKED 
	state: RUNNING
	sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo>
	volume: front-left: 66443 / 101% / 0.36 dB,   front-right: 66443 / 101% / 0.36 dB
	        balance 0.00
	muted: no
	current latency: 47.71 ms
	requested latency: 23.22 ms
	sample spec: float32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: copy
	module: 10
	client: 926 <Chromium>
	properties:
		application.icon_name = "chromium-browser"
		media.name = "Playback"
		application.name = "Chromium"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.process.id = "42733"
		application.process.user = "maric"
		application.process.host = "Deimos"
		application.process.binary = "chromium"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "ea9f08ce009f49fb820ad1da6ed7d6e9"
		application.process.session_id = "1"
		module-stream-restore.id = "sink-input-by-application-name:Chromium"

after reset

Offline

#7 2020-01-18 14:47:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,496

Re: Sound vanishes in pulseaudio after alsa corking/rewind

A whoops yeah, looked at the wrong number, sink-input increase is normal, if it would be the sinks it would be a problem. At this point I'm suspecting a kernel issue, can you try linux-lts or so?

Offline

#8 2020-01-21 07:41:24

x4dr
Member
Registered: 2016-02-05
Posts: 7

Re: Sound vanishes in pulseaudio after alsa corking/rewind

Am now  on lts

Linux Deimos 4.19.97-1-lts #1 SMP Fri, 17 Jan 2020 23:09:48 +0000 x86_64 GNU/Linux

took nearly a day and i thought evrything was fine but then it happened again
i am considering popping the harddrive into another laptop to check if its hardware related

By the way i am extremely thankful for the help!

Offline

Board footer

Powered by FluxBB