Better Sound Quality in Debian 12

Debian 12 “bookworm” comes with a new and improved sound server called PipeWire. It brings noticable sound quality and latency improvements over PulseAudio. Here is an article describing the differences in detail.

Although PipeWire is a huge improvement, under the hood the new sound server still relies upon ALSA which is a kernel-level API for handling sound in Linux. Out of the box, ALSA defaults to a sample rate of only 48000Hz. Most people won’t notice, but for users who really care about sound quality, this is not acceptable. The majority of modern sound hardware (DACs in particular) are capable of much more.

Here are the steps to take if you want to fix this and improve your Linux sound quality experience.

First, we need to determine your sound card’s capabilities. This is how you list all of your audio devices on your computer:

$ aplay -l
...
card 1: Audio [VIA USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
...

If this is your sound card, you would be using card 1, device/stream 0. Use the following commands to determine all supported sample rates:

$ cat /proc/asound/card1/stream0
...
  Interface 1
    Altset 1
    Format: S24_LE
    Channels: 2
    Endpoint: 0x05 (5 OUT) (ASYNC)
    Rates: 44100, 48000, 88200, 96000
    Data packet interval: 125 us
    Bits: 24
   ...

So our sound card supports a maximum sample rate of 24-bit, 96000Hz, (LE) Little Endian. What we want to do now is edit the ALSA config file to tell it to use this sample rate. We will also tell it to use a higher quality rate converter when playing sounds that are less than 96kHz. Open the file for editing:

$ sudo nano /etc/asound.conf

So for our example, we are card 1, device 0, S24_LE, and 96000. So you will want to add the following to your /etc/asound.conf file, changing the values to suit your sound card:

pcm.device{
        format S24_LE
        rate 96000
        type hw
        card 1
        device 0
        rate_converter "samplerate_best"
}

Save the file. It should take effect once you restart. You can confirm the changes using the following command:

$ pactl info

How To Edit MATE Desktop Main Menu

I love the MATE desktop environment and I use it every day. It is a continuation of GNOME 2. I recently found an easy way to edit the main menu. It is a package called Mozo.

This is what it looks like:

MATE Mozo Screenshot

If you have MATE on a debian-based distro, you can install it using this command:

$ sudo apt install mozo

Install Chromium on Debian – The Right Way

Google Chromium Logo

The Google Chromium browser is an open-source web browser that is a good alternative to Google Chrome and Mozilla Firefox. Firefox is usually included in Debian by default. Some people say that Chromium is faster than Firefox. I like to use both depending on what I’m doing.

Let’s go ahead and install Chromium using the apt-get package manager built into Debian. Installing Chromium using the package manager means that it will automatically be updated when you update the packages on your system. This should also work with Ubuntu and other Debian-based distributions.

Add the Google Chrome Repository on Debian

Open a Terminal window and type the following to open the package manager sources file as root.

$ sudo nano /etc/apt/sources.list

Copy the following line to the end of the sources.list file.

$ deb http://dl.google.com/linux/chrome/deb/ stable main

Save and close the sources.list file. Now let’s download Google’s signing key and use apt-key to add it to the keyring so the package manager can verify the integrity of Google Chrome package.

$ wget https://dl-ssl.google.com/linux/linux_signing_key.pub

$ sudo apt-key add linux_signing_key.pub

Now let’s update the local package index and install the stable version of Google Chromium.

$ sudo apt update

$ sudo apt install chromium chromium-l10n

Now you’re finished! Google Chromium should be installed.