How to eject headphones?

After full system reinstall I’ve got an issue with unplugging headhpones.
When headphones are plugged in, sound is routed to headphones. When headphones are unplugged - sound is randomly NOT routed back to speakers.
It seems like the only way to get sound back to the speakers is to reboot pc.
When opening the PulseAudio Volume Control → output devices → port: I can select “Speakers (unavailable)” or “Headphones (unplugged)”
If I select speakers and slide the volume slider underneath, I hear the blobb-sound from the speakers. This is the only thing I’ve found that is able to make sound from the speakers at this state. This should indicate that the hardware is working.
(Inserting headphones again, and pull them out once more, does not help.)

As I rebooted before writing this post, sound is not an issue at this moment. Which debug commands should I run the next time this happens?

To debug audio devices and output sinks in PulseAudio or PipeWire

pactl list cards
pactl list sinks

If the output device is shown as Speakers (unavailable), the audio server will avoid using it and use any other output that is available or has unknown availability

I guess the outpur will be Speakers (unavailable), as that is what it said in the pulseaudio volume control gui.
What may cause such status? Obviously the speakers aren’t unavailable as they make sound when sliding the output volume slider in pulsaudio gui.
Is there a command to “rescan” for speakers?

Looks like it’s pipewire that is used. Still there are lots of pulseaudio-stuff installed. Could the issue be caused by some pulseaudio stuff that should have been removed? (I guess the usb-installer included pulseaudio, while the first update replaced pulseaudio with pipewire)

Does this output give any ideas whats causing trouble?

$ pactl list sinks
Sink #1830
	State: SUSPENDED
	Name: alsa_output.pci-0000_00_1b.0.analog-stereo
	Description: Built-in Audio Analog Stereo
	Driver: PipeWire
	Sample Specification: s32le 2ch 48000Hz
	Channel Map: front-left,front-right
	Owner Module: 4294967295
	Mute: no
	Volume: front-left: 98304 / 150% / 10,57 dB,   front-right: 98304 / 150% / 10,57 dB
	        balance 0,00
	Base Volume: 65536 / 100% / 0,00 dB
	Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.card = "0"
		alsa.card_name = "HDA Intel MID"
		alsa.class = "generic"
		alsa.device = "0"
		alsa.driver_name = "snd_hda_intel"
		alsa.id = "92HD75B3X5 Analog"
		alsa.long_card_name = "HDA Intel MID at 0xd7420000 irq 33"
		alsa.name = "92HD75B3X5 Analog"
		alsa.resolution_bits = "16"
		alsa.subclass = "generic-mix"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		api.alsa.card.longname = "HDA Intel MID at 0xd7420000 irq 33"
		api.alsa.card.name = "HDA Intel MID"
		api.alsa.path = "front:0"
		api.alsa.pcm.card = "0"
		api.alsa.pcm.stream = "playback"
		audio.channels = "2"
		audio.position = "FL,FR"
		card.profile.device = "4"
		device.api = "alsa"
		device.class = "sound"
		device.id = "43"
		device.profile.description = "Analog Stereo"
		device.profile.name = "analog-stereo"
		device.routes = "2"
		factory.name = "api.alsa.pcm.sink"
		media.class = "Audio/Sink"
		device.description = "Built-in Audio"
		node.name = "alsa_output.pci-0000_00_1b.0.analog-stereo"
		node.nick = "92HD75B3X5 Analog"
		node.pause-on-idle = "false"
		object.path = "alsa:pcm:0:front:0:playback"
		priority.driver = "1009"
		priority.session = "1009"
		factory.id = "18"
		clock.quantum-limit = "8192"
		client.id = "35"
		node.driver = "true"
		factory.mode = "merge"
		audio.adapt.follower = ""
		library.name = "audioconvert/libspa-audioconvert"
		object.id = "53"
		object.serial = "1830"
		api.acp.auto-port = "false"
		api.acp.auto-profile = "false"
		api.alsa.card = "0"
		api.alsa.use-acp = "true"
		api.dbus.ReserveDevice1 = "Audio0"
		device.bus = "pci"
		device.bus_path = "pci-0000:00:1b.0"
		device.enum.api = "udev"
		device.form_factor = "internal"
		device.icon_name = "audio-card-analog-pci"
		device.name = "alsa_card.pci-0000_00_1b.0"
		device.nick = "HDA Intel MID"
		device.plugged.usec = "10470369"
		device.product.id = "0x3b56"
		device.product.name = "5 Series/3400 Series Chipset High Definition Audio"
		device.subsystem = "sound"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.vendor.id = "0x8086"
		device.vendor.name = "Intel Corporation"
		device.string = "0"
	Ports:
		analog-output-speaker: Speakers (type: Speaker, priority: 10000, availability group: Legacy 4, not available)
		analog-output-headphones: Headphones (type: Headphones, priority: 9900, availability group: Legacy 5, available)
	Active Port: analog-output-headphones
	Formats:
		pcm

