Audio Hardware Details on Ubuntu 24.04: Display Your Sound Card Info Using Terminal Commands

If you’re managing Ubuntu systems, understanding your sound card setup is pretty important. It helps you make sure the hardware plays nicely with the system and that the right drivers are doing their job.

Luckily, you can get all the essential details about your audio devices and drivers in Ubuntu 24.04 using just a few straightforward terminal commands.

In this guide, I’ll walk you through some handy techniques I use to figure out which sound cards are installed, check driver versions, see what they can do, and more. We’re focusing purely on gathering info here, not troubleshooting specific sound problems. Armed with this knowledge, you can confidently confirm that your systems meet the necessary audio requirements before you roll them out.

Read: Display Your Graphics Card Details on Ubuntu 24.04: A Terminal Command Guide

Getting Started: Understanding Ubuntu 24.04 Audio Basics

On any Linux system like Ubuntu 24.04, sound output relies on a few key components working together:

  • The Sound Card: This is the actual physical hardware that handles audio. It might be built into your motherboard (integrated audio) or be a separate card plugged into a PCIe slot. Common chipsets you might see are from Realtek (like ALC series), Intel (HD Audio), Nvidia, or AMD.
  • The Sound Driver: This is the software layer that lets Ubuntu talk to the sound card hardware. The main players are:
    • ALSA (Advanced Linux Sound Architecture): This is the fundamental sound driver system built right into the Linux kernel. It provides the core audio capabilities.
    • PulseAudio (or PipeWire in newer setups): This acts as a sound server, sitting on top of ALSA. It manages audio streams from different applications, directs them to the correct outputs (speakers, headphones), and adds cool features like volume control per application or network audio streaming.
  • Your Applications: Things like music players, web browsers playing videos, video conferencing apps, or games all rely on the drivers and the sound card to produce sound through your speakers, headphones, HDMI monitors, etc.

So, before deploying or heavily using a system, it’s smart for Ubuntu admins to check a few things:

  • Is the detected sound card model the one you expect, and does it support the features you need?
  • Is the correct kernel driver loaded and active for that specific hardware?
  • Are volume levels and audio routing configured correctly (though we’re mainly focusing on identifying hardware/drivers here)?

Let’s dive into how you can find this crucial sound card and driver information using the terminal.

Read: Troubleshooting and Resolving Audio Issues in Ubuntu 24.04

Finding Your Sound Card via the Terminal

To quickly list the sound cards recognized by the ALSA system in your Ubuntu machine, open your terminal and type this command:

cat /proc/asound/cards

This command reads a special system file that lists the detected audio cards and gives you a brief description of each.

If you just want a quick count of how many sound cards the system sees, you can use:

ls -ld /proc/asound/card*

The number of `cardX` entries listed corresponds to the number of detected sound devices.

Read: How to display Graphics card information on Ubuntu 22.04

Getting Sound Card Manufacturer and Driver Details

To dig a bit deeper and find out the manufacturer of your sound card and the kernel driver it’s currently using, the `lspci` command is your friend. Try this:

lspci -v | grep -i audio

This command lists PCI devices (`lspci`), shows verbose output (`-v`), and then filters (`grep`) for lines containing “audio” (case-insensitive `-i`). You’ll often see the manufacturer, device name, and sometimes the driver mentioned here.

For even more context, including surrounding lines which might contain driver information, you can use the `-A` flag with `grep` to show lines *after* the match:

lspci -v | grep -A7 -i “audio”

Here, `-A7` tells `grep` to show the matching line plus the next 7 lines, which usually includes details like the “Kernel driver in use”.

Read: How to use grep command in Linux

Alternatively, if you prefer a more interactive, visual tool (though still in the terminal), you can use `alsamixer`:

alsamixer

Running this command opens up a text-based interface:

At the top of the `alsamixer` screen, you’ll usually see the Card name and Chipset information, which helps identify your hardware. You can press F6 to select different sound cards if you have more than one. Press Esc to exit.

Read: How to manage sounds using PulseAudio on Ubuntu

Checking Your ALSA Version

As ALSA is the core foundation for sound in Linux, knowing its version can sometimes be useful. Use this simple command:

cat /proc/asound/version

Here’s what the output might look like:

Read: PipeWire on Ubuntu 22.04: A Complete Installation and Configuration Guide

More Detailed Info with lspci Options

The `lspci` command has other flags that can give you even more specific details. This combination is particularly helpful:

