3

My laptop stopped recognizing the audio device seemingly at random (probably after doing something stupid that I don't remember). The audio settings show no inputs or outputs at all.

I ran through troubleshooting on this page.

The first suggestion,inxi -SMA, returns:

System:
  Host: pop-os Kernel: 5.19.0-76051900-generic x86_64 bits: 64
    Desktop: GNOME 42.3.1 Distro: Pop!_OS 22.04 LTS
Machine:
  Type: Laptop System: LENOVO product: 20EQS2BH00 v: ThinkPad P50
    serial: <superuser required>
  Mobo: LENOVO model: 20EQS2BH00 serial: <superuser required> UEFI: LENOVO
    v: N1EET96W (1.69 ) date: 07/13/2022
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio
    driver: snd_hda_intel
  Device-2: NVIDIA GM107 High Definition Audio [GeForce 940MX]
    driver: snd_hda_intel
  Sound Server-1: ALSA v: k5.19.0-76051900-generic running: yes
  Sound Server-2: PipeWire v: 0.3.59 running: yes

EDIT: Extra steps: I ran lspci -v | grep -A6 Audio and found an output similar to the inxi command:

00:1f.3 Audio device: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller (rev 31)
    Subsystem: Lenovo 100 Series/C230 Series Chipset Family HD Audio Controller
    Flags: bus master, fast devsel, latency 64, IRQ 157
    Memory at c5840000 (64-bit, non-prefetchable) [size=16K]
    Memory at c5830000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: [50] Power Management version 3
    Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Kernel driver in use: snd_hda_intel
--
01:00.1 Audio device: NVIDIA Corporation GM107 High Definition Audio Controller [GeForce 940MX] (rev a1)
    Flags: bus master, fast devsel, latency 0, IRQ 17
    Memory at c4000000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Endpoint, MSI 00
    Kernel driver in use: snd_hda_intel

I believe the relevant device is missing as I remember it having a different name. This would indicate that the issue is not with ALSA or pipewire but with the underlying device driver?

EDIT: I found that the steps below are irrelevant as pop-os uses pipewire rather than pulseaudio.

The second suggestion, pulseaudio --start, indicates that I don't have pulseaudio (guess I found my problem), so i tried sudo apt install pulseaudio, and got the following error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 pop-desktop : Conflicts: pulseaudio
               Recommends: eog but it is not going to be installed
               Recommends: geary but it is not going to be installed
               Recommends: gnome-weather but it is not going to be installed
               Recommends: io.elementary.sideload but it is not installable
               Recommends: seahorse but it is not going to be installed
               Recommends: totem but it is not going to be installed
               Recommends: sessioninstaller but it is not going to be installed
               Conflicts: pulseaudio:i386
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I figure I have some broken dependencies, but I'm at a loss figuring out how to fix them.

4
  • Does a live version of e.g. Fedora 36 work for you? Oct 13, 2022 at 16:35
  • 1
    @ArtemS.Tashkinov I ended up figuring it out through pop-os support. Turns out that pipewire services were masked (somehow). Just had to unmask and all worked out.
    – iHnR
    Oct 20, 2022 at 9:53
  • @iHnR can you put your finding in an detailed answer ? comment are hard to read.
    – Archemar
    Oct 25, 2022 at 9:10
  • Do you have a heterogeneous laptop. NVIDIA + INTEL, AMD + INTEL etc? Nov 7, 2022 at 9:25

1 Answer 1

2

Fixing POP OS sound

You need to know if your system is using pulseaudio or pipewire.

Sound settings or packages related to the sound system can become corrupt or broken. Many times, deleting the configuration files, reinstalling the sound-related packages, and restarting the audio software can help.

1. Reset Audio Software (server)

If the system is not playing audio, first try restarting the audio daemon:

PulseAudio PipeWire
Ubuntu and Pop!_OS pre-22.04 Pop!_OS 22.04+
systemctl --user restart pulseaudio systemctl --user restart wireplumber pipewire pipewire-pulse
rm -r ~/.config/pulse rm -r ~/.config/pulse
pulseaudio -k

This set of commands first restarts the sound daemon and removes the user's configuration for PulseAudio. On systems still using PulseAudio as a server, it restarts the PulseAudio server, which will create new default audio configuration files.

2. Check the PulseAudio Controls

The program PulseAudio Volume Control is helpful in figuring out which program is producing audio, where that audio is being routed, what the default input/output devices are, and what the volume levels are set to. It can be installed using the Pop!_Shop, or with this command:

 sudo apt install pavucontrol

Once installed, open the PulseAudio Volume Control app in the Activities menu, or run pavucontrol in a terminal.

The Playback tab will show a list of applications that are currently playing audio. The volume for each application can be individually controlled. Similarly, the "Recording" tab will show a list of applications that are currently recording audio. The "Output Devices" tab shows a list of output devices and an indicator of what's being played out of each device. The green checkmark being selected indicates a device is the default output device. The "Input Devices" tab shows a similar list of input devices. Under "Configuration," each sound card should be listed.

3. Troubleshooting ALSA

PulseAudio sits on top of ALSA. If PulseAudio is not seeing any input/output devices, check what playback devices ALSA is detecting:

aplay -l

Or, check what recording devices ALSA is detecting:

arecord -l

A device may be muted in the ALSA mixer, which will override any PulseAudio volume settings. You can open the ALSA mixer with this command:

alsamixer

You can navigate between the different volume meters using the left and right arrow keys. Each meter can be adjusted using the up and down arrow keys. An "MM" at the bottom of a meter indicates that meter is muted. If the PulseAudio Volume Control shows that sound is playing, but you don't hear any sound, try unmuting all of the volume meters in alsamixer by pressing the M key while each meter is selected. If your system has more than one sound card (for example, an Intel sound card and an NVIDIA sound card in switchable-graphics systems), you can switch between them by pressing F6.

4. Check if Hardware is Detected

If ALSA doesn't list a sound card, it may not be physically detected by the system at all. If the Linux kernel sees a sound card, it will show up in your lspci output. This command will list every sound card your system detects, and show the driver being used for each one:

lspci -v | grep -A6 Audio

If the output from that command is blank, then your system isn't detecting any sound cards (which could indicate a hardware issue.)

5. Other Useful Commands

  • This command will reinstall ALSA and some of the other core audio packages:

    sudo apt install --reinstall alsa-base alsa-utils linux-sound-base libasound2
    
  • This command will reinstall the PulseAudio packages:

    sudo apt install --reinstall libpulse0 libpulsedsp pulseaudio pulseaudio-module-bluetooth pulseaudio-utils`
    
  • This command will reinstall the PipeWire packages:

    sudo apt reinstall libpipewire-0.3-0 libpipewire-0.3-common libpipewire-0.3-modules pipewire pipewire-audio-client-libraries pipewire-bin pipewire-pulse
    
  • This command will force reload the kernel sound driver modules:

    sudo alsa force-reload
    
  • This command will start PulseAudio after it's been stopped (this is not usually needed, because PulseAudio will usually restart itself when it's stopped):

    pulseaudio --start
    
  • This command will check the status of PipeWire and show any errors if automatic restarts raised any errors:

    systemctl --user status pipewire
    
  • If you would like to monitor PipeWire, run:

    pw-top
    

6. Configuration Tweaks

Some particular problems may be solved by tweaks to ALSA or PulseAudio configuration. Clearing the current settings for Pipewire or PulseAudio may allow the defaults to be used again. To revert to defaults and clear any current saved settings run the following commands:

rm -r ~/.config/pulse/*
rm -r ~/.local/state/wireplumber/*

7. Audio crackling or hardware clicking

If you hear audio crackling (especially when you start or stop playing audio), your audio card may be going to sleep too often. This is known to happen on some versions of the Serval WS and some Thunderbolt docks.

  • a. Prevent Crackling with PipeWire/WirePlumber:

    For Pop!_OS 22.04 and newer (and other distributions using PipeWire with WirePlumber), these two commands will disable this behavior and restart PipeWire:

     sudo sed -i 's/--\["session.suspend-timeout-seconds"\] = 5/\["session.suspend-timeout-seconds"\] = 0/' /usr/share/wireplumber/main.lua.d/50-alsa-config.lua
    
     systemctl restart --user pipewire.service
    

    This change can be undone using these commands:

     sudo sed -i 's/\["session.suspend-timeout-seconds"\] = 0/--\["session.suspend-timeout-seconds"\] = 5/' /usr/share/wireplumber/main.lua.d/50-alsa-config.lua
    
     systemctl restart --user pipewire.service
    
  • b. Prevent Crackling with PulseAudio

    For older versions of Pop!_OS or distributions using PulseAudio without PipeWire, these two commands will disable this behavior and restart PulseAudio:

     sudo sed -i 's/load-module module-suspend-on-idle/#load-module module-suspend-on-idle/' /etc/pulse/default.pa
    
     pulseaudio -k
    

    This change can be undone using these commands:

     sudo sed -i 's/#load-module module-suspend-on-idle/load-module module-suspend-on-idle/' /etc/pulse/default.pa
    
     pulseaudio -k
    

8. PCI/internal sound card not detected (dummy output)

With hardware that uses the snd_hda_intel kernel module, rare bugs can cause the sound card to not be detected. If you're having this issue, try running these commands to force the usage of a specific audio driver:

echo "options snd-hda-intel dmic_detect=0" | sudo tee -a /etc/modprobe.d/alsa-base.conf
echo "blacklist snd_soc_skl" | sudo tee -a /etc/modprobe.d/blacklist.conf

Reboot after making the changes. If this doesn't solve the issue, undo the changes using these commands:

sudo sed -i 's/options snd-hda-intel dmic_detect=0//' /etc/modprobe.d/alsa-base.conf
sudo sed -i 's/blacklist snd_soc_skl//' /etc/modprobe.d/blacklist.conf

Then reboot again.

9. Helpful references

I hope this helps someone.

2
  • 1
    using pavucontrol on UI, fixed the issue
    – Xiao
    Jul 10, 2023 at 13:31
  • 1
    I am glad this was of help. Cheers!! Jul 14, 2023 at 7:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .