You are not logged in.

#1 2020-11-17 12:54:46

Yann
Member
Registered: 2017-11-23
Posts: 233

[SOLVED] pulseaudio no auto switch speakers to headphones plug

Hi everyone,

Since a few days I am facing problems with my audio. Mostly about auto switches to audio output at particular event, such as plug headphones jack or connect my bluetooth speakers. It used to auto switch to the headphones when I plugged them or connect to the bluetooth speakers when I connected it.

This behavior changes in the last days. System up to date and I use pulseaudio. With pavucontrol I can see that these events are well detected, when I plug the headphones, then I can pick it with pavucontrol, the same with bluetooth speakers.

I read everything and played with the load-module module-switch-on-connect and load-module module-switch-on-port-available parameters in /etc/pulse/default.pa. Doesn't seem to change anything. Also I downgraded the different pulseaudio packages, didn't seem to revert the previous behavior.

For some reasons, the bluetooth speakers seem to auto switch the sink and then the audio output this morning, so it seems to be solved for the bluetooth speakers. But for the headphones, when I plug them, pulseaudio doesn't automatically changes the output to the headphones, stay on the speakers, and there is no audio going out from the speakers anymore. I need to click it in pulseaudio to get the headphones and unplug the headphones to get audio from the speakers.

Any idea ?

Thanks for your time.

Last edited by Yann (2020-11-17 14:53:43)


all different - all equal

Offline

#2 2020-11-17 12:56:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,528

Re: [SOLVED] pulseaudio no auto switch speakers to headphones plug

https://bbs.archlinux.org/viewtopic.php … 9#p1936619

However downgrading the relevant pulse packages should restore behaviour, did you restart pulse afterwards?

systemctl --user restart pulseaudio

? What's your output for

pacmd list-cards
pacmd list-sinks

in the connected/not connected state?

Last edited by V1del (2020-11-17 12:58:07)

Offline

#3 2020-11-17 13:18:06

Yann
Member
Registered: 2017-11-23
Posts: 233

Re: [SOLVED] pulseaudio no auto switch speakers to headphones plug

Hi V1del, thanks for the reply.

I downgraded to the following packages pulseaudio-13.99.2+7+g6101798c7-1-x86_64.pkg.tar.zst libpulse-13.99.2+7+g6101798c7-1-x86_64.pkg.tar.zst pulseaudio-bluetooth-13.99.2+7+g6101798c7-1-x86_64.pkg.tar.zst and restored the config file as I remembered. And it works. Sorry for that.

However, if I get these packages up to date with the same conf file, doesn't switch from speakers mode to headphones. But it knows they have been plugged.. I played one more time with the parameters above. No change.

$ pacmd list-cards