$ pactl list cards
Card #1828
	Name: alsa_card.pci-0000_01_00.1
	Driver: alsa
	Owner Module: n/a
	Properties:
		api.acp.auto-port = "false"
		api.acp.auto-profile = "false"
		api.alsa.card = "1"
		api.alsa.card.longname = "HDA NVidia at 0xd3000000 irq 16"
		api.alsa.card.name = "HDA NVidia"
		api.alsa.path = "hw:1"
		api.alsa.use-acp = "true"
		api.dbus.ReserveDevice1 = "Audio1"
		device.api = "alsa"
		device.bus = "pci"
		device.bus_path = "pci-0000:01:00.1"
		device.description = "High Definition Audio Controller"
		device.enum.api = "udev"
		device.icon_name = "audio-card-analog-pci"
		device.name = "alsa_card.pci-0000_01_00.1"
		device.nick = "HDA NVidia"
		device.plugged.usec = "10376909"
		device.product.id = "0x0be3"
		device.product.name = "High Definition Audio Controller"
		device.subsystem = "sound"
		sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
		device.vendor.id = "0x10de"
		device.vendor.name = "NVIDIA Corporation"
		media.class = "Audio/Device"
		factory.id = "14"
		client.id = "35"
		object.id = "55"
		object.serial = "1828"
		object.path = "alsa:pcm:1"
		alsa.card = "1"
		alsa.card_name = "HDA NVidia"
		alsa.long_card_name = "HDA NVidia at 0xd3000000 irq 16"
		alsa.driver_name = "snd_hda_intel"
		device.string = "1"
	Profiles:
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
		output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5900, available: no)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (sinks: 1, sources: 0, priority: 5700, available: no)
		output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: no)
		output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (sinks: 1, sources: 0, priority: 800, available: no)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
		output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (sinks: 1, sources: 0, priority: 600, available: no)
		pro-audio: Pro Audio (sinks: 4, sources: 0, priority: 1, available: yes)
	Active Profile: off
	Ports:
		hdmi-output-0: HDMI / DisplayPort (type: HDMI, priority: 5900, latency offset: 0 usec, availability group: Legacy 1, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 1"
				device.icon_name = "video-display"
				card.profile.port = "0"
			Part of profile(s): output:hdmi-stereo, output:hdmi-surround, output:hdmi-surround71
		hdmi-output-1: HDMI / DisplayPort 2 (type: HDMI, priority: 5800, latency offset: 0 usec, availability group: Legacy 2, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 2"
				device.icon_name = "video-display"
				card.profile.port = "1"
			Part of profile(s): output:hdmi-stereo-extra1, output:hdmi-surround-extra1, output:hdmi-surround71-extra1
		hdmi-output-2: HDMI / DisplayPort 3 (type: HDMI, priority: 5700, latency offset: 0 usec, availability group: Legacy 3, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 3"
				device.icon_name = "video-display"
				card.profile.port = "2"
			Part of profile(s): output:hdmi-stereo-extra2, output:hdmi-surround-extra2, output:hdmi-surround71-extra2
		hdmi-output-3: HDMI / DisplayPort 4 (type: HDMI, priority: 5600, latency offset: 0 usec, availability group: Legacy 4, not available)
			Properties:
				port.type = "hdmi"
				port.availability-group = "Legacy 4"
				device.icon_name = "video-display"
				card.profile.port = "3"
			Part of profile(s): output:hdmi-stereo-extra3, output:hdmi-surround-extra3, output:hdmi-surround71-extra3

Card #1829
	Name: alsa_card.pci-0000_00_1b.0
	Driver: alsa
	Owner Module: n/a
	Properties:
		api.acp.auto-port = "false"
		api.acp.auto-profile = "false"
		api.alsa.card = "0"
		api.alsa.card.longname = "HDA Intel MID at 0xd7420000 irq 33"
		api.alsa.card.name = "HDA Intel MID"
		api.alsa.path = "hw:0"
		api.alsa.use-acp = "true"
		api.dbus.ReserveDevice1 = "Audio0"
		device.api = "alsa"
		device.bus = "pci"
		device.bus_path = "pci-0000:00:1b.0"
		device.description = "Built-in Audio"
		device.enum.api = "udev"
		device.form_factor = "internal"
		device.icon_name = "audio-card-analog-pci"
		device.name = "alsa_card.pci-0000_00_1b.0"
		device.nick = "HDA Intel MID"
		device.plugged.usec = "10470369"
		device.product.id = "0x3b56"
		device.product.name = "5 Series/3400 Series Chipset High Definition Audio"
		device.subsystem = "sound"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.vendor.id = "0x8086"
		device.vendor.name = "Intel Corporation"
		media.class = "Audio/Device"
		factory.id = "14"
		client.id = "35"
		object.id = "43"
		object.serial = "1829"
		object.path = "alsa:pcm:0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel MID"
		alsa.long_card_name = "HDA Intel MID at 0xd7420000 irq 33"
		alsa.driver_name = "snd_hda_intel"
		device.string = "0"
	Profiles:
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6565, available: yes)
		output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6500, available: yes)
		output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 1265, available: no)
		output:analog-surround-40: Analog Surround 4.0 Output (sinks: 1, sources: 0, priority: 1200, available: no)
		input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 65, available: yes)
		pro-audio: Pro Audio (sinks: 1, sources: 2, priority: 1, available: yes)
	Active Profile: output:analog-stereo+input:analog-stereo
	Ports:
		analog-input-internal-mic: Internal Microphone (type: Mic, priority: 8900, latency offset: 0 usec, availability group: Legacy 1, availability unknown)
			Properties:
				port.type = "mic"
				port.availability-group = "Legacy 1"
				device.icon_name = "audio-input-microphone"
				card.profile.port = "0"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo
		analog-input-mic: Microphone (type: Mic, priority: 8700, latency offset: 0 usec, availability group: Legacy 2, not available)
			Properties:
				port.type = "mic"
				port.availability-group = "Legacy 2"
				device.icon_name = "audio-input-microphone"
				card.profile.port = "1"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo
		analog-input-linein: Line In (type: Line, priority: 8100, latency offset: 0 usec, availability group: Legacy 3, not available)
			Properties:
				port.type = "line"
				port.availability-group = "Legacy 3"
				card.profile.port = "2"
			Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40+input:analog-stereo
		analog-output-speaker: Speakers (type: Speaker, priority: 10000, latency offset: 0 usec, availability group: Legacy 4, not available)
			Properties:
				port.type = "speaker"
				port.availability-group = "Legacy 4"
				device.icon_name = "audio-speakers"
				card.profile.port = "3"
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo, output:analog-surround-40, output:analog-surround-40+input:analog-stereo
		analog-output-headphones: Headphones (type: Headphones, priority: 9900, latency offset: 0 usec, availability group: Legacy 5, available)
			Properties:
				port.type = "headphones"
				port.availability-group = "Legacy 5"
				device.icon_name = "audio-headphones"
				card.profile.port = "4"
			Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo

I don’t use Pipewire so I don’t know much about it, but when I’m looking for answers I find the Arch documentation very useful, since Manjaro is based on Arch. This link explains Pipewire & you may find Section 5 Troubleshooting useful: https://wiki.archlinux.org/title/PipeWire

Thanks. The solution was:

PipeWire - Audio problems after standby

If the sound is missing or otherwise garbled after waking the machine up from sleep, it might help to reinitialize ALSA:

# alsactl init
1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.