GTX 1060 - No Audio over HDMI - Only HDA Intel detected - Azalia

@ generix
thanks

I have ubuntu 17.10 which defaults to 4.13. However, I can install a 4.15 kernel and nvidia works with it (390.48).
But I still can’t get audio over display port if I’m running hybrid graphics (modeset=1)
I can only get audio over DP if i use the BIOS setting in my thinkpad for pure discrete graphics.

Should I be expecting display port audio in hybrid graphics?

Tim, how are you enabling the audio device when in hybrid mode? Does the audio device show up when you issue

sudo lspci -d 10de:*

Please run nvidia-bug-report.sh after attaching monitor and enabling audio and attach. Also run

sudo lspci -d 10de:* -xxx

and attach the output.

Hi Generix,
I am not doing anything to enable it … I hoped it would just work :)

bug report will be attached

tim@raffles:~$ sudo lspci -d 10de:*
[sudo] password for tim: 
01:00.0 VGA compatible controller: NVIDIA Corporation GM107GLM [Quadro M1000M] (rev a2)
tim@raffles:~$
tim@raffles:~$ sudo lspci -d 10de:* -xxx
01:00.0 VGA compatible controller: NVIDIA Corporation GM107GLM [Quadro M1000M] (rev a2)
00: de 10 b1 13 07 00 10 00 a2 00 00 03 00 00 00 00
10: 00 00 00 d3 0c 00 00 c0 00 00 00 00 0c 00 00 d0
20: 00 00 00 00 01 40 00 00 00 00 00 00 aa 17 2e 22
30: 00 00 00 00 60 00 00 00 00 00 00 00 ff 01 00 00
40: aa 17 2e 22 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 00 00 00 01 00 00 00 ce d6 23 00 00 00 00 00
60: 01 68 03 00 08 00 00 00 05 78 81 00 78 03 e0 fe
70: 00 00 00 00 00 00 00 00 10 00 02 00 e1 8d 2c 01
80: 30 21 00 00 03 4d 45 00 43 01 03 11 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 13 08 04 00
a0: 00 04 00 00 0e 00 00 00 03 00 1f 00 00 00 00 00
b0: 00 00 00 00 09 00 14 01 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

tim@raffles:~$

nvidia-bug-report.log.gz (115 KB)

lol…ok, no, this does not work ootb yet, you’ll have to use the nvhda module for that.

OK :)
ThinkPad P50 with M1000M

tim@raffles:~$ lsmod | grep nvhda
nvhda 16384 0

tim@raffles:~$ sudo lspci -d 10de:*
[sudo] password for tim:
01:00.0 VGA compatible controller: NVIDIA Corporation GM107GLM [Quadro M1000M] (rev a2)
01:00.1 Audio device: NVIDIA Corporation Device 0fbc (rev a1)
tim@raffles:~$
[so that’s good I guess]

I’m using cinnamon but can also run pulse audio control panel, but the hdmi device is not shown.

tim@raffles:~$ sudo lspci -d 10de:* -xxx
01:00.0 VGA compatible controller: NVIDIA Corporation GM107GLM [Quadro M1000M] (rev a2)
00: de 10 b1 13 07 00 10 00 a2 00 00 03 00 00 80 00
10: 00 00 00 d3 0c 00 00 c0 00 00 00 00 0c 00 00 d0
20: 00 00 00 00 01 40 00 00 00 00 00 00 aa 17 2e 22
30: 00 00 00 00 60 00 00 00 00 00 00 00 ff 01 00 00
40: aa 17 2e 22 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 01 00 00 00 ce d6 23 00 00 00 00 00
60: 01 68 03 00 08 00 00 00 05 78 81 00 d8 03 e0 fe
70: 00 00 00 00 00 00 00 00 10 00 02 00 e1 8d 2c 01
80: 30 21 00 00 03 4d 45 00 43 01 03 11 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 13 08 04 00
a0: 00 04 00 00 0e 00 00 00 03 00 1f 00 00 00 00 00
b0: 00 00 00 00 09 00 14 01 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

01:00.1 Audio device: NVIDIA Corporation Device 0fbc (rev a1)
00: de 10 bc 0f 00 00 10 00 a1 00 03 04 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 60 00 00 00 00 00 00 00 00 02 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 ce d6 23 00 00 00 00 00
60: 01 68 03 00 08 00 00 00 05 78 80 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 10 00 02 00 e1 8d 2c 01
80: 30 29 00 00 03 4d 45 00 00 01 03 11 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 13 08 04 00
a0: 00 00 00 00 0e 00 00 00 00 00 01 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

nvidia-bug-report.log.gz (117 KB)

Tim, the audio device is turned on but the dmesg output looks odd, as if there’s nothing connected to it.
Does turning it off and on again make it work?

sudo tee /proc/acpi/nvhda <<<OFF
sudo tee /proc/acpi/nvhda <<<ON

Thank you so much! HDMI sound now working on Alienware 17r4, Ubuntu Bionic, 18.04.

