You are not logged in.

#1 2016-10-31 22:43:48

iuno
Member
Registered: 2014-08-09
Posts: 42

Pulseaudio issues in headless/X-less setup

Hi there,
today I (mostly) successfully switched to a setup where I stream my audio to my server that is connected to the actual audio hardware. I use pulseaudio's native-protocol-tcp, zeroconf-discover and zeroconf-publish modules and set the sink to the remote one in my graphical environment. So far it works well, I am able to play audio from my devices in good quality at the same time.

However, I still have the problem that sometimes, maybe every 10 minutes, the audio stops playing for a few (~10?) seconds before it continues playing again. Both, client and server are not even close to be stressed and the bandwidth is more than enough. It shows ~1 Mbps traffic on the gigabit connection.

The service status on the client gives some hints:

$ systemctl --user status pulseaudio

pulseaudio: E: [pulseaudio] module-tunnel.c: Connection failed: Connection timed out
pulseaudio: W: [pulseaudio] module-tunnel.c: Stream killed

Does anybody have an idea how I could get the stream more stable?

Thanks in advance!

I updated the thread title and added a log along with a more precise description of the problem, please read post #4

Last edited by iuno (2016-11-05 17:37:00)

Offline

#2 2016-11-02 08:26:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,729

Re: Pulseaudio issues in headless/X-less setup

I'm not that well versed in the networking parts of pulse, but from what we  have here, if you intend to use the server for all audio needs, it might be better to let the pulse client connect to the server directly instead of relying on the tunnel module. If I misunderstood and you still have local audio hardware to access, another possibility would be trying the new implementation of the tunnel sink which might be more stable for your usecase.

Offline

#3 2016-11-05 01:56:12

iuno
Member
Registered: 2014-08-09
Posts: 42

Re: Pulseaudio issues in headless/X-less setup

