Front Panel Audio Not Working

I did a custom build and my front panel audio is not working. I do not hear anything when I plug in headphones on the front panel. The same headphones work when I connect to the line output in the back.

My setup is:
Rocky Linux 9
motherboard: Gigabyte Z690 AERO G (rev. 1.x)
case: Fractal Design Define R5

The case has HD Audio on the connector and the motherboard labels the port “F_AUDIO (Front Panel Audio Header)”.

I’m not sure if I have a hardware issue or if this is a software issue.

If I run pavucontrol and play audio, I see usb audio analog stereo playing when headphones in back.

If I run alsamixer then press f6 to select usb audio, I see pcm, pcm1, and pcm2. If I select hda intel I see pch, spdf1 to spef 11.

Any suggestions to troubleshoot this?

I have similar issues - haven’t looked into cause/config issues but if I unplug and reinsert the front panel connector I then get audio there.

The “sound” applet has changed in Rocky 9.
If you have gnome desktop, go to top right, drop down menu, “Settings”, then Sound.
You should see output devices and input devices, and at least be able to confirm what it thinks you have.

@gerry666uk

If I plug in earbuds, in settings→sounds output devices, I see:

  1. Speakers – USB Audio
  2. HTMI/DisplayPort
  3. Headphones- USB Audio

When I select Headphones and then test, I don’t hear anything. The same thing happens with a second set of earbuds.

When unplug the earbuds, the headphones disappears from the settings.

I used a multimeter on my case HD Audio cable. If I put a multimeter between pin 10 and pin 7, I get a short when I plug in a headphones and an open when when the headphones are removed. I’d expect to see the resistance of the headphone left headphone across pin 9 and 7, and right headphone pin 5 and 7 but I’m getting an open circuit on both. I asked the case maker for the schematic for the case panel but they do not release it.

Regarding the short circuit, if you get the back socket working, and then plug in the front, does it suddenly stop the back from working?

@ gerry666uk
If I’m listening to the back line out and plug in a different earbud into the front, the back line out keeps playing and nothing is played on the front earbuds.

For the short, pin 6 is sense and pint 7 is ground. By short I mean pin 6 is pulled to ground. Since Rocky Linux can read when the earbuds are inserted, it appears the sense circuit is working as expected.

If it’s a motherboard, I’m not sure why it says “usb” audio.

Have you checked the motherboard manual for the exact header layout and pins, and checked that they are wired in the correct way to both front and back? With power off, use the multimeter to do continueity between the pin on the header and the contact on the output socket, e.g. use a jack plug with wires sticking out of it.

@ gerry666uk

The case maker does not publish the schematic so I can’t check pins. The HD Audio is a 2x9 header. It appears the HD Audio is a standard (Intel High Definition Audio - Wikipedia). The HD Audio pin out in wikipedia matches the pin out on my motherboard.

The case maker is sending me a new front panel board. I’ll reverse engineer the board when I get it. Since Rocky Linux recognizes the headphone being plugged in and removed, my gut feeling is the problem is in software. I’m going to try to install Rocky Linux 8 to see if the headjack works with the older version.

I tested on the closest thing I could find, which was a Viglen PC with front and rear 3.5mm jacks. On the back it has line out and mic, on the front it has “headphones” and mic. It’s running Rocky 8.x with pulse audio.

The first thing I tested was plugging in headphones to the back, and playing sound, which worked, then I plugged the headphones into the front and they also worked. I then did the same on Windows 10, again both worked.

It seems that some kind of software decides to route the audio when the jacks are connected, but I don’t know if there’s a mechanical contact or maybe a resistance check.

Running pacmd, I could see the “port” changing when I switched the headphones from the back to the front. It looks a bit like this; Note where it says “active port”.

ports:
	analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
		properties:
			
	analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
		properties:
			device.icon_name = "audio-speakers"
	analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
		properties:
			device.icon_name = "audio-headphones"
active port: <analog-output-lineout>


ports:
	analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: no)
		properties:
			
	analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
		properties:
			device.icon_name = "audio-speakers"
	analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: yes)
		properties:
			device.icon_name = "audio-headphones"
active port: <analog-output-headphones>