1 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_00_1f.3>
	driver: <module-alsa-card.c>
	owner module: 5
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xed618000 irq 146"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.product.name = "Cannon Lake PCH cAVS"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		input:analog-stereo: Analog Stereo Input (priority 65, available: unknown)
		output:analog-stereo: Analog Stereo Output (priority 6500, available: unknown)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6565, available: unknown)
		output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: no)
		output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5965, available: no)
		output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: no)
		output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (priority 865, available: no)
		output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: no)
		output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (priority 865, available: no)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5700, available: no)
		output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Analog Stereo Input (priority 5765, available: no)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 600, available: no)
		output:hdmi-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2) Output + Analog Stereo Input (priority 665, available: no)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 600, available: no)
		output:hdmi-surround71-extra1+input:analog-stereo: Digital Surround 7.1 (HDMI 2) Output + Analog Stereo Input (priority 665, available: no)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5700, available: unknown)
		output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Analog Stereo Input (priority 5765, available: unknown)
		output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5700, available: no)
		output:hdmi-stereo-extra3+input:analog-stereo: Digital Stereo (HDMI 4) Output + Analog Stereo Input (priority 5765, available: no)
		output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 600, available: no)
		output:hdmi-surround-extra3+input:analog-stereo: Digital Surround 5.1 (HDMI 4) Output + Analog Stereo Input (priority 665, available: no)
		output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 600, available: no)
		output:hdmi-surround71-extra3+input:analog-stereo: Digital Surround 7.1 (HDMI 4) Output + Analog Stereo Input (priority 665, available: no)
		output:hdmi-stereo-extra4: Digital Stereo (HDMI 5) Output (priority 5700, available: no)
		output:hdmi-stereo-extra4+input:analog-stereo: Digital Stereo (HDMI 5) Output + Analog Stereo Input (priority 5765, available: no)
		output:hdmi-surround-extra4: Digital Surround 5.1 (HDMI 5) Output (priority 600, available: no)
		output:hdmi-surround-extra4+input:analog-stereo: Digital Surround 5.1 (HDMI 5) Output + Analog Stereo Input (priority 665, available: no)
		output:hdmi-surround71-extra4: Digital Surround 7.1 (HDMI 5) Output (priority 600, available: no)
		output:hdmi-surround71-extra4+input:analog-stereo: Digital Surround 7.1 (HDMI 5) Output + Analog Stereo Input (priority 665, available: no)
		off: Off (priority 0, available: unknown)
	active profile: <output:analog-stereo+input:analog-stereo>
	sinks:
		alsa_output.pci-0000_00_1f.3.analog-stereo/#0: Built-in Audio Analog Stereo
	sources:
		alsa_output.pci-0000_00_1f.3.analog-stereo.monitor/#0: Monitor of Built-in Audio Analog Stereo
		alsa_input.pci-0000_00_1f.3.analog-stereo/#1: Built-in Audio Analog Stereo
	ports:
		analog-input-internal-mic: Internal Microphone (priority 8900, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-headphone-mic: Microphone (priority 8700, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-headset-mic: Headset Microphone (priority 8800, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-input-microphone"
		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: unknown)
			properties:
				device.icon_name = "audio-headphones"
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
				device.product.name = "U28E590"
		hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-4: HDMI / DisplayPort 5 (priority 5500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
$ pacmd list-sinks

1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: IDLE
	suspend cause: (none)
	priority: 9039
	volume: front-left: 24631 /  38% / -25.50 dB,   front-right: 24631 /  38% / -25.50 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 39.80 ms
	max request: 6 KiB
	max rewind: 6 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 1
	configured latency: 40.00 ms; range is 0.50 .. 2000.00 ms
	card: 0 <alsa_card.pci-0000_00_1f.3>
	module: 5
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC3266 Analog"
		alsa.id = "ALC3266 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xed618000 irq 146"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a348"
		device.product.name = "Cannon Lake PCH cAVS"
		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"
		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: unknown)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-speaker>

all different - all equal

Offline

#4 2020-11-17 13:25:45

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,528

Re: [SOLVED] pulseaudio no auto switch speakers to headphones plug

read the bugreport linked in my reply in the linked thread. That's a known regression in the 13.99.3 version of pulseaudio. It has a merge request pending and should be fixed for the final pulseaudio 14 release.

It appears to have been committed: https://gitlab.freedesktop.org/pulseaud … ad6120e17f

Last edited by V1del (2020-11-17 13:27:59)

Offline

#5 2020-11-17 13:38:49

Yann
Member
Registered: 2017-11-23
Posts: 233

Re: [SOLVED] pulseaudio no auto switch speakers to headphones plug

Sorry, forgot to click the link, just forgot.

Everything clear now. Committed but not released ? Should come soon I imagine. I am going to downgrade until the release.

May I ask some not related questions ? Do you recommend to update your system every day ? Or we gain time by updating it at punctual moments ?
Also, are you paid to answer all these questions ? Sorry for the direct question.


all different - all equal

Offline

#6 2020-11-17 14:45:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,528

Re: [SOLVED] pulseaudio no auto switch speakers to headphones plug

The update frequency largely depends on what you intend to do with it and which packages you have installed , if you do it more often you have smaller batches of packages to worry about and should be able to easier spot regressions, if you do it less often you have a system that works as intended at that point in time.  I do it when I got free time to look at potential regressions, often at least once a week, sometimes I have a project or so that I can't risk any issues on so I might defer updating for a few weeks. It also depends a bit on how well you understand how packages interact with each other.  Some packages can generally "assumed" to be safe to pick up, others might be more problematic, i.e. you should always expect the possibility of regressions on major kernel releases.

None of us gets paid as far as I know, though we do accept bribes in the form of tacos  tongue

Offline

#7 2020-11-17 14:53:16

Yann
Member
Registered: 2017-11-23
Posts: 233

Re: [SOLVED] pulseaudio no auto switch speakers to headphones plug

Thanks for the answers !!

Do you want me to send you a tacos from France ? Might not be a good idea ?.. Anyway, thanks for your amazing job !! Very useful.


all different - all equal

Offline

Board footer

Powered by FluxBB