You are not logged in.

#1 2018-11-20 04:42:32

orderlyDisorganized
Member
Registered: 2016-05-15
Posts: 15

[SOLVED] Pulseaudio mono sink, no sound in some Steam games

I'm remapping stereo to mono in Pulseaudio using this config:

.include /etc/pulse/default.pa
# Remap stereo to mono
load-module module-remap-sink master=alsa_output.pci-0000_0b_00.3.analog-stereo sink_name=mono sink_properties="device.description='Mono'" channels=2 channel_map=mono,mono
# Set new remap as default
set-default-sink mono

It works in MPD, Chromium but some Steam games (like Into the Breach) don't output any sound but some (Divinity Original Sin) do.

If I remove the mono sink, everything works fine with all Steam games. It shouldn't be an issue with a game being incompatible with the sink because if I start a game without the mono remap and use pavucontrol to change the current sink to mono afterwards, the game sound still works. So the issue is that these few games don't like to start with the mono sink being default. Anyway, I thought it was Pulseaudio's job to do the remapping entirely(?) so if audio works with a specific sink even in one program, I don't know why it doesn't work in some other program. Of course, the former being true when a program is using Pulseaudio and not Alsa but this shouldn't be the case here because all my Steam games work well without the mono sink.

I have installed pulseaudio-alsa, lib32-libpulse and lib32-alsa-plugins. No .asoundrc in my home directory and my /etc/asound.conf is:

# Use PulseAudio by default
pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

# vim:set ft=alsaconf:

There are no suspicious error messages in the terminal either when I launch one of these games. I welcome all suggestions to debug this further.

Last edited by orderlyDisorganized (2018-12-06 12:03:07)

Offline

#2 2018-11-20 10:40:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 5,694

Re: [SOLVED] Pulseaudio mono sink, no sound in some Steam games

Output of

pacmd list-sinks
pacmd list-sink-inputs

during a not working situation?

Offline

#3 2018-11-20 15:40:07

orderlyDisorganized
Member
Registered: 2016-05-15
Posts: 15

Re: [SOLVED] Pulseaudio mono sink, no sound in some Steam games

V1del wrote:

Output of

pacmd list-sinks
pacmd list-sink-inputs

during a not working situation?

