Public bug reported:

== Summary ==
On a Lenovo ThinkPad T14 Gen 7 (Panther Lake + Realtek ALC257, SOF driver),
plugging or unplugging headphones does not switch the audio output between the
internal Speaker and the Headphones. The "Headphones" and "Speaker" ALSA card
profiles are exposed as two separate profiles that are BOTH always reported as
"available = yes", so the session manager never switches between them.

== Environment ==
- Machine: Lenovo ThinkPad T14 Gen 7 (LENOVO 21WN00ARCD)
- Audio controller: 8086:e328 (Panther Lake SST), codec Realtek ALC257
- OS: Ubuntu 26.04 (resolute), kernel 7.0.0-29-generic
- PipeWire 1.6.2, WirePlumber 0.5.13
- SOF firmware 2.14.1.1, topology sof-hda-generic-2ch.tplg

== Steps to reproduce ==
1. Boot with no headphones connected (output is Speaker).
2. Plug in headphones.
3. Check sinks: wpctl status
4. Unplug the headphones and check again.

== Expected behavior ==
Plugging headphones switches the default output to Headphones (and unplugging
switches it back to Speaker).

== Actual behavior ==
The output stays on the original profile. No Headphones sink is created when
the headphones are plugged, and no Speaker sink is created when they are
unplugged. The profile only changes if it is set manually with
"wpctl set-profile".

== Root cause analysis ==

With PipeWire's split-node model, the internal Speaker and the Headphone jack
share the same analog PCM (hw:0), so the ACP exposes them as two separate
card profiles:

  index 1: "HiFi (HDMI1, HDMI2, HDMI3, Headphones, Mic1, Mic2)"  priority 10300
  index 2: "HiFi (HDMI1, HDMI2, HDMI3, Mic1, Mic2, Speaker)"     priority 10200

Both profiles are ALWAYS reported as available = yes, regardless of the jack
state (verified with "pw-cli e <id> EnumProfile" with the headphones both
plugged and unplugged). Only the ROUTE availability follows the jack:

  "[Out] Headphones" route: yes when plugged, no when unplugged
  "[Out] Speaker" route:    always "unknown" (phantom jack)

Two problems combine here:

1. Profile availability does not follow the route availability, so the profile
   selection logic (find-best-profile) can never tell them apart.

2. WirePlumber's device/select-profile.lua only re-selects the profile on
   "device-added" or "EnumProfile" param changes. A jack event only emits an
   "EnumRoute" param change, so the profile is never re-evaluated anyway.

== Workaround ==
A local WirePlumber script was added that reacts to "EnumRoute" changes and
directly selects the profile matching the "[Out] Headphones" route
availability. This works around both problems, but it should not be necessary.

== Additional info ==
This is on very new hardware (Panther Lake). The same machine also has a
separate headset-microphone detection issue tracked in bug #2164629.

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: wireplumber 0.5.13-1ubuntu1
ProcVersionSignature: Ubuntu 7.0.0-29.29-generic 7.0.12
Uname: Linux 7.0.0-29-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Fri Aug 21 13:51:51 2026
InstallationDate: Installed on 2026-07-15 (37 days ago)
InstallationMedia: Ubuntu 26.04 "Resolute Raccoon" - Release amd64 (20260423.1)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: wireplumber
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: wireplumber (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2164715

Title:
  [split-node] Headphones/Speaker output never auto-switches on
  headphone jack events

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/wireplumber/+bug/2164715/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to