OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
audio-input low common DISPUTE

USB DAC stuck at 48 kHz, so everything is resampled

archendeavouroscachyosmanjaroomarchypipewiredesktoplaptop
AUDITED Audited against its sources and confirmed accurate.
AUDIT NOTE

Verified against src/daemon/pipewire.conf.in and the Arch PipeWire/Troubleshooting page. The upstream conf confirms the exact stock values the record quotes: default.clock.rate = 48000, default.clock.allowed-rates = [ 48000 ], quantum = 1024, min-quantum = 32, max-quantum = 2048. The record's step-3 substitution (rate 96000 with quantum 2048 / min 64 / max 4096) correctly doubles each to preserve real-time duration and stays under the quantum-limit of 8192. The 'moving default.clock.rate breaks quantum ratios' warning is the wiki's own reasoning, quoting upstream: "The default clock rate determines the real time duration of the min/max/default quantums. You might want to change the quantums when you change the default clock rate." The 32-rate limit is confirmed: "Since PipeWire 0.3.61 up to 32 different sample rates can be configured." The allowed-rates list, both diagnostic greps (including the baroque /proc/asound/card?/stream? pipeline), the hw_params rate check, and the tip about pinning default.clock.rate when the kernel cannot read the DAC's rates are all lifted correctly from that page. pw-metadata -n settings 0 clock.force-rate <n> / 0 to release is valid and is the right way to prove a rate without editing files. The 'graph must be idle to switch' point plus pw-top/wpctl status for finding the holder is accurate and is the part that actually resolves most reports. Drop-in precedence note (a full pipewire.conf in /etc or ~/.config shadows the packaged one) is correct.

Symptom

"My DAC's front panel always shows 48 kHz no matter what I play." 44.1 kHz CD rips and 96/192 kHz hi-res files are all silently resampled, and grep rate: /proc/asound/card*/pcm*p/sub*/hw_params reports rate: 48000 (48000/1) for every track. A related complaint on cheap or old cards: audio is audibly distorted or crunchy because the hardware only really does 44.1 kHz and PipeWire is forcing 48 kHz at it.

Cause

PipeWire sets a single fixed global clock rate of 48000 Hz by default and resamples every stream to it. It will happily follow a stream's native rate instead, but only for rates listed in default.clock.allowed-rates, which ships containing just [ 48000 ]. Two extra traps: setting default.clock.rate to a new fixed value (a very common piece of forum advice) just moves the problem and additionally breaks the min/max quantum ratios, because quantums are expressed in samples and are not recalculated for you. And rate switching only happens when the graph is idle, so a single background client holding a stream open (cava, EasyEffects, a muted browser tab, a Discord call) pins the rate for everything else.

Fix

**1. Find out what the hardware can actually do.**


grep -E 'Codec|Audio Output|rates' /proc/asound/card*/codec#*
# for USB DACs that report no codec info:
grep -m1 -Hn "" /proc/asound/card?/stream? | tee /dev/tty | awk -F':' '{print $1}' | xargs grep 'Rates'

**2. Allow those rates instead of pinning one.** Create ~/.config/pipewire/pipewire.conf.d/10-sample-rate.conf (or the system-wide /etc/pipewire/pipewire.conf.d/10-sample-rate.conf):


context.properties = {
    default.clock.allowed-rates = [ 44100 48000 88200 96000 176400 192000 352800 384000 ]
}

Trim that list to rates your DAC actually reports. Up to 32 rates are accepted since PipeWire 0.3.61.


systemctl --user restart pipewire pipewire-pulse wireplumber

Now PipeWire matches the stream's rate when both the allowed-rates list and the device support it, and falls back to resampling to default.clock.rate otherwise, so there is no resampling in the common case.

**3. Only if the DAC will not follow** (usually because the kernel cannot read its supported rates) pin the rate, and move the quantums with it so latency stays sane:


context.properties = {
    default.clock.rate        = 96000
    default.clock.quantum     = 2048
    default.clock.min-quantum = 64
    default.clock.max-quantum = 4096
}

The stock values are rate = 48000, quantum = 1024, min-quantum = 32, max-quantum = 2048. The ones above preserve the same real-time duration at double the rate.

**4. Test a rate without editing anything**: this bypasses the allowed-rates check entirely and is the fastest way to prove the DAC can do it:


pw-metadata -n settings 0 clock.force-rate 96000   # force
pw-metadata -n settings 0 clock.force-rate 0       # release, back to automatic

**5. If the rate still never changes**, something is holding the graph. Find it and close it:


pw-top          # lists every running node and its rate
wpctl status    # look for unexpected RUNNING streams

Cava, EasyEffects, an open browser tab and an idle Discord are the usual culprits. Also check you do not have a stale default.clock.rate from older advice in /etc/pipewire/pipewire.conf, ~/.config/pipewire/pipewire.conf, or any other drop-in. A file in a higher-precedence directory shadows the packaged one entirely.

Verify

Play a 44.1 kHz track, then while it is playing:


grep rate: /proc/asound/card?/pcm??/sub?/hw_params

It should read rate: 44100 (44100/1) (pcm0p = playback, pcm0c = capture). Play a 96 kHz file and confirm it changes to 96000. pw-top shows the same rate per node, and the DAC's own display should follow.

Sources

pipewire-sample-rate-stuck-48khz-resampling