Notice: Thank you for using this how-to. I never expected it to bring in so many people with audio issues. I want to say that this guide is gonna be deprecated soon in the future. I feel like the dmix solution is not good enough; I’ve been testing with JACK Audio Connection Kit to bring a more formidable solution, however doing long term testing takes time. Plus I’ve run into issues with the native version of Steam client… so you can guess on why I haven’t posted anything about the new solution.

You might be interested in [added 08/04/14 04:30 PM]:

An Additional Note for WINE underrun audio issue

This method has been tested in Linux Mint “petra” 16, it should work nicely
with other linux distributions.

Before you start:

This solution has worked for me. I’m still testing it, usually it’s easy
to run into any underrun problem after alt-tabbing from games several times.
I’m still testing this solution. I need more people to test it too so we can
be sure that we eliminated the problem.

What we are going to do today is fix this annoying issue. What are the
symptoms of having this problem?

  • In console: You will receive a lot of warnings saying ALSA lib pcm.c:7843:(sndpcmrecover) underrun occurred
  • The sound gets distorted, filled with static and it plays really fast.
  • Due to PulseAudio failing to recover, it will keep retrying thus using even more CPU. (It ends up hogging the CPU)

This solution was originally based on WINE And PulseAudio
solution
. Like it mentioned, using
such solution will remove a features PulseAudio provides to multiple
soundcards. I decided to look a bit further since I wanted to use the
following audio output sources: video card’s HDMI, USB Speakers, and headset.

This is the final result:

Be able to move Audio Output to other Playback Devices

Well, I’m sure you want to get started into applying the solution in your own
system. So let’s get started.

Like I said before, this has been tested in Linux Mint, this guide is using
examples that will appear in Linux Mint. You will have to adapt this
solution in whatever way your distribution has PA set up.
I edit the files
in /etc/pulse/default.pa, even if they are there it doesn’t start as a system-
wide daemon. However, there’s a high chance that your configuration is in
~/.pulse/default.pa or ~/.config/pulse/default.pa. It’s your task to
find which configuration your PA uses in your distribution community forum.**

Or you can just use:

    locate default.pa

As you have noticed I use KDE, so I’ll be using Kate text editor to open
my configuration files.

Important Notes:

  • Do not type “$”, the dollar sign in the terminal. This is used to hint the reader that I’m writing a command in the terminal.

First Step:

We are going to check how many soundcards your system detects. For this we
will do the following command

    $ cat /proc/asound/cards

This will print the following (the results won’t be the same):

    david@david-desktop:~ > cat /proc/asound/cards  
     0 [PCH            ]: HDA-Intel - HDA Intel PCH  

                          HDA Intel PCH at 0xfb400000 irq 52  

     1 [NVidia         ]: HDA-Intel - HDA NVidia  

                          HDA NVidia at 0xfb080000 irq 17  

     2 [MicroII        ]: USB-Audio - Audio Advantage MicroII  

                          C-Media INC. Audio Advantage MicroII at usb-0000:06:00.0-1, full speed  

Let’s take a look at this. We have 3 soundcards installed

* 0 is my Intel on-board audio card.
* 1 is my NVIDIA GeForce GT400 HDMI output
* 2 is my USB Audio Speakers

So what’s with the numbers? They are called deviceid in PulseAudio. This
tells PulseAudio “hey man, load this card with this unique deviceid for me,
will ya?”. So that’s what PulseAudio will do in t he following examples.

Now that we have the device id, let’s open /etc/pulse/default.pa. It’s
up to you to choose what you are going to load or not.

Back up your default.pa first

    sudo cp /etc/pulse/default.pa /etc/pulse/default.pa.bak

Then

    sudo kate /etc/pulse/default.pa

Search for module-udev-detect and module-detect,
disable them by adding a # at the start of the line. As presented in the
picture.

Here we are telling PulseAudio. “I’ll be the one deciding what to load or
not”. We are disabling the automatic detection.

Now comes the important part

Above those lines there are these ones, find module-alsa-sink and
uncomment it, like this


This is an example.

The first, and *most important line *we are going to add is

load-module module-alsa-sink device=dmix

(Optional) What is dmix?

PCM plugins extend the functionality of PCM devices allowing low-level sample
conversions and copying between channels, files and soundcard devices. The
dmix plugin provides for direct mixing of multiple streams.
Source

What we are telling PulseAudio is “don’t hog the hardware directly, use dmix
as your default device”. PulseAudio will make the first available sink as
default. (This is an assumption I made)

If you remember the cards we printed early with the IDs, add

:::text
load-module module-alsa-sink device_id=1 
load-module module-alsa-sink device_id=2 

Which is the equivalent of:

:::text
* 1 is my NVIDIA GeForce GT400 HDMI output 
* 2 is my USB Audio Speakers

What you are going to do is put the device id we printed early. Usually I
avoid using 0 because dmix is probably using it already.

(Optional Step) In the occasion that you have a headset like me plugged in your on-board card.

Add after load-module module-alsa-sink device_id=2

