Better Sound Quality in Ubuntu
In ubuntu you can set your audio sample rate and bitrate settings by modifying your pipewire.conf file. In this tutorial I'll show you howOpen a terminal, navigate to /usr/share/pipewire, we're looking for the pipewire.conf file.
Backup your pipewire.conf file in case you mess up your audio, you can recover the state
Backup your pipewire.conf file in case you mess up your audio, you can recover the state
cd /usr/share/pipewire sudo cp pipewire.conf pipewire.conf.backup
Then edit the `pipewire.conf` file as root. You need to set the following properties uncomment this
# default.clock.rate = 44100
change it to
default.clock.rate = 96000
My best guess of what to change for bitrate is to uncomment this:
#link.max-buffers = 16 # version < 3 clients can't handle more
And change it to
link.max-buffers = 24 # version < 3 clients can't handle more
Then reboot. You should see your changes take effect, and if you run pactl info you should see 96000Hz as the sample specification.
$ pactl info Server String: /run/user/1000/pulse/native Library Protocol Version: 35 Server Protocol Version: 35 Is Local: yes Client Index: 199 Tile Size: 65472 User Name: seb Host Name: golem Server Name: PulseAudio (on PipeWire 1.0.5) Server Version: 15.0.0 Default Sample Specification: float32le 2ch 96000Hz Default Channel Map: front-left,front-right Default Sink: alsa_output.usb-AudioQuest_inc._AudioQuest_DragonFly-00.analog-stereo Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo Cookie: b039:4497
That's it! you should have it set a higher sample rate if your hardware + software can support it! Other thoughts on audio in ubuntu Honestly, the GUI in ubuntu seems to be lacking. This should be OS functionality. I looked into the pavucontrol package, but that just gave me a GUI for devices and mastering levels. Background for this was I got my hands on a audioquest dragonfly external dac, thinking it would improve audio recordings on the garbled lenovo DAC. The audioquest does not record, it is only an audio output. Nevertheless, I wanted to max out the audioquest's supported 96000Hz 24bit audio, and then as you can see in the image, the LED turns from blue to red on Ubuntu same as when I had it configured that way on windows!
Here's how I tested it on windows 7:
The windows Speaker properties editor hasnt changed much, but it does get the job done here. The dragonfly changes LED color based on the set sample rate. 44100 Hz was green, 48000 Hz was blue and 96000 Hz was red. I'll share an image below. Anyways that's all, I feel like I can hear high frequency sounds more crisply on certain songs, but it's probably all in my head.

A reddit post for cross reference: https://www.reddit.com/r/pipewire/comments/10smi87/how_to_change_sampling_rate_and_bit_depth/