9

I recently updated my system, and pulseaudio now refuses to use my sound card. It does know it exists, as pacmd list-cards shows:

    index: 2
    name: <alsa_card.pci-0000_00_1b.0>
    driver: <module-alsa-card.c>
    owner module: 8
    properties:
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0xf7210000 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 = "0"
        device.description = "Built-in Audio"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    profiles:
        input:analog-stereo: Analog Stereo Input (priority 60, available: no)
        output:analog-stereo: Analog Stereo Output (priority 6000, available: no)
        output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: no)
        off: Off (priority 0, available: unknown)
    active profile: <off>
    ports:
        analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "audio-input-microphone"
        analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "audio-input-microphone"
        analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
            properties:

        analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: no)
            properties:

        analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "audio-headphones"

However, for every single port on the card, it shows available: no. I believe this is it auto detecting whether anything is plugged into the jack. This would be fine, except the jack auto detect for this sound card is known to be broken.

In the past it would simply show up as "unplugged" and I could choose to output to it. Now, pulseaudio won't even setup a sink for it. pacmd list-sinks only shows sinks for the video card's HDMI/DP outputs.

How do I turn off jack auto detect, or alternatively force these ports to be available?

  • Have you tried selecting a profile in pavucontrol? – dirkt Mar 03 '17 at 07:16
  • 1
    @dirkt The card doesn't appear in pavucontrol at all. – wingedsubmariner Mar 03 '17 at 15:39
  • First time I've seen cards in list-cards but not in pavucontrol. So, can you select a profile with pacmd set-card-profile? Without an active profile, I wouldn't expect a usable output sink (at least I haven't seen cards where not one profile was always active).. Also, to rule down problems one level below, if you stop Pulseaudio, can you use the card directly in ALSA (aplay etc.)? – dirkt Mar 03 '17 at 15:49
  • @dirkt My bad, I don't think I understood what was meant by profile. In pavucontrol, if I go to the configuration tab, I can select a profile for the sound card. With a profile other than "Off", it then appears in the list of output devices. If you write that as an answer I'll accept it. – wingedsubmariner Mar 03 '17 at 17:50

2 Answers2

10

I found a solution for this issue: There is an option in the hda driver to disable the Jack detection. I made a udev rule to enforce this before boot:

/etc/udev/rules.d/jackdetect.rules:

ACTION=="add", SUBSYSTEM=="sound", ATTRS{chip_name}=="ALC898", ATTR{hints}="jack_detect=false"
ACTION=="add", SUBSYSTEM=="sound", ATTRS{chip_name}=="ALC898", ATTR{reconfig}="1"

You can find your chip_name in /sys/class/sound/hwC?D?/chip_name, or use something else as a selector...

See this page for more information: https://www.kernel.org/doc/html/latest/sound/hd-audio/notes.html#hd-audio-reconfiguration

tkteun
  • 201
  • Warning: on linux 5.8.7-arch1-1 with a ALCS1200A chipset, this causes a general protection fault in device_del in the kernel when udev tries to apply the rules. – Gavin S. Yancey Sep 08 '20 at 18:08
  • 1
    It also prevented my Debian 10 (Buster) system from normal booting. Maybe, it was because some other serivce was using the same resources. So I applied the early patching instead. – v_2e Sep 13 '20 at 09:21
  • Just tried it on this board (not used as desktop anymore) and it still works fine with Debian 10 on this Gigabyte GA-Z77X-UD5H with the ALC898 chip. – tkteun Nov 01 '20 at 15:47
  • Magic! I had a headset output which I wanted to use with a speaker, but pavucontrol kept listing the Analogue Stereo Output as (unavailable). After applying your fix the (unavailable) disappeared and I was able to use it! Thanks. – Alex Zeffertt Mar 24 '21 at 19:26
4

Many cards have profiles, which determine - among other things - which inputs and outputs are available. Your card has the following:

 profiles:
    input:analog-stereo: Analog Stereo Input (priority 60, available: no)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: no)
    output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: no)
    off: Off (priority 0, available: unknown)

and the currently active profile is

active profile: <off>

You can choose a profile in pavucontrol in the Configuration tab, or with pacmd set-card-profile. Choosing one of the two profiles with output in its name should enable the Analog Stereo Output.

dirkt
  • 32,309
  • 1
    In my case, I have an active profile selected, but it's still set in the description as available:no So no sound it's output no matter what. Is there a way to force it to be available? – Felipe May 24 '17 at 00:02
  • @Felipe: I don't know. Please open a new question, and include details about your soundcard (pacmd list-cards). – dirkt May 24 '17 at 04:42