MY WEBCAM TEST GUIDE

How to Change the PipeWire Sample Rate

Step-by-step instructions for changing the PipeWire sample rate, checking the active rate, and fixing common configuration problems on Linux.

Before you start

You can change the PipeWire sample rate locally without stopping the sound server or switching to another audio system. The setting affects devices and applications that accept the rate requested by PipeWire. A microphone, USB audio interface, webcam audio input, or Bluetooth headset may still report its own supported rates, so the value you configure is a request rather than a guarantee for every device.

Check which PipeWire version is installed before editing configuration files. Version 0.3 uses pipewire.conf and pipewire-pulse.conf, while newer releases also read settings from configuration drop-in files. The exact directory names can differ between distributions, but the file contents described here remain broadly compatible.

Step-by-step instructions

The most direct method is to set the default clock rate in a PipeWire configuration file that loads before your audio devices are created. Back up the original file first so you can restore it if an application stops producing sound.

Copy the configuration file

For a user-specific setting, copy the system configuration into your local PipeWire configuration directory. A common approach is to copy pipewire.conf, but the file you need depends on your distribution. The configuration should contain a context.properties section where default.clock.rate can be placed.

Set default.clock.rate

Open the copied file in a text editor and locate the context.properties section. Add or change the rate to a value supported by your audio hardware, such as 44100 or 48000. If the property is already present, replace its value instead of adding a duplicate line.

context.properties = {
    default.clock.rate = 48000
}

Keep the formatting of the surrounding file intact. A missing brace or comma can prevent PipeWire from loading the configuration.

Restart the PipeWire user services

Restart the user-level PipeWire services so the new configuration is read. Because this is a local audio setting, you do not need to restart the whole system. Stop and start pipewire, pipewire-pulse, and wireplumber in the correct order for your setup, or log out and back in if your desktop starts these services automatically.

Check the output

Use PipeWire's inspection tools to confirm the rate that the server is currently using. The command for this varies by installed package set; pipewire-pulse may be queried directly on some systems. Look for the server sample rate or default clock rate in the output rather than relying on an application's own settings.

If you changed the rate for a microphone or webcam audio path, open the application you normally use for calls or recording and confirm that it starts without an error. A successful start does not prove the device accepted the exact rate, but a failure or repeated fallback usually indicates a mismatch between the requested rate and the hardware range.

Common problems and next steps

If PipeWire falls back to a different sample rate, the chosen value is probably outside the range reported by the audio device. Set the rate to one listed by the device driver, or use the nearest rate that your microphone, interface, or Bluetooth codec supports. This is more common with Bluetooth audio because codec selection can limit the available rates.

Multiple configuration files can create conflicting settings. If the change has no effect, check the load order and look for another file that sets default.clock.rate later. A distribution may also package a tool for overriding PipeWire settings; when available, use that tool instead of hand-editing files.

After a failed edit, restore the backup copy and restart the user services. Keep both the restored file and the attempted file available so you can compare differences if the problem persists.