# No audio on haswell board

## Uroc327

I've installed gentoo on a machine with a Haswell processor (4790k) on a z97 board (ga-z97x-ud3h). I'm using a gt 730 from nvidia to connect my display via vga (no HDMI). The speaker is connected to the audio jack (the green one) on the backside of my machine.

The problem I have is, that I can't get audio to work. Sometimes when scrolling in chrome or when downloading something with wget, I hear a bit of crackling from my speakers.

My audio devices:

```

> lspci | grep -i audio

00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)

00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller

01:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)

```

My alsa config:

```

> cat /proc/asound/cards

 0 [PCH            ]: HDA-Intel - HDA Intel PCH

                      HDA Intel PCH at 0xf7930000 irq 34

 2 [NVidia         ]: HDA-Intel - HDA NVidia

                      HDA NVidia at 0xf7080000 irq 17

> aplay -L

null

    Discard all samples (playback) or generate zero samples (capture)

default:CARD=PCH

    HDA Intel PCH, ALC1150 Analog

    Default Audio Device

sysdefault:CARD=PCH

    HDA Intel PCH, ALC1150 Analog

    Default Audio Device

front:CARD=PCH,DEV=0

    HDA Intel PCH, ALC1150 Analog

    Front speakers

surround21:CARD=PCH,DEV=0

    HDA Intel PCH, ALC1150 Analog

    2.1 Surround output to Front and Subwoofer speakers

surround40:CARD=PCH,DEV=0

    HDA Intel PCH, ALC1150 Analog

    4.0 Surround output to Front and Rear speakers

surround41:CARD=PCH,DEV=0

    HDA Intel PCH, ALC1150 Analog

    4.1 Surround output to Front, Rear and Subwoofer speakers

surround50:CARD=PCH,DEV=0

    HDA Intel PCH, ALC1150 Analog

    5.0 Surround output to Front, Center and Rear speakers

surround51:CARD=PCH,DEV=0

    HDA Intel PCH, ALC1150 Analog

    5.1 Surround output to Front, Center, Rear and Subwoofer speakers

surround71:CARD=PCH,DEV=0

    HDA Intel PCH, ALC1150 Analog

    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

iec958:CARD=PCH,DEV=0

    HDA Intel PCH, ALC1150 Digital

    IEC958 (S/PDIF) Digital Audio Output

hdmi:CARD=NVidia,DEV=0

    HDA NVidia, HDMI 0

    HDMI Audio Output

hdmi:CARD=NVidia,DEV=1

    HDA NVidia, HDMI 1

    HDMI Audio Output

> cat /etc/modprobe.d/alsa.conf

#options snd cards_limit=1 Set in kernel cmdline

options snd-hda-intel id=PCH index=0

options snd-hda-intel id=HDMI index=1

```

My video drivers:

```

x11-drivers/nvidia-drivers-355.11-r2

x11-drivers/xf86-video-intel-2.99.917-r2

```

dmesg complaints:

```

> dmesg | grep -i snd

[    0.000000] Command line: \vmlinuz-4.2.2-gentoo root=PARTUUID=9531bb52-53f2-4b45-a047-ad0aa5800f8c ro fbcon=scrollback:1024k snd.cards_limit=1 quiet

[    0.000000] Kernel command line: \vmlinuz-4.2.2-gentoo root=PARTUUID=9531bb52-53f2-4b45-a047-ad0aa5800f8c ro fbcon=scrollback:1024k snd.cards_limit=1 quiet

[    1.958586] snd_hda_intel 0000:00:03.0: enabling device (0000 -> 0002)

[    1.958660] snd_hda_intel 0000:00:03.0: Haswell must build in CONFIG_SND_HDA_I915

[    1.958680] snd_hda_intel 0000:00:1b.0: enabling device (0000 -> 0002)

[    1.958932] snd_hda_intel 0000:01:00.1: Disabling MSI

[    1.967937] snd_hda_codec_realtek hdaudioC0D2: ALC1150: SKU not ready 0x00000000

[    1.968444] snd_hda_codec_realtek hdaudioC0D2: autoconfig for ALC1150: line_outs=3 (0x14/0x15/0x16/0x0/0x0) type:line

[    1.968446] snd_hda_codec_realtek hdaudioC0D2:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)

[    1.968447] snd_hda_codec_realtek hdaudioC0D2:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)

[    1.968447] snd_hda_codec_realtek hdaudioC0D2:    mono: mono_out=0x0

[    1.968448] snd_hda_codec_realtek hdaudioC0D2:    dig-out=0x11/0x1e

[    1.968449] snd_hda_codec_realtek hdaudioC0D2:    inputs:

[    1.968450] snd_hda_codec_realtek hdaudioC0D2:      Front Mic=0x19

[    1.968450] snd_hda_codec_realtek hdaudioC0D2:      Rear Mic=0x18

[    1.968451] snd_hda_codec_realtek hdaudioC0D2:      Line=0x1a

```

But I can't figure out, how to combine the config_snd_hda_i915 option with the nvidia driver, as the nvidia driver does not like the direct rendering manager system required by the config_drm_i915, which is in turn required to enable config_snd_hda_i915.

Any ideas how to get audio working but benefitting from the nvidia video card/video driver?

If I forgot some informations please ask  :Smile: 

----------

## Keruskerfuerst

You need to configure the Intel HDA audio device.

Add the driver in the kernel.

----------

## Uroc327

Should be loaded, I think:

```

> lsmod | grep -i snd

snd_hda_codec_hdmi     36497  1

snd_hda_codec_realtek    57006  1

snd_hda_codec_generic    53015  1 snd_hda_codec_realtek

snd_hda_intel          19669  0

snd_hda_codec          80619  4 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel

snd_hwdep               5994  1 snd_hda_codec

snd_hda_core           34864  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel

```

----------

## Keruskerfuerst

snd_hda_intel          19669  0 

The driver for the Intel HDA is not loaded.

----------

## Uroc327

Hmm.. neither adding snd_hda_intel to my /etc/conf.d/modules nor loading it by hand using modprobe (after rmmod snd_hda_intel) changes lsmods snd_hda_intel entry.

Also dmesg doesn't say anything new besides the lines from my first post.

----------

## guido.hatzsis

Have you enabled iommu? I can't get the intel HDMI driver to work with VT-d enabled. Try booting with intel_iommu=off

----------

## krinn

 *Keruskerfuerst wrote:*   

> snd_hda_intel          19669  0 
> 
> The driver for the Intel HDA is not loaded.

 

Sorry it is.

If any module is list by lsmod, then the module is loaded.

