# No sound from HDMI

## KeyMerVin

Hi ^^. First of all, sorry for my bad English

I'll explain my problem; I've got audio though onboard ports, but not from my GTX 1080's HDMI port

The module is loaded in the kernel: 

```
aplay --list-devices

**** 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

card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]

  Subdevices: 1/1

  Subdevice #0: subdevice #0
```

AlsaMixer and other software (like Kmix) find the card as HDA Nvidia, but no sliding avaliable, just "OO" and "MM"

Other commands can see it too

```
head -1 /proc/asound/card*/codec* 

==> /proc/asound/card0/codec#0 <==

Codec: Realtek Generic

==> /proc/asound/card1/codec#0 <==

Codec: Nvidia GPU 83 HDMI/DP
```

Pulseaudio fails to initialize as user, and if I init it as root though pavucontrol it keeps establishing connection

I've modified a little /usr/src/linux/.config with no luck

I've tried modifying alsa.conf, asound.conf, etc, but nothing worked

And now, if I try to execute pulseaudio from console (not pavucontrol), it says this:

```
pulseaudio

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-sink-HDMI 1] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-sink-HDMI 1] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-sink-HDMI 1] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-sink-HDMI 1] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-sink-HDMI 1] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-sink-Generic Digital] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-sink-Generic Digital] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-sink-Generic Digital] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-sink-Generic Digital] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-sink-Generic Digital] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-source-Generic Analog] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-source-Generic Analog] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-source-Generic Analog] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-source-Generic Analog] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [alsa-source-Generic Analog] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] module-console-kit.c: Unable to contact D-Bus system bus: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No existe el fichero o el directorio

E: [pulseaudio] module.c: Failed to load module "module-console-kit" (argument: ""): initialization failed.

E: [pulseaudio] main.c: Module load failed.

E: [pulseaudio] main.c: Fallo al intentar iniciar el demonio (failed trying to init daemon)

```

My user is on audio group

I've looked everywhere, and could not find any solution  :Sad: 

What can I do?

Thanks ^^

EDIT:

I've found out something curious... kernel wants to use the same driver for HDMI's audio than Onboard's

This is Nvidia's lspci -v output:

```
01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)

        Subsystem: Gigabyte Technology Co., Ltd GP104 High Definition Audio Controller

        Flags: bus master, fast devsel, latency 0, IRQ 17

        Memory at df080000 (32-bit, non-prefetchable) [size=16K]

        Capabilities: [60] Power Management version 3

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

        Capabilities: [78] Express Endpoint, MSI 00

        Kernel driver in use: snd_hda_intel

        Kernel modules: snd_hda_intel
```

And this, onboard's audio chip: 

```
00:1f.3 Audio device: Intel Corporation 200 Series PCH HD Audio

        Subsystem: ASUSTeK Computer Inc. 200 Series PCH HD Audio

        Flags: bus master, fast devsel, latency 32, IRQ 131

        Memory at df240000 (64-bit, non-prefetchable) [size=16K]

        Memory at df220000 (64-bit, non-prefetchable) [size=64K]

        Capabilities: [50] Power Management version 3

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

        Kernel driver in use: snd_hda_intel

        Kernel modules: snd_hda_intel
```

----------

## mimosinnet

 *KeyMerVin wrote:*   

> Pulseaudio fails to initialize as user, and if I init it as root though pavucontrol it keeps establishing connection
> 
> And now, if I try to execute pulseaudio from console (not pavucontrol), it says this:
> 
> pulseaudio
> ...

 

media-sound/pavucontrol should work as a user. Do you have udev or eudev correctly configured? Also, could you check D-Bus? In case you are using OpenRC, is ConsoleKit running? 

Cheers!

----------

## NeddySeagoon

KeyMerVin,

Welcome to Gentoo.

HDMI is digital audio. It only has a mute switch, which should be set to OO, so what you see is correct.

----------

## KeyMerVin