[arch1@arch ~]$ pacmd list-sinks
3 sink(s) available.
    index: 0
	name: <alsa_output.pci-0000_09_00.1.hdmi-stereo-extra1>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 9030
	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: yes
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 0
	sample spec: s16le 2ch 48000Hz
	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_09_00.1>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "HDMI 1"
		alsa.id = "HDMI 1"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "7"
		alsa.card = "0"
		alsa.card_name = "HDA NVidia"
		alsa.long_card_name = "HDA NVidia at 0xf7080000 irq 56"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:09:00.1"
		sysfs.path = "/devices/pci0000:00/0000:00:03.1/0000:09:00.1/sound/card0"
		device.bus = "pci"
		device.vendor.id = "10de"
		device.vendor.name = "NVIDIA Corporation"
		device.product.id = "10f1"
		device.product.name = "GP106 High Definition Audio Controller"
		device.string = "hdmi:0,1"
		device.buffering.buffer_size = "384000"
		device.buffering.fragment_size = "192000"
		device.access_mode = "mmap+timer"
		device.profile.name = "hdmi-stereo-extra1"
		device.profile.description = "Digital Stereo (HDMI 2)"
		device.description = "GP106 High Definition Audio Controller Digital Stereo (HDMI 2)"
		alsa.mixer_name = "Nvidia GPU 84 HDMI/DP"
		alsa.components = "HDA:10de0084,14623285,00100100"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
				device.product.name = "DELL U2415
  "
	active port: <hdmi-output-1>
    index: 1
	name: <alsa_output.pci-0000_0b_00.3.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: (none)
	priority: 9039
	volume: front-left: 19436 /  30% / -31.67 dB,   front-right: 19436 /  30% / -31.67 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 196.30 ms
	max request: 39 KiB
	max rewind: 39 KiB
	monitor source: 1
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 1
	configured latency: 210.00 ms; range is 0.50 .. 2000.00 ms
	card: 1 <alsa_card.pci-0000_0b_00.3>
	module: 7
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC1220 Analog"
		alsa.id = "ALC1220 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 0xf7800000 irq 58"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:0b:00.3"
		sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:0b:00.3/sound/card1"
		device.bus = "pci"
		device.vendor.id = "1022"
		device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
		device.product.id = "1457"
		device.product.name = "Family 17h (Models 00h-0fh) HD Audio Controller"
		device.string = "front:1"
		device.buffering.buffer_size = "384000"
		device.buffering.fragment_size = "192000"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Family 17h (Models 00h-0fh) HD Audio Controller Analog Stereo"
		alsa.mixer_name = "Realtek ALC1220"
		alsa.components = "HDA:10ec1168,10438733,00100003"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: yes)
			properties:
				
		analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-lineout>
  * index: 2
	name: <mono>
	driver: <module-remap-sink.c>
	flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: (none)
	priority: 1000
	volume: mono: 65536 / 100% / 0.00 dB,   mono: 65536 / 100% / 0.00 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 196.10 ms
	max request: 39 KiB
	max rewind: 39 KiB
	monitor source: 3
	sample spec: s16le 2ch 48000Hz
	channel map: mono,mono
	             Mono
	used by: 1
	linked by: 1
	configured latency: 210.00 ms; range is 0.50 .. 2000.00 ms
	module: 23
	properties:
		device.master_device = "alsa_output.pci-0000_0b_00.3.analog-stereo"
		device.class = "filter"
		device.description = "Mono"
		device.icon_name = "audio-card"
[arch1@arch ~]$ pacmd list-sink-inputs
2 sink input(s) available.
    index: 0
	driver: <module-remap-sink.c>
	flags: START_CORKED 
	state: RUNNING
	sink: 1 <alsa_output.pci-0000_0b_00.3.analog-stereo>
	volume: mono: 65536 / 100% / 0.00 dB,   mono: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 0.00 ms
	requested latency: 210.00 ms
	sample spec: s16le 2ch 48000Hz
	channel map: mono,mono
	             Mono
	resample method: copy
	module: 23
	properties:
		media.name = "Remapped Stream"
		media.role = "filter"
		module-stream-restore.id = "sink-input-by-media-role:filter"
    index: 4
	driver: <protocol-native.c>
	flags: 
	state: RUNNING
	sink: 2 <mono>
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 71.63 ms
	requested latency: 210.00 ms
	sample spec: s24-32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: speex-float-1
	module: 10
	client: 10 <Music Player Daemon>
	properties:
		media.name = "My Pulse Output"
		application.name = "Music Player Daemon"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		media.role = "music"
		application.icon_name = "mpd"
		application.process.id = "2369"
		application.process.user = "arch1"
		application.process.host = "arch"
		application.process.binary = "mpd"
		application.language = "C"
		window.x11.display = ":0"
		application.process.machine_id = "2faabb91168e46ecb2e99029d1e72738"
		module-stream-restore.id = "sink-input-by-media-role:music"

I have MPD and a Steam game running while running those commands. The fact that the game is not listed in sink-inputs is interesting. I having difficulties to understand why would it have troubles to use the mono sink while some other programs have no problems with it?

Edit:
It seems like native Linux game are working fine. I'm using Steam Proton to launch non native games but they don't work as mentioned. Using winecfg to configure audio is not an option because it's not included in Steam Proton.

Last edited by orderlyDisorganized (2018-11-20 16:19:33)

Offline

#4 2018-11-20 17:23:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 5,694

Re: [SOLVED] Pulseaudio mono sink, no sound in some Steam games

