Can't select wired headphone as output device in KDE audio panel

The output of 3.5mm jack of my laptop can’t be selected:

While it detects all the sound devices:

Every application would use the “selected” AD104 as default output device, so I could hear nothing from my headphone.

But, after using pavucontrol to set the output device for the specific application, I could hear the sound from it. eg : Firefox or any music player:

This is a issue that I endured from the day I use manjaro / Linux, I thought It’s some driver issue. I’m using the built-in speaker or jack in the external monitor all the way until I notice the noise from that jack recently.

Why KDE thinks my jack is unplugged while it’s plugged? (Maybe I should post this into forum of KDE)

How to set the default output device of the system in console?

Any way to solve this issue? I searched lots of places, but no answer found.

Audio hardware information

Audio:
Device-1: Intel Raptor Lake High Definition Audio vendor: AIstone Global
driver: snd_hda_intel v: kernel alternate: snd_soc_avs,snd_sof_pci_intel_tgl
bus-ID: 00:1f.3 chip-ID: 8086:7a50 class-ID: 0403
Device-2: NVIDIA AD104 High Definition Audio vendor: AIstone Global
driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:22bc class-ID: 0403
API: ALSA v: k6.12.4-1-MANJARO status: kernel-api with: aoss
type: oss-emulator tools: alsactl,alsamixer,amixer
Server-1: JACK v: 1.9.22 status: off tools: N/A
Server-2: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
tools: pactl,pw-cat,pw-cli,wpctl

My wife is using a pair of simple wired headphones with 3.5" jack.
It works out of the box. But on her device it doesn’t say anything with “analog”.

1 Like

I suggest go to pavucontrol Configuration tab and change Profile for AD104 HDMI pactl to Off
that should leave Built-In Analog Stereo output as the sole output device

Then check the output Port (for Speakers or Headphones) in Output Devices tab
If pavucontrol output port for Headphones is shown as (unplugged) similar to KDE audio controls
check ALSA mixer settings for Headphone output and Auto-Mute Mode

alsamixer -c0

or

amixer -c0
1 Like

Yes sir:

In the meantime, the KDE side:
image

pavucontrol :

amixer -c0

Simple mixer control ‘Master’,0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 72 [83%] [-11.25dB] [on]
Simple mixer control ‘Headphone’,0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 87
Mono:
Front Left: Playback 0 [0%] [-65.25dB] [off]
Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control ‘Speaker’,0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 87
Mono:
Front Left: Playback 87 [100%] [0.00dB] [on]
Front Right: Playback 87 [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 254 [100%] [-0.20dB]
Front Right: Playback 254 [100%] [-0.20dB]
Simple mixer control ‘Mic Boost’,0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 0 [0%] [0.00dB]
Front Right: 0 [0%] [0.00dB]
Simple mixer control ‘Capture’,0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 63
Front Left: Capture 63 [100%] [30.00dB] [on]
Front Right: Capture 63 [100%] [30.00dB] [on]
Simple mixer control ‘Auto-Mute Mode’,0
Capabilities: enum
Items: ‘Disabled’ ‘Enabled’
Item0: ‘Disabled’
Simple mixer control ‘Internal Mic Boost’,0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 3 [100%] [30.00dB]
Front Right: 3 [100%] [30.00dB]

ALSA mixer control for Headphone has audio level set to 0 and is muted

To increase audio level and unmute control

amixer -c0 sset 'Headphone' 80% unmute

Auto-Mute Mode (to mute speakers when headphones are plugged in) is disabled

Simple mixer control ‘Auto-Mute Mode’,0

Item0: ‘Disabled’

To enable:

amixer -c0 sset 'Auto-Mute Mode' Enabled
2 Likes

Thanks. Learned a lot.

But there are still some weirdness:

  1. Let’s start with the speakers as the default output, and I plugged my headphone:

You can see that there is no headphones port in KDE audio panel.

  1. unmute the headphone, enable auto-mute:

Still no headphones port.

  1. I selected the “Headphones unplugged” manually from system settings:

Until now, my headphone become the default output device.

Applications is playing sound on it.

The Ports options is shown in KDE panel.

  1. If I select Speakers now:

Actions in 2 got reverted, speakers is the default output, KDE panel is right while system settings is wrong.

Wanna sound on headphone? Repeat these steps :arrow_up: :skull: 1

(After some testing, looks like step 2 is optional for now)

3 incorrectly shows “Headphones (unplugged)” even though ALSA output is unmuted [OO]

I suggest install alsa-tools and use jack detection tool to check the Headphone jack socket

sudo hdajacksensetest -c 0

If the Headphone jack detection is not working, use the jack retasking tool to disable jack detection

If jack-detection is disabled, KDE audio controls and pavucontrol should no longer show Headphone output as (unplugged)

2 Likes

I think the jack detection is not working:

Pin 0x1a (Black Mic, Front side): present = No
Pin 0x21 (Black Headphone, Front side): present = No

Setting Not Present:

rebooting…

Everything works now, like you said:

Thanks!!! You are my hero :smiling_face_with_three_hearts:

(All of these reminds me that on Windows there is also a check box named “disable front panel detection” in the Realtek application, they should be similar)