I am reinstalling Gentoo from zero, when I finish (tomorrow, today I cant use computer because of an important exam) I'll try more things and show results ^^

@mimosinnet Yes, consolekit was working, or so I think... amyway, that Gentoo's instalation is gone jeje

@NeddySeagoon Thanks ^^

But Im looking for audio to work though HDMI... anyway, thanks for telling me that the "OO" thing is correct ^^

Cheers everyone ^^

----------

## Jaglover

Reinstalling Gentoo is a waste of time indeed. Anything you do in Gentoo can be undone, redone. It is a DIY Linux and you are in control. Your HDMI audio probably was functional, you may have failed to find correct output to use. Often the chipset has more outputs than actually used by your hardware manufacturer. You can test your outputs with a player, for instance. 

```
mpv --audio-device=alsa/hdmi:CARD=PCH,DEV=1 <file>
```

 As an example, this command sends sound to my TV set. I do not use PulseAudio.

----------

## KeyMerVin

Gonna give it a shoot and will tell if it worked ^^

About reinstalling Gentoo... well, I "dirtied" it too much and told myself I would be better reinstalling it. Now I've got a clean and "satisfaying" installation ^^

Edit: Instead of the command, I used VLC and saw all my devices, and tried listening to a song... WORKED

So, now I know that my "HDMI audio" device is "HDA NVidia HDMI 1 HDMI Audio Output"

And, yes, there are more outputs that used, jeje. But that one is the right one ^^

I guess all I have to do now is make that one default instead of Intel's

How can I do that?

Though the asound.conf?

Thanks ^^

Edit: I guess that I would want to use mpv, I'll first need to install it, because terminal can't find the order, jeje

----------

## NeddySeagoon

KeyMerVin,

How you switch sound card order depends on how you made the snd-hda-intel module.

You need to pass it a module parameter when it loads.

----------

## KeyMerVin

How do I do that?

Thanks and sorry jeje

----------

## NeddySeagoon

KeyMerVin,

Is your snd-hda-intel built into your kernel or is it a loadable module?

----------

## KeyMerVin

I'm almost sure its as a module

----------

## KeyMerVin

I FOUND THE WAY ^^

Taking as a guide the last 2 responsed here: https://forums.gentoo.org/viewtopic-t-1051046-start-0.html

My device was number 7, comparing which one worked with VLC and to which corresponds on the output of aplay --list-devices 

So, my solution has been creating a file /etc/asound.conf and write on it:

defaults.pcm.!card NVidia

defaults.pcm.!device 7

defaults.pcm.!ctl NVidia

The problem is that it looks like KDE has broke...

Im gonna modify the file and see ^^

THANKS ^^

EDIT: I DID NOT NEED MODIFYING ANYTHING, problem was solved with a simple reboot ^^Last edited by KeyMerVin on Fri Apr 27, 2018 8:49 pm; edited 2 times in total

----------

## NeddySeagoon

KeyMerVin,

As root, try 

```
modprobe -r snd-hda-intel

modprobe snd-hda-intel index=1,0
```

If that works, you need to pass  index=1,0  to snd-hda-intel when its loaded

Look in lsmod for  snd-hda-intel

----------

## KeyMerVin

Well, modprobe -r snd-hda-intel returns this:

```
modprobe -r snd-hda-intel

modprobe: FATAL: Module snd_hda_intel is in use.

```

And modprobe snd-hda-intel index=1,0	returns nothing jeje

Anyway, my device is working by default, but I've got just another little problem: cant increase or decrease volume though KMix. I can for Intel's device, but not for NVidia. For NVidia I can just mute or unmute, there is no slider

Anyway to solve this?

But... no problem anyway if there is not, I can live with it, jeje. I can decrease or increase volumen though firefox for multimedia streaming, of from the TV itself, so no big deal ^^

Oh, and KDE s (Plasma) problem got solved by simply rebooting system ^^

EDIT: Oh, and, yes, snd-hda-intel is visible on lsmod output. Here is the complete output; 