Wine/proton should have support for a native pulse output, is lib32-libpulse and FWIW lib32-alsa-plugins installed? What's the output of

sudo fuser -v /dev/snd/*

during that?

Last edited by V1del (2018-11-20 17:25:18)

Offline

#5 2018-11-20 17:42:53

orderlyDisorganized
Member
Registered: 2016-05-15
Posts: 15

Re: [SOLVED] Pulseaudio mono sink, no sound in some Steam games

V1del wrote:

Wine/proton should have support for a native pulse output, is lib32-libpulse and FWIW lib32-alsa-plugins installed? What's the output of

sudo fuser -v /dev/snd/*

during that?

Yes, I have those packages installed.

During a native Linux game (sound works):

[arch1@arch ~]$ fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  arch1     636 F.... pulseaudio
/dev/snd/controlC1:  arch1      636 F.... pulseaudio
/dev/snd/pcmC1D0p:   arch1      636 F...m pulseaudio

And during a non native game (sound doesn't work):

[arch1@arch ~]$ fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  arch1     636 F.... pulseaudio
/dev/snd/controlC1:  arch1      636 F.... pulseaudio

Offline

#6 2018-11-20 17:51:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 5,694

Re: [SOLVED] Pulseaudio mono sink, no sound in some Steam games

looks technically alright, I have a hunch that this might be related to a patched alsa-lib that did have an issue with the pulse <-> alsa plugin bridge and that patch is not yet applied to lib32-alsa-lib. Does sound in that case only not work with the mono sink present (that wouldn't make sense, but initial description sounded like that was the case)? FWIW can you test these games (which ones?) in normal wine? And ensure that your normal wine is configured to use the winepulsedrv ? if that works, it's likely some game specific  proton config which forces an ALSA driver in which case the aforementioned alsa pulse bridge will interfere.

Offline

#7 2018-11-20 19:12:38

orderlyDisorganized
Member
Registered: 2016-05-15
Posts: 15

Re: [SOLVED] Pulseaudio mono sink, no sound in some Steam games

V1del wrote:

...Does sound in that case only not work with the mono sink present (that wouldn't make sense, but initial description sounded like that was the case)?...

Sorry, I don't understand which case you are referring to? And yes, only the mono sink produces problems with sound. If I remove it, everything works fine.

My intention is to test with normal Wine but I'm having some issues with getting online on Steam under normal Wine. I will get back to this when (/if) I have Steam running via normal Wine.

Last edited by orderlyDisorganized (2018-11-20 19:13:47)

Offline

#8 2018-11-21 09:20:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 5,694

Re: [SOLVED] Pulseaudio mono sink, no sound in some Steam games

Do the applications that currenty aren't creating  a pulse sink, suddenly have one just by not setting the mono sink as default? If that's the case then it's likely that the games simply break if they are told that they are only getting a mono sink (there's some difference to having a mono sink set as default and simply moving it over afterwards, the game/application doesn't necessarily receive information about the latter)

Offline

#9 2018-12-06 12:00:36

orderlyDisorganized
Member
Registered: 2016-05-15
Posts: 15

Re: [SOLVED] Pulseaudio mono sink, no sound in some Steam games

I think I solved this by changing from this line:

load-module module-remap-sink master=alsa_output.pci-0000_0b_00.3.analog-stereo sink_name=mono channels=2 channel_map=mono,mono

to:

load-module module-remap-sink master=alsa_output.pci-0000_0b_00.3.analog-stereo sink_name=mono channels=1 channel_map=mono

And this is in Pulseaudio's default.pa config.

I don't know why but there was no sink stream created for non-native Linux games when using the first line above. I also tried to run these games directly via Wine without success. Now sound works also in non-native Linux games and the sound appears to be true mono - at least from what I've tested so far.

And thanks again V1del for your help.

Last edited by orderlyDisorganized (2018-12-06 12:03:33)

Offline

Board footer

Powered by FluxBB