PulseAudio not recognizing Intel HDA after upgrading to Debian testing (Buster)

12,348

Solution 1

Should anyone else run into this, here's a workaround to force PulseAudio to use the ALSA device...

First, confirm you know the correct sound card and device you want by playing some audio directly via ALSA:

aplay -D plughw:<CARD#>,<DEVICE#> /usr/share/sounds/alsa/Front_Center.wav

In my case I wanted the optical audio output so based on my aplay -l output as seen in my question above it was:

aplay -D plughw:0,1 /usr/share/sounds/alsa/Front_Center.wav

Make a note of the card and device number and add an entry to /etc/pulse/default.pa (replace 0,1 with what worked for you in the previous step):

load-module module-alsa-sink device=plughw:0,1

I added this line immediately before the .ifexists module-udev-detect.so line in the file (i.e. underneath the ### Load audio drivers statically comment)

Then run the following as the user your desktop session is logged in as (i.e. not as root):

pulseaudio --kill
pulseaudio --start

Then you should be able to open Sound Settings to see and select the card:

enter image description here

At this point, you should have audio playback through PulseAudio working again. (Something I noticed is that pacmd list-cards will still not list the card even though it now works) Reminder: this is a workaround and not the long term fix so be sure to make a note to yourself to undo this at some point in the future to see if it's been fixed properly. But it gets audio working for the time being.

Solution 2

I ended up here because of the very same problem, after upgrading from Stretch, the audio disappeared. Similar symptoms and outputs (Nvidia card and Intel HDA sound). While following instructions, though, I've found that I couldn't get this step to work:

root@desk:~# aplay -D plughw:0,0 /usr/share/sounds/alsa/Front_Center.wav
aplay: main:828: audio open error: Device or resource busy

I found that the culprit was timidity:

root@desk:~# fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/pcmC0D0p:   timidity   1274 F...m timidity
/dev/snd/seq:        timidity   1274 F.... timidity

Once I killed it, I could proceed editing /etc/pulse/default.pa and everything snapped into place. I'm still not sure if the issue was the missing PA sink or timidity taking over.

I've also considered filing a bug report, but I'm not sure where would be more appropriate. If you have any suggestions, I'll be happy to follow your lead and add my support to the report.

Thank you for sharing the solution!

Solution 3

I just had this exact issue, and uninstalling Timidity solved it. Literally, as the package was removed by apt, I saw a notification showing I have a sound card (interpreted as a volume change).

Share:
12,348

Related videos on Youtube

blihp
Author by

blihp

Updated on September 18, 2022

Comments

  • blihp
    blihp over 1 year

    I noticed a problem a over the summer after upgrading from Debian 9 stable to Debian 10 testing: PulseAudio no longer recognized my Intel HDA audio devices. At the time I was able to switch to my monitor's audio connected via nVidia HDMI so I sidestepped the problem hoping that a future update would fix it. They haven't. Fast forward a few months and I've rearranged my workspace and now need to get the Intel HDA working again.

    Here's what I've looked at so far...

    Debian 10 Testing

    The kernel sees it:

    # dmesg | grep HDA
    [  +0.005509] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input17
    [  +0.000073] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input18
    [  +0.000057] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1b.0/sound/card0/input19
    [  +0.000054] input: HDA Intel PCH Line Out Front as /devices/pci0000:00/0000:00:1b.0/sound/card0/input20
    [  +0.000052] input: HDA Intel PCH Line Out Surround as /devices/pci0000:00/0000:00:1b.0/sound/card0/input21
    [  +0.000051] input: HDA Intel PCH Line Out CLFE as /devices/pci0000:00/0000:00:1b.0/sound/card0/input22
    [  +0.000053] input: HDA Intel PCH Line Out Side as /devices/pci0000:00/0000:00:1b.0/sound/card0/input23
    [  +0.000058] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input24
    [followed by NVidia HDMI audio devices that are recognized]
    
    # lspci -nnk | grep -A2 Audio
    00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller [8086:1e20] (rev 04)
        Subsystem: Gigabyte Technology Co., Ltd 7 Series/C216 Chipset Family High Definition Audio Controller [1458:a002]
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
    [followed by NVidia HDMI audio devices that are recognized]
    

    ALSA sees it:

    # aplay -l
    
    **** List of PLAYBACK Hardware Devices ****
    card 0: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]
      Subdevices: 0/1
      Subdevice #0: subdevice #0
    card 0: PCH [HDA Intel PCH], device 1: Generic Digital [Generic Digital]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    [followed by NVidia HDMI audio devices that are recognized]
    
    # aplay -L | grep PCH
    default:CARD=PCH
        HDA Intel PCH, Generic Analog
    sysdefault:CARD=PCH
        HDA Intel PCH, Generic Analog
    front:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Analog
    surround21:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Analog
    surround40:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Analog
    surround41:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Analog
    surround50:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Analog
    surround51:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Analog
    surround71:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Analog
    iec958:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Digital
    dmix:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Analog
    dmix:CARD=PCH,DEV=1
        HDA Intel PCH, Generic Digital
    dsnoop:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Analog
    dsnoop:CARD=PCH,DEV=1
        HDA Intel PCH, Generic Digital
    hw:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Analog
    hw:CARD=PCH,DEV=1
        HDA Intel PCH, Generic Digital
    plughw:CARD=PCH,DEV=0
        HDA Intel PCH, Generic Analog
    plughw:CARD=PCH,DEV=1
        HDA Intel PCH, Generic Digital
    

    speaker-test plays audio normally as does aplay -D default:CARD=PCH /usr/share/sounds/alsa/Front_Left.wav

    However PulseAudio doesn't see the device at all:

    $ pacmd list-sinks
    1 sink(s) available.
      * index: 0
        name: <auto_null>
        driver: <module-null-sink.c>
        flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 1000
        volume: front-left: 55705 /  85% / -4.24 dB,   front-right: 55705 /  85% / -4.24 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 344 KiB
        max rewind: 344 KiB
        monitor source: 0
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
        module: 16
        properties:
            device.description = "Dummy Output"
            device.class = "abstract"
            device.icon_name = "audio-card"
    

    When I go to Sound Settings, all I'm seeing is the Dummy Output device. (The nVidia devices are no longer listed here because in rearranging things, I'm using a different monitor without audio so there's no HDMI audio device connected currently.)

    I've tried to clearing out the PulseAudio configuration thinking I might have some legacy cruft around via:

    rm ~/.pulse/* ~/.config/pulse/*
    

    Debian 9 Stable

    I have another partition on this machine which is still running Debian 9 stable, where the Intel HDA works under PulseAudio, and there do appear to be differences in the ALSA drivers vs. Debian 10 so below are the differences I noticed...

    # aplay -l
    
    **** List of PLAYBACK 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 1: ALC887-VD Digital [ALC887-VD Digital]
      Subdevices: 0/1
      Subdevice #0: subdevice #0
    
    # aplay -L | grep PCH
    
    sysdefault:CARD=PCH
        HDA Intel PCH, ALC887-VD Analog
    front:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Analog
    surround21:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Analog
    surround40:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Analog
    surround41:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Analog
    surround50:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Analog
    surround51:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Analog
    surround71:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Analog
    iec958:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Digital
    dmix:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Analog
    dmix:CARD=PCH,DEV=1
        HDA Intel PCH, ALC887-VD Digital
    dsnoop:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Analog
    dsnoop:CARD=PCH,DEV=1
        HDA Intel PCH, ALC887-VD Digital
    hw:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Analog
    hw:CARD=PCH,DEV=1
        HDA Intel PCH, ALC887-VD Digital
    plughw:CARD=PCH,DEV=0
        HDA Intel PCH, ALC887-VD Analog
    plughw:CARD=PCH,DEV=1
        HDA Intel PCH, ALC887-VD Digital
    

    And of course, Debian 9 sees Intel HDA in PulseAudio:

    $ pacmd list-sinks
    1 sink(s) available.
      * index: 2
        name: <alsa_output.pci-0000_00_1b.0.iec958-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: RUNNING
        suspend cause: 
        priority: 9958
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 24.26 ms
        max request: 4 KiB
        max rewind: 344 KiB
        monitor source: 3
        sample spec: s16le 2ch 48000Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        configured latency: 25.00 ms; range is 0.50 .. 1837.50 ms
        card: 1 <alsa_card.pci-0000_00_1b.0>
        module: 7
        properties:
            alsa.resolution_bits = "16"
            device.api = "alsa"
            device.class = "sound"
            alsa.class = "generic"
            alsa.subclass = "generic-mix"
            alsa.name = "ALC887-VD Digital"
            alsa.id = "ALC887-VD Digital"
            alsa.subdevice = "0"
            alsa.subdevice_name = "subdevice #0"
            alsa.device = "1"
            alsa.card = "0"
            alsa.card_name = "HDA Intel PCH"
            alsa.long_card_name = "HDA Intel PCH at 0xf5130000 irq 30"
            alsa.driver_name = "snd_hda_intel"
            device.bus_path = "pci-0000:00:1b.0"
            sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
            device.bus = "pci"
            device.vendor.id = "8086"
            device.vendor.name = "Intel Corporation"
            device.product.id = "1e20"
            device.product.name = "7 Series/C216 Chipset Family High Definition Audio Controller"
            device.form_factor = "internal"
            device.string = "iec958:0"
            device.buffering.buffer_size = "352800"
            device.buffering.fragment_size = "176400"
            device.access_mode = "mmap+timer"
            device.profile.name = "iec958-stereo"
            device.profile.description = "Digital Stereo (IEC958)"
            device.description = "Built-in Audio Digital Stereo (IEC958)"
            alsa.mixer_name = "Realtek ALC887-VD"
            alsa.components = "HDA:10ec0887,1458a002,00100302"
            module-udev-detect.discovered = "1"
            device.icon_name = "audio-card-pci"
        ports:
            iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
                properties:
    
        active port: <iec958-stereo-output>
    

    So the question is obviously: how do I get the Intel HDA audio working again in PulseAudio with Debian 10? Is this something I can fix from a configuration standpoint or is this a driver issue that needs to be fixed either by the ALSA or PulseAudio maintainers?

    • Nasir Riley
      Nasir Riley over 5 years
      Debian 10 Buster is still in testing. The most you can do here is file a bug report and wait until it's officially released and has actual support.
    • blihp
      blihp over 5 years
      But a bug report for what? (i.e. the kernel drivers? ALSA? PulseAudio?) It's clear that the behavior has changed but it's not at all clear to me what the source of the problem is. I also don't know if the issue is specific to my current configuration or if a complete reinstall (not something I can do right now) would reproduce. Debian package maintainers want a specific package that is at fault with steps to reproduce... I don't believe I'm there yet.
    • Nasir Riley
      Nasir Riley over 5 years
      You'll need to troubleshoot PulseAudio and see if there's a problem with the kernel or something else. You could also just wait until it's officially released and see if the problem is resolved.
    • nicoco
      nicoco over 5 years
      @blihp did you solve your issue? I'm experiencing the exact same one…
    • blihp
      blihp over 5 years
      @nicoco not yet... I've asked both this question and unix.stackexchange.com/questions/473846/… but so far neither has gotten much attention
    • blihp
      blihp over 5 years
      @nicoco does the solution I've found work for you?
    • nicoco
      nicoco over 5 years
      @blihp Nope :( Got resource busy when trying to play with aplay. Adding the line to /etc/pulse/default.pa resulted in pulseaudio not starting anymore. If you have any other idea to try, it would be great!
    • nicoco
      nicoco over 5 years
      …but I managed to get the HDMI output working. I would prefer my speakers but meh, that is still something I guess. Thanks ☺
  • dsz
    dsz over 5 years
    Just removed timidity from my system - thank you!
  • Steve McIntyre
    Steve McIntyre almost 5 years
    Exact same problem here too. I'm a Debian Developer, so I can tell you where to look. See bugs.debian.org/910048 ("timidity: upgrading to 2.14.0-2 broke sound via pulseaudio")
  • Anton Krug
    Anton Krug almost 5 years
    same issue, thanks
  • LatinSuD
    LatinSuD almost 5 years
    @SteveMcIntyre The bug is bugs.debian.org/901148
  • Clément
    Clément over 4 years
    Indeed, a simple apt-get purge timidity solved all my issues, after fiddling for hours… Thank you so much for sharing your solution.
  • Martin Ueding
    Martin Ueding over 4 years
    I have a system and timidity wasn't installed to begin with. Still I have no sound even after pulseaudio --start. And using aplay I get some sounds.
  • Martin Ueding
    Martin Ueding over 4 years
    This file already exists on the system which I had installed with Debian 9 and upgraded to Debian 10.
  • Martin Ueding
    Martin Ueding over 4 years
    I did not have it installed in the first place and still face similar issues.
  • rakslice
    rakslice over 4 years
    In my case it was muroard that was tying up the sound device. A reminder: fuser likely isn't going to be able to tell you anything useful unless you remember to run it as root.
  • christianparpart
    christianparpart over 4 years
    FYI: I had the very same issue. And I fixed it the very same way - however, fuser -v /dev/snd/* did not yield anything. Still I fixed it by uninstalling timidity!
  • panta82
    panta82 over 3 years
    sudo apt remove timidity timidity-daemon did the trick for me.