The 0 value shown here is the module dependencies, a dep on b will output a=1 and b=0 (b doesn't depend on a) but both a & b are loaded.

You can also have a dep that is not even a module and get the output a=1 (but no b shown as b isn't a module itself).

OP:

You have 3 cards reports, the 03.0, the 1b.0 and the 00.1 (the hdmi one), and only two are enable from your output (and i think both 03.0 and 1b.0 should use the same snd_hda_intel).

Are you sure the connectors from the mb where you plug the jack in are the ones handle by the card that is enable?

That's something cards_limit should set, yours seems not set, the 3 should be enable so, but you have only 2 listed.

Re-check if you didn't limit your cards to 2 only, and by doing that, you have disable the 3rd card which is the one handling the jack output.

From your output, i could tell you the 1b.0 is the classic mb chip use ; and this is the one that should be enable and that should logically own the jack output.

If it could help you, have a look

```
lspci | grep Audio

00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller

01:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1)

```

----------

## Uroc327

My kernel cmdline contains 

```
snd.cards_limit=1
```

 (as seen in dmesg).

So basically I shouldn't have two cards but only one, correct?

Also have a look at my alsa.conf (first post) where I explicitely map IDs to indices (at least I think I do).

I'm pretty sure I plugged the audio cable into the correct jack (the green one). (Picture of my motherboard back panel)

----------

## krinn

This is not a question if you plug-in the cable inside the green jack or not.

The question is : if you plug it inside the green jack, but the green jack is handle by card Z, if you enable card Y only : you will have no sound, because card Z is the one that own the green jack.

```
[    1.958586] snd_hda_intel 0000:00:03.0: enabling device (0000 -> 0002)

[    1.958660] snd_hda_intel 0000:00:03.0: Haswell must build in CONFIG_SND_HDA_I915

[    1.958680] snd_hda_intel 0000:00:1b.0: enabling device (0000 -> 0002)

```

We can see the snd_hda_intel is handling both the 03.0 device and the 01.0 device.

We can see the 03.0 device appears FIRST (it's important, most computer related software like to do: first see, first serve)

Now if you limit your cards to one, why are you sure the only one enable is the 01.0 (that should be the one using the handling the green jack)?

You should kill the limit, to makes sure all can be seen, allowing you to figure out who is who easier. Once you get sounds, put your limit or special things like you wish, but you know it works.

You can also just make sure intel_pch is really the 01.0 by checking in dmesg if irq 34 (report in use by intel_pch) is own by 01.0 card.

(look: easier for me, i have only one card using intel_snd_hda)

```
cat /proc/asound/cards

 0 [PCH            ]: HDA-Intel - HDA Intel PCH

                      HDA Intel PCH at 0xdf530000 irq 28

 1 [NVidia         ]: HDA-Intel - HDA NVidia

                      HDA NVidia at 0xdf080000 irq 17

dmesg | grep "irq 28"

[    3.809628] snd_hda_intel 0000:00:1b.0: irq 28 for MSI/MSI-X

```

For your question about limit=1 should display only 1 card: sorry i don't have the answer to this one, i never really check what limit=1 should do.

If limit=1 should display 1 card, but we can see 2 (pch + hdmi) ; so if we assume limit=1 limit only the handling to one card, but not the cards themselves, it's then logic to see 2 cards. But assuming this would mean you should see 3 and not only 2!

The only logical explain for me would be, limiting usage to 1 card, but when you ask alsa, it display only "active cards", so 2 (as your haswell complains about missing dri)

Anyway that sure a good sign you should not use any limit until you have fix your issue.

----------

## frostschutz

I don't use HDMI sound and in recent kernels the HDMI sound card vanished I guess because "# CONFIG_SND_HDA_CODEC_HDMI is not set"?

Anyway, remove limits, check /proc/asound/cards is a good first step. Alsamixer second step ...

I used to have snd_hda_intel.index=1 in my kernel command line because otherwise the HDMI card would end up being the default/first card even though I wanted to use the other one...

----------

## Uroc327

I've removed all the special things, in particular snd.cards_limit=1 from my cmdline and the options snd-hda-intel id=.. index=... lines from my /etc/modprobe.d/alsa.conf (which is empty now).

My cards:

```

> cat /proc/asound/cards

 1 [PCH            ]: HDA-Intel - HDA Intel PCH

                      HDA Intel PCH at 0xf7930000 irq 34

 2 [NVidia         ]: HDA-Intel - HDA NVidia

                      HDA NVidia at 0xf7080000 irq 17

```

Dmesg check for my intel card:

```

> dmesg | grep -i snd | grep -i irq

```

prints nothing. (grep -i irq only doesn't print anything sound related:

```

[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)

[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)

[    0.000000] ACPI: IRQ0 used by override.

[    0.000000] ACPI: IRQ9 used by override.

[    0.000000] NR_IRQS:4352 nr_irqs:488 16

[    0.103146] ACPI: PCI Interrupt Link [LNKA] (IRQs 4 6 10 *11 12 14 15)

[    0.103170] ACPI: PCI Interrupt Link [LNKB] (IRQs 4 6 *10 11 12 14 15)

[    0.103192] ACPI: PCI Interrupt Link [LNKC] (IRQs 4 6 10 *11 12 14 15)

[    0.103213] ACPI: PCI Interrupt Link [LNKD] (IRQs 4 6 10 *11 12 14 15)

[    0.103235] ACPI: PCI Interrupt Link [LNKE] (IRQs 4 6 10 *11 12 14 15)

[    0.103256] ACPI: PCI Interrupt Link [LNKF] (IRQs 4 6 10 11 12 14 15) *0, disabled.

[    0.103279] ACPI: PCI Interrupt Link [LNKG] (IRQs 4 6 *10 11 12 14 15)

[    0.103301] ACPI: PCI Interrupt Link [LNKH] (IRQs 4 6 *10 11 12 14 15)

[    0.103684] PCI: Using ACPI for IRQ routing

[    0.104996] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0

[    0.171076] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled

[    0.191581] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A

[    0.197613] ata1: SATA max UDMA/133 abar m2048@0xf7939000 port 0xf7939100 irq 30

[    0.197614] ata2: SATA max UDMA/133 abar m2048@0xf7939000 port 0xf7939180 irq 30

[    0.197615] ata3: SATA max UDMA/133 abar m2048@0xf7939000 port 0xf7939200 irq 30

[    0.204950] ehci-pci 0000:00:1a.0: irq 16, io mem 0xf793b000

[    0.214106] ehci-pci 0000:00:1d.0: irq 23, io mem 0xf793a000

[    0.220555] serio: i8042 KBD port at 0x60,0x64 irq 1

[    0.220558] serio: i8042 AUX port at 0x60,0x64 irq 12

[    0.220860] rtc_cmos 00:02: alarms up to one month, y3k, 242 bytes nvram, hpet irqs

```

)

When executing alsamixer or amixer, no default sound card is found:

```

> alsamixer

cannot open mixer: No such file or directory

> amixer

amixer: Mixer attach default error: No such file or directory

```

Starting alsamixer with -c PCH works, but doesn't let me select default via F6 with the same error (mixer default not found).

----------

## Uroc327

Update: I've tried messing a bit with sound running a system with CONFIG_DRM_I915.

Now I see all three cards: Intel HDMI (which is missing without the i915 driver (actually not a surprise)), Intel PCH and NVidia HDMI.

alsamixer and amixer were able to find a default sound card now (the intel HDMI).

dmesg didn't provide any new information compared to what was already posted in this thread.

Testing with chromium (default sound card only) and speaker-test (various sound cards/devices) still didn't result in any sound :/

I then kept the i915 driver but changed the order of the two intel cards by writing

```

options snd-hda-intel id=PCH index=0

options snd-hda-intel id=HDMI index=1

```

into /etc/modprobe.d/alsa.conf.

This results in the PCH card being default as supposed. But still no sound using chromium or speaker-test.

ATM I still have those two lines in my /etc/modprobe.d/alsa.conf, but I do not build with CONFIG_DRM_I915 anymore as this results in annyoing conflicts with the nvidia driver.

So now I have the PCH card as default card, the NVidia HDMI card as second card, no third card and no sound.

----------

## krinn

I think you're closer to solve, or maybe even already at it.

You should really use a headphone and plug it on all jacks to really test (why the headphone, to remove potential problem coming from your current speakers).

Do the mixer works in alsamixer with the PCH per default now?

----------

## Uroc327

alsamixer defaults correctly to the Intel PCH card and shows (presumably correct) volume controls.

I've now tested every jack (using my normal speaker which works under windows on this machine and a headphone) on the back as well as on the front while the speaker-test command was running (without any args).

None of the outputs made any noise.

----------

## krinn

I must say i'm not bad with sound trouble, but i have myself limits.

If the mixer works, volume can be change, speaker-test/application could play a sound file (but no sound output) ; and trying every jacks you still have no sound ; then you've reach my limits  :Sad: 

I could only suggest this (by experience) ; when you try things, you will make assumptions : this is good, that is bad... While doing tests, you will change X and Y and K and L... if you find progress when trying X, you will assume X seems good... and may never again requestion if X is really good or not.

So, as boring as it is, you should try forget everything, and requestion everything you've made because something you assume as good (or bad), may not be as good (or bad) as you think, and your solve may just be in front of your eyes, but you just never look at it as it cannot be that.

I know it sucks, but for me, everything looks ok from a software side (specially the mixer levels and speaker-test, that prove mixer is working, and driver is also working), hence i think it comes from a "stupidity" (you know the little thing we use to do that ashamed us later? like checking mixer volume just to finally find out, mixers is in mute state, something that will never prevent playing with volume, while of course no sound until you uncheck it) you've made earlier that will remain forgotten until you requestion it.

----------

## Uroc327

Okay.. I'll dig through documentations and configs again and will recapitulate my audio installation and configuration.

Maybe I'll even follow the ubuntu wiki to get a (hopefully) completely different pov to the whole problem.

Big thanks anyway  :Smile: 

----------

## krinn

Just think about it right now (sorry, sometimes, i'm soooo slowww at thinking).

Use gentoo livedvd (or the one you love, with sound support in it), this way, you will be able to output some sounds, making sure at least hardware is like it should (speakers ok, plug where they should...) ; and you will be able at least to frozen this setup that is working, and only alter software then.

----------

## Uroc327

Will try this, thanks.

Though pure hardware should be alright, as the sound works under windows.

----------

## Krog

any solution?

i have a similar problem with the motherboard Asus z170i Pro Gaming

lspci:

```
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)

        Subsystem: ASUSTeK Computer Inc. Sunrise Point-H HD Audio

        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B DisINTx+

        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

        Latency: 32

        Interrupt: pin A routed to IRQ 134

        Region 0: Memory at f7140000 (64-bit, non-prefetchable) [size=16K]

        Region 4: Memory at f7120000 (64-bit, non-prefetchable) [size=64K]

        Capabilities: [50] Power Management version 3

                Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)

                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-

        Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+

                Address: 00000000fee0f00c  Data: 41a2

        Kernel driver in use: snd_hda_intel

```

kmix and alsamixer show the volume bars...

```
cat /proc/asound/cards

 0 [PCH            ]: HDA-Intel - HDA Intel PCH

                      HDA Intel PCH at 0xf7140000 irq 134
```

dmesg:

```
dmesg | grep -i snd

[    1.106031] snd_hda_intel 0000:00:1f.3: Haswell must build in CONFIG_SND_HDA_I915

[    1.106353] usbcore: registered new interface driver snd-usb-audio

[    1.115846] snd_hda_codec_realtek hdaudioC0D0: ALC1150: SKU not ready 0x00000000

[    1.116878] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC1150: line_outs=3 (0x14/0x15/0x16/0x0/0x0) type:line

[    1.117145] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)

[    1.117408] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)

[    1.117746] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0

[    1.117943] snd_hda_codec_realtek hdaudioC0D0:    dig-out=0x11/0x1e

[    1.118121] snd_hda_codec_realtek hdaudioC0D0:    inputs:

[    1.118299] snd_hda_codec_realtek hdaudioC0D0:      Front Mic=0x19

[    1.118565] snd_hda_codec_realtek hdaudioC0D0:      Rear Mic=0x18

[    1.118761] snd_hda_codec_realtek hdaudioC0D0:      Line=0x1a

[  116.365364] snd_hda_intel 0000:00:1f.3: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.

```

but in the end... no sound!

(windows works fine, so no hardware issues or bad cabling)

----------

## Krog

I solved my problem, timidity was stucking my /dev/dsp

I went crazy for 2 days to discover that!   :Twisted Evil: 

----------