the funny thing is that when I am in discrete nvidia mode, I have two Nvidia audio devices, one for the HDMI screen (which has no speakers) and one for the display port screen (the one I want).
When the system lists only one, and you see that it has nothing connected, I guess it is seeing the HDMI one only?
I have a confession to make. Today I ordered a Thinkpad t480 and I’m selling out of Optimus … Ubuntu 18.04 was the final straw, it was the best optimus solution for my use case, and now it just makes me :( Partly I use linux because it’s fun, and this has stopped being fun.

Understandable, Tim. Though your audio problems rather sounds like a design/firmware issue of that specific model. Would only be interesting to see the behaviour running Windows.

I make antoher try and it’s ok … !

From linux mint mate 18.3,

I installed a newer kernel 4.15.0-22-generic from a ppa
I reinstalled nvidia drivers from a ppa too
I make whats it sayed here https://devtalk.nvidia.com/default/topic/1024022/linux/gtx-1060-no-audio-over-hdmi-only-hda-intel-detected-azalia/post/5230494/#5230494
And it’s ok

I don’t try a lot, i hope it’will be stable …

Thank’s a lot for this patch and workarround, but it was difficult and i think a lot of poeple don’t know and have not the time to do this :(

arn_epsilon, to have that stable, use the updated module from here:
[url]https://github.com/hhfeuer/nvhda[/url]
and use the dkms install method. Afterwards, run
sudo update-initramfs -u

This will keep the module recompiled on kernel updates.

@ generix

Thank’s !
I will see that

but i’m not sure if I used dkms, because usually i had some bug with that (maybe because virtualbox was ugly in last version or mint … )

So now I hope it will not have so much probleme to configure vga passthrough.

I used the Maik Freudenberg Module and indeed it fixed the problem … but to add to this

I love to fool around until it is BROKE, knowing I can fix it with the aforementioned “Kernel Module” …

and used UKUU to install a bleeding edge Kernel that Ubuntu is NOT installing even with “Developer Mode” Checked … Ubuntu 18.04-1 is using 4-15 from JANUARY!!!

… so I found a tool called UKUU (needed a repository - I think … installed easy-peasy,and installed kernel 4-18 from THIS MONTH SEPTEMBER

Loving Linux for years, but could not believe my 1 week grief with a new cutting edge Omen X laptop - No HDMI / HDA / Nvidia Sound or Card as ALL on this forum know …

and this kernel SEEMS to have fixed it !! Just makes SENSE - How could they NOT! was my thinking as this problem has been around for almost a year!!!

and when I realized Ubuntu’s kernel is about that age … well the rest is history!

Working Great, now Mark

I also have an ASUS GL502VM with a GTX 1060 and I have a similar problem with some caveats. I’m loading the module using /etc/initramfs-tools/modules and I enable the audio output by placing “options nvhda load_state=1” at /etc/modprobe.d/nvhda.conf, but then I’m unable to get my laptop to sleep.

I’m using Kubuntu 18.10 and it will just hang with an error message that I believe has something to do with not being able to put all devices to sleep and it eventually kicks me back to the login screen. However, if I manually disable the audio output output before “sudo tee /proc/acpi/nvhda <<< OFF” I’m then able to get it to sleep. I then have to turn it on again after I resume it with “sudo tee /proc/acpi/nvhda <<< ON”. I automated this process using the a variation of the systemd units provided a few posts back and it has been working fine so far, but I still feel that it is flimsy solution.

Interestingly enough, If I manually “modprobe nvhda” after login from a terminal and if I enable the audio output with “sudo tee /proc/acpi/nvhda <<< ON” I’m able to sleep and resume. In that case, I still have the same problem as you, the HDMI audio output stops working, but by issuing “sudo tee /proc/acpi/nvhda <<< OFF” followed by “sudo tee /proc/acpi/nvhda <<< OFF” I get it to work again.

For the time being I’m just doing everything manually from the terminal with a couple of simple scripts: one that “modprobes” the nvhda module and enables the audio output, while another disables the audio output and “rmmods” the nvhda module. Sill, this is far from the perfect “ootb” experience that I would expect.

petersaints, the nvhda github repository contains systemd unit files for that.

@generix
I didn’t notice that, but I developed my own custom systemd units myself.

Nevertheless, as I previously mentioned, when I load the module at “/etc/initramfs-tools/modules” I have to turn it the audio off before suspending (either manually or using the systemd unit). Otherwise, the suspend fails and I’m eventually sent to the lock screen.

If I load it later, on my own session using “sudo modprobe nvhda”, the system is able to sleep with no problem EVEN IF I don’t disable the audio before sleep.

I was just reporting this because I find it odd that loading the module at “/etc/initramfs-tools/modules” vs. “sudo modprobe nvhda” has such a different behavior and I was hoping to see if someone else had a similar experience.

BTW, instead of adding “nvhda” to “/etc/initramfs-tools/modules” and “options nvhda load_state=1” to “/etc/modprobe.d/nvhda.conf”, I tried to just run “modprobe nvhda” and “sudo tee /proc/acpi/nvhda <<< ON” on my rc.local. I was already using to set a few other things up on the up and since nvhda is a non-essential kernel module I thought, why not give it a try? It works as well as if it was built into the initramfs. So that another option if you prefer not to “pollute” your initramfs.

Finally, I found this thread! ASUS ROG GL502VM no HDMI sound output on Linux was driving me crazy.

01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile 6GB] (rev a1)

Following the instructions at: GitHub - hhfeuer/nvhda: Linux kernel module to toggle Nvidia HDMI audio device on/off on notebooks and installing the DKMS module, I now see the NVIDIA device after running: aplay -a

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC255 Analog [ALC255 Analog]
  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

Very good!

It worked very well with the GTX1050Ti in Linux mint 19.1.
:)