GTX 1060 - No Audio over HDMI - Only HDA Intel detected - Azalia
change [code]sudo rmmod nvidia-drm nvidia-modeset nvidia[/code] to [code]sudo rmmod nvidia-uvm nvidia-drm nvidia-modeset nvidia[/code]
change
sudo rmmod nvidia-drm nvidia-modeset nvidia


to
sudo rmmod nvidia-uvm nvidia-drm nvidia-modeset nvidia

#16
Posted 10/14/2017 07:24 PM   
[quote=""]I'll give that a try (the GRUB thing) and report back.[/quote] This didn't work. I inserted the setpci module in grub and added the entry. Made no difference. Did anyone manage too get this approach working? Making it as a service works better for me.
said:I'll give that a try (the GRUB thing) and report back.


This didn't work. I inserted the setpci module in grub and added the entry. Made no difference. Did anyone manage too get this approach working? Making it as a service works better for me.

#17
Posted 10/15/2017 12:39 AM   
[quote=""]change [code]sudo rmmod nvidia-drm nvidia-modeset nvidia[/code] to [code]sudo rmmod nvidia-uvm nvidia-drm nvidia-modeset nvidia[/code] [/quote] that got me a little further thank you! now I'm down to this error message [b][code] Failed to start system-logind.service: Unit system_logind.service not found [/code][/b] But the good news is, my system's sound settings now shows the HDMI Output. But when I select it, sound still plays through my laptop's speakers. But I figured out that I had to open HDAJackRetask and tick [i]Set model=auto[/i] (in options) and apply for the sound to really be played via HDMI. Did anybody else experience this behavior?
said:change
sudo rmmod nvidia-drm nvidia-modeset nvidia

to
sudo rmmod nvidia-uvm nvidia-drm nvidia-modeset nvidia



that got me a little further thank you!
now I'm down to this error message

Failed to start system-logind.service: Unit system_logind.service not found




But the good news is, my system's sound settings now shows the HDMI Output. But when I select it, sound still plays through my laptop's speakers.

But I figured out that I had to open HDAJackRetask and tick Set model=auto (in options) and apply for the sound to really be played via HDMI.

Did anybody else experience this behavior?

#18
Posted 10/16/2017 01:33 PM   
change [code]sudo systemctl start system-logind[/code] to [code]sudo systemctl start systemd-logind[/code] systemd is missing the letter d.
change
sudo systemctl start system-logind


to
sudo systemctl start systemd-logind

systemd is missing the letter d.

#19
Posted 10/16/2017 02:52 PM   
[quote="jimbowgt"][b]01:00.0 3D controller: NVIDIA Corporation Device 1c8d (rev a1)[/b][/quote] "3D controller" here means that this GPU doesn't have a display engine, presumably because it's an Optimus laptop. Audio and display are both Intel's responsibility there.
jimbowgt said:01:00.0 3D controller: NVIDIA Corporation Device 1c8d (rev a1)

"3D controller" here means that this GPU doesn't have a display engine, presumably because it's an Optimus laptop. Audio and display are both Intel's responsibility there.

Aaron Plattner
NVIDIA Linux Graphics