When I wiped out Rocky Linux 9 and installed Linux 8, I still cannot hear though the front panel with headphones.

If I use a multiple meter between pin 5 (LINE2_R) and pin 2(GND), I can see the resistance of the headphone. Same for pin 9 (LINE2_L) and pin 2. Also, the new front panel board from the manufacture works the same.

I also updated the bios but got the same behavior.

If I run “lspci -k” the only Audio entry I get is:

00:1f.3 Audio device: Intel Corporation Alder Lake-S HD Audio Controller (rev 11)
DeviceName: Onboard - Sound
Subsystem: Gigabyte Technology Co., Ltd Device a00d
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel, snd_sof_pci_intel_tgl

With the headphones plugged in, if I run “pacmd list” and search for “active port”, I see

  • index: 3
    name: <alsa_output.usb-Generic_USB_Audio-00.analog-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: RUNNING
    suspend cause: (none)
    priority: 9049
    volume: front-left: 30129 / 46% / -20.25 dB, front-right: 30129 / 46% / -20.25 dB
    balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 19.58 ms
    max request: 1 KiB
    max rewind: 1 KiB
    monitor source: 4
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
    Stereo
    used by: 4
    linked by: 4
    configured latency: 8.00 ms; range is 8.00 … 2000.00 ms
    card: 0 <alsa_card.usb-Generic_USB_Audio-00>
    module: 21
    properties:
    alsa.resolution_bits = “16”
    device.api = “alsa”
    device.class = “sound”
    alsa.class = “generic”
    alsa.subclass = “generic-mix”
    alsa.name = “USB Audio”
    alsa.id = “USB Audio”
    alsa.subdevice = “0”
    alsa.subdevice_name = “subdevice #0
    alsa.device = “0”
    alsa.card = “0”
    alsa.card_name = “USB Audio”
    alsa.long_card_name = “Generic USB Audio at usb-0000:00:14.0-11, high speed”
    alsa.driver_name = “snd_usb_audio”
    device.bus_path = “pci-0000:00:14.0-usb-0:11:1.0”
    sysfs.path = “/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11:1.0/sound/card0”
    udev.id = “usb-Generic_USB_Audio-00”
    device.bus = “usb”
    device.vendor.id = “0414”
    device.vendor.name = “Giga-Byte Technology Co., Ltd”
    device.product.id = “a012”
    device.product.name = “USB Audio”
    device.serial = “Generic_USB_Audio”
    device.string = “front:0”
    device.buffering.buffer_size = “352800”
    device.buffering.fragment_size = “176400”
    device.access_mode = “mmap+timer”
    device.profile.name = “analog-stereo”
    device.profile.description = “Analog Stereo”
    device.description = “USB Audio Analog Stereo”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card-usb”
    ports:
    analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
    properties:
    device.icon_name = “audio-speakers”
    analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: yes)
    properties:
    device.icon_name = “audio-headphones”
    active port:

If I look at the motherboard drivers, I see there is a “Realtek USB Audio Driver” for windows. I’m wondering if I’m using the wrong drivers.

I’m not sure the next step. Maybe submit a bug report to snd_hda_intel. Or try different flavor of Linux, trial of windows, or trail of Red Hat.

It sounds like there are at least two sound cards, try something like

aplay -l

The results of “aplay -l” is:

**** List of PLAYBACK Hardware Devices ****
card 0: Audio [USB Audio], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Audio [USB Audio], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Audio [USB Audio], device 2: USB Audio [USB Audio #2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Audio [USB Audio], device 3: USB Audio [USB Audio #3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [LF32TU87]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 11: HDMI 5 [HDMI 5]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 12: HDMI 6 [HDMI 6]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 13: HDMI 7 [HDMI 7]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 14: HDMI 8 [HDMI 8]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 15: HDMI 9 [HDMI 9]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 16: HDMI 10 [HDMI 10]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 17: HDMI 11 [HDMI 11]
Subdevices: 1/1
Subdevice #0: subdevice #0

I installed ubuntu and fedora, and I got the same problems. Next I tried installing a trial version of windows and the front jack performs as expected.

Why is card 0 saying it’s USB?
card 1 says it’s HDMI, so I’m guessing that’s not connected to the headphone jacks.
In Windows, do you see both cards in sound settings and which one is showing as being in use, and which driver is it using?

@gerry666uk
I assume the way Gigabyte designed the motherboard to use USB audio. The windows audio driver has USB in the name. The back line out port is part the connector on the motherboard. The front audio is connected to the HD audio header. The system diagram of the motherboard shows line out ↔ codec ↔ intel z690 ↔ LGA1700 CPU and HDMI 1.4 ↔ LGA1700 CPU. I’m using the on CPU HDMI graphics. My understanding is that audio can be sent over HDMI. I would assume that is why audio is showing up from the HDMI port.

For Windows, once I found that the headphone jack was working, I wiped out Windows and installed Rocky Linux 9. If you think this is important, I can re-install Windows. The sole reason for Windows test was to verify the hardware was working.

Since Rocky Linux 8 and 9, Ubuntu, and Fedora all have the headphone issue, it would seem that there is an upstream bug. I would assume the bug is either in the kernal or the intel driver (snd_hda_intel). Where should I post the bug report?

Try both cards (assuming card 0 and 1)

cat /proc/asound/card0/codec#0
cat /proc/asound/card1/codec#0

First with both jacks unplugged, then plug in one at a time (front and back) and save output to file ‘audio_card0.txt’, audio_card1.txt etc, then compare the files to see if any flag has changed, e.g. “pin complex, pin ctls”.

@gerry666uk

I don’t have a codec#0.

If I run

ll /proc/asound

I get:

lrwxrwxrwx. 1 root root 5 Dec 23 19:41 Audio → card0
dr-xr-xr-x. 17 root root 0 Dec 23 19:23 card0
dr-xr-xr-x. 52 root root 0 Dec 23 19:23 card1
-r–r–r–. 1 root root 0 Dec 23 19:41 cards
-r–r–r–. 1 root root 0 Dec 23 19:41 devices
-r–r–r–. 1 root root 0 Dec 23 19:41 hwdep
-r–r–r–. 1 root root 0 Dec 23 19:41 modules
dr-xr-xr-x. 4 root root 0 Dec 23 19:41 oss
lrwxrwxrwx. 1 root root 5 Dec 23 19:41 PCH → card1
-r–r–r–. 1 root root 0 Dec 23 19:41 pcm
dr-xr-xr-x. 6 root root 0 Dec 23 19:41 seq
-r–r–r–. 1 root root 0 Dec 23 19:41 timers
-r–r–r–. 1 root root 0 Dec 23 19:41 version

If I run

find /proc/asound/ | grep codec

I get

/proc/asound/card1/codec#2

For the /proc/asound/card1/codec#2, I don’t get a change when no earbud is plugged in, only back, and only front. I noticed /proc/asound/Audio points to card0 and the codec#2 is under card2.

Check if the front panel is using a different sound card to the back panel. On the systems I’ve tested, both are using the same sound card. If it’s a different sound card (front and back), it would need the source switched to the second sound card.

@gerry666uk

I believe both the front and back use the same card.

if I run:

aplay --list-devices

I get:

**** List of PLAYBACK Hardware Devices ****
card 0: Audio [USB Audio], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: Audio [USB Audio], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Audio [USB Audio], device 2: USB Audio [USB Audio #2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Audio [USB Audio], device 3: USB Audio [USB Audio #3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [LF32TU87]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 11: HDMI 5 [HDMI 5]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 12: HDMI 6 [HDMI 6]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 13: HDMI 7 [HDMI 7]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 14: HDMI 8 [HDMI 8]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 15: HDMI 9 [HDMI 9]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 16: HDMI 10 [HDMI 10]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 17: HDMI 11 [HDMI 11]
Subdevices: 1/1
Subdevice #0: subdevice #0

I appears card0 is the USB (front and back jack) and card 0 is HDMI.

If ‘card0’ is serving both back and front, try

ls /proc/asound/card0

@gerry666uk
If I run:

ls /proc/asound/card0

I get:

id pcm0c pcm0p pcm1c pcm1p pcm2c pcm2p pcm3p stream0 stream1 stream2 stream3 usbbus usbid usbmixer