Thanks for your answer.
[I'm a bit confused, I thought I already have been using direct connection with the native tcp module, not the tunnel sink. I think I have posted this here and changed my setup after that, sadly the direct connection seems to show the same style of behaviour, although not as bad.]


edit: ok, I figured it out. Of course I was using the tunnel, I got that wrong when I set it up. Currently testing in direct mode, but I'm not sure if this is the right solution for me. I want to be able to use headphones locally on the desktop pc and on the laptop switch between the inbuilt speakers and the ones on the server in the network.
The direct connection does not work 100% flawlessly, too, but it's close. There are some very short breaks in playback, looking in the log it seems like it is adjusting the sampling rate, but I'll look closer into this tomorrow.

Last edited by iuno (2016-11-05 03:10:10)

Offline

#4 2016-11-05 17:35:20

iuno
Member
Registered: 2014-08-09
Posts: 42

Re: Pulseaudio issues in headless/X-less setup

iuno wrote:

I'll look closer into this tomorrow.

OK it seems the problem is not at all a networking problem, I also have the issue when I play audio on the server via paplay. The audio playback stops for maybe a second and then immediately returns playing. When playing over the network it takes a lot longer to recover when using the tunnel and just a little bit longer when using direct connection.

To me it seems like pulseaudio is "losing" the device, it creates the dummy output (because of the module module-always-sink), an additional monitoring device and then re-creates the hdmi sink, includign a monitor as well. The playback is then automatically switched to this new sink. I pasted the log below.

Any ideas why the hdmi sink seems to disappear? I turned off gpu power saving options in the bios and also disabled turning off the video signal for the console with setterm -powersave off -blank 0. I'd like to note that this seems to work, I tried it before. When I connect a monitor, the screen with the console prompt doesn't turn black at any time. The server does not run X and I have no intention to. I also turned off module-suspend-on-idle

I: [pulseaudio] sink.c: Created sink 1 "auto_null" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c:     device.description = "Dummy Output"
I: [pulseaudio] sink.c:     device.class = "abstract"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card"
I: [pulseaudio] source.c: Created source 1 "auto_null.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     device.description = "Monitor of Dummy Output"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone"
I: [pulseaudio] module.c: Loaded "module-null-sink" (index: #19; argument: "sink_name=auto_null sink_properties='device.description="Dummy Output"'").
I: [pulseaudio] sink.c: Freeing sink 0 "alsa_output.pci-0000_00_1b.0.hdmi-surround71"
I: [pulseaudio] source.c: Freeing source 0 "alsa_output.pci-0000_00_1b.0.hdmi-surround71.monitor"
I: [pulseaudio] alsa-util.c: Trying to disable ALSA period wakeups, using timers only
I: [pulseaudio] alsa-util.c: ALSA period wakeups disabled
I: [pulseaudio] alsa-sink.c: Successfully opened device front:0.
I: [pulseaudio] alsa-sink.c: Selected mapping 'Analog Stereo' (analog-stereo).
I: [pulseaudio] alsa-sink.c: Successfully enabled mmap() mode.
I: [pulseaudio] alsa-sink.c: Successfully enabled timer-based scheduling mode.
I: [pulseaudio] (alsa-lib)control.c: Invalid CTL front:0
I: [pulseaudio] alsa-util.c: Unable to attach to mixer front:0: No such file or directory
I: [pulseaudio] alsa-util.c: Successfully attached to mixer 'hw:0'
I: [pulseaudio] sink.c: Created sink 2 "alsa_output.pci-0000_00_1b.0.analog-stereo" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c:     alsa.resolution_bits = "16"
I: [pulseaudio] sink.c:     device.api = "alsa"
I: [pulseaudio] sink.c:     device.class = "sound"
I: [pulseaudio] sink.c:     alsa.class = "generic"
I: [pulseaudio] sink.c:     alsa.subclass = "generic-mix"
I: [pulseaudio] sink.c:     alsa.name = "ALC892 Analog"
I: [pulseaudio] sink.c:     alsa.id = "ALC892 Analog"
I: [pulseaudio] sink.c:     alsa.subdevice = "0"
I: [pulseaudio] sink.c:     alsa.subdevice_name = "subdevice #0"
I: [pulseaudio] sink.c:     alsa.device = "0"
I: [pulseaudio] sink.c:     alsa.card = "0"
I: [pulseaudio] sink.c:     alsa.card_name = "HDA Intel PCH"
I: [pulseaudio] sink.c:     alsa.long_card_name = "HDA Intel PCH at 0xf7e20000 irq 44"
I: [pulseaudio] sink.c:     alsa.driver_name = "snd_hda_intel"
I: [pulseaudio] sink.c:     device.bus_path = "pci-0000:00:1b.0"
I: [pulseaudio] sink.c:     sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
I: [pulseaudio] sink.c:     device.bus = "pci"
I: [pulseaudio] sink.c:     device.vendor.id = "8086"
I: [pulseaudio] sink.c:     device.vendor.name = "Intel Corporation"
I: [pulseaudio] sink.c:     device.product.id = "1c20"
I: [pulseaudio] sink.c:     device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
I: [pulseaudio] sink.c:     device.form_factor = "internal"
I: [pulseaudio] sink.c:     device.string = "front:0"
I: [pulseaudio] sink.c:     device.buffering.buffer_size = "352800"
I: [pulseaudio] sink.c:     device.buffering.fragment_size = "176400"
I: [pulseaudio] sink.c:     device.access_mode = "mmap+timer"
I: [pulseaudio] sink.c:     device.profile.name = "analog-stereo"
I: [pulseaudio] sink.c:     device.profile.description = "Analog Stereo"
I: [pulseaudio] sink.c:     device.description = "Built-in Audio Analog Stereo"
I: [pulseaudio] sink.c:     alsa.mixer_name = "Realtek ALC892"
I: [pulseaudio] sink.c:     alsa.components = "HDA:10ec0892,10438436,00100302 HDA:80862805,80860101,00100000"
I: [pulseaudio] sink.c:     module-udev-detect.discovered = "1"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card-pci"
I: [pulseaudio] source.c: Created source 2 "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     device.description = "Monitor of Built-in Audio Analog Stereo"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     alsa.card = "0"
I: [pulseaudio] source.c:     alsa.card_name = "HDA Intel PCH"
I: [pulseaudio] source.c:     alsa.long_card_name = "HDA Intel PCH at 0xf7e20000 irq 44"
I: [pulseaudio] source.c:     alsa.driver_name = "snd_hda_intel"
I: [pulseaudio] source.c:     device.bus_path = "pci-0000:00:1b.0"
I: [pulseaudio] source.c:     sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
I: [pulseaudio] source.c:     device.bus = "pci"
I: [pulseaudio] source.c:     device.vendor.id = "8086"
I: [pulseaudio] source.c:     device.vendor.name = "Intel Corporation"
I: [pulseaudio] source.c:     device.product.id = "1c20"
I: [pulseaudio] source.c:     device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
I: [pulseaudio] source.c:     device.form_factor = "internal"
I: [pulseaudio] source.c:     device.string = "0"
I: [pulseaudio] source.c:     module-udev-detect.discovered = "1"
I: [pulseaudio] source.c:     device.icon_name = "audio-card-pci"
I: [pulseaudio] alsa-sink.c: Using 2.0 fragments of size 176400 bytes (1000.00ms), buffer size is 352800 bytes (2000.00ms)
I: [pulseaudio] alsa-sink.c: Time scheduling watermark is 20.00ms
I: [pulseaudio] alsa-sink.c: Successfully enabled deferred volume.
I: [pulseaudio] alsa-sink.c: Hardware volume ranges from -179.00 dB to 0.00 dB.
I: [pulseaudio] alsa-sink.c: Fixing base volume to 0.00 dB
I: [pulseaudio] alsa-sink.c: Using hardware volume control. Hardware dB scale supported.
I: [pulseaudio] alsa-sink.c: Using hardware mute control.
I: [alsa-sink-ALC892 Analog] core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
I: [alsa-sink-ALC892 Analog] alsa-sink.c: Starting playback.
I: [pulseaudio] module-always-sink.c: A new sink has been discovered. Unloading null-sink.
I: [pulseaudio] sink-input.c: Trying to change sample rate
I: [pulseaudio] sink-input.c: Rate changed to 44100 Hz
I: [pulseaudio] protocol-native.c: Requested tlength=2000.00 ms, minreq=20.00 ms
I: [pulseaudio] resampler.c: Forcing resampler 'copy', because of fixed, identical sample rates.
I: [pulseaudio] card.c: Changed profile of card 0 "alsa_card.pci-0000_00_1b.0" to output:analog-stereo
I: [pulseaudio] sink.c: Freeing sink 2 "alsa_output.pci-0000_00_1b.0.analog-stereo"
I: [pulseaudio] source.c: Freeing source 2 "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
I: [pulseaudio] alsa-util.c: Trying to disable ALSA period wakeups, using timers only
I: [pulseaudio] alsa-util.c: ALSA period wakeups disabled
I: [pulseaudio] alsa-sink.c: Successfully opened device hdmi:0.
I: [pulseaudio] alsa-sink.c: Selected mapping 'Digital Surround 7.1 (HDMI)' (hdmi-surround71).
I: [pulseaudio] alsa-sink.c: Successfully enabled mmap() mode.
I: [pulseaudio] alsa-sink.c: Successfully enabled timer-based scheduling mode.
I: [pulseaudio] (alsa-lib)control.c: Invalid CTL hdmi:0
I: [pulseaudio] alsa-util.c: Unable to attach to mixer hdmi:0: No such file or directory
I: [pulseaudio] alsa-util.c: Successfully attached to mixer 'hw:0'
I: [pulseaudio] sink.c: Created sink 3 "alsa_output.pci-0000_00_1b.0.hdmi-surround71" with sample spec s16le 8ch 44100Hz and channel map front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
I: [pulseaudio] sink.c:     alsa.resolution_bits = "16"
I: [pulseaudio] sink.c:     device.api = "alsa"
I: [pulseaudio] sink.c:     device.class = "sound"
I: [pulseaudio] sink.c:     alsa.class = "generic"
I: [pulseaudio] sink.c:     alsa.subclass = "generic-mix"
I: [pulseaudio] sink.c:     alsa.name = "HDMI 0"
I: [pulseaudio] sink.c:     alsa.id = "HDMI 0"
I: [pulseaudio] sink.c:     alsa.subdevice = "0"
I: [pulseaudio] sink.c:     alsa.subdevice_name = "subdevice #0"
I: [pulseaudio] sink.c:     alsa.device = "3"
I: [pulseaudio] sink.c:     alsa.card = "0"
I: [pulseaudio] sink.c:     alsa.card_name = "HDA Intel PCH"
I: [pulseaudio] sink.c:     alsa.long_card_name = "HDA Intel PCH at 0xf7e20000 irq 44"
I: [pulseaudio] sink.c:     alsa.driver_name = "snd_hda_intel"
I: [pulseaudio] sink.c:     device.bus_path = "pci-0000:00:1b.0"
I: [pulseaudio] sink.c:     sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
I: [pulseaudio] sink.c:     device.bus = "pci"
I: [pulseaudio] sink.c:     device.vendor.id = "8086"
I: [pulseaudio] sink.c:     device.vendor.name = "Intel Corporation"
I: [pulseaudio] sink.c:     device.product.id = "1c20"
I: [pulseaudio] sink.c:     device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
I: [pulseaudio] sink.c:     device.form_factor = "internal"
I: [pulseaudio] sink.c:     device.string = "hdmi:0"
I: [pulseaudio] sink.c:     device.buffering.buffer_size = "1411200"
I: [pulseaudio] sink.c:     device.buffering.fragment_size = "705600"
I: [pulseaudio] sink.c:     device.access_mode = "mmap+timer"
I: [pulseaudio] sink.c:     device.profile.name = "hdmi-surround71"
I: [pulseaudio] sink.c:     device.profile.description = "Digital Surround 7.1 (HDMI)"
I: [pulseaudio] sink.c:     device.description = "Built-in Audio Digital Surround 7.1 (HDMI)"
I: [pulseaudio] sink.c:     alsa.mixer_name = "Realtek ALC892"
I: [pulseaudio] sink.c:     alsa.components = "HDA:10ec0892,10438436,00100302 HDA:80862805,80860101,00100000"
I: [pulseaudio] sink.c:     module-udev-detect.discovered = "1"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card-pci"
I: [pulseaudio] source.c: Created source 3 "alsa_output.pci-0000_00_1b.0.hdmi-surround71.monitor" with sample spec s16le 8ch 44100Hz and channel map front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
I: [pulseaudio] source.c:     device.description = "Monitor of Built-in Audio Digital Surround 7.1 (HDMI)"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     alsa.card = "0"
I: [pulseaudio] source.c:     alsa.card_name = "HDA Intel PCH"
I: [pulseaudio] source.c:     alsa.long_card_name = "HDA Intel PCH at 0xf7e20000 irq 44"
I: [pulseaudio] source.c:     alsa.driver_name = "snd_hda_intel"
I: [pulseaudio] source.c:     device.bus_path = "pci-0000:00:1b.0"
I: [pulseaudio] source.c:     sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
I: [pulseaudio] source.c:     device.bus = "pci"
I: [pulseaudio] source.c:     device.vendor.id = "8086"
I: [pulseaudio] source.c:     device.vendor.name = "Intel Corporation"
I: [pulseaudio] source.c:     device.product.id = "1c20"
I: [pulseaudio] source.c:     device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
I: [pulseaudio] source.c:     device.form_factor = "internal"
I: [pulseaudio] source.c:     device.string = "0"
I: [pulseaudio] source.c:     module-udev-detect.discovered = "1"
I: [pulseaudio] source.c:     device.icon_name = "audio-card-pci"
I: [pulseaudio] alsa-sink.c: Using 2.0 fragments of size 705600 bytes (1000.00ms), buffer size is 1411200 bytes (2000.00ms)
I: [pulseaudio] alsa-sink.c: Time scheduling watermark is 5.03ms
I: [pulseaudio] alsa-sink.c: Driver does not support hardware volume control, falling back to software volume control.
I: [pulseaudio] alsa-sink.c: Driver does not support hardware mute control, falling back to software mute control.
I: [alsa-sink-HDMI 0] core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
I: [alsa-sink-HDMI 0] alsa-sink.c: Starting playback.
I: [pulseaudio] sink-input.c: Trying to change sample rate
I: [pulseaudio] sink-input.c: Rate changed to 44100 Hz
I: [pulseaudio] protocol-native.c: Requested tlength=2000.00 ms, minreq=20.00 ms
I: [pulseaudio] resampler.c: Forcing resampler 'copy', because of fixed, identical sample rates.
I: [pulseaudio] remap.c: Using generic matrix remapping
I: [pulseaudio] card.c: Changed profile of card 0 "alsa_card.pci-0000_00_1b.0" to output:hdmi-surround71
I: [pulseaudio] module.c: Unloading "module-null-sink" (index: #19).
I: [pulseaudio] sink.c: Freeing sink 1 "auto_null"
I: [pulseaudio] source.c: Freeing source 1 "auto_null.monitor"
I: [pulseaudio] module.c: Unloaded "module-null-sink" (index: #19).

Last edited by iuno (2016-11-05 17:49:04)

Offline

#5 2016-11-27 04:56:00

iuno
Member
Registered: 2014-08-09
Posts: 42

Re: Pulseaudio issues in headless/X-less setup

*digging out*

Offline

Board footer

Powered by FluxBB