:::text
load-module module-alsa-source device=hw:0,0

How can I find more capture devices?

    $ arecord -l
    List of CAPTURE Hardware Devices

    card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]

      Subdevices: 1/1

      Subdevice #0: subdevice #0

    card 0: PCH [HDA Intel PCH], device 2: ALC887-VD Alt Analog [ALC887-VD Alt
    Analog]

      Subdevices: 1/1

      Subdevice #0: subdevice #0

(Optional) Use Audacity to find more capture devices:

I noticed that Audacity lists all the devices with their respective hardware
numbers, like this:

Please don’t use pulse audio settings because you haven’t configured it yet.
*Take notice of “hw:0,0” or “hw:0,2”. *You can test which one works, that’s
the main idea behind using Audacity.

*
*

Remember to replace the device of module-alsa-source with the one that worked for you.

*
*

Next Step? Save the file and restart your system.
*
*
Why restart your computer? I noticed while I was trying to figure out how pulseaudio worked that sometimes there would be a conflict in the modules. This would kill the sound completely and PulseAudio wouldn’t listen to me in the sense that no matter how many times I killed it, it wouldn’t start.

Side notes:

  • In the original solution, we saw that the user wrote a local .asoundrc file. This is unneeded as you are making dmix become the default, so exporting extra variables is not needed. You can still use that type of solution to find creative ways of using your audio cards.
  • I have moved the Audio Output source to my USB Speakers, Headset over and over and over to trigger the underrun. With the solution in place I’ve yet to run into an underrun problem
  • The other solution would be removing pulseaudio completely, but if you have multiple cards you are going to suffer in terms of changing audio output source on the fly.

Final Result

I hope this helped you. Feel free to leave a comment!

Before you comment

  • You can use Markdown in your comments, here's a guide.
  • Keep things civil.
  • That means don't do personal attacks.
  • Profanity is highly discouraged.

