Open tamer-hassan opened 6 years ago
Please check if turning off and on makes it work when hdmi cable is connected:
sudo tee /proc/acpi/nvhda <<<OFF
sudo tee /proc/acpi/nvhda <<<ON
Please attach the output of
xrandr
before connecting hdmi cable:
jasmin@GL702VM:~$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-4 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
1920x1080 75.00*+
after HDMI connected:
jasmin@GL702VM:~$ xrandr
Screen 0: minimum 8 x 8, current 5760 x 2160, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 3840x2160+1920+0 (normal left inverted right x axis y axis) 1872mm x 1053mm
3840x2160 60.00*+ 59.94 50.00 29.97 25.00 23.98
4096x2160 59.94 50.00 29.97 25.00 24.00 23.98
1920x1080 60.00 59.94 50.00 29.97 25.00 24.00 23.98 60.00 50.04 48.08
1680x1050 59.95
1600x1200 60.00
1440x900 59.89
1400x1050 59.98
1280x1024 75.02 60.02
1280x960 60.00
1280x800 59.81
1280x720 59.94 50.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
720x576 50.00
720x480 59.94
640x480 75.00 72.81 59.94 59.93
DP-4 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
1920x1080 75.00*+
After running:
sudo tee /proc/acpi/nvhda <<<OFF
sudo tee /proc/acpi/nvhda <<<ON
Audio is enabled successfully..
It's a bit odd. Telling by the messages from dmesg the audio device is already present when the module loads so it doesn't toggle it. Are you using any other workaround to make it visible before or is it there on boot? Without loading the module, is
sudo lspci -d 10de:*
displaying the audio device?
I'm not using any other workarounds. nvhda is the first workaround I used, when I started with Ubuntu 17.10. I then upgraded to 18.04 developer release, updated the nvhda source tree, and reinstalled with dkms, as I did originally on 17.10. On a fresh boot, before connecting HDMI cable, nvhda is already on
$ cat /proc/acpi/nvhda
0000:01:00.0 ON
let me uninstall, reboot fresh without nvhda and report back if audio device is already present.
Ah, ok. So it was working with 17.10, but kind of broke with 18.04? What exact kernel version are you running? Please post the output of
dmesg | grep -i nv
so I can see in which order the driver loads.
Exactly. was working perfectly on 17.10 and kind of broke with 18.04. Kernel is as posted in first post: 4.15.0-13-generic After I uninstalled via dkms and rebooted I realized nvhda was still loaded, via initramfs (i forgot, maybe this was leftover). removed and rebooted, now nvhda is not loaded anymore.
$ dmesg | grep -i nv
[ 0.000000] BIOS-e820: [mem 0x00000000320e1000-0x00000000320e1fff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x0000000036521000-0x00000000370acfff] ACPI NVS
[ 0.045230] PM: Registering ACPI NVS region [mem 0x320e1000-0x320e1fff] (4096 bytes)
[ 0.045230] PM: Registering ACPI NVS region [mem 0x36521000-0x370acfff] (12107776 bytes)
[ 1.215339] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[ 1.233082] rtc_cmos 00:02: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[ 1.391122] nvidia: loading out-of-tree module taints kernel.
[ 1.391128] nvidia: module license 'NVIDIA' taints kernel.
[ 1.394215] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[ 1.400650] nvidia-nvlink: Nvlink Core is being initialized, major device number 240
[ 1.400922] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[ 1.400998] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 390.42 Sat Mar 3 04:10:22 PST 2018 (using threaded interrupts)
[ 1.402671] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 390.42 Sat Mar 3 03:30:48 PST 2018
[ 1.403364] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[ 1.403366] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
[ 8.610217] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[ 8.643036] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 239
[ 8.861379] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[ 10.858685] nvidia-modeset: Allocated GPU:0 (GPU-9cac9894-8637-734d-7405-487cd9a3e13b) @ PCI:0000:01:00.0
jasmin@GL702VM:~$ sudo lsmod | grep nvhda
jasmin@GL702VM:~$ sudo lspci -d 10de:*
01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile] (rev a1)
jasmin@GL702VM:~$ sudo modprobe nvhda
jasmin@GL702VM:~$ sudo lspci -d 10de:*
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)
jasmin@GL702VM:~$ dmesg | grep -i nv
[ 0.000000] BIOS-e820: [mem 0x00000000320e1000-0x00000000320e1fff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x0000000036521000-0x00000000370acfff] ACPI NVS
[ 0.045237] PM: Registering ACPI NVS region [mem 0x320e1000-0x320e1fff] (4096 bytes)
[ 0.045237] PM: Registering ACPI NVS region [mem 0x36521000-0x370acfff] (12107776 bytes)
[ 1.223657] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[ 1.241715] rtc_cmos 00:02: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[ 1.400647] nvidia: loading out-of-tree module taints kernel.
[ 1.400652] nvidia: module license 'NVIDIA' taints kernel.
[ 1.403704] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[ 1.410524] nvidia-nvlink: Nvlink Core is being initialized, major device number 240
[ 1.410850] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[ 1.410909] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 390.42 Sat Mar 3 04:10:22 PST 2018 (using threaded interrupts)
[ 1.412732] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 390.42 Sat Mar 3 03:30:48 PST 2018
[ 1.413690] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[ 1.413692] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
[ 3.527208] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 239
[ 3.769943] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[ 3.819108] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[ 6.653466] nvidia-modeset: Allocated GPU:0 (GPU-9cac9894-8637-734d-7405-487cd9a3e13b) @ PCI:0000:01:00.0
[ 85.578216] nvhda: version 0.01
[ 85.578227] nvhda: Found nv VGA device 0000:01:00.0
[ 85.578279] nvhda: enabling audio
[ 85.578671] nvhda: Audio found, adding
[ 85.579241] nvhda: Found nv audio device 0000:01:00.1
[ 85.579243] nvhda: Succesfully loaded. Audio 0000:01:00.0 is on
[ 86.387654] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input17
[ 86.388072] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input18
[ 86.388410] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input19
Now when I connect HDMI cable, I get in syslog:
Mar 29 12:03:29 GL702VM kernel: [ 218.871401] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 6
and audio is not enabled.
I still have to do the additional step of:
sudo tee /proc/acpi/nvhda <<<OFF
sudo tee /proc/acpi/nvhda <<<ON
to get hdmi audio enabled.
Ok, thank you for the info so far. I'll have to look into what changed in the Ubuntu kernel.
Ubuntu 18.04 LTS is now released. Still having the same issue with updated kernel 4.15 & nvidia driver 390.48 can you kindly investigate?
Problem is, it's a general kernel problem. The nvhda module is just responsible for powering on/off the audio device which it is reliably doing. To actually get audio over hdmi, additionally it has to be routed to the right connector/stream which has to be done by gpu/sound driver on hdmi connect. This is currently kind of fluctuating and subject to investigation in the nouveau thread mentioned, it's not fully understoood yet. Depending on hardware/kernel this is either only working using the proprietary driver or also working with nouveau and now your case is kind of a third situation, not making it easier to debug. Do you remember under which kernel/driver this was fully working?
I can confirm that this works fully on the Linux 4.17 kernel series.
Thanks for this 💯
Hello @tamer-hassan ,
You may want to try out the latest Linux 4.17 kernel, just in case.
Issue has returned, in Fedora 32 (rawhide): kernel-5.5.0-0.rc6.git3.1.fc32.x86_64 It was working fine in Fedora 31, before upgrade: kernel-5.4.14-200.fc31.x86_64 HDMI: invalid ELD data byte 2 I can force some playback through HDMI even though pavucontrol says it is disconnected. Go to volume control configuration, profile, select HDMI device (unplugged) (unavailalbe). Start sound app playing. In volume control Playback, choose HDMI playback for the app. Do this for each video or sound to force it out through HDMI. Of course, this workaround is less than ideal as HDMI audio should be detected and automatic. But it confirms HDMI is actually able to play a sound. All other system messages are similar to previous comments.
..and hdmi audio is not enabled.
kernel 4.15.0 on Ubuntu 18.04 Developer release