```
lsmod

Module                  Size  Used by

cfg80211              581632  0

nouveau              1568768  2

rfkill                 24576  3 cfg80211

8021q                  24576  0

garp                   16384  1 8021q

stp                    16384  1 garp

llc                    16384  2 garp,stp

x86_pkg_temp_thermal    16384  0

coretemp               16384  0

kvm                   581632  0

snd_hda_codec_hdmi     49152  1

snd_hda_codec_generic    73728  1

snd_hda_intel          36864  4

snd_hda_codec         135168  3 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic

snd_hda_core           81920  4 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic

snd_hwdep              16384  1 snd_hda_codec

ttm                    98304  1 nouveau

drm_kms_helper        155648  1 nouveau

snd_pcm               110592  4 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi

drm                   360448  5 nouveau,ttm,drm_kms_helper

syscopyarea            16384  1 drm_kms_helper

sysfillrect            16384  1 drm_kms_helper

sysimgblt              16384  1 drm_kms_helper

iTCO_wdt               16384  0

iTCO_vendor_support    16384  1 iTCO_wdt

snd_timer              32768  1 snd_pcm

fb_sys_fops            16384  1 drm_kms_helper

nvidiafb               49152  0

irqbypass              16384  1 kvm

snd                    86016  15 snd_hda_intel,snd_hwdep,snd_hda_codec,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_pcm

i2c_i801               24576  0

crc32c_intel           24576  0

fb_ddc                 16384  1 nvidiafb

vgastate               20480  1 nvidiafb

e1000e                245760  0

ghash_clmulni_intel    16384  0

mxm_wmi                16384  1 nouveau

serio_raw              16384  0

soundcore              16384  1 snd

i2c_smbus              16384  1 i2c_i801

cryptd                 24576  1 ghash_clmulni_intel

pcspkr                 16384  0

video                  40960  1 nouveau

wmi                    16384  2 mxm_wmi,nouveau

efivarfs               16384  1

xts                    16384  0

gf128mul               16384  1 xts

cbc                    16384  0

sha256_generic         20480  0

iscsi_tcp              20480  0

libiscsi_tcp           24576  1 iscsi_tcp

libiscsi               53248  2 libiscsi_tcp,iscsi_tcp

scsi_transport_iscsi    98304  2 libiscsi,iscsi_tcp

vmxnet3                57344  0

virtio_net             28672  0

virtio_ring            24576  1 virtio_net

virtio                 16384  1 virtio_net

tg3                   163840  0

sky2                   61440  0

r8169                  81920  0

pcnet32                45056  0

mii                    16384  2 r8169,pcnet32

igb                   200704  0

ptp                    20480  3 tg3,igb,e1000e

pps_core               20480  1 ptp

dca                    16384  1 igb

i2c_algo_bit           16384  3 nvidiafb,igb,nouveau

i2c_core               65536  9 fb_ddc,nvidiafb,i2c_algo_bit,igb,i2c_i801,nouveau,i2c_smbus,drm_kms_helper,drm

e1000                 143360  0

bnx2                   81920  0

atl1c                  49152  0

fuse                   98304  1

xfs                  1175552  0

nfs                   233472  0

lockd                  73728  1 nfs

grace                  16384  1 lockd

sunrpc                303104  2 lockd,nfs

fscache                61440  1 nfs

jfs                   172032  0

reiserfs              233472  0

btrfs                1028096  0

ext4                  565248  1

jbd2                  102400  1 ext4

ext2                   73728  0

mbcache                16384  3 ext4,ext2

linear                 16384  0

raid10                 49152  0

raid1                  36864  0

raid0                  20480  0

dm_raid                40960  0

raid456               102400  1 dm_raid

async_raid6_recov      20480  1 raid456

async_memcpy           16384  2 raid456,async_raid6_recov

libcrc32c              16384  2 xfs,raid456

async_pq               16384  2 raid456,async_raid6_recov

async_xor              16384  3 async_pq,raid456,async_raid6_recov

xor                    24576  2 async_xor,btrfs

async_tx               16384  5 async_xor,async_pq,raid456,async_memcpy,async_raid6_recov

raid6_pq              110592  4 async_pq,btrfs,raid456,async_raid6_recov

dm_snapshot            40960  0

dm_bufio               28672  1 dm_snapshot

dm_crypt               28672  0

dm_mirror              24576  0

dm_region_hash         20480  1 dm_mirror

dm_log                 20480  2 dm_mirror,dm_region_hash

dm_mod                114688  6 dm_raid,dm_mirror,dm_log,dm_bufio,dm_crypt,dm_snapshot

firewire_core          65536  0

crc_itu_t              16384  1 firewire_core

sl811_hcd              24576  0

xhci_pci               16384  0

xhci_hcd              192512  1 xhci_pci

usb_storage            69632  0

aic94xx                81920  0

libsas                 73728  1 aic94xx

lpfc                  647168  0

qla2xxx               630784  0

megaraid_sas          131072  0

megaraid_mbox          36864  0

megaraid_mm            20480  1 megaraid_mbox

aacraid               102400  0

sx8                    24576  0

hpsa                  102400  0

cciss                 118784  0

3w_9xxx                45056  0

3w_xxxx                36864  0

3w_sas                 28672  0

mptsas                 61440  0

scsi_transport_sas     45056  4 libsas,hpsa,mptsas,aic94xx

mptfc                  24576  0

scsi_transport_fc      57344  3 lpfc,qla2xxx,mptfc

mptspi                 24576  0

mptscsih               40960  3 mptfc,mptsas,mptspi

mptbase               102400  4 mptscsih,mptfc,mptsas,mptspi

imm                    20480  0

parport                49152  1 imm

sym53c8xx              81920  0

initio                 28672  0

arcmsr                 45056  0

aic7xxx               122880  0

aic79xx               135168  0

scsi_transport_spi     32768  4 aic79xx,aic7xxx,sym53c8xx,mptspi

sr_mod                 24576  0

cdrom                  61440  1 sr_mod

sg                     36864  0

sd_mod                 49152  2

pdc_adma               16384  0

sata_inic162x          16384  0

sata_mv                32768  0

ata_piix               36864  0

ahci                   36864  1

libahci                32768  1 ahci

sata_qstor             16384  0

sata_vsc               16384  0

sata_uli               16384  0

sata_sis               16384  0

sata_sx4               20480  0

sata_nv                28672  0

sata_via               20480  0

sata_svw               16384  0

sata_sil24             20480  0

sata_sil               16384  0

sata_promise           20480  0

pata_via               16384  0

pata_jmicron           16384  0

pata_marvell           16384  0

pata_sis               20480  1 sata_sis

pata_netcell           16384  0

pata_pdc202xx_old      16384  0

pata_atiixp            16384  0

pata_amd               20480  0

pata_ali               16384  0

pata_it8213            16384  0

pata_pcmcia            20480  0

pata_serverworks       16384  0

pata_oldpiix           16384  0

pata_artop             16384  0

pata_it821x            20480  0

pata_hpt3x2n           16384  0

pata_hpt3x3            16384  0

pata_hpt37x            20480  0

pata_hpt366            16384  0

pata_cmd64x            16384  0

pata_sil680            16384  0

pata_pdc2027x          16384  0

```

Thanks ^^

----------

## NeddySeagoon

KeyMerVin,

You can't unload a module thats in use.

```
snd_hda_codec_hdmi     49152  1

snd_hda_codec_generic    73728  1

snd_hda_intel          36864  4 
```

It used by 4 things and lsmod only lists two.

No sliders on digital outputs is a feature, not a problem.

The device on the end of digital sound will convert it back to analogue and provide controls.

It appears that setting the index parameter at module load time is old fashioned.

See the Gentoo Wiki

----------

## KeyMerVin

Thanks ^^

----------