8 thoughts on “Fixing ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred while keeping PulseAudio in your system

    1. Hard to pin point this with not much information, but if dmix doesn’t work (it could fail if you switch between sinks and thus go underrun), next stop is JACK.

  1. Hello. I run into this problem every time I try to run any game with PlayOnLinux/wine and tried your solution. It did not work and I am not experienced enough to know whether this is something easy and obvious to fix and does not help you or it’s something common which should be included in the guide. So I’ll leave what I have here. Any help/reply is of course welcome, hope this helps in some way regardless.

    Some stuff that could help:
    $ uname -a
    Linux darknetfan-it 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
    $ cat /proc/asound/cards
    0 [Generic ]: HDA-Intel – HD-Audio Generic
    HD-Audio Generic at 0xf0c44000 irq 50
    1 [Generic_1 ]: HDA-Intel – HD-Audio Generic
    HD-Audio Generic at 0xf0c40000 irq 16
    29 [ThinkPadEC ]: ThinkPad EC – ThinkPad Console Audio Control
    ThinkPad Console Audio Control at EC reg 0x30, fw unknown

    What happened:
    Followed your guide, ignored the stuff about headsets. After reboot there’s no sound, pulseaudio is not running. Started pulseaudio from console. Seems that “load-module module-alsa-sink device=dmix” already doesn’t work.

    $ pulseaudio -v &
    I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
    I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
    I: [pulseaudio] core-util.c: Successfully gained nice level -11.
    I: [pulseaudio] main.c: This is PulseAudio 4.0
    I: [pulseaudio] main.c: Page size is 4096 bytes
    I: [pulseaudio] main.c: Machine ID is 35ba22a86585f93768bf6fbc53ebc83b.
    I: [pulseaudio] main.c: Session ID is c1.
    I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
    I: [pulseaudio] main.c: Using state directory /home/darknetfan/.config/pulse.
    I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-4.0/modules.
    I: [pulseaudio] main.c: Running in system mode: no
    I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit!
    I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 MMXEXT 3DNOW 3DNOWEXT
    I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
    I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
    I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
    I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
    I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
    I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
    I: [pulseaudio] module-device-restore.c: Successfully opened database file ‘/home/darknetfan/.config/pulse/35ba22a86585f93768bf6fbc53ebc83b-device-volumes’.
    I: [pulseaudio] module.c: Loaded “module-device-restore” (index: #0; argument: “”).
    I: [pulseaudio] module-stream-restore.c: Successfully opened database file ‘/home/darknetfan/.config/pulse/35ba22a86585f93768bf6fbc53ebc83b-stream-volumes’.
    I: [pulseaudio] module.c: Loaded “module-stream-restore” (index: #1; argument: “”).
    I: [pulseaudio] module-card-restore.c: Successfully opened database file ‘/home/darknetfan/.config/pulse/35ba22a86585f93768bf6fbc53ebc83b-card-database’.
    I: [pulseaudio] module.c: Loaded “module-card-restore” (index: #2; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-augment-properties” (index: #3; argument: “”).
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0p’ failed (-2)
    I: [pulseaudio] (alsa-lib)pcm_dmix.c: unable to open slave
    I: [pulseaudio] alsa-util.c: Error opening PCM device dmix: No such file or directory
    E: [pulseaudio] module.c: Failed to load module “module-alsa-sink” (argument: “device=dmix”): initialization failed.
    E: [pulseaudio] main.c: Module load failed.
    E: [pulseaudio] main.c: Failed to initialize daemon.
    I: [pulseaudio] module.c: Unloading “module-augment-properties” (index: #3).
    I: [pulseaudio] module.c: Unloaded “module-augment-properties” (index: #3).
    I: [pulseaudio] module.c: Unloading “module-card-restore” (index: #2).
    I: [pulseaudio] module.c: Unloaded “module-card-restore” (index: #2).
    I: [pulseaudio] module.c: Unloading “module-stream-restore” (index: #1).
    I: [pulseaudio] module.c: Unloaded “module-stream-restore” (index: #1).
    I: [pulseaudio] module.c: Unloading “module-device-restore” (index: #0).
    I: [pulseaudio] module.c: Unloaded “module-device-restore” (index: #0).
    I: [pulseaudio] main.c: Daemon terminated.

    Removed everything but “load-module module-alsa-sink device=dmix” that I added from default.pa . Same output. Restored old default.pa and ran
    $ pulseaudio -v &
    [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
    I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
    I: [pulseaudio] core-util.c: Successfully gained nice level -11.
    I: [pulseaudio] main.c: This is PulseAudio 4.0
    I: [pulseaudio] main.c: Page size is 4096 bytes
    I: [pulseaudio] main.c: Machine ID is 35ba22a86585f93768bf6fbc53ebc83b.
    I: [pulseaudio] main.c: Session ID is c1.
    I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
    I: [pulseaudio] main.c: Using state directory /home/darknetfan/.config/pulse.
    I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-4.0/modules.
    I: [pulseaudio] main.c: Running in system mode: no
    I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit!
    I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 MMXEXT 3DNOW 3DNOWEXT
    I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
    I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
    I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
    I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
    I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
    I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
    I: [pulseaudio] module-device-restore.c: Successfully opened database file ‘/home/darknetfan/.config/pulse/35ba22a86585f93768bf6fbc53ebc83b-device-volumes’.
    I: [pulseaudio] module.c: Loaded “module-device-restore” (index: #0; argument: “”).
    I: [pulseaudio] module-stream-restore.c: Successfully opened database file ‘/home/darknetfan/.config/pulse/35ba22a86585f93768bf6fbc53ebc83b-stream-volumes’.
    I: [pulseaudio] module.c: Loaded “module-stream-restore” (index: #1; argument: “”).
    I: [pulseaudio] module-card-restore.c: Successfully opened database file ‘/home/darknetfan/.config/pulse/35ba22a86585f93768bf6fbc53ebc83b-card-database’.
    I: [pulseaudio] module.c: Loaded “module-card-restore” (index: #2; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-augment-properties” (index: #3; argument: “”).
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0c’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device hw:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0c’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device front:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0c’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device hw:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0c’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device hw:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D1c’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device iec958:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0p’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device hw:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0p’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device front:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0p’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device hw:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0p’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device surround40:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0p’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device surround41:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0p’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device surround50:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0p’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device surround51:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D0p’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device surround71:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC0D1p’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device iec958:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm.c: Unknown PCM a52:0
    I: [pulseaudio] alsa-util.c: Error opening PCM device a52:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm.c: Unknown PCM a52:0
    I: [pulseaudio] alsa-util.c: Error opening PCM device a52:0: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm.c: Unknown PCM dca:0
    I: [pulseaudio] alsa-util.c: Error opening PCM device dca:0: No such file or directory
    I: [pulseaudio] (alsa-lib)control.c: Invalid CTL hdmi:0
    I: [pulseaudio] alsa-util.c: Unable to attach to mixer hdmi:0: No such file or directory
    I: [pulseaudio] alsa-util.c: Successfully attached to mixer ‘hw:0’
    I: [pulseaudio] module-card-restore.c: Restoring port latency offsets for card alsa_card.pci-0000_00_01.1.
    I: [pulseaudio] card.c: Created 0 “alsa_card.pci-0000_00_01.1”
    I: [pulseaudio] alsa-util.c: Successfully attached to mixer ‘hw:0’
    I: [pulseaudio] alsa-util.c: Trying to disable ALSA period wakeups, using timers only
    I: [pulseaudio] alsa-util.c: ALSA period wakeups disabled
    I: [pulseaudio] alsa-sink.c: Successfully opened device hdmi:0.
    I: [pulseaudio] alsa-sink.c: Selected mapping ‘Digital Stereo (HDMI)’ (hdmi-stereo).
    I: [pulseaudio] alsa-sink.c: Successfully enabled mmap() mode.
    I: [pulseaudio] alsa-sink.c: Successfully enabled timer-based scheduling mode.
    I: [pulseaudio] (alsa-lib)control.c: Invalid CTL hdmi:0
    I: [pulseaudio] alsa-util.c: Unable to attach to mixer hdmi:0: No such file or directory
    I: [pulseaudio] alsa-util.c: Successfully attached to mixer ‘hw:0’
    I: [pulseaudio] sink.c: Created sink 0 “alsa_output.pci-0000_00_01.1.hdmi-stereo” with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
    I: [pulseaudio] sink.c: alsa.resolution_bits = “16”
    I: [pulseaudio] sink.c: device.api = “alsa”
    I: [pulseaudio] sink.c: device.class = “sound”
    I: [pulseaudio] sink.c: alsa.class = “generic”
    I: [pulseaudio] sink.c: alsa.subclass = “generic-mix”
    I: [pulseaudio] sink.c: alsa.name = “HDMI 0”
    I: [pulseaudio] sink.c: alsa.id = “HDMI 0”
    I: [pulseaudio] sink.c: alsa.subdevice = “0”
    I: [pulseaudio] sink.c: alsa.subdevice_name = “subdevice #0”
    I: [pulseaudio] sink.c: alsa.device = “3”
    I: [pulseaudio] sink.c: alsa.card = “0”
    I: [pulseaudio] sink.c: alsa.card_name = “HD-Audio Generic”
    I: [pulseaudio] sink.c: alsa.long_card_name = “HD-Audio Generic at 0xf0c44000 irq 50”
    I: [pulseaudio] sink.c: alsa.driver_name = “snd_hda_intel”
    I: [pulseaudio] sink.c: device.bus_path = “pci-0000:00:01.1”
    I: [pulseaudio] sink.c: sysfs.path = “/devices/pci0000:00/0000:00:01.1/sound/card0”
    I: [pulseaudio] sink.c: device.bus = “pci”
    I: [pulseaudio] sink.c: device.vendor.id = “1002”
    I: [pulseaudio] sink.c: device.vendor.name = “Advanced Micro Devices, Inc. [AMD/ATI]”
    I: [pulseaudio] sink.c: device.product.id = “1714”
    I: [pulseaudio] sink.c: device.product.name = “BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series]”
    I: [pulseaudio] sink.c: device.form_factor = “internal”
    I: [pulseaudio] sink.c: device.string = “hdmi:0”
    I: [pulseaudio] sink.c: device.buffering.buffer_size = “65536”
    I: [pulseaudio] sink.c: device.buffering.fragment_size = “32768”
    I: [pulseaudio] sink.c: device.access_mode = “mmap+timer”
    I: [pulseaudio] sink.c: device.profile.name = “hdmi-stereo”
    I: [pulseaudio] sink.c: device.profile.description = “Digital Stereo (HDMI)”
    I: [pulseaudio] sink.c: device.description = “Built-in Audio Digital Stereo (HDMI)”
    I: [pulseaudio] sink.c: alsa.mixer_name = “ATI R6xx HDMI”
    I: [pulseaudio] sink.c: alsa.components = “HDA:1002aa01,00aa0100,00100200”
    I: [pulseaudio] sink.c: module-udev-detect.discovered = “1”
    I: [pulseaudio] sink.c: device.icon_name = “audio-card-pci”
    I: [pulseaudio] source.c: Created source 0 “alsa_output.pci-0000_00_01.1.hdmi-stereo.monitor” with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
    I: [pulseaudio] source.c: device.description = “Monitor of Built-in Audio Digital Stereo (HDMI)”
    I: [pulseaudio] source.c: device.class = “monitor”
    I: [pulseaudio] source.c: alsa.card = “0”
    I: [pulseaudio] source.c: alsa.card_name = “HD-Audio Generic”
    I: [pulseaudio] source.c: alsa.long_card_name = “HD-Audio Generic at 0xf0c44000 irq 50”
    I: [pulseaudio] source.c: alsa.driver_name = “snd_hda_intel”
    I: [pulseaudio] source.c: device.bus_path = “pci-0000:00:01.1”
    I: [pulseaudio] source.c: sysfs.path = “/devices/pci0000:00/0000:00:01.1/sound/card0”
    I: [pulseaudio] source.c: device.bus = “pci”
    I: [pulseaudio] source.c: device.vendor.id = “1002”
    I: [pulseaudio] source.c: device.vendor.name = “Advanced Micro Devices, Inc. [AMD/ATI]”
    I: [pulseaudio] source.c: device.product.id = “1714”
    I: [pulseaudio] source.c: device.product.name = “BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series]”
    I: [pulseaudio] source.c: device.form_factor = “internal”
    I: [pulseaudio] source.c: device.string = “0”
    I: [pulseaudio] source.c: module-udev-detect.discovered = “1”
    I: [pulseaudio] source.c: device.icon_name = “audio-card-pci”
    I: [pulseaudio] alsa-sink.c: Using 2.0 fragments of size 32768 bytes (185.76ms), buffer size is 65536 bytes (371.52ms)
    I: [pulseaudio] alsa-sink.c: Time scheduling watermark is 20.00ms
    I: [pulseaudio] alsa-sink.c: Driver does not support hardware volume control, falling back to software volume control.
    I: [pulseaudio] alsa-sink.c: Driver does not support hardware mute control, falling back to software mute control.
    I: [alsa-sink-HDMI 0] core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
    I: [alsa-sink-HDMI 0] alsa-sink.c: Starting playback.
    I: [pulseaudio] module.c: Loaded “module-alsa-card” (index: #4; argument: “device_id=”0″ name=”pci-0000_00_01.1″ card_name=”alsa_card.pci-0000_00_01.1″ namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=no card_properties=”module-udev-detect.discovered=1″”).
    I: [pulseaudio] module-udev-detect.c: Card /devices/pci0000:00/0000:00:01.1/sound/card0 (alsa_card.pci-0000_00_01.1) module loaded.
    I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plug:hw:1: Invalid argument
    I: [pulseaudio] (alsa-lib)control.c: Invalid CTL front:1
    I: [pulseaudio] alsa-util.c: Unable to attach to mixer front:1: No such file or directory
    I: [pulseaudio] alsa-util.c: Successfully attached to mixer ‘hw:1’
    I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plug:hw:1: Invalid argument
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC1D1c’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device iec958:1: No such file or directory
    I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plug:hw:1: Invalid argument
    I: [pulseaudio] (alsa-lib)control.c: Invalid CTL front:1
    I: [pulseaudio] alsa-util.c: Unable to attach to mixer front:1: No such file or directory
    I: [pulseaudio] alsa-util.c: Successfully attached to mixer ‘hw:1’
    I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plug:surround40:1: Invalid argument
    I: [pulseaudio] (alsa-lib)pcm_params.c: Slave PCM not usable
    I: [pulseaudio] (alsa-lib)pcm_params.c: Slave PCM not usable
    I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plug:surround41:1: Invalid argument
    I: [pulseaudio] (alsa-lib)pcm_params.c: Slave PCM not usable
    I: [pulseaudio] (alsa-lib)pcm_params.c: Slave PCM not usable
    I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plug:surround50:1: Invalid argument
    I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plug:surround51:1: Invalid argument
    I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plug:surround71:1: Invalid argument
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC1D1p’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device iec958:1: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm.c: Unknown PCM a52:1
    I: [pulseaudio] alsa-util.c: Error opening PCM device a52:1: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm.c: Unknown PCM a52:1
    I: [pulseaudio] alsa-util.c: Error opening PCM device a52:1: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm.c: Unknown PCM dca:1
    I: [pulseaudio] alsa-util.c: Error opening PCM device dca:1: No such file or directory
    I: [pulseaudio] (alsa-lib)pcm_hw.c: open ‘/dev/snd/pcmC1D3p’ failed (-2)
    I: [pulseaudio] alsa-util.c: Error opening PCM device hdmi:1: No such file or directory
    I: [pulseaudio] module-card-restore.c: Restoring port latency offsets for card alsa_card.pci-0000_00_14.2.
    I: [pulseaudio] card.c: Created 1 “alsa_card.pci-0000_00_14.2”
    I: [pulseaudio] alsa-util.c: Successfully attached to mixer ‘hw:1’
    I: [pulseaudio] alsa-util.c: Trying to disable ALSA period wakeups, using timers only
    I: [pulseaudio] alsa-util.c: ALSA period wakeups disabled
    I: [pulseaudio] alsa-sink.c: Successfully opened device front:1.
    I: [pulseaudio] alsa-sink.c: Selected mapping ‘Analog Stereo’ (analog-stereo).
    I: [pulseaudio] alsa-sink.c: Successfully enabled mmap() mode.
    I: [pulseaudio] alsa-sink.c: Successfully enabled timer-based scheduling mode.
    I: [pulseaudio] (alsa-lib)control.c: Invalid CTL front:1
    I: [pulseaudio] alsa-util.c: Unable to attach to mixer front:1: No such file or directory
    I: [pulseaudio] alsa-util.c: Successfully attached to mixer ‘hw:1’
    I: [pulseaudio] module-device-restore.c: Restoring volume for sink alsa_output.pci-0000_00_14.2.analog-stereo.
    I: [pulseaudio] module-device-restore.c: Restored volume: 0: 52% 1: 52%
    I: [pulseaudio] module-device-restore.c: Restoring mute state for sink alsa_output.pci-0000_00_14.2.analog-stereo.
    I: [pulseaudio] sink.c: Created sink 1 “alsa_output.pci-0000_00_14.2.analog-stereo” with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
    I: [pulseaudio] sink.c: alsa.resolution_bits = “16”
    I: [pulseaudio] sink.c: device.api = “alsa”
    I: [pulseaudio] sink.c: device.class = “sound”
    I: [pulseaudio] sink.c: alsa.class = “generic”
    I: [pulseaudio] sink.c: alsa.subclass = “generic-mix”
    I: [pulseaudio] sink.c: alsa.name = “CX20590 Analog”
    I: [pulseaudio] sink.c: alsa.id = “CX20590 Analog”
    I: [pulseaudio] sink.c: alsa.subdevice = “0”
    I: [pulseaudio] sink.c: alsa.subdevice_name = “subdevice #0”
    I: [pulseaudio] sink.c: alsa.device = “0”
    I: [pulseaudio] sink.c: alsa.card = “1”
    I: [pulseaudio] sink.c: alsa.card_name = “HD-Audio Generic”
    I: [pulseaudio] sink.c: alsa.long_card_name = “HD-Audio Generic at 0xf0c40000 irq 16”
    I: [pulseaudio] sink.c: alsa.driver_name = “snd_hda_intel”
    I: [pulseaudio] sink.c: device.bus_path = “pci-0000:00:14.2”
    I: [pulseaudio] sink.c: sysfs.path = “/devices/pci0000:00/0000:00:14.2/sound/card1”
    I: [pulseaudio] sink.c: device.bus = “pci”
    I: [pulseaudio] sink.c: device.vendor.id = “1022”
    I: [pulseaudio] sink.c: device.vendor.name = “Advanced Micro Devices, Inc. [AMD]”
    I: [pulseaudio] sink.c: device.product.id = “780d”
    I: [pulseaudio] sink.c: device.product.name = “FCH Azalia Controller”
    I: [pulseaudio] sink.c: device.form_factor = “internal”
    I: [pulseaudio] sink.c: device.string = “front:1”
    I: [pulseaudio] sink.c: device.buffering.buffer_size = “65536”
    I: [pulseaudio] sink.c: device.buffering.fragment_size = “32768”
    I: [pulseaudio] sink.c: device.access_mode = “mmap+timer”
    I: [pulseaudio] sink.c: device.profile.name = “analog-stereo”
    I: [pulseaudio] sink.c: device.profile.description = “Analog Stereo”
    I: [pulseaudio] sink.c: device.description = “Built-in Audio Analog Stereo”
    I: [pulseaudio] sink.c: alsa.mixer_name = “Conexant CX20590”
    I: [pulseaudio] sink.c: alsa.components = “HDA:14f1506e,17aa21ea,00100002”
    I: [pulseaudio] sink.c: module-udev-detect.discovered = “1”
    I: [pulseaudio] sink.c: device.icon_name = “audio-card-pci”
    I: [pulseaudio] source.c: Created source 1 “alsa_output.pci-0000_00_14.2.analog-stereo.monitor” with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
    I: [pulseaudio] source.c: device.description = “Monitor of Built-in Audio Analog Stereo”
    I: [pulseaudio] source.c: device.class = “monitor”
    I: [pulseaudio] source.c: alsa.card = “1”
    I: [pulseaudio] source.c: alsa.card_name = “HD-Audio Generic”
    I: [pulseaudio] source.c: alsa.long_card_name = “HD-Audio Generic at 0xf0c40000 irq 16”
    I: [pulseaudio] source.c: alsa.driver_name = “snd_hda_intel”
    I: [pulseaudio] source.c: device.bus_path = “pci-0000:00:14.2”
    I: [pulseaudio] source.c: sysfs.path = “/devices/pci0000:00/0000:00:14.2/sound/card1”
    I: [pulseaudio] source.c: device.bus = “pci”
    I: [pulseaudio] source.c: device.vendor.id = “1022”
    I: [pulseaudio] source.c: device.vendor.name = “Advanced Micro Devices, Inc. [AMD]”
    I: [pulseaudio] source.c: device.product.id = “780d”
    I: [pulseaudio] source.c: device.product.name = “FCH Azalia Controller”
    I: [pulseaudio] source.c: device.form_factor = “internal”
    I: [pulseaudio] source.c: device.string = “1”
    I: [pulseaudio] source.c: module-udev-detect.discovered = “1”
    I: [pulseaudio] source.c: device.icon_name = “audio-card-pci”
    I: [pulseaudio] alsa-sink.c: Using 2.0 fragments of size 32768 bytes (185.76ms), buffer size is 65536 bytes (371.52ms)
    I: [pulseaudio] alsa-sink.c: Time scheduling watermark is 20.00ms
    I: [pulseaudio] alsa-sink.c: Successfully enabled deferred volume.
    I: [pulseaudio] alsa-sink.c: Hardware volume ranges from -199.00 dB to 0.00 dB.
    I: [pulseaudio] alsa-sink.c: Fixing base volume to 0.00 dB
    I: [pulseaudio] alsa-sink.c: Using hardware volume control. Hardware dB scale supported.
    I: [pulseaudio] alsa-sink.c: Using hardware mute control.
    I: [alsa-sink-CX20590 Analog] core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
    I: [alsa-sink-CX20590 Analog] alsa-sink.c: Starting playback.
    I: [pulseaudio] alsa-util.c: Trying to disable ALSA period wakeups, using timers only
    I: [pulseaudio] alsa-util.c: ALSA period wakeups disabled
    I: [pulseaudio] alsa-source.c: Successfully opened device front:1.
    I: [pulseaudio] alsa-source.c: Selected mapping ‘Analog Stereo’ (analog-stereo).
    I: [pulseaudio] alsa-source.c: Successfully enabled mmap() mode.
    I: [pulseaudio] alsa-source.c: Successfully enabled timer-based scheduling mode.
    I: [pulseaudio] (alsa-lib)control.c: Invalid CTL front:1
    I: [pulseaudio] alsa-util.c: Unable to attach to mixer front:1: No such file or directory
    I: [pulseaudio] alsa-util.c: Successfully attached to mixer ‘hw:1’
    I: [pulseaudio] module-device-restore.c: Restoring volume for source alsa_input.pci-0000_00_14.2.analog-stereo.
    I: [pulseaudio] module-device-restore.c: Restored volume: 0: 100% 1: 100%
    I: [pulseaudio] module-device-restore.c: Restoring mute state for source alsa_input.pci-0000_00_14.2.analog-stereo.
    I: [pulseaudio] source.c: Created source 2 “alsa_input.pci-0000_00_14.2.analog-stereo” with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
    I: [pulseaudio] source.c: alsa.resolution_bits = “16”
    I: [pulseaudio] source.c: device.api = “alsa”
    I: [pulseaudio] source.c: device.class = “sound”
    I: [pulseaudio] source.c: alsa.class = “generic”
    I: [pulseaudio] source.c: alsa.subclass = “generic-mix”
    I: [pulseaudio] source.c: alsa.name = “CX20590 Analog”
    I: [pulseaudio] source.c: alsa.id = “CX20590 Analog”
    I: [pulseaudio] source.c: alsa.subdevice = “0”
    I: [pulseaudio] source.c: alsa.subdevice_name = “subdevice #0”
    I: [pulseaudio] source.c: alsa.device = “0”
    I: [pulseaudio] source.c: alsa.card = “1”
    I: [pulseaudio] source.c: alsa.card_name = “HD-Audio Generic”
    I: [pulseaudio] source.c: alsa.long_card_name = “HD-Audio Generic at 0xf0c40000 irq 16”
    I: [pulseaudio] source.c: alsa.driver_name = “snd_hda_intel”
    I: [pulseaudio] source.c: device.bus_path = “pci-0000:00:14.2”
    I: [pulseaudio] source.c: sysfs.path = “/devices/pci0000:00/0000:00:14.2/sound/card1”
    I: [pulseaudio] source.c: device.bus = “pci”
    I: [pulseaudio] source.c: device.vendor.id = “1022”
    I: [pulseaudio] source.c: device.vendor.name = “Advanced Micro Devices, Inc. [AMD]”
    I: [pulseaudio] source.c: device.product.id = “780d”
    I: [pulseaudio] source.c: device.product.name = “FCH Azalia Controller”
    I: [pulseaudio] source.c: device.form_factor = “internal”
    I: [pulseaudio] source.c: device.string = “front:1”
    I: [pulseaudio] source.c: device.buffering.buffer_size = “65536”
    I: [pulseaudio] source.c: device.buffering.fragment_size = “32768”
    I: [pulseaudio] source.c: device.access_mode = “mmap+timer”
    I: [pulseaudio] source.c: device.profile.name = “analog-stereo”
    I: [pulseaudio] source.c: device.profile.description = “Analog Stereo”
    I: [pulseaudio] source.c: device.description = “Built-in Audio Analog Stereo”
    I: [pulseaudio] source.c: alsa.mixer_name = “Conexant CX20590”
    I: [pulseaudio] source.c: alsa.components = “HDA:14f1506e,17aa21ea,00100002”
    I: [pulseaudio] source.c: module-udev-detect.discovered = “1”
    I: [pulseaudio] source.c: device.icon_name = “audio-card-pci”
    I: [pulseaudio] alsa-source.c: Using 2.0 fragments of size 32768 bytes (185.76ms), buffer size is 65536 bytes (371.52ms)
    I: [pulseaudio] alsa-source.c: Time scheduling watermark is 20.00ms
    I: [pulseaudio] alsa-source.c: Successfully enabled deferred volume.
    I: [pulseaudio] alsa-source.c: Hardware volume ranges from -74.00 dB to 54.00 dB.
    I: [pulseaudio] alsa-source.c: Fixing base volume to -54.00 dB
    I: [pulseaudio] alsa-source.c: Using hardware volume control. Hardware dB scale supported.
    I: [pulseaudio] alsa-source.c: Using hardware mute control.
    I: [alsa-source-CX20590 Analog] core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
    I: [alsa-source-CX20590 Analog] alsa-source.c: Starting capture.
    I: [pulseaudio] module.c: Loaded “module-alsa-card” (index: #5; argument: “device_id=”1″ name=”pci-0000_00_14.2″ card_name=”alsa_card.pci-0000_00_14.2″ namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=no card_properties=”module-udev-detect.discovered=1″”).
    I: [pulseaudio] module-udev-detect.c: Card /devices/pci0000:00/0000:00:14.2/sound/card1 (alsa_card.pci-0000_00_14.2) module loaded.
    I: [pulseaudio] module-udev-detect.c: Found 2 cards.
    I: [pulseaudio] module.c: Loaded “module-udev-detect” (index: #6; argument: “use_ucm=0”).
    I: [pulseaudio] module.c: Loaded “module-bluetooth-policy” (index: #7; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-bluetooth-discover” (index: #8; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-native-protocol-unix” (index: #9; argument: “”).
    I: [pulseaudio] module-default-device-restore.c: Restored default sink ‘alsa_output.pci-0000_00_14.2.analog-stereo’.
    I: [pulseaudio] module-default-device-restore.c: Restored default source ‘alsa_input.pci-0000_00_14.2.analog-stereo’.
    I: [pulseaudio] module.c: Loaded “module-default-device-restore” (index: #10; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-rescue-streams” (index: #11; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-always-sink” (index: #12; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-intended-roles” (index: #13; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-suspend-on-idle” (index: #14; argument: “”).
    I: [pulseaudio] client.c: Created 0 “Login Session c1”
    I: [pulseaudio] module.c: Loaded “module-systemd-login” (index: #15; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-position-event-sounds” (index: #16; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-filter-heuristics” (index: #17; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-filter-apply” (index: #18; argument: “”).
    I: [pulseaudio] module.c: Loaded “module-switch-on-port-available” (index: #19; argument: “”).
    I: [pulseaudio] main.c: Daemon startup complete.

    1. Please use something like pastebin next time… the logs are extremely long.

      Show me your /etc/pulse/default.pa (paste it to pastebin.com or something)

      I just tried my own solution, there wasn’t a problem activating dmix; I’m guessing there might be a problem with your default.pa

  2. Addition to the above, in case this is relevant:
    $ ls -la /dev/snd/*
    crw-rw—-+ 1 root audio 116, 5 Aug 29 09:03 /dev/snd/controlC0
    crw-rw—-+ 1 root audio 116, 9 Aug 29 09:03 /dev/snd/controlC1
    crw-rw—-+ 1 root audio 116, 2 Aug 29 09:03 /dev/snd/controlC29
    crw-rw—-+ 1 root audio 116, 4 Aug 29 09:03 /dev/snd/hwC0D0
    crw-rw—-+ 1 root audio 116, 8 Aug 29 09:03 /dev/snd/hwC1D0
    crw-rw—-+ 1 root audio 116, 3 Aug 29 09:25 /dev/snd/pcmC0D3p
    crw-rw—-+ 1 root audio 116, 7 Aug 29 09:25 /dev/snd/pcmC1D0c
    crw-rw—-+ 1 root audio 116, 6 Aug 29 09:25 /dev/snd/pcmC1D0p
    crw-rw—-+ 1 root audio 116, 1 Aug 29 09:03 /dev/snd/seq
    crw-rw—-+ 1 root audio 116, 33 Aug 29 09:03 /dev/snd/timer

    /dev/snd/by-path:
    total 0
    drwxr-xr-x 2 root root 100 Aug 29 09:03 .
    drwxr-xr-x 3 root root 260 Aug 29 09:03 ..
    lrwxrwxrwx 1 root root 12 Aug 29 09:03 pci-0000:00:01.1 -> ../controlC0
    lrwxrwxrwx 1 root root 12 Aug 29 09:03 pci-0000:00:14.2 -> ../controlC1
    lrwxrwxrwx 1 root root 13 Aug 29 09:03 platform-thinkpad_acpi -> ../controlC29

  3. Hey,

    thanks for the reply. Sorry for the wall of text, didn’t realize it would be that much.

    Here’s the file I used. I also tried some combinations of uncommenting the lines 47-49 (especially with all of them uncommented and 48 and 49 uncommented). The original file is the same as this one, just with line 46 commented and line 60-65 uncommented:
    https://bpaste.net/show/d95117bf73fd

    1. Hey,

      I tried the configuration in my laptop and it works. Why it behaves like that it could be:

      • PulseAudio may be running system-wide? (that’s a no-no).
      • Something is grabbing hw:0 as a resource before pulseaudio. (see first option, it could conflict, and I really doubt this is the case)
      • You are not in the audio (in fact, you SHOULD NOT be in this group when PA is running) or pulse group. In this time and age this shouldn’t be necessary anymore, but well different distributions means different defaults.
      • You have an ALSA configuration that might interfere with PulseAudio.
      • Your PulseAudio previous configuration is trying to remap itself to devices that “no longer are there” since you chose dmix. You could try removing the folder ~/.config/pulse, no harm done.
      • Install pavucontrol sudo apt install pavucontrol and if it opens and let’s you configure ports in output devices/etc.

      I think, it’s not much about not recognizing the device but that’s trying to configure itself to something that’s no longer there:

      I: [pulseaudio] alsa-util.c: Error opening PCM device hdmi:1: No such file or directory

      From here I’m just out of ideas, hope this helps you somehow.

Comments are closed.