The headphones are plugged in, but the speakers keep playing
You plug your headphones into the jack. The speakers continue blasting music at full volume. You click the sound icon in the system tray. The dropdown still lists "Speakers" as the active output. You unplug the headphones and plug them back in. Nothing changes. You have to reboot just to hear audio through the headphones again.
This is a routing failure in the PipeWire session. The hardware detected the plug, but the session manager did not update the audio graph. The kernel sent the event, but WirePlumber missed it or applied the wrong profile. The audio stream remains bound to the speaker sink because the policy engine never issued a switch command.
What is actually happening
Fedora uses PipeWire as the audio server and WirePlumber as the session manager. PipeWire handles the low-level stream processing and hardware access. WirePlumber watches the hardware state and applies routing rules. These two components work together to manage audio output.
When you insert a plug, the kernel generates a uevent. The udev daemon forwards this event to WirePlumber. WirePlumber reads the new device state and updates the profile for the audio card. It then instructs PipeWire to switch the active sink from the speakers to the headphones. PipeWire moves the running streams to the new sink.
If WirePlumber crashes, hangs, or fails to receive the uevent, the profile never updates. PipeWire keeps the streams attached to the last known sink. The system believes the speakers are still the active output. This often happens after a suspend/resume cycle, a kernel update, or when a third-party application locks the audio device.
The pipewire-pulse service provides a PulseAudio compatibility layer. Applications that use PulseAudio APIs talk to pipewire-pulse, which translates the requests for PipeWire. If pipewire-pulse loses sync with the core PipeWire daemon, the volume controls and device lists can become stale. Restarting the user services forces all three components to re-synchronize.
Audio services run as user units, not system units. The --user flag is mandatory for these commands. Running sudo systemctl restart pipewire does nothing for your desktop audio. The system service manages the socket activation, but the actual audio graph lives in your user session.
Restart the user services before rebooting. A reboot hides the bug and wastes time.
How to fix the routing
Force the session manager to re-scan the hardware state and reload the audio graph. This clears stale device profiles and resets the PulseAudio compatibility layer.
Here is how to restart the audio stack without losing your current session.
systemctl --user restart wireplumber pipewire-pulse pipewire
# WHY: Restart WirePlumber first to clear stale device profiles and policy state.
# WHY: Restart pipewire-pulse next to reset the PulseAudio compatibility layer.
# WHY: Restart pipewire last to reload the core audio graph with fresh device data.
The order matters. WirePlumber manages the profiles. PipeWire consumes the profiles. If you restart PipeWire before WirePlumber, PipeWire might reload with the old profile data. Restarting WirePlumber first ensures the policy engine has the latest hardware state before the audio server applies it.
After the restart, check if the system recognizes the headphone jack as a distinct output device. The pactl command queries the PulseAudio compatibility layer and returns the current sink list.
Here is how to verify that the headphone sink exists and is not muted.
pactl list sinks short
# WHY: Lists all audio sinks with their index, name, driver, and current state.
# WHY: Look for a sink with 'state: RUNNING' that mentions 'Headphone' or 'Headset'.
# WHY: If the headphone sink is missing, the kernel did not report the jack state correctly.
If the headphone sink appears but audio still plays through the speakers, the active profile might be wrong. Some hardware requires an explicit profile switch to enable the headphone amplifier. The pactl set-sink-profile command forces the driver to load a specific configuration.
Here is how to force the audio driver to load the headphone profile.
pactl set-sink-profile alsa_output.pci-0000_00_1f.3.analog-stereo output:analog-stereo+input:analog-stereo
# WHY: Explicitly sets the profile to support both playback and recording on analog jacks.
# WHY: Replace the sink name with the actual name from the pactl list output.
# WHY: This command works when automatic profile detection fails due to ambiguous hardware IDs.
Use the sink name from the pactl list sinks short output. The name usually starts with alsa_output. followed by the PCI or USB identifier. If you are unsure of the available profiles, run pactl list sinks and look for the Available profiles section in the verbose output.
Run journalctl -xeu wireplumber if the restart fails. The journal shows whether WirePlumber crashed or encountered a configuration error. Read the last ten lines for the actual cause.
Check the journal before guessing. The error message tells you exactly which component failed.
Verify the fix
Confirm that the audio stream is now bound to the headphone sink. The pactl list short sink-inputs command shows which applications are sending audio to which sink index.
Here is how to check that your music player or browser is routing to the correct device.
pactl list short sink-inputs
# WHY: Shows the sink-input index, sink index, application name, and volume.
# WHY: The sink index should match the headphone sink index from the previous step.
# WHY: If the index matches the speaker sink, the application has not moved yet.
Some applications cache the sink index. If the index in sink-inputs still points to the speakers, restart the application. The application will re-query the default sink and bind to the headphones.
Play a test sound and check the volume meters in pavucontrol. The Output Devices tab shows real-time activity for each sink. If the meters move on the headphone sink, the routing is correct.
Trust the sink index. The GUI can lie; the pactl output tells the truth.
Common pitfalls and error patterns
The audio fails to switch for several reasons beyond a stale session. Understanding these patterns saves time when the restart does not help.
Muted channels in the Configuration tab
The pavucontrol Configuration tab controls the hardware profiles. If the profile is set to "Off" or "Analog Stereo Duplex" when the hardware only supports "Analog Stereo Output", the jack detection breaks. Some laptops have a combo jack that shares the pins for headphones and microphone. The profile must match the hardware capability. Open pavucontrol, go to the Configuration tab, and select the profile that mentions "Headphones" or "Headset". Avoid "Pro Audio" profiles unless you are using a professional interface.
HDMI audio stealing focus
If you connect a monitor via HDMI or DisplayPort, the system may switch the default output to the monitor speakers. This happens even if the monitor has no speakers. The kernel reports the HDMI audio device as available, and WirePlumber may prefer it over the analog jack. Check the Output Devices tab in pavucontrol. Set the HDMI device to "Mute" or lower its priority in the settings. You can also disable the HDMI audio in the kernel module parameters if the monitor never provides audio.
Kernel module model mismatch
Some laptops have ambiguous hardware IDs. The snd_hda_intel kernel module loads a generic model that does not distinguish between the headphone jack and the line-out jack. This results in the audio staying on the speakers because the driver believes the speakers are the only valid output path. You can force the driver to probe the hardware with a specific model option.
Here is how to set the kernel module model to auto-detect the correct codec.
# /etc/modprobe.d/alsa-base.conf
options snd-hda-intel model=auto
# WHY: Forces the driver to probe the hardware for the correct codec model.
# WHY: Use 'auto' to let the driver try multiple configurations on boot.
# WHY: Create this file if it does not exist. The modprobe.d directory reads config on module load.
After editing the file, reboot the system. The kernel module reloads with the new option. If model=auto does not work, check the ALSA project wiki for your specific laptop model. Some hardware requires model=generic or a vendor-specific string.
Error: No such sink
The pactl set-sink-profile command fails with Error: No such sink if you typed the sink name incorrectly. The sink name is case-sensitive and includes the full device path. Copy the name directly from the pactl list sinks short output. Do not guess the name.
Profile not available
The command fails with Error: Profile output:analog-stereo is not available if the hardware does not support that mode. Run pactl list sinks and check the Available profiles section. Use one of the listed profiles. Forcing an unavailable profile causes the driver to reject the command.
Edit the kernel parameters only after you have exhausted user-space fixes. A bad modprobe line can silence all audio on boot.
When to use this approach
Choose the right tool based on the symptom and the scope of the problem.
Use systemctl --user restart when the device detection is stale and you need an immediate fix without losing your session.
Use pavucontrol when you need to manually route streams or unmute specific channels that the default mixer hides.
Use modprobe.d configuration when the kernel reports the wrong hardware model and no profile works correctly.
Reboot only when the kernel module itself is locked up and user-space restarts have no effect.
Snapshot the system before editing kernel parameters. A wrong model option can break audio for all users.