How to Switch Between Audio Output Devices on Fedora

Switch audio output devices on Fedora by listing sinks with pactl and setting the default sink.

You plug in a USB headset and the desktop audio stays on the laptop speakers

You connect a Bluetooth speaker, an HDMI monitor, or a USB microphone, but your music player keeps routing sound to the built-in speakers. The system settings panel shows the new device, but clicking it does nothing. The volume slider resets. Applications refuse to migrate. You need a reliable way to force the audio server to recognize the new hardware and redirect active streams without closing every program.

What's actually happening

Modern Fedora ships with PipeWire as the default audio and video server. PipeWire runs a compatibility layer called pipewire-pulse that speaks the PulseAudio protocol. Applications do not talk to your sound card directly. They open a connection to the audio server and request a sink. The server maintains a routing table that maps virtual sinks to physical hardware. When you switch devices, you are changing the default sink in that table.

Existing applications often keep their old routing until they are restarted or explicitly told to migrate. The terminal bypasses the desktop environment and talks directly to the audio server. You can list available sinks, change the default, and force active streams to move to the new device.

Run journalctl -xeu pipewire-pulse if the server is crashing or refusing connections. The x flag adds explanatory text and the e flag jumps to the end. Most routing failures show up as a one-line summary before the stack trace. Read that line before editing configuration files.

The fix

Here's how to list every available audio output and identify the exact identifier you need to use.

pactl list short sinks
# Lists all registered sinks with their index, name, and driver
# The second column is the sink name you will use for routing
# Filter out virtual null sinks if you only want physical hardware

The output looks like a table. The second column contains the sink name. It usually follows the pattern alsa_output.pci-0000_00_1f.3.analog-stereo or bluez_sink.00_1A_2B_3C_4D_5E.a2dp_sink. Copy the exact string. Do not guess the name. The audio server rejects partial matches.

Here's how to set that sink as the system default and migrate active streams.

pactl set-default-sink alsa_output.pci-0000_00_1f.3.analog-stereo
# Tells the audio server to route new applications to this sink
# Existing streams will not move automatically
# Run the next command to force active applications to switch
pactl move-sink-input @DEFAULT_SINK_INPUT@ alsa_output.pci-0000_00_1f.3.analog-stereo
# Moves the currently active input stream to the new sink
# Repeat for each active application if multiple streams are playing

If you are running a recent Fedora release, you can use the native PipeWire client instead of the PulseAudio compatibility wrapper. The commands are shorter and the output is easier to read.

wpctl status
# Shows the active PipeWire graph with sinks and sources
# Look for the [V] marker next to the default sink
# The name in parentheses is what you will pass to the next command
wpctl set-default alsa_output.pci-0000_00_1f.3.analog-stereo
# Updates the PipeWire default sink immediately
# No stream migration command is required

PipeWire handles stream migration automatically when you change the default. PulseAudio requires the explicit move-sink-input command. Both approaches work on Fedora. Choose the tool that matches your workflow.

Edit ~/.config/pipewire/pipewire.conf.d/ if you need the change to survive a reboot. Never edit files in /usr/lib/pipewire/. Package updates overwrite system directories. User configuration directories are preserved across upgrades.

Verify it worked

Here's how to confirm the audio server accepted your change and is routing sound correctly.

pactl info | grep "Default Sink"
# Prints the currently active default sink name
# The output must match the sink you just set
# If it shows a different name, the command failed silently

Play a test tone to verify the hardware is actually receiving the signal.

speaker-test -t wav -c 2
# Sends a stereo WAV test tone to the default sink
# Press Ctrl+C to stop the test
# You should hear the tone from the newly selected device

If the tone plays from the wrong speaker, check your physical connections and Bluetooth pairing status. The audio server cannot route to hardware that the kernel does not recognize. Run dmesg | grep -i audio to verify the kernel detected the device.

Reboot before you debug. Half the time the symptom is gone.

Common pitfalls and what the error looks like

Bluetooth audio profiles are the most frequent source of confusion. A Bluetooth headset supports two profiles. A2DP provides high-quality stereo playback. HSP/HFP provides lower-quality audio with microphone support. The audio server switches profiles automatically when an application requests microphone access. This switch drops the A2DP connection and falls back to the laptop speakers.

The terminal will print a refusal when you try to set a suspended sink as the default.

Error: Sink not available

This message means the hardware is powered down or the Bluetooth device is not in active use. Wake the device by playing a short audio file or toggling the Bluetooth connection in the system settings. Then run the set-default-sink command again.

HDMI audio disappears when the monitor enters sleep mode. The kernel removes the ALSA device node when the display link drops. When you wake the monitor, the kernel recreates the node with a different index. The audio server still points to the old index. You must run the list and set commands again after the monitor wakes.

SELinux denials occasionally block PipeWire from accessing USB audio devices. The denial shows up in the journal with a one-line summary.

type=AVC msg=audit(...): avc:  denied  { write } for  pid=... comm="pipewire" name="usb" dev="tmpfs" ino=... scontext=system_u:system_r:pipewire_t:s0 tcontext=system_u:object_r:usb_device_t:s0 tclass=chr_file permissive=0

Read the setroubleshoot summary before disabling SELinux. Most USB audio issues are resolved by reloading the udev rules or restarting the user PipeWire service. Run systemctl --user restart pipewire pipewire-pulse. The --user flag targets your session service instead of the system-wide daemon.

Trust the package manager. Manual file edits drift, snapshots stay.

When to use this vs alternatives

Use pactl when you need maximum compatibility across older Fedora releases and third-party desktop environments. Use wpctl when you are on Fedora 36 or newer and want native PipeWire output with automatic stream migration. Use the desktop sound settings panel when you only need to change the default sink once and do not want to open a terminal. Use pavucontrol when you need per-application routing or want to adjust channel balances without touching configuration files. Stay on the terminal when you are scripting hardware switching or managing a headless server with USB audio capture cards.

Where to go next