lspci -nnk | grep -A3 ‘Audio’

Let’s break down those options:

  • -nn: Shows the vendor and device codes as numbers (useful for precise identification).
  • -k: Shows the kernel driver currently handling the device.
  • grep -A3 ‘Audio’: Filters for lines containing ‘Audio’ and shows the next 3 lines as well, typically including the driver and module information.

Read: How to view your Linux software and hardware details using the terminal

Identifying Peripherals Connected to the Sound Card (Microphones, Speakers, etc.)

Sometimes you need to know which specific audio input (capture) and output (playback) interfaces the system recognizes. These correspond to things like your microphone jacks, speaker outputs, headphone jacks, and HDMI audio outputs.

Use the following command to list the audio devices known to the ALSA subsystem:

cat /proc/asound/devices

Read: How to use Bluetooth Headset on Ubuntu 20.04

The output above lists numbered devices and their types (playback, capture, control, etc.). For instance, in the example image, entries indicate playback devices (like speakers/headphones) and capture devices (like microphones).

Another useful command is pactl which will display the Audio devices:

pactl list cards | grep -i “audio”

This command provides a more user-friendly list of the available playback hardware devices (cards and subdevices). You can use `arecord -l` for recording devices.

Quickly Testing Audio Playback

Once you’ve identified your devices, you might want to quickly test if sound output is working without launching a full media player. The `speaker-test` utility is perfect for this:

speaker-test -c 2 -t sine -f 1000

Read: How To Install AMD GPU Drivers on Ubuntu 20.04

Here’s what those options mean:

  • -c 2: Specifies the number of channels (e.g., 2 for stereo).
  • -t sine: Sets the waveform type to a sine wave (other options include `wav`, `pink`, `noise`).
  • -f 1000: Sets the frequency of the sine tone in Hz (e.g., 1000 Hz).

You should hear a tone alternating between your left and right speakers (if using `-c 2`). Press Ctrl+C to stop the test.

To see all available options for `speaker-test`, just run:

speaker-test –help

This is a great way to validate basic audio output functionality directly from the terminal.

Read: How to Configure Network Settings in Ubuntu 22.04

How Do I Find the Kernel Module (Sound Driver) for My Sound Card?

The specific kernel module acting as the driver for your sound card usually has ‘snd’ (for sound) in its name. You can list loaded kernel modules and filter for the sound-related ones using the `lsmod` command combined with `grep`.

Try this command:

lsmod | grep snd

The output will list various modules starting with `snd_`, such as `snd_hda_intel` (a common driver for Intel High Definition Audio), `snd_usb_audio` (for USB audio devices), `snd_pcm`, `snd_timer`, etc. The main hardware-specific driver (like `snd_hda_intel`) is often the most relevant one you’re looking for here. This confirms which low-level driver is managing your audio hardware.

Frequently Asked Questions (FAQ)

Q1: How do I find my exact sound card model name in the Ubuntu 24.04 terminal?

You can use the `lspci` command. Try running lspci -v | grep -i audio or lspci -nnk | grep -A3 ‘Audio’. These commands usually display the manufacturer and specific model of your audio device(s).

Q2: What command shows the sound driver being used by my audio hardware in Ubuntu?

The command lspci -nnk | grep -A3 ‘Audio’ is very effective. Look for the line starting with “Kernel driver in use:”. Alternatively, lsmod | grep snd lists all loaded sound-related kernel modules, which includes the drivers.

Q3: Can I test if my speakers are working from the Ubuntu 24.04 terminal without playing music?

Yes, you can use the `speaker-test` utility. A simple command like speaker-test -c 2 -t sine -f 1000 will generate a test tone for stereo output (2 channels). Press Ctrl+C to stop it.

Q4: How to list all audio input and output devices connected to Ubuntu 24.04?

To see a list of playback (output) devices, use pactl list cards | grep -i “audio”. For recording (input) devices, use arecord -l. For a more raw list of all ALSA devices, you can use cat /proc/asound/devices.

Q5: Where can I find the ALSA version installed on my Ubuntu 24.04 system?

You can easily check the ALSA version by running the command: cat /proc/asound/version in your terminal.


If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.

 

Marianne elanotta

Marianne is a graduate in communication technologies and enjoys sharing the latest technological advances across various fields. Her programming skills include Java OO and Javascript, and she prefers working on open-source operating systems. In her free time, she enjoys playing chess and computer games with her two children.

Leave a Reply