#20
Posted 10/16/2017 06:09 PM   
[quote=""] The only downside I have noticed with this approach, but that ALSO happens when I do it manually, is that the backlight control for my laptop's screen disappears. Apparently "/sys/class/backlight/acpi_video0" and "/sys/class/backlight/acpi_video0" point to non-existing devices after the commands are run. Do you have any idea why and how to fix this? It's not really a big deal for me since the backlight was not working correctly under GNOME anyway (or any other DE for that matter). I have to resort to xbacklight to change my screen brightness. As a side note/offtopic: If I use the free drivers (nouveau) under Xorg, instead of the proprietary ones, not even xbacklight works. Has anyone else come across something similar and found an universal solution of having backlight working on their GTX 1060 powered laptops regardless of the Desktop Environment, proprietary vs open-source drivers, or if you're running Xorg or Wayland?[/quote] The backlight dies for me too. As you said, the link /sys/class/backlight/acpi_video0 is broken because /sys/devices/pci0000:00/0000:00:01.0/backlist is then missing. Not sure how to bring it up either. Whenever I'm not using this script for getting the audio to work with HDMI, I can control the brightness using a work-around (not what I'd like but it works): [code] #!/bin/sh path=/sys/class/backlight/acpi_video0 luminance() { read -r level < "$path"/actual_brightness factor=$((100 / max)) printf '%d\n' "$((level * factor))" } read -r max < "$path"/max_brightness xbacklight -set "$(luminance)" inotifywait -me modify --format '' "$path"/actual_brightness | while read; do xbacklight -set "$(luminance)" done [/code]
said:
The only downside I have noticed with this approach, but that ALSO happens when I do it manually, is that the backlight control for my laptop's screen disappears. Apparently "/sys/class/backlight/acpi_video0" and "/sys/class/backlight/acpi_video0" point to non-existing devices after the commands are run. Do you have any idea why and how to fix this?

It's not really a big deal for me since the backlight was not working correctly under GNOME anyway (or any other DE for that matter). I have to resort to xbacklight to change my screen brightness.

As a side note/offtopic:
If I use the free drivers (nouveau) under Xorg, instead of the proprietary ones, not even xbacklight works. Has anyone else come across something similar and found an universal solution of having backlight working on their GTX 1060 powered laptops regardless of the Desktop Environment, proprietary vs open-source drivers, or if you're running Xorg or Wayland?


The backlight dies for me too. As you said, the link /sys/class/backlight/acpi_video0 is broken because /sys/devices/pci0000:00/0000:00:01.0/backlist is then missing.

Not sure how to bring it up either.

Whenever I'm not using this script for getting the audio to work with HDMI, I can control the brightness using a work-around (not what I'd like but it works):

#!/bin/sh

path=/sys/class/backlight/acpi_video0

luminance() {
read -r level < "$path"/actual_brightness
factor=$((100 / max))
printf '%d\n' "$((level * factor))"
}

read -r max < "$path"/max_brightness

xbacklight -set "$(luminance)"

inotifywait -me modify --format '' "$path"/actual_brightness | while read; do
xbacklight -set "$(luminance)"
done

#21
Posted 10/20/2017 04:10 AM   
Based on all information in this thread, I've been able to construct a systemd solution to get the HDMI Audio device exposed on my Skylake laptop with a GTX1060 running in "Discrete Graphics" (not Hybrid) mode on Ubuntu 17.10: /etc/systemd/system/fix-hdmi-audio.service [code][Unit] Description=nVidia HDMI Audio Fixer Before=systemd-logind.service display-manager.service After=module-init-tools.service [Service] Type=oneshot ExecStart=/root/fix-hdmi-audio.sh [Install] WantedBy=multi-user.target[/code] /root/fix-hdmi-audio.sh [code]#!/bin/sh setpci -s 01:00.0 0x488.l=0x2000000:0x2000000 rmmod nvidia-uvm nvidia-drm nvidia-modeset nvidia sh -c 'echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove' sh -c 'echo 1 > /sys/bus/pci/devices/0000:00:01.0/rescan' modprobe nvidia nvidia-modeset nvidia-drm nvidia-uvm[/code] And then execute the following commands (as root) to make it do this at boot: [code]chmod +x /root/fix-hdmi-audio.sh systemctl enable fix-hdmi-audio.service[/code] After each reboot, I now see the HDMI audio device on my laptop: [code]fludizz@tongerlo:~$ lspci | grep "PCIe Controller\|NVIDIA" 00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07) 01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile] (rev a1) 01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1) fludizz@tongerlo:~$ aplay -l | grep NVidia card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0] card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1] card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2][/code]
Based on all information in this thread, I've been able to construct a systemd solution to get the HDMI Audio device exposed on my Skylake laptop with a GTX1060 running in "Discrete Graphics" (not Hybrid) mode on Ubuntu 17.10:

/etc/systemd/system/fix-hdmi-audio.service
[Unit]
Description=nVidia HDMI Audio Fixer
Before=systemd-logind.service display-manager.service
After=module-init-tools.service

[Service]
Type=oneshot
ExecStart=/root/fix-hdmi-audio.sh

[Install]
WantedBy=multi-user.target


/root/fix-hdmi-audio.sh
#!/bin/sh
setpci -s 01:00.0 0x488.l=0x2000000:0x2000000
rmmod nvidia-uvm nvidia-drm nvidia-modeset nvidia
sh -c 'echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove'
sh -c 'echo 1 > /sys/bus/pci/devices/0000:00:01.0/rescan'
modprobe nvidia nvidia-modeset nvidia-drm nvidia-uvm


And then execute the following commands (as root) to make it do this at boot:
chmod +x /root/fix-hdmi-audio.sh
systemctl enable fix-hdmi-audio.service


After each reboot, I now see the HDMI audio device on my laptop:
fludizz@tongerlo:~$ lspci | grep "PCIe Controller\|NVIDIA"
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07)
01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
fludizz@tongerlo:~$ aplay -l | grep NVidia
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]

#22
Posted 10/28/2017 02:13 PM   
Fludizz, have you tried putting your laptop to sleep and resuming it? Does the HDMI audio still work after that? In my case, it breaks after resuming from suspend.
Fludizz, have you tried putting your laptop to sleep and resuming it? Does the HDMI audio still work after that? In my case, it breaks after resuming from suspend.

#23
Posted 10/28/2017 02:18 PM   
[quote=""]Fludizz, have you tried putting your laptop to sleep and resuming it? Does the HDMI audio still work after that? In my case, it breaks after resuming from suspend.[/quote] Yes, it still works after waking up from suspend. Only thing I have to do after waking is enabling the HDMI Output from the Volume Control options - it doesn't automatically switch to HDMI Audio. [edit] Fixed that by switching to pasystray instead of volti / pavucontrol. pasystray allowed me to force HDMI Audio as 'default' audio device.
said:Fludizz, have you tried putting your laptop to sleep and resuming it? Does the HDMI audio still work after that? In my case, it breaks after resuming from suspend.

Yes, it still works after waking up from suspend.

Only thing I have to do after waking is enabling the HDMI Output from the Volume Control options - it doesn't automatically switch to HDMI Audio.

[edit]
Fixed that by switching to pasystray instead of volti / pavucontrol. pasystray allowed me to force HDMI Audio as 'default' audio device.

#24
Posted 10/28/2017 02:41 PM   
This is a confusing issue for me. I usually run my Thinkpad in hybrid mode, using nvidia and modesetting in order to get Prime Sync. There are comments in a couple of other threads that there are DP audio problems which will be fixed in the driver. What I mean to ask is: is this fix involving start-up scripts the last word, or is nvidia able & willing to fix this in the driver?
This is a confusing issue for me. I usually run my Thinkpad in hybrid mode, using nvidia and modesetting in order to get Prime Sync.
There are comments in a couple of other threads that there are DP audio problems which will be fixed in the driver.
What I mean to ask is:
is this fix involving start-up scripts the last word, or is nvidia able & willing to fix this in the driver?

#25
Posted 11/03/2017 05:41 AM   
[quote="aplattner"]For some reason, a lot of recent laptops are set up to boot with the GPU's PCI audio function disabled. I haven't done much investigation, but you can turn on the audio function and make the kernel see it by setting the appropriate PCI configuration bit and then telling the kernel to rescan the PCI bus on the PCI bridge the GPU is connected to.[/quote] Hi aplattner, do you have any time to investigate this further? This issue is affecting an increasing number of consumer products and I'd like to help you find a solution so that we can have this fixed in upstream Linux or your Linux drivers - without the need for any of these special scripts. I have checked under Windows. RWEverything and Windows pciutils don't seem to be able to read PCI extended configuration space, but System Information Viewer can. Under Windows the HDMI audio device is not visible on the PCI bus by default, but plug in the HDMI cable and it appears. Unplug the cable and it disappears again. Here is the PCI config space before connecting HDMI: https://gist.github.com/dsd/065aa167a47c1b4db2cce3aeecb98c2a And with a HDMI TV connected: https://gist.github.com/dsd/47348a072b9fd9439520c50c66358dca i.e. the 0x488 value is changing in the way you have described on this thread. I did a fresh install of Win10 and found that the HDMI audio PCI device does not appear at all - not even when a HDMI TV is connected - until the nvidia driver is installed. I checked the ACPI tables for this product, and there is no mention of the exact values 0x488 nor 0x2000000. I checked all the PCI_Config OperationRegions and there aren't any regions defined that would allow access to offset 0x488. I believe this strongly suggests that the NVIDIA Windows driver has some specific logic to do this 0x488 write upon HDMI connection event. It would be great if you can confirm that, and under which conditions this register change is done (or not done). If this theory is correct then we can move on and see how to implement the same magic under Linux.
aplattner said:For some reason, a lot of recent laptops are set up to boot with the GPU's PCI audio function disabled. I haven't done much investigation, but you can turn on the audio function and make the kernel see it by setting the appropriate PCI configuration bit and then telling the kernel to rescan the PCI bus on the PCI bridge the GPU is connected to.


Hi aplattner, do you have any time to investigate this further?

This issue is affecting an increasing number of consumer products and I'd like to help you find a solution so that we can have this fixed in upstream Linux or your Linux drivers - without the need for any of these special scripts.

I have checked under Windows. RWEverything and Windows pciutils don't seem to be able to read PCI extended configuration space, but System Information Viewer can.

Under Windows the HDMI audio device is not visible on the PCI bus by default, but plug in the HDMI cable and it appears. Unplug the cable and it disappears again.

Here is the PCI config space before connecting HDMI:

https://gist.github.com/dsd/065aa167a47c1b4db2cce3aeecb98c2a


And with a HDMI TV connected:

https://gist.github.com/dsd/47348a072b9fd9439520c50c66358dca


i.e. the 0x488 value is changing in the way you have described on this thread.

I did a fresh install of Win10 and found that the HDMI audio PCI device does not appear at all - not even when a HDMI TV is connected - until the nvidia driver is installed.

I checked the ACPI tables for this product, and there is no mention of the exact values 0x488 nor 0x2000000. I checked all the PCI_Config OperationRegions and there aren't any regions defined that would allow access to offset 0x488.

I believe this strongly suggests that the NVIDIA Windows driver has some specific logic to do this 0x488 write upon HDMI connection event. It would be great if you can confirm that, and under which conditions this register change is done (or not done). If this theory is correct then we can move on and see how to implement the same magic under Linux.

#26
Posted 12/18/2017 04:01 PM   
I'm also waiting for a real fix of this problem. My system specs: i7-7700HQ + GTX 1060 6GB Linux kernel version: 4.10.0-42-generic Nvidia driver Version: 384.90 OS: Linux Mint 18.2 The register 0x488 has а value 02000000 on my system without any workarounds: [code]$ sudo lspci -d 10de:* -xxxx | grep 480 480: 00 00 00 00 13 00 00 00 [b]00 00 00 02[/b] 00 00 00 00[/code] However, the Nvidia audio device is still not available at system startup. I can make it work by performing a pci rescan, but after that I noticed a power management problem related to the Nvidia audio device. Laptop consumes 5 watts more power after this workaround. I hope that the problem will be fixed soon.
I'm also waiting for a real fix of this problem.

My system specs:
i7-7700HQ + GTX 1060 6GB
Linux kernel version: 4.10.0-42-generic
Nvidia driver Version: 384.90
OS: Linux Mint 18.2

The register 0x488 has а value 02000000 on my system without any workarounds:

$ sudo lspci -d 10de:* -xxxx | grep 480
480: 00 00 00 00 13 00 00 00 00 00 00 02 00 00 00 00


However, the Nvidia audio device is still not available at system startup.
I can make it work by performing a pci rescan, but after that I noticed a power management problem related to the Nvidia audio device. Laptop consumes 5 watts more power after this workaround.
I hope that the problem will be fixed soon.

#27
Posted 12/20/2017 11:53 AM   
[quote=""]I'm also waiting for a real fix of this problem. My system specs: i7-7700HQ + GTX 1060 6GB Linux kernel version: 4.10.0-42-generic Nvidia driver Version: 384.90 OS: Linux Mint 18.2 [/quote] I have the same specs, except for Xubuntu 17.10, and Nvidia: 387.12 as well as Linux: 4.13.0-21-generic and with the systemd workaround the HDA Nvidia is found and working. Sadly upon restart I need to reinstall pulseaudio for it to work at all (doesnt detect any more cards); I have to restart lightdm to use HDMI at all and strangely bluetooth is broken. So I suspect loading the HDA Nvidia in systemd is a bit too late bootwise.
said:I'm also waiting for a real fix of this problem.

My system specs:
i7-7700HQ + GTX 1060 6GB
Linux kernel version: 4.10.0-42-generic
Nvidia driver Version: 384.90
OS: Linux Mint 18.2


I have the same specs, except for Xubuntu 17.10, and Nvidia: 387.12 as well as Linux: 4.13.0-21-generic and with the systemd workaround the HDA Nvidia is found and working. Sadly upon restart I need to reinstall pulseaudio for it to work at all (doesnt detect any more cards); I have to restart lightdm to use HDMI at all and strangely bluetooth is broken. So I suspect loading the HDA Nvidia in systemd is a bit too late bootwise.

#28
Posted 12/21/2017 12:28 PM   
I can confirm that kernel module, posted by Maik Freudenberg ([url]https://bugs.freedesktop.org/show_bug.cgi?id=75985#c27[/url]), is working fine on my system. Thank you for the fix. The HDMI audio device now works as it should. The steps I did to enable HDMI audio device: 1. Download and extract the file nvhda.tar.xz. 2. [code]make sudo make install echo nvhda | sudo tee -a /etc/initramfs-tools/modules echo "options nvhda load_state=1" | sudo tee /etc/modprobe.d/nvhda.conf sudo update-initramfs -u[/code] 3. Reboot. With this fix, I did not notice any problems with power management or system stability. HDMI audio works at system startup, after resume from sleep, after plugging/unplugging HDMI cable.
I can confirm that kernel module, posted by Maik Freudenberg (https://bugs.freedesktop.org/show_bug.cgi?id=75985#c27), is working fine on my system. Thank you for the fix. The HDMI audio device now works as it should.

The steps I did to enable HDMI audio device:
1. Download and extract the file nvhda.tar.xz.
2.
make
sudo make install
echo nvhda | sudo tee -a /etc/initramfs-tools/modules
echo "options nvhda load_state=1" | sudo tee /etc/modprobe.d/nvhda.conf
sudo update-initramfs -u

3. Reboot.

With this fix, I did not notice any problems with power management or system stability. HDMI audio works at system startup, after resume from sleep, after plugging/unplugging HDMI cable.

#29
Posted 01/04/2018 08:40 AM   
[quote=""]I can confirm that kernel module, posted by Maik Freudenberg ([url]https://bugs.freedesktop.org/show_bug.cgi?id=75985#c27[/url]), is working fine on my system. Thank you for the fix. The HDMI audio device now works as it should. The steps I did to enable HDMI audio device: 1. Download and extract the file nvhda.tar.xz. 2. [code]make sudo make install echo nvhda | sudo tee -a /etc/initramfs-tools/modules echo "options nvhda load_state=1" | sudo tee /etc/modprobe.d/nvhda.conf sudo update-initramfs -u[/code] 3. Reboot. With this fix, I did not notice any problems with power management or system stability. HDMI audio works at system startup, after resume from sleep, after plugging/unplugging HDMI cable.[/quote] I tried this module. Everything is fine except that there is no sound again when you exit from sleep mode. My specs: gl502vm (gtx1060). from dmesg: [45311.568050] snd_hda_codec_hdmi hdaudioC1D0: out of range cmd 0:4:707:ffffffff [45311.576447] done. [45311.583399] video LNXVIDEO:01: Restoring backlight state [45311.583422] PM: suspend exit [45311.583916] snd_hda_codec_hdmi hdaudioC1D0: out of range cmd 0:4:707:ffffffff [45311.829959] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1 [45311.829974] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1 [45311.829981] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
said:I can confirm that kernel module, posted by Maik Freudenberg (https://bugs.freedesktop.org/show_bug.cgi?id=75985#c27), is working fine on my system. Thank you for the fix. The HDMI audio device now works as it should.

The steps I did to enable HDMI audio device:
1. Download and extract the file nvhda.tar.xz.
2.
make
sudo make install
echo nvhda | sudo tee -a /etc/initramfs-tools/modules
echo "options nvhda load_state=1" | sudo tee /etc/modprobe.d/nvhda.conf
sudo update-initramfs -u

3. Reboot.

With this fix, I did not notice any problems with power management or system stability. HDMI audio works at system startup, after resume from sleep, after plugging/unplugging HDMI cable.


I tried this module. Everything is fine except that there is no sound again when you exit from sleep mode. My specs: gl502vm (gtx1060).

from dmesg:
[45311.568050] snd_hda_codec_hdmi hdaudioC1D0: out of range cmd 0:4:707:ffffffff
[45311.576447] done.
[45311.583399] video LNXVIDEO:01: Restoring backlight state
[45311.583422] PM: suspend exit
[45311.583916] snd_hda_codec_hdmi hdaudioC1D0: out of range cmd 0:4:707:ffffffff
[45311.829959] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[45311.829974] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1
[45311.829981] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD buf size -1

#30
Posted 01/21/2018 11:32 AM   
Scroll To Top

Add Reply