All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 75985] New: HDMI audio device only visible after rescan
@ 2014-03-10 15:56 bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
  0 siblings, 1 reply; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-03-10 15:56 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 3913 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

          Priority: medium
            Bug ID: 75985
          Assignee: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
           Summary: HDMI audio device only visible after rescan
        QA Contact: xorg-team-go0+a7rfsptAfugRpC6u6w@public.gmane.org
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: jean-louis-h84OYfGOAs2zQB+pC5nmwQ@public.gmane.org
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: unspecified
         Component: Driver/nouveau
           Product: xorg

Hi

I have a Dell XPS 15 laptop with Optimus.
It has the following NVIDIA card:
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M]
(rev a1)

The HDMI output is working fine since some time now.
Only there is still an issue with the HDMI audio.

On Windows, and with `lspci -H1` it shows the following devices:
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M]
(rev a1)
01:00.1 Audio device: NVIDIA Corporation GF108 High Definition Audio Controller
(rev a1)

But by default, the audio device isn't visible after a clean boot. So the HDMI
audio ain't working.

Now I've found some workaround to get it working.

- Start the system, and stop the display manager (lightdm/gdm)
- Load the nouveau module
- Remove the Nvidia card from the PCI bus (echo 1 >
/sys/bus/pci/devices/0000\:01\:00.0/remove)
- Rescan the PCI bus (echo "1" > /sys/bus/pci/rescan)

And there it is, the Audio device is visible now:
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M]
(rev a1)
01:00.1 Audio device: NVIDIA Corporation GF108 High Definition Audio Controller
(rev a1)

Also dmesg shows the following:
[  152.360864] input: HDA NVidia HDMI/DP,pcm=9 as
/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input18
[  152.361210] input: HDA NVidia HDMI/DP,pcm=8 as
/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input17
[  152.361415] input: HDA NVidia HDMI/DP,pcm=7 as
/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input16
[  152.361592] input: HDA NVidia HDMI/DP,pcm=3 as
/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input15

So the device is loaded correctly.
Now if we start lightdm/gdm/whatever again, and login (which also starts
PulseAudio), the HDMI audio works correctly like it should :)

Some note:
If we do the rescan without nouveau module loaded, the workaround does not
work. So we need to have nouveau loaded to make the Audio device visible.

On first boot I get the following error:
[  121.872253] nouveau 0000:01:00.0: enabling device (0006 -> 0007)
[  121.872554] [drm] hdmi device  not found 1 0 1

This might be related?
After the rescan, it shows the following:
[  151.557038] [drm] Initialized nouveau 1.1.1 20120801 for 0000:01:00.0 on
minor 1
[  151.557186] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[  151.557253] hda_intel: Disabling MSI
[  151.557274] hda-intel 0000:01:00.1: Handle VGA-switcheroo audio client
[  151.557349] hda-intel 0000:01:00.1: Disabling 64bit DMA
[  151.560778] hda-intel 0000:01:00.1: Enable delay in RIRB handling
[  152.360864] input: HDA NVidia HDMI/DP,pcm=9 as
/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input18
[  152.361210] input: HDA NVidia HDMI/DP,pcm=8 as
/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input17
[  152.361415] input: HDA NVidia HDMI/DP,pcm=7 as
/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input16
[  152.361592] input: HDA NVidia HDMI/DP,pcm=3 as
/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input15
[  156.801404] hda-intel 0000:01:00.1: Disabling via VGA-switcheroo

Hopefully this can help getting the issue fixed completely :)

Thanks!
Jean-Louis

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 5220 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
@ 2014-03-10 16:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2014-03-10 16:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (120 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-03-10 16:00 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 846 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|HDMI audio device only      |[NVC1] HDMI audio device
                   |visible after rescan        |only visible after rescan

--- Comment #1 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
I assume that somewhere in that list of steps you had to plug the HDMI cable
in? Is it the case, at least on windows, that the PCI device appears and
disappears at the same time that the HDMI cable is plugged/unplugged?

What happens if you boot with the HDMI cable plugged in?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2076 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
  2014-03-10 16:00   ` [Bug 75985] [NVC1] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-03-10 16:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2014-03-10 23:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (119 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-03-10 16:15 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 765 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #2 from Jean-Louis Dupond <jean-louis-h84OYfGOAs2zQB+pC5nmwQ@public.gmane.org> ---
Tested this out.

On Windows:
Both devices not visible in lspci. When you then start a game for example, the
NVIDIA VGA device becomes visible. The audio device not.

Now if you plugin a HDMI cable, both devices (VGA & Audio) becomes visible.

If we now remove the HDMI cable, both devices stay there for a while, and then
get deactivated together.

On Linux:
If we boot with HDMI cable in, same issue.

Now if I do the pci remove/rescan without HDMI cable, same result.
The Audio device becomes visible, even without having a HDMI cable in!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1520 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
  2014-03-10 16:00   ` [Bug 75985] [NVC1] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2014-03-10 16:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-03-10 23:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2014-03-10 23:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (118 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-03-10 23:14 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 328 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #3 from Jean-Louis Dupond <jean-louis-h84OYfGOAs2zQB+pC5nmwQ@public.gmane.org> ---
Created attachment 95562
  --> https://bugs.freedesktop.org/attachment.cgi?id=95562&action=edit
acpidump

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1186 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (2 preceding siblings ...)
  2014-03-10 23:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-03-10 23:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2014-09-15 23:52   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (117 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-03-10 23:14 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 769 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #4 from Jean-Louis Dupond <jean-louis-h84OYfGOAs2zQB+pC5nmwQ@public.gmane.org> ---
All hotplug options enabled in kernel:
CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTPLUG_SPARSE=y
CONFIG_HOTPLUG_CPU=y
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_HOTPLUG_MEMORY=y
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y
CONFIG_HOTPLUG_PCI_ACPI_IBM=m
CONFIG_HOTPLUG_PCI_CPCI=y
CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
CONFIG_HOTPLUG_PCI_SHPC=m
CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1520 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (3 preceding siblings ...)
  2014-03-10 23:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-09-15 23:52   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2014-09-16  6:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (116 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-09-15 23:52 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 486 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #5 from Jethro Beekman <freedesktop-bugs-LmnypSVwBK6EVqv0pETR8A@public.gmane.org> ---
I've been having a similar issue for a while, see this thread:
https://www.mail-archive.com/dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org/msg45935.html

The workaround you propose (loading nouveau, removing the device, rescanning
the bus) works.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1313 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (4 preceding siblings ...)
  2014-09-15 23:52   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-09-16  6:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2016-07-16 17:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (115 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-09-16  6:33 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 725 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #6 from Jethro Beekman <freedesktop-bugs-LmnypSVwBK6EVqv0pETR8A@public.gmane.org> ---
Nevermind, the workaround lists the device, and ALSA/Pulse seem to recognize
the device, but no audio gets through. I need to do more debugging.

I found this patch, it seems relevant:
http://cgit.freedesktop.org/nouveau/linux-2.6/commit/?h=linux-3.18&id=cc2a9071458254cb0db6153811734750da0233ea

FYI the nouveau driver doesn't actually output any graphics on my machine (see
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-nouveau/+bug/1292036
), I'm just here to get audio working ;)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1712 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (5 preceding siblings ...)
  2014-09-16  6:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2016-07-16 17:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2016-11-05 22:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (114 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2016-07-16 17:20 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1087 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

Peter Wu <peter-VTkQYDcBqhK7DlmcbJSQ7g@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter-VTkQYDcBqhK7DlmcbJSQ7g@public.gmane.org

--- Comment #7 from Peter Wu <peter-VTkQYDcBqhK7DlmcbJSQ7g@public.gmane.org> ---
Possibly interesting information from
https://devtalk.nvidia.com/default/topic/609790/no-hdmi-sound-w-optimus-in-linux/

On Windows, the audio device is not visible normally, but when a HDMI audio
cable is inserted, suddenly the audio device appears. Perhaps the Windows
driver is doing some rescanning automatically?


Related: 20/111 Nvidia devices report an audio device. AFAIK newer machines
have their HDMI port connected to the Nvidia card, so something is probably
missing there. See
https://lists.freedesktop.org/archives/nouveau/2016-July/025619.html

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2508 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (6 preceding siblings ...)
  2016-07-16 17:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2016-11-05 22:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2016-12-22 23:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (113 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2016-11-05 22:30 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1017 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #8 from Peter Wu <peter-VTkQYDcBqhK7DlmcbJSQ7g@public.gmane.org> ---
Following these steps I always see an audio function (01:00.1):

1. Power off laptop
2. Insert miniDP cable (HDMI probably works as well, did not test)
3. Power on laptop
4. Check lspci -s1:

When booting the laptop without cable there is some other weird behavior:
1. Power on laptop
2. Run "lspci -s1: ; lspci -H1 -s:"
   (first command also resumes the dGPU as side-effect)
   Expected: 2x 01:00:0
3. Wait 5 seconds for the card to runtime suspend (important, verify that this
is actually the case, e.g. by watching "dmesg -w").
4. Insert cable
5. Run the above two lspci commands again. Now I also see the audio function
(01:00.1).
6. Repeat step 3, remove audio cable, repeat step 5 (now the audio function is
gone again!)

This was tested on a Clevo P651RA (GTX 965M). Weird!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1790 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (7 preceding siblings ...)
  2016-11-05 22:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2016-12-22 23:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2016-12-22 23:05   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (112 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2016-12-22 23:04 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 357 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #9 from zigarrre-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org ---
Created attachment 128640
  --> https://bugs.freedesktop.org/attachment.cgi?id=128640&action=edit
dmesg recording from a t520 trying the workaround

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1278 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (8 preceding siblings ...)
  2016-12-22 23:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2016-12-22 23:05   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-09-26 10:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (111 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2016-12-22 23:05 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 2804 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #10 from zigarrre-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org ---
Any updates?

I can confirm this bug on my Lenovo Thinkpad T520 (4242-PT2). For testing I
used a FHD TV connected via a DP to HDMI connector. The hardware setup was
tested and confirmed to work as expected with Windows 7 so a hardware cause can
be ruled out.

uname -a
Linux t520 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64
GNU/Linux

I am using the optimus implementation provided by nouveau together with the
intel graphics driver.

xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x8c cap: 0xb, Source Output, Sink Output, Sink Offload crtcs:
3 outputs: 3 associated providers: 0 name:Intel
Provider 1: id: 0x66 cap: 0x7, Source Output, Sink Output, Source Offload
crtcs: 2 outputs: 5 associated providers: 0 name:nouveau

'lspci' doesn't show the audio device but 'lspci -H1' does:
01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [Quadro NVS 4200M]
(rev a1)
01:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)

Even 'lspci -H1' shows the audio device only when the discrete GPU is powered
up (e.g. by doing 'lspci; lspci -H1').

I am not using a DM or a DE but bspwm launched via startx from the tty.

The procedure I used:
1) boot and login (x not yet started)
2) modprobe nouveau
3) echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove
4) echo 1 > /sys/bus/pci/rescan
5) lspci now shows the audio device
6) startx
7) open pavucontrol (to trigger launch of pulseaudio via rtkit)

It made no difference when, or even if a device is connected to the DP Port.
The output wasn't usable even with this workaround as pulseaudio showed it
always as unplugged. On one single attempt it did show as connected and worked
ok but even though following procedure exactly and trying many times I was not
able to reproduce this.

After starting pulseaudio multiple errors of the form 'kernel:
snd_hda_codec_hdmi hdaudioC2D0: out of range cmd 0:5:707:ffffffff' showed up.

The usage of this workaround also lead to a very unstable system till the next
boot. I experienced cpu soft locks multiple times (though found no way to
reliably reproduce them) from which no recovery except hard resetting the
computer was possible.

Attached is a dmesg log where I follow the above procedure (connecting the
display between steps 3 and 4) and activating/deactivating the display with
xrandr once in the end.
I could also provide a syslog from boot till shutdown recorded with journald if
required.

If I can help fixing this by providing more information or testing things let
me know.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3542 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (9 preceding siblings ...)
  2016-12-22 23:05   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-09-26 10:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-09-26 22:50   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (110 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-09-26 10:04 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 412 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #11 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
Some interesting information from Aaron Plattner of Nvidia:
https://devtalk.nvidia.com/default/topic/1024022/linux/gtx-1060-no-audio-over-hdmi-only-hda-intel-detected-azalia/post/5211273/#5211273

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1323 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (10 preceding siblings ...)
  2017-09-26 10:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-09-26 22:50   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-09-28 12:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (109 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-09-26 22:50 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 809 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #12 from Peter Wu <peter-VTkQYDcBqhK7DlmcbJSQ7g@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #11)
> Some interesting information from Aaron Plattner of Nvidia:
> https://devtalk.nvidia.com/default/topic/1024022/linux/gtx-1060-no-audio-
> over-hdmi-only-hda-intel-detected-azalia/post/5211273/#5211273

Interesting bit about the PCI configuration space. Essentially this is the
command that Aaron posted. On my laptop that area is somewhere after the AER
capability and is all zeroes, it does not seem to make sense.

Aarons command is essentially the above remove/rescan, but including:
setpci -s 01:00.0 0x488.l=0x2000000:0x2000000

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1727 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (11 preceding siblings ...)
  2017-09-26 22:50   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-09-28 12:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-09-30  2:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (108 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-09-28 12:33 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1379 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hhfeuer-Mmb7MZpHnFY@public.gmane.org

--- Comment #13 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
(In reply to Peter Wu from comment #12)
> On my laptop that area is somewhere after the AER
> capability and is all zeroes, it does not seem to make sense.

Why do you mention AER capability in this context? Are associated registers
normally the highest used in PCI config space? Could you give a hint on that?
Seen from a hardware perspective, this could make sense. Since the audio is
another PCI function not always needed, it sure has some enable pin on the chip
so it can be toggled or disabled by some external circuitry, vendor specific.
And some (reserved) gpio pin is used to make it switchable through software. So
maybe the config space >=0x400 being gpio space?
Wild guess, of course.
Interesting would be if after write, this can be read or returns zero again? 
What about desktop cards, do they also have this register? Is this always set
then?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2717 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (12 preceding siblings ...)
  2017-09-28 12:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-09-30  2:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-10-04 21:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (107 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-09-30  2:45 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 287 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #14 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
(In reply to Peter Wu from comment #12)
> AER capability
Red herring?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1119 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (13 preceding siblings ...)
  2017-09-30  2:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-10-04 21:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-10-12 15:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (106 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-10-04 21:39 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 507 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #15 from Peter Wu <peter-VTkQYDcBqhK7DlmcbJSQ7g@public.gmane.org> ---
The AER capability was the closest one I could see just before the magic value
of 0x488, it likely has nothing to do with 0x488. I haven't tried
writing/reading it yet.

You might also be interested in this document:
https://github.com/envytools/envytools/blob/master/rnndb/bus/pci.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1344 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (14 preceding siblings ...)
  2017-10-04 21:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-10-12 15:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-10-14 19:36   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (105 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-10-12 15:04 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 741 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #16 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
So an interesting thought here is that GRUB also supports the setpci command,
and runs early enough for it to matter. This would be the functional equivalent
of an early pci quirk. If someone having the issue could try adding

setpci -s 01:00.0 0x488.l=0x2000000:0x2000000

to be run by grub, and reporting back whether that helped or not, with `lspci
-nn -d 10de:` output, that'd be interesting to see. [Not everyone can use
01:00.0 -- double-check where your GPU is at. But that'll be right for most
people.]

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1498 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (15 preceding siblings ...)
  2017-10-12 15:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-10-14 19:36   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-10-15  4:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (104 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-10-14 19:36 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 709 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #17 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
(In reply to Ilia Mirkin from comment #16)
> So an interesting thought here is that GRUB also supports the setpci
> command
Really smart thinking but users trying it had no success. Register always
returning value 0xFFFFFFFF. Which would normally(?) mean, no device there.
Which led me to dig a bit into setpci and it seems to me that without the
kernel and its mmio, setpci is only able to work on the standard 256 pci
registers but not the extended config space. So out of luck there?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1544 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (16 preceding siblings ...)
  2017-10-14 19:36   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-10-15  4:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-11-10 23:32   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (103 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-10-15  4:14 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 991 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #18 from Fede <fedevx-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #17)
> (In reply to Ilia Mirkin from comment #16)
> > So an interesting thought here is that GRUB also supports the setpci
> > command
> Really smart thinking but users trying it had no success. Register always
> returning value 0xFFFFFFFF. Which would normally(?) mean, no device there.
> Which led me to dig a bit into setpci and it seems to me that without the
> kernel and its mmio, setpci is only able to work on the standard 256 pci
> registers but not the extended config space. So out of luck there?


I can confirm this. It does not work from GRUB. The best work-around so far is
to have a service do the setpci step before the nvidia drivers are loaded and
display-manager.service starts (for those on systemd).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1872 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (17 preceding siblings ...)
  2017-10-15  4:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-11-10 23:32   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-11-11  0:59   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (102 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-11-10 23:32 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 417 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #19 from Denis Lisov <dennis.lissov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
Having the same bug.

Thinkpad P50, Quadro M1000M.

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107GLM [Quadro
M1000M] [10de:13b1] (rev a2)

Ready to test patches.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1174 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (18 preceding siblings ...)
  2017-11-10 23:32   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-11-11  0:59   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-12-18 16:06   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (101 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-11-11  0:59 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 909 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #20 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
(In reply to Denis Lisov from comment #19)
> Ready to test patches.
Try the workaround in
https://devtalk.nvidia.com/default/topic/1024022/linux/gtx-1060-no-audio-over-hdmi-only-hda-intel-detected-azalia/post/5211273/#5211273
for now.
Some implications met. Workaround seems to have effects/depends on ACPI,
backlight control not working, sleep/resume breaking audio, see same thread.
Most interesting issue met in
https://devtalk.nvidia.com/default/topic/1025831/linux/gtx-1060m-with-linux-no-hdmi-audio-device-/
Workaround there works on linux 4.4 but not on 4.9, turning acpi off makes
audio device appear on 4.9 without workaround.
Another green acpi hell needing kernel quirks?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2004 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (19 preceding siblings ...)
  2017-11-11  0:59   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-12-18 16:06   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-12-22 19:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (100 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-12-18 16:06 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1045 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #21 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
I checked the behaviour under Windows and it appears that Windows is doing the
above-mentioned PCI config space write when a HDMI cable is plugged in. I'm
fairly sure that this is done "natively" by the windows driver (not in ACPI
stuff). More info:
https://devtalk.nvidia.com/default/topic/1024022/linux/gtx-1060-no-audio-over-hdmi-only-hda-intel-detected-azalia/post/5227504/#5227504

What would be the best way to implement this in nouveau? I'm unsure about the
conditions we would want to do this under. Maybe something like:
 1. nouveau is driving the HDMI output using its own display controller, and
 2. HDMI cable is connected? (or maybe we enable HDMI audio all the time like
other platforms?)
 3. Only on GTX1060/GTX1070 which are the only cards where the 0x448 register
write has been confirmed to work?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1965 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (20 preceding siblings ...)
  2017-12-18 16:06   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-12-22 19:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-12-23  2:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (99 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-12-22 19:15 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1368 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #22 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
Created attachment 136369
  --> https://bugs.freedesktop.org/attachment.cgi?id=136369&action=edit
GP104: enable HDMI audio device function

On Asus GL502VS I investigated why the gfx device must be removed before rescan
in the above workarounds.

The reason is that when Linux first probes the device (before you attempt the
workaround), pci_setup_device() notes that the device is not multifunction
capable. This causes pci_scan_slot() to not bother scanning the non-zero
functions (per the behaviour inside next_fn()).

I checked and I found that when the 0x488 magic bit is not set, the gfx device
advertises as non-multifunction. After the bit is set, the device advertises as
multi-function. So, after setting the magic bit, removing the device will cause
Linux to re-probe it during the next rescan, taking note at that point that it
is a multi-function device, and proceeding to scan the functions, finding the
audio device at function 1.

Based on that I have a first attempt at a fix. It's not working though, audio
output is silent (but I did have it working with the previous workarounds).
I'll look closer next week.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2385 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (21 preceding siblings ...)
  2017-12-22 19:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-12-23  2:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-12-27 16:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (98 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-12-23  2:00 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 744 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #23 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
@Daniel Drake: that's coherent with my investigations, even on a 740M without
any outputs setting the bit at 0x488 changes the pci header type to 0x80,
multifunction. My idea would be to use the pci_scan_single_device function to
add the sub-function device. The really old fakephp driver available in kernels
<2.29 would have been useful for general testing, but that's gone AWOL. The
later one is useless, tested it. I also want to use the holyday break to do
some development on this. What have you been thinking about?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1512 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (22 preceding siblings ...)
  2017-12-23  2:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-12-27 16:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-12-27 17:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (97 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-12-27 16:12 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 472 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #24 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #23)
> My idea would be to use the pci_scan_single_device function to add the sub-function device.

That's what I did in the above patch. Need to look closer at why my HDMI audio
output is now silent though

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1303 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (23 preceding siblings ...)
  2017-12-27 16:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-12-27 17:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-12-28  2:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (96 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-12-27 17:35 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1301 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #25 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
I found the difference. When I previously tested and found HDMI audio to be
working after the setpci,unload,rescan approach, I was using the nvidia
proprietary driver. HDMI audio PCI device was then detected, the ELD files show
the monitor detected, and HDMI audio works.

In the patch above, I am using nouveau. The HDMI audio PCI device is now
detected automatically, the HDMI video output is working and active, but the
ELD files show that no HDMI monitor was detected on the audio side.

I checked with HDA verbs directly:
# hda-verb /dev/snd/hwC1D0 6 GET_PIN_SENSE 0

With the setpci+unload+rescan approach on nouveau, this always returns value 0,
even with HDMI video output active and working.

With the setpci+unload+rescan approach on nvidia's proprietary drivers, this
returns 0 after loading the modules. However upon starting X, it starts
returning 0xc0000000 and HDMI audio output works fine.

So in addition to the games with the magic register, the nvidia proprietary
driver is doing something else as well which is needed to make HDMI audio work.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2061 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (24 preceding siblings ...)
  2017-12-27 17:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-12-28  2:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2017-12-28  3:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (95 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-12-28  2:24 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 955 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #26 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
Created attachment 136416
  --> https://bugs.freedesktop.org/attachment.cgi?id=136416&action=edit
Kernel module to toggle audio function

Thank you, Daniel. I was too blind to see the attachment.
Attaching some c/p work using/abusing bbswitch as a framework and your enable
code. So works like that. Creates a handle /proc/acpi/nvhda which takes ON and
OFF. Since my hardware doesn't have outputs I can't test it farther than
turning on and off.
Can be loaded and used while the proprietary driver is loaded to be used for
further investigations.
- Does the prop. driver react to this immediately, i.e. make audio work?
- If not, does plugging out/in the hdmi cable make it work?
- Are any pci config space changes noticeable?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1884 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (25 preceding siblings ...)
  2017-12-28  2:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2017-12-28  3:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-01-03 19:34   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (94 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2017-12-28  3:00 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 677 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #136416|0                           |1
        is obsolete|                            |

--- Comment #27 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
Created attachment 136418
  --> https://bugs.freedesktop.org/attachment.cgi?id=136418&action=edit
Kernel module to toggle audio function

Bug removed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2101 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (26 preceding siblings ...)
  2017-12-28  3:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-01-03 19:34   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-01-03 20:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (93 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-01-03 19:34 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 435 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #28 from Raphaël Doursenaud <rdoursenaud-GANU6spQydw@public.gmane.org> ---
Maik Freudenberg, I tried your module on my ThinkPad P51 and it successfully
enabled the HDMI audio.
HDMI audio playback is now fully functional on my laptop.
I'm using it with the proprietary driver.
Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1205 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (27 preceding siblings ...)
  2018-01-03 19:34   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-01-03 20:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-01-03 20:25   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (92 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-01-03 20:20 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1604 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #29 from Karol Herbst <karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Daniel Drake from comment #22)
> Created attachment 136369 [details] [review]
> GP104: enable HDMI audio device function
> 
> On Asus GL502VS I investigated why the gfx device must be removed before
> rescan in the above workarounds.
> 
> The reason is that when Linux first probes the device (before you attempt
> the workaround), pci_setup_device() notes that the device is not
> multifunction capable. This causes pci_scan_slot() to not bother scanning
> the non-zero functions (per the behaviour inside next_fn()).
> 
> I checked and I found that when the 0x488 magic bit is not set, the gfx
> device advertises as non-multifunction. After the bit is set, the device
> advertises as multi-function. So, after setting the magic bit, removing the
> device will cause Linux to re-probe it during the next rescan, taking note
> at that point that it is a multi-function device, and proceeding to scan the
> functions, finding the audio device at function 1.
> 
> Based on that I have a first attempt at a fix. It's not working though,
> audio output is silent (but I did have it working with the previous
> workarounds). I'll look closer next week.

I think this check against 0x134 can be something like < 0x82 instead. This
thing is there since like G82 GPUs and I am sure the HDMI audio device is
controlled like this on all those GPUs.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2814 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (28 preceding siblings ...)
  2018-01-03 20:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-01-03 20:25   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-01-03 21:27   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (91 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-01-03 20:25 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 672 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #30 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
(In reply to Karol Herbst from comment #29)
> I think this check against 0x134 can be something like < 0x82 instead. This
> thing is there since like G82 GPUs and I am sure the HDMI audio device is
> controlled like this on all those GPUs.

Separate audio function started with GT215 (0xA3) and continues on GT216 (0xA5)
and GT218 (0xA8). Note that it's not available on MCP77/79 (0xAA/0xAC) but I'm
fairly sure *is* available on MCP89 (0xAF).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1509 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (29 preceding siblings ...)
  2018-01-03 20:25   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-01-03 21:27   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-01-04  7:51   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (90 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-01-03 21:27 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 577 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #31 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
As a sidenote: another user reported 5 Watts additional power draw when
enabling the audio function. Regardless of this being accurate it should be
taken into account to not enable it unconditionally since these are mobile
devices.

@Raphaël Doursenaud
in which order did you do the following:
boot
plug in cable
start X
load module
turn on audio
?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1342 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (30 preceding siblings ...)
  2018-01-03 21:27   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-01-04  7:51   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-01-04 11:18   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (89 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-01-04  7:51 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 3622 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #32 from Martin Lopatář <lopin-vkOr6uFwhzftwjQa/ONI9g@public.gmane.org> ---
Hello.
I have Dell XPS 17 L702X with discrete GPU GF106M [GeForce GT 555M]
[10de:0dcd].
I'm trying to investigate the HDMI audio issue for some time, but I'm complete
novice in all - kernel development, power management, PCI, ACPI.
On Windows, the audio device appears/disappears as I plug/unplug the HDMI cable
and MF (multi-functional) bit in PCI config space is changing corresponding it.
Linux boots without audio device detected and MF bit not set, but my ntb has
ACPI _DSM function for enabling/disabling discrete GPU including audio device.
To be precise, the enabling/disabling is not done using _DSM function, but
using _DSM combined with _PS0 and _PS3.
So I was able to get HDMI audio working using the ACPI _DSM and remove+rescan
via sysfs workaround. Since I modified kernel to ignore cached value of
boot-time MF bit when doing rescan, removing the device via sysfs was not
needed anymore (only rescan after enabling using ACPI _DSM).
Using _DSM I was able to disable/enable GPU+audio together, but not
individually like Windows can. I was curious what is the magic the Windows do,
and in the best case I want to be able to contribute to Linux by implementing
this missing feature using the same approach as Windows use. I have just found
this thread and saw that someone is working on it so I can provide at least
some information about behavior in my environment so far.

Laptop model: Dell XPS 17 L702X
lspci output relevant lines:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF106M [GeForce GT
555M] [10de:0dcd] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation GF106 High Definition Audio
Controller [10de:0be9] (rev a1)

"setpci -s 01:00.0 0x488.l=0x2000000:0x2000000" is working - sets the MF bit in
01:00.0 and 01:00.1 PCI devices config space.
I went through ACPI AML code and see that _DSM,_PS0,_PS3 functions on
\_SB.PCI0.PEG0.PEGP do this as well (writing to 01:00.0 0x488).
I had an idea to do this in GRUB too (hoping that everything will work without
need of any additional steps or kernel changing :)),
but like Maik Freudenberg [Comment 17], I found that in grub the extended
config space is not accessible.
But because it is memory-mapped, I tried to do the same (as 'setpci'), but
using 'write_dword' grub command and succeeded!

Calling "write_dword 0xf8100488 0x02000000 0x02000000" (in my case) in grub
results in MF bit set so both GPU and audio functions are discovered at boot
time without any kernel change needed, so enabling audio function in grub IS
POSSIBLE!

Although everything looked fine at the first sight, no sound can be heard when
I tested it. After another investigation I found that HDMI audio works - but
only until the first runtime_pm suspend (in my case it happened just before X
starts :( ). I use nouveau driver and I have not tried it with proprietary
nvidia driver yet.
It looks like the problem is that the audio device is not correctly enabled by
kernel after power state resumed to D0 - it has no irq and memory resources
associated.
I have now intended to read something about PCI PM and Device Links just before
I found this thread, but now I'm going to try the patch found here before that
to know if it doesn't solve this as well.

Does someone else face same issues with nouveau driver and runtime_pm ?

Please let me know if I can help somehow.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 4440 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (31 preceding siblings ...)
  2018-01-04  7:51   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-01-04 11:18   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-01-04 23:37   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (88 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-01-04 11:18 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1045 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #33 from spamas-HPQIj1OAFZMvJsYlp49lxw@public.gmane.org ---
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 can confirm that kernel module, posted by Maik Freudenberg [Comment 27], 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. Run commands in terminal:
   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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1826 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (32 preceding siblings ...)
  2018-01-04 11:18   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-01-04 23:37   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-02-27 12:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (87 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-01-04 23:37 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 510 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #34 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
(In reply to Martin Lopatář from comment #32)
Really nice find that it's depending on power states or the change thereof. Can
you check when you boot to X with audio disabled and then enable it either
using setpci/rescan with your mod. kernel or the module, does the audio work
instantly?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1311 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (33 preceding siblings ...)
  2018-01-04 23:37   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-02-27 12:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-01 10:42   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (86 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-02-27 12:57 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 808 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

Raphaël Doursenaud <rdoursenaud-GANU6spQydw@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rdoursenaud-GANU6spQydw@public.gmane.org

--- Comment #35 from Raphaël Doursenaud <rdoursenaud-GANU6spQydw@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #31)

I usually load the module at boot in the initrd.
I also loaded it manually with X already started.
Plugging in the cable before or after starting X seem to work regardless.
Also works with both nouveau and the proprietary driver.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2128 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (34 preceding siblings ...)
  2018-02-27 12:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-01 10:42   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-03 10:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (85 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-01 10:42 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1496 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #36 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
I don't know about the current state of this, I would put some effort into it
if nobody else is working on it. Daniel Drake's patch is a good starting point
for that.
Currently, it looks like the problem lies in that the audio dev is only ever
looked after on nouveau drm module load. Instead, the state of it should be
checked/toggled on
- connector connected/disconected
- poweron/off the corresponding gpu
e.g remove the audio dev on suspend if it has been previously enabled, on
resume check if any connector is connected that needs it and enabled it again
in that case.
This would also work around the quirks of some laptop's acpi toggling the bit
either on boot [1] or on suspend [2].
Desktop cards should not be affected by that because they start with audio dev
enabled, so it will not be touched.
Quirks will have to be added for nForce chipsets with IGP since those have a
separate audio dev.

BTW, the kernel module has moved to:
https://github.com/hhfeuer/nvhda


[1]
https://devtalk.nvidia.com/default/topic/1024022/linux/gtx-1060-no-audio-over-hdmi-only-hda-intel-detected-azalia/post/5228002/#5228002
[2]
https://devtalk.nvidia.com/default/topic/1024022/linux/gtx-1060-no-audio-over-hdmi-only-hda-intel-detected-azalia/post/5234127/#5234127

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2604 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (35 preceding siblings ...)
  2018-03-01 10:42   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-03 10:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-03 12:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (84 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-03 10:41 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1466 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #37 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
Related to this issue, I've just posted v2 of my patch set to use a device link
for power management of GPU-integrated HDA controllers:
https://lists.freedesktop.org/archives/dri-devel/2018-March/168012.html

It would be great if more people could test it. There's a 4.15-based branch
available at:
https://github.com/l1k/linux/commits/switcheroo_devlink_v2

Crucially, this patch lets the HDA controller autosuspend at its own
descretion, rather than forcing it on whenever the GPU is on. It looks like
writing to bit 25 of config space dword 0x488 powergates the HDA controller. We
could leverage that to runtime suspend the HDA controller to D3cold. I'll see
to it that I cook up a patch.

As to the bit being cleared on boot, I think this should be done in a "header"
PCI quirk rather than in nouveau. If you look at pci_scan_slot() and next_fn()
in drivers/pci/probe.c, you'll notice that device functions are scanned from 0
upwards. So the GPU is always scanned first. Just add a PCI quirk which gets
executed for the GPU, sets the bit and then reinitializes the multifunction
flag in the GPU's struct pci_dev, that may already be sufficient. The PCI core
should do all the rest. See quirk_jmicron_ata() for an example.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2385 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (36 preceding siblings ...)
  2018-03-03 10:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-03 12:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-03 13:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (83 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-03 12:24 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 830 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org

--- Comment #38 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
Created attachment 137764
  --> https://bugs.freedesktop.org/attachment.cgi?id=137764&action=edit
PCI: Enable power to Nvidia HDA controllers on device enumeration

This (untested) patch is basically what I had in mind with the PCI quirk.
Runtime suspending to D3cold would be a separate patch then.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2368 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (37 preceding siblings ...)
  2018-03-03 12:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-03 13:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-03 13:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (82 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-03 13:35 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 407 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #39 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
Lukas, unconditionally enabling the nvidia hda shouldn't be done. In my case,
having a "3D controlller" meaning a dGPU without outputs this would lead to
having a broken HDA device visible.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1178 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (38 preceding siblings ...)
  2018-03-03 13:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-03 13:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-03 14:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (81 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-03 13:45 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 305 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #40 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
Should be easily avoidable by not enabling it when adapter class is
PCI_CLASS_DISPLAY_3D

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1066 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (39 preceding siblings ...)
  2018-03-03 13:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-03 14:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-03 15:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (80 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-03 14:55 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 994 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #41 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #39)
> Lukas, unconditionally enabling the nvidia hda shouldn't be done. In my
> case, having a "3D controller" meaning a dGPU without outputs this would
> lead to having a broken HDA device visible.

Hm, broken in what way? My expectation would be that it just reports all
connectors as disconnected. That might be irritating to some users, but other
than that I don't see a real downside. If the HDA controller is runtime
suspended to D3cold, power consumption is identical to the status quo ante.

But yes, just matching for PCI_CLASS_DISPLAY_VGA << 8 instead of
PCI_BASE_CLASS_DISPLAY << 16 would also work, assuming that vendors always got
this right and never used PCI_CLASS_DISPLAY_3D for a GPU with connectors.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1843 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (40 preceding siblings ...)
  2018-03-03 14:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-03 15:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-03 15:47   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (79 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-03 15:28 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1226 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #42 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
The hda devices on 3D controller are existing but not completely configured by
vendors leading to errors like
[ 4790.121207] pci 0000:07:00.1: [10de:0e0f] type 00 class 0x040300
[ 4790.121253] pci 0000:07:00.1: reg 0x10: [mem 0x00000000-0x00003fff]
[ 4790.121610] pci 0000:07:00.1: BAR 0: no space for [mem size 0x00004000]
[ 4790.121613] pci 0000:07:00.1: BAR 0: failed to assign [mem size 0x00004000]
[ 4790.121900] snd_hda_intel 0000:07:00.1: Disabling MSI
[ 4790.122493] snd_hda_intel 0000:07:00.1: can't ioremap BAR 0: [??? 0x00000000
flags 0x0]
[ 5661.858112] snd_hda_intel 0000:07:00.1: ioremap error

AFAIK, 3D class is used by nvidia to specifically mark the adapters without
display engines, like Teslas or some Optimus dGPUs. So excluding them should be
safe.
One thing that I don't know about but always had in the back of my mind are
Tegras, how those are handled or react.
Looking at the vgaswitcheroo patches, these look like a really fine way to
handle pm on these hda devices.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1987 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (41 preceding siblings ...)
  2018-03-03 15:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-03 15:47   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-03 17:54   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (78 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-03 15:47 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1597 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #43 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #42)
> The hda devices on 3D controller are existing but not completely configured
> by vendors leading to errors like
> [ 4790.121207] pci 0000:07:00.1: [10de:0e0f] type 00 class 0x040300
> [ 4790.121253] pci 0000:07:00.1: reg 0x10: [mem 0x00000000-0x00003fff]
> [ 4790.121610] pci 0000:07:00.1: BAR 0: no space for [mem size 0x00004000]
> [ 4790.121613] pci 0000:07:00.1: BAR 0: failed to assign [mem size 0x00004000]
> [ 4790.121900] snd_hda_intel 0000:07:00.1: Disabling MSI
> [ 4790.122493] snd_hda_intel 0000:07:00.1: can't ioremap BAR 0: [??? 0x00000000 flags 0x0]
> [ 5661.858112] snd_hda_intel 0000:07:00.1: ioremap error

Is this a Thunderbolt-attached GPU? AFAICS these errors are not caused by
missing bits in the device configuration but rather improper resource
allocation by the kernel. This is common with Thunderbolt, but Mika Westerberg
has upstreamed a bunch of fixes for 4.15 and more are currently being
upstreamed:

https://lkml.org/lkml/2017/10/13/791
https://www.spinics.net/lists/linux-pci/msg69483.html

Have you tried this on a 4.15 kernel or was it an older version? If the latter,
try on 4.15 again and see if the situation has improved.

> Looking at the vgaswitcheroo patches, these look like a really fine way to
> handle pm on these hda devices.

Thanks, glad you like them.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2595 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (42 preceding siblings ...)
  2018-03-03 15:47   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-03 17:54   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-04  0:08   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (77 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-03 17:54 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1438 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #44 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #42)
> The hda devices on 3D controller are existing but not completely configured
> by vendors leading to errors like
> [ 4790.121207] pci 0000:07:00.1: [10de:0e0f] type 00 class 0x040300
> [ 4790.121253] pci 0000:07:00.1: reg 0x10: [mem 0x00000000-0x00003fff]
> [ 4790.121610] pci 0000:07:00.1: BAR 0: no space for [mem size 0x00004000]
> [ 4790.121613] pci 0000:07:00.1: BAR 0: failed to assign [mem size
> 0x00004000]
> [ 4790.121900] snd_hda_intel 0000:07:00.1: Disabling MSI
> [ 4790.122493] snd_hda_intel 0000:07:00.1: can't ioremap BAR 0: [???
> 0x00000000 flags 0x0]
> [ 5661.858112] snd_hda_intel 0000:07:00.1: ioremap error
> 
> AFAIK, 3D class is used by nvidia to specifically mark the adapters without
> display engines, like Teslas or some Optimus dGPUs. So excluding them should
> be safe.

Sadly no. This was true for a time, but is unfortunately not accurate across
all devices. One can check if the DCB table has any outputs, and only do stuff
if there are none.This tends to be representative of whether there are actual
outputs on a laptop connected to the GPU. (The DISPLAY block can also be fused
off, which can also be checked.)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2308 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (43 preceding siblings ...)
  2018-03-03 17:54   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-04  0:08   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-04  0:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (76 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-04  0:08 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1064 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #45 from Denis Lisov <dennis.lissov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Lukas Wunner from comment #37)
> Related to this issue, I've just posted v2 of my patch set to use a device
> link for power management of GPU-integrated HDA controllers:
> https://lists.freedesktop.org/archives/dri-devel/2018-March/168012.html
> 
> It would be great if more people could test it. There's a 4.15-based branch
> available at:
> https://github.com/l1k/linux/commits/switcheroo_devlink_v2

Tested these patches on Lenovo Thinkpad P50. Audio works, the HDA and GPU
suspend when unused with no errors in logs and resume when needed.
HDA unbind/bind worked with no errors, some "Too big adjustment {128,384}"
messages in dmesg.

For this hardware, even a plugged in HDMI TV on boot does not cause the audio
device to appear, so the test was done with a PCI early quirk like suggested in
this bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2079 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (44 preceding siblings ...)
  2018-03-04  0:08   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-04  0:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-04  1:07   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (75 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-04  0:58 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 463 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #46 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
(In reply to Lukas Wunner from comment #43)
> Is this a Thunderbolt-attached GPU?
Calm down, get back to basics.
This is the dmesg when you turn on the hda dev on a 3d class device.
Just exclude the 3D class from toggling the bit. No big deal.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1295 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (45 preceding siblings ...)
  2018-03-04  0:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-04  1:07   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-04  1:23   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (74 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-04  1:07 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 537 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #47 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
There's of course the possibility that some braindead vendor would ship a 3D
class tagged device actually having outputs. From my observations, this would
break the prop. driver so this vendor would have to pay nvidia to add a quirk
so this would work for two years.
Don't think too much of it, your approach is fine.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1298 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (46 preceding siblings ...)
  2018-03-04  1:07   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-04  1:23   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-04  2:38   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (73 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-04  1:23 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 697 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #48 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
(In reply to Denis Lisov from comment #45)
> For this hardware, even a plugged in HDMI TV on boot does not cause the
> audio device to appear, so the test was done with a PCI early quirk like
> suggested in this bug.
Yes, Lukas' main patches just(!) take care of power management of the hda
device so it isn't powered on when it isn't needed which is pretty great.
The pci quirk is taking care of boot time, now it needs a second quirk for
resume to have a perfect solution.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1535 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (47 preceding siblings ...)
  2018-03-04  1:23   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-04  2:38   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-04 10:23   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (72 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-04  2:38 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 463 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #49 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #47)
> There's of course the possibility that some braindead vendor would ship a 3D
> class tagged device actually having outputs.

This happens. A lot. See comment #44 for the proper procedure.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1334 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (48 preceding siblings ...)
  2018-03-04  2:38   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-04 10:23   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-04 10:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (71 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-04 10:23 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1077 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #50 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Denis Lisov from comment #45)
> (In reply to Lukas Wunner from comment #37)
> > Related to this issue, I've just posted v2 of my patch set to use a device
> > link for power management of GPU-integrated HDA controllers:
> > https://lists.freedesktop.org/archives/dri-devel/2018-March/168012.html
> > 
> > It would be great if more people could test it. There's a 4.15-based branch
> > available at:
> > https://github.com/l1k/linux/commits/switcheroo_devlink_v2
> 
> Tested these patches on Lenovo Thinkpad P50. Audio works, the HDA and GPU
> suspend when unused with no errors in logs and resume when needed.
> HDA unbind/bind worked with no errors, some "Too big adjustment {128,384}"
> messages in dmesg.

Thank you, this helps greatly. I'll add your Tested-by to the commits so that
you get credit for your testing efforts.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2164 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (49 preceding siblings ...)
  2018-03-04 10:23   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-04 10:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-04 12:47   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (70 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-04 10:39 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1877 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #51 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #31)
> As a sidenote: another user reported 5 Watts additional power draw when
> enabling the audio function. Regardless of this being accurate it should be
> taken into account to not enable it unconditionally since these are mobile
> devices.

On my GK107 I do not see any change in power consumption regardless whether bit
25 at config space offset 0x488 is set or cleared, which is somewhat
disappointing. I also do not see a change in power consumption between PCI
power state D0 and D3hot.

So if it's true that enabling the HDA increases power consumption, that would
seem to only apply to newer cards.

Could somebody verify this: Do you see a consistent drop or increase in power
consumption when enabling/disabling the HDA?

setpci -s 01:00.0 0x488.l=0x0000000:0x2000000    # disable
setpci -s 01:00.0 0x488.l=0x2000000:0x2000000    # enable

Try this a couple of times and see if powertop shows a consistent difference in
power consumption. (The laptop needs to run on battery for this to work, so
disconnect the charger.)

If you *do* see a difference, double-check whether runtime suspending the HDA
to D3hot (using my above-linked switcheroo_devlink_v2 patch set) also shows a
difference. You can force the HDA into D0 or let it autosuspend to D3hot like
this:

echo on   > /sys/bus/pci/devices/0000:01:00.1/power/control    # disable
echo auto > /sys/bus/pci/devices/0000:01:00.1/power/control    # enable

If the reduction in power consumption turns out to be the same in D3hot versus
disabling via bit 25, there's no point in adding D3cold support to hda_intel.c.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2713 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (50 preceding siblings ...)
  2018-03-04 10:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-04 12:47   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-04 17:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (69 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-04 12:47 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 981 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #52 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Ilia Mirkin from comment #49)
> (In reply to Maik Freudenberg from comment #47)
> > There's of course the possibility that some braindead vendor would ship a 3D
> > class tagged device actually having outputs.
> 
> This happens. A lot.

Ilia, do you have definitive knowledge of GPUs which
a) have a different class than PCI_CLASS_DISPLAY_VGA and
b) have working DP/HDMI outputs and
c) have an integrated HDA controller?

I'm asking because get_bound_vga() in sound/pci/hda/hda_intel.c specifically
matches against PCI_CLASS_DISPLAY_VGA only. In other words, if a GPU with the
three above-listed properties exists and is built into a hybrid graphics
laptop, it is currently not registered with vga_switcheroo, which would be
wrong.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1860 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (51 preceding siblings ...)
  2018-03-04 12:47   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-04 17:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-06 19:26   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (68 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-04 17:28 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1602 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #53 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
(In reply to Lukas Wunner from comment #52)
> (In reply to Ilia Mirkin from comment #49)
> > (In reply to Maik Freudenberg from comment #47)
> > > There's of course the possibility that some braindead vendor would ship a 3D
> > > class tagged device actually having outputs.
> > 
> > This happens. A lot.
> 
> Ilia, do you have definitive knowledge of GPUs which
> a) have a different class than PCI_CLASS_DISPLAY_VGA and
> b) have working DP/HDMI outputs and
> c) have an integrated HDA controller?
> 
> I'm asking because get_bound_vga() in sound/pci/hda/hda_intel.c specifically
> matches against PCI_CLASS_DISPLAY_VGA only. In other words, if a GPU with
> the three above-listed properties exists and is built into a hybrid graphics
> laptop, it is currently not registered with vga_switcheroo, which would be
> wrong.

I can say with some certainty that there are laptops running around, esp
GM107's, whose pci class is 3D, and that have attached DP/HDMI outputs.

I don't think the users in question ever asked about audio, so I don't know
about the last bit. However I can't imagine that it wouldn't be there (esp once
all the proper enablement is done).

Is hda_intel only for intel? If so, I'm pretty sure that all intel vga devices
are PCI_CLASS_DISPLAY_VGA. However if it's used for everything, then it needs
to deal with DISPLAY_3D as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2579 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (52 preceding siblings ...)
  2018-03-04 17:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-06 19:26   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-06 19:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (67 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-06 19:26 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 582 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #54 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
(In reply to Ilia Mirkin from comment #44)
> One can check if the DCB table has any outputs, and only do
> stuff if there are none.
I don't see how that's feasible since this would require to load the ROM and
parse it and this is about an early pci quirk or am I wrong there?
Sidenote: there's also one gtx560ti that's advertising as
PCI_CLASS_MULTIMEDIA_OTHER

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1417 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (53 preceding siblings ...)
  2018-03-06 19:26   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-06 19:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-06 19:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (66 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-06 19:30 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 706 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #55 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #54)
> (In reply to Ilia Mirkin from comment #44)
> > One can check if the DCB table has any outputs, and only do
> > stuff if there are none.
> I don't see how that's feasible since this would require to load the ROM and
> parse it and this is about an early pci quirk or am I wrong there?

Correct.

What's the downside for doing this always btw (except for a fixed list of pci
ids/ranges, for the "older" chips, i.e. pre-fermi)?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1602 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (54 preceding siblings ...)
  2018-03-06 19:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-06 19:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-06 20:02   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (65 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-06 19:57 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1767 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #56 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Ilia Mirkin from comment #53)
> (In reply to Lukas Wunner from comment #52)
> > Ilia, do you have definitive knowledge of GPUs which
> > a) have a different class than PCI_CLASS_DISPLAY_VGA and
> > b) have working DP/HDMI outputs and
> > c) have an integrated HDA controller?
> > 
> > I'm asking because get_bound_vga() in sound/pci/hda/hda_intel.c specifically
> > matches against PCI_CLASS_DISPLAY_VGA only. In other words, if a GPU with
> > the three above-listed properties exists and is built into a hybrid graphics
> > laptop, it is currently not registered with vga_switcheroo, which would be
> > wrong.
> 
> I can say with some certainty that there are laptops running around, esp
> GM107's, whose pci class is 3D, and that have attached DP/HDMI outputs.
> 
> I don't think the users in question ever asked about audio, so I don't know
> about the last bit. However I can't imagine that it wouldn't be there (esp
> once all the proper enablement is done).

In the meantime I've done extensive googling for dmesg output of a laptop that
satisfies all three conditions listed above, but I come back empty-handed. I
did find machines with a PCI_CLASS_DISPLAY_3D Nvidia card and an HDA device on
function 1, but those weren't laptops. So it looks to me like we're good right
now but we'll definitely need to amend hda_intel.c if we expose the HDA device
on all modern cards.

> Is hda_intel only for intel?

No, that file contains the driver for all PCI HDA devices, its name is a
historic artifact.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2740 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (55 preceding siblings ...)
  2018-03-06 19:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-06 20:02   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-06 20:19   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (64 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-06 20:02 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 624 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #57 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
(In reply to Ilia Mirkin from comment #55)
> What's the downside for doing this always btw 
By 'this', you mean, always turning it on?
This generates the errors from comment #42 since those devices are not
configured resource-wise, all zeros.
I think that's rather ugly, users getting confused, trying to poke sound
through the device, spamming mailing-lists. That's just the non-technical side
of it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1496 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (56 preceding siblings ...)
  2018-03-06 20:02   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-06 20:19   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-07 12:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (63 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-06 20:19 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 854 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #58 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
OK, well, I've seen this both ways -- 3D controllers with outputs as well as
VGA display adapters with the display function actually fused off. The only
reliable thing is the DCB block, but like you said, it's not appropriate for an
early pci quirk.

Finding the specifics is going to be difficult. People come into #nouveau with
a pastebin of their dmesg and some problem, and I note it in my head over the
years. Finding these will be next to impossible, esp as the pastes expire
fairly quickly.

Whatever solution you try to come up with, remember that all these cases are
possible, but some more frequent than others.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1611 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (57 preceding siblings ...)
  2018-03-06 20:19   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-07 12:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-09 15:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (62 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-07 12:04 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1291 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #59 from Peter Wu <peter-VTkQYDcBqhK7DlmcbJSQ7g@public.gmane.org> ---
(In reply to Lukas Wunner from comment #51)
> On my GK107 I do not see any change in power consumption regardless whether
> bit 25 at config space offset 0x488 is set or cleared, which is somewhat
> disappointing. I also do not see a change in power consumption between PCI
> power state D0 and D3hot.

Was this your macbook or a regular laptop? The Kepler family still used an ACPI
_DSM method to remove power, setting the PM bit in the PCI config space did not
do anything (this was at least true for my older Fermi card).


Possibly relevant for this bug: I tested Lukas devlink_v2 patches but found
some issues when the HDMI/DP cable was disconnected on a GTX 965M (where by
default the audio function would not be visible):
https://lists.freedesktop.org/archives/nouveau/2018-March/029988.html

Do you also experience issues after these steps:
1. remove+rescan to make audio function appear
2. remove GPU power (runtime PM or system sleep)
3. remove HDMI/DP cable
4. restore power
5. check dmesg or try to access audio function (e.g. read PCI regs)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2209 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (58 preceding siblings ...)
  2018-03-07 12:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-09 15:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-09 15:40   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (61 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-09 15:39 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 679 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #137764|0                           |1
        is obsolete|                            |

--- Comment #60 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
Created attachment 137939
  --> https://bugs.freedesktop.org/attachment.cgi?id=137939&action=edit
[PATCH 1/3] PCI: Expose Nvidia HDA controllers

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2182 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (59 preceding siblings ...)
  2018-03-09 15:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-09 15:40   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-09 15:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (60 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-09 15:40 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 390 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #61 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
Created attachment 137940
  --> https://bugs.freedesktop.org/attachment.cgi?id=137940&action=edit
[PATCH 2/3] PCI: Apply quirks on runtime resume despite being unbound

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1455 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (60 preceding siblings ...)
  2018-03-09 15:40   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-09 15:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-09 16:10   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (59 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-09 15:41 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 371 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #62 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
Created attachment 137941
  --> https://bugs.freedesktop.org/attachment.cgi?id=137941&action=edit
[PATCH 3/3] ALSA: hda - Broaden VGA class matching

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1398 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (61 preceding siblings ...)
  2018-03-09 15:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-09 16:10   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-10  6:36   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (58 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-09 16:10 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 3716 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #63 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Peter Wu from comment #59)
> (In reply to Lukas Wunner from comment #51)
> > On my GK107 I do not see any change in power consumption regardless whether
> > bit 25 at config space offset 0x488 is set or cleared, which is somewhat
> > disappointing. I also do not see a change in power consumption between PCI
> > power state D0 and D3hot.
> 
> Was this your macbook or a regular laptop? The Kepler family still used an
> ACPI _DSM method to remove power, setting the PM bit in the PCI config space
> did not do anything (this was at least true for my older Fermi card).

This was on my MacBook Pro. (Is that not a regular laptop? ;-) ) Power to the
GK107 GPU is cut and reinstated by the GMUX controller rather than a _DSM. I
can hide and expose the audio device by clearing or setting bit 25 at offset
0x488, but this does not change power consumption in any way. Only cutting
power to the GPU via GMUX does.

That the audio device is powergated on newer GPUs was only a theory. Because,
why would laptop vendors hide the audio device if nothing is connected? One
possible explanation is that it saves power. Someone needs to confirm or debunk
this theory by clearing and setting the bit and comparing power consumption in
powertop.


> Possibly relevant for this bug: I tested Lukas devlink_v2 patches but found
> some issues when the HDMI/DP cable was disconnected on a GTX 965M (where by
> default the audio function would not be visible):
> https://lists.freedesktop.org/archives/nouveau/2018-March/029988.html
> 
> Do you also experience issues after these steps:
> 1. remove+rescan to make audio function appear
> 2. remove GPU power (runtime PM or system sleep)
> 3. remove HDMI/DP cable
> 4. restore power
> 5. check dmesg or try to access audio function (e.g. read PCI regs)

I've had a look at the acpidump of your machine:
https://github.com/Lekensteyn/acpi-stuff/tree/master/dsl/Clevo_P651RA

Bit 25 at offset 0x488 is named NHDA. In two places (in the _ON method of the
root port's power resource and in _PS0 of the GPU device), the AML code probes
three GPIO pins and exposes the HDA controller if any of them are high, or else
hides the GPU. These GPIO pins are probably wired to HPD of the external
connectors.

I think what happens in the scenario you've described above is: On runtime
suspend or system suspend, the state of the HDA is saved (BARs etc). Because
the cable is disconnected, the HDA will be hidden on resume. Now the kernel
tries to wake the HDA device to D0 and will fail (you should see "Refused to
change power state, currently in D3" in dmesg). It will then restore the saved
state, which will also fail because the device is inaccessible. Also, the saved
state is invalidated and cannot be restored again. So the HDA's BARs are blank
until you remove+rescan.

I've just attached three patches, please try those on top of my
switcheroo_devlink_v2 series, they should fix the issue.

Crucially, patch [1/3] now also applies the PCI quirk during the resume_noirq
and runtime_resume phase. This means that in the scenario you've given above,
even though the BIOS may have hidden the HDA, that change will be undone by the
quirk. The quirk is executed for the GPU device. We know that the HDA device
will resume *after* the GPU device because of the device link.

I cannot test these patches myself because the HDA is never hidden on my
machine. So the patches are compile-tested only.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 4852 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (62 preceding siblings ...)
  2018-03-09 16:10   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-10  6:36   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-10 19:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (57 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-10  6:36 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1625 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #64 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #57)
> (In reply to Ilia Mirkin from comment #55)
> > What's the downside for doing this always btw 
> By 'this', you mean, always turning it on?
> This generates the errors from comment #42 since those devices are not
> configured resource-wise, all zeros.

I would assume the BAR is all zeroes because there was insufficient space to
accommodate the additional 4K for it. AFAIUI, the kernel assigns only the
minimal amount of space to the bridge window that is necessary to accomodate
the devices below. Hence, if a device is added after the fact below the bridge,
there may not be sufficient space available for it. I'd expect the situation to
be different if the device is already present on enumeration, as is done by the
"header" PCI quirk. Then the bridge window can be sized appropriately. Could
you verify that on the machine in question?

It occurred to me that we could at least check presence of the Optimus _DSM in
the PCI quirk. That would be sufficiently small for a quirk. That way it would
be constrained to Optimus laptops, but sadly we'd still expose an audio
function if the GPU has no outputs at all. However I notice that
drivers/gpu/drm/nouveau/nouveau_acpi.c defines a OPTIMUS_HDA_CODEC_MASK macro
("hda bios codec supported"). Would that be of any use? Or can we query via the
_DSM whether the GPU has any outputs?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2561 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (63 preceding siblings ...)
  2018-03-10  6:36   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-10 19:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-10 19:42   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (56 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-10 19:14 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1283 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #65 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
I feel like I'm jumping from puddle to puddle now.
Lukas, I previously couldn't test your patches due to an acpica bug affecting
my machine rendering results useless. Luckily, this has been fixed now.

Meanwhile, I discovered that (at least) kernels 4.9-4.13 suffer from some pci
config space bug making re-reading the header type impossible. The kernel will
always put out a cached version thus making it impossible to enable the hda dev
with any method, even remove/rescan.
So a fair warning to users running a 4.9LTS kernel trying to turn on audio.
Kernel series 4.4 or 4.14+ work.

Now with the acpi bug fixed, I applied both of your v2 patchsets with some
nip/tuck to a 4.16rc4+ kernel and ran into the next oddity: while the pci quirk
in general works, re-reading the header type will always return 0x00 so the hda
device is not added.
lspci confirms that the quirk is otherwise working:
00: de 10 92 12 07 00 10 00 a1 00 02 03 00 00 80 00
480: 00 00 00 00 17 00 00 00 00 00 00 02 00 00 00 00

I'll investigate what's happening the next days.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2044 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (64 preceding siblings ...)
  2018-03-10 19:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-10 19:42   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-10 20:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (55 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-10 19:42 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1130 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #66 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #65)
> Now with the acpi bug fixed, I applied both of your v2 patchsets with some
> nip/tuck to a 4.16rc4+ kernel and ran into the next oddity: while the pci
> quirk in general works, re-reading the header type will always return 0x00
> so the hda device is not added.
> lspci confirms that the quirk is otherwise working:
> 00: de 10 92 12 07 00 10 00 a1 00 02 03 00 00 80 00
> 480: 00 00 00 00 17 00 00 00 00 00 00 02 00 00 00 00

Hm, the multifunction bit is set. Try adding an msleep(100) after setting the
bit at offset 0x488 and before re-reading the header type register. 100 ms is
likely way too much, this is just to ensure it's not too short.

Also, try changing DECLARE_PCI_FIXUP_CLASS_HEADER to
DECLARE_PCI_FIXUP_CLASS_EARLY. Shouldn't make a difference but maybe I missed
something.

Does it work if you just set gpu->multifunction = 1?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1972 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (65 preceding siblings ...)
  2018-03-10 19:42   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-10 20:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-11 12:53   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (54 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-10 20:55 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 827 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #67 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
(In reply to Lukas Wunner from comment #66)
> Hm, the multifunction bit is set. Try adding an msleep(100) after setting
> the bit at offset 0x488 and before re-reading the header type register. 100
> ms is likely way too much, this is just to ensure it's not too short.
No success. 
> Also, try changing DECLARE_PCI_FIXUP_CLASS_HEADER to
> DECLARE_PCI_FIXUP_CLASS_EARLY. Shouldn't make a difference but maybe I
> missed something.
No success.
> Does it work if you just set gpu->multifunction = 1?
Nope.
Completely absurd. Looks a bit like the mentioned bug in 4.9 though it vanishes
after pci init.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1736 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (66 preceding siblings ...)
  2018-03-10 20:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-11 12:53   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-03-16  3:54   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (53 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-11 12:53 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1689 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #68 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
Created attachment 137989
  --> https://bugs.freedesktop.org/attachment.cgi?id=137989&action=edit
Patch to simulate hidden HDA on systems which normally expose it

This is a quick & dirty hack to hide the HDA controller in the EFI stub. It can
be used to simulate a hidden HDA controller on systems which normally expose
it. Register 0x488 is written for any PCI device that has a ROM. On my machine
that happens to only be the case for the Nvidia GPU.

If I boot my system with this patch applied, the HDA controller is not
enumerated and invoking lspci on the GPU shows that the multifunction bit is
cleared, as is bit 25 at offset 0x488.

Applying the three other patches I've attached to this bugzilla on top results
in the HDA controller being enumerated again. So the patches seem to work as
intended.

One interesting behavior I've noticed though: If I hide the HDA in the EFI stub
and do not expose it with a PCI quirk, putting the GPU into D3cold and back
into D0 causes the multifunction bit to be set, same for bit 25 at offset
0x488, even though the bits were cleared before the GPU went into D3cold. I
don't see anything in the ACPI tables that bit 25 is written, I'm rather under
the impression that the GPU has some non-volatile memory where the vendor
preconfigures bits that are restored when the device comes out of power-on
reset. But because the PCI quirk is also executed on resume of the GPU, we
should have that covered.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2748 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (67 preceding siblings ...)
  2018-03-11 12:53   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-03-16  3:54   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-04-24 20:27   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (52 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-03-16  3:54 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 2378 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #69 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
Thanks for the efforts here. I have tested the switcheroo_devlink_v2 branch
plus patches:

 [PATCH 1/3] PCI: Expose Nvidia HDA controllers 
 [PATCH 2/3] PCI: Apply quirks on runtime resume despite being unbound
 [PATCH 3/3] ALSA: hda - Broaden VGA class matching 

on Asus GL502VS with GP104M [GeForce GTX 1070].

The quirk works in that the HDMI audio PCI device now appears. I checked with
and without the quirk, the login screen idle power consumption from
/sys/class/power_supply/BAT0/power_now is 31W-32W in both cases (no difference
observed with the quirk).

However, with no graphics driver loaded, or with nouveau loaded, HDMI audio
does not work at all and the eld files in /proc/asound show that no HDMI
display is connected. If I load the proprietary nvidia driver and then start X,
the eld files change their values to indicate a connected device, and HDMI
audio works. After suspend and resume the HDMI audio continues working.

I also tested GL702VMK with GP106M [GeForce GTX 1060], with the proprietary
nvidia driver, HDMI audio now works and also after suspend/resume.

Also tested Asus UX550GE with GP107M [GeForce GTX 1050 Ti Mobile] with the
proprietary driver. This one could not be worked around with previous userspace
approaches (setpci, remove, rescan) because after remove/rescan the magic bit
had gone back to zero. But this new kernel approach works, the magic bit gets
stuck on and HDMI audio works. Also tested suspend/resume and it still works.

Results look good, but I have 2 concerns:
 1. The proprietary nvidia driver does something special on these platforms to
make the HDMI audio work after it has appeared. nouveau does not do this, so
this will not fix HDMI audio for nouveau users on some platforms, something
else is needed too.
 2. Do we understand why the underlying nvidia/windows design is like this in
the first place? I previously confirmed that Windows dynamically
enables/disables this magic bit based on presence of a HDMI display - i.e.
Windows does not do the approach being considered here which makes it
always-on. Is there a good reason for this that we're missing?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3138 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (68 preceding siblings ...)
  2018-03-16  3:54   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-04-24 20:27   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-05-20  1:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (51 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-04-24 20:27 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1349 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #70 from Aaron Plattner <aplattner-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> ---
How the audio and video drivers interact is described a bit in [1]: The audio
function and the graphics function work hand-in-hand to provide audio support.
At modeset time, the graphics driver extracts information from the display's
EDID and the mode timings and sticks it into registers in the graphics
function. These get processed by the hardware and spit out the other side via
the "EDID-Like Data" fields in the audio function, described in [2].

I'm not completely sure how this works on Windows, but my understanding is that
the display driver enables or disables the audio function at modeset time, and
Windows handles that as a PCI hot-plug or -unplug, loading or unloading the
audio driver as necessary. On Linux, I think the nouveau and nvidia-modeset
drivers would need to call into some hypothetical new audio power module to
coordinate that, so the kernel can know when to rescan or remove the audio
device.

[1]
https://download.nvidia.com/XFree86/gpu-hdmi-audio-document/#_driver_architecture
[2]
https://www.intel.com/content/www/us/en/standards/high-definition-audio-specification.html

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2318 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (69 preceding siblings ...)
  2018-04-24 20:27   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-05-20  1:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-09-18 10:43   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (50 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-05-20  1:13 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 704 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #71 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
So you're talking about the driver toggling the bit and emitting a general
hotplug event to trigger a rescan of the pci bus? Having one of those would
sure be handy.
(You can imagine in windows a daemon triggering this every second to detect new
hardware)
OTOH though, doing a rescan on its own subdevice isn't complicated, take as
proof comment #26.
For any out-of-driver solution, fixing this:
https://devtalk.nvidia.com/default/topic/1016046/?comment=5250957
would be helpful.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1585 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (70 preceding siblings ...)
  2018-05-20  1:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-09-18 10:43   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2018-09-21 11:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (49 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-09-18 10:43 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1488 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #72 from Mark Ackerman <markackerman8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
Mark Thank you SOOOOO Much.  

Now my seventh day with this new Hp Omen X 17-ap0xx and its' Nvidia GTX 1080m 
(Hp's most awesome Laptop / GPU as of today WooHoo), and I always have despised
Windows and stuck with Ubuntu Since Vista 13 years ago - and proud to have
helped hundreds if not more convert to Ubuntu, but lately I am proud to say it
does not take too much effort as Ubuntu is so EASY, for all drivers and ease of
use, but,

BUT! With this Bleeding Edge Laptop I have been pulling out what hair is left
on my head trying to simply get HDMI sound working. I was starting to think I
was wrong 13 years later if Linux/Ubuntu can't even have digital sound easily
on a 6 month old Video card ... And NO help from 20+ sources, and then I
stumbled upon this fix.  Thank you So Much!   You have renewed my faith - So to
speak

And I have spread the word to every blog I was on about this problem with your
AWESOME Fix.

But Pray tell, 6 months later and linux/Ubuntu has not got this solved yet -
what is their PROBLEM!   Or is this an evolving problem from Hp getting
proprietary?  Can you respond to why this fix is not yet into the mainstream
Ubuntu?

Always Trying to help, and in this thanks for the help, Me Mark TOO - Cheers!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2247 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (71 preceding siblings ...)
  2018-09-18 10:43   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2018-09-21 11:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-03-31  9:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (48 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2018-09-21 11:16 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 392 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #73 from fheday-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org ---
Hi all, I can confirm that the module posted by Maik Freudenberg [Comment 27]
works nicely: I can turn the HDMI audio on/off on the fly with no problems at
all! 
Thank you very much!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1160 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (72 preceding siblings ...)
  2018-09-21 11:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-03-31  9:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-06-02 22:29   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (47 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-03-31  9:57 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 3102 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #74 from Eugene Medvedev <rn3aoh.g-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #27)
> Created attachment 136418 [details]
> Kernel module to toggle audio function

I have a somewhat strange variation on the bug when using your kernel module
workaround.

MSI GE63 Raider 8RF looks like this when everything's working:

00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM
Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core
Processor PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b
00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal
Controller (rev 10)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host
Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:14.3 Network controller: Intel Corporation Wireless-AC 9560 [Jefferson Peak]
(rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI
Controller (rev 10)
00:17.0 SATA controller: Intel Corporation Device a353 (rev 10)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port 9
(rev f0)
00:1d.6 PCI bridge: Intel Corporation Device a336 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Device a30d (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI
Controller (rev 10)
01:00.0 VGA compatible controller: NVIDIA Corporation GP104M [GeForce GTX 1070
Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller
(rev a1)
02:00.0 Non-Volatile memory controller: Kingston Technology Company, Inc.
Device 5008 (rev 01)
03:00.0 Ethernet controller: Qualcomm Atheros Killer E2500 Gigabit Ethernet
Controller (rev 10)

What's strange is that upon cold boot -- using the proprietary driver -- the
audio subdevice is missing entirely -- even from "lspci -H1" and can't be
enabled:

[    3.214369] nvhda: version 0.01
[    3.214373] nvhda: Found nv VGA device 0000:01:00.0
[    3.214377] nvhda: enabling audio
[    3.214378] nvhda: Not multifunction, no audio
[    3.214380] nvhda: Succesfully loaded. Audio 0000:01:00.0 is off

Unloading and reloading the module after the boot has completed makes no
difference, it doesn't work. Upon suspending and resuming once, however, the
device is there on "lspci -H1", and the module can enable it. I ended up
setting the module up to unload on suspend and load on resume, so that I can
just do a suspend/resume when I need to use HDMI output, which isn't that
often.

I can supply further data and experiment a bit if needed, but my understanding
of this area of hardware is essentially nil.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 4183 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (73 preceding siblings ...)
  2019-03-31  9:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-06-02 22:29   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-06-03 12:46   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (46 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-06-02 22:29 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 870 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #75 from jonasz-ee4meeAH724@public.gmane.org ---
Hi guys,

I have a dell t7610 centOS installation with two K6000 gpus with the latest
available firmware installed. These gpus have two DisplayPorts and two DVI
ports each.

There is no hdmi sound coming from any of the displayports, video is ok but no
sound at all when using the latest NVIDIA available drivers. I did get sound
when previously using nouveau.

I have spent the last couple of days trying and testing things that I have
found over the web. FiR example
https://download.nvidia.com/XFree86/gpu-hdmi-audio-document/ Besides quite a
few crashes and reinstalls, still no 

Could this patch be used in my situation?

Thanks in advance,

Regards

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1678 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (74 preceding siblings ...)
  2019-06-02 22:29   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-06-03 12:46   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-06-20  7:25   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (45 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-06-03 12:46 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 753 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #76 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
(In reply to jonasz from comment #75)
> Hi guys,
> 
> I have a dell t7610 centOS installation with two K6000 gpus with the latest
> available firmware installed. These gpus have two DisplayPorts and two DVI
> ports each.

This bug report is about the sound device of notebooks. So this does not apply
to your desktop hardware. You're probably hitting this nvidia bug:
https://devtalk.nvidia.com/default/topic/1044547/linux/audio-problems-with-the-415-18-drivers/
The workaround would be to downgrade the driver to v410 or v390.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1706 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (75 preceding siblings ...)
  2019-06-03 12:46   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-06-20  7:25   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-06-20  8:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (44 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-06-20  7:25 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 2170 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #77 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
Created attachment 144596
  --> https://bugs.freedesktop.org/attachment.cgi?id=144596&action=edit
Acer Predator G3-572 acpidump

Martin Lopatář, thanks for the analysis above, sorry I missed those details
before!

Checking on my Acer Predator G3-572 (acpidump attached here), I can see what
you're referring to in SSDT5:

        OperationRegion (PCNV, SystemMemory, \_SB.PCI0.PEG0.PEGP.EBAS, 0x1000)
        Field (PCNV, AnyAcc, NoLock, Preserve)
        {
            Offset (0x488), 
                ,   25, 
            MLTF,   1
        }

        Method (_PS0, 0, NotSerialized)  // _PS0: Power State 0
        {
            If (DGOS)
            {
                If ((\_SB.PCI0.PEG0.PEGP.DPCS != Zero))
                {
                    \_SB.PCI0.PEG0.PEGP._ON ()
                    DGOS = Zero
                }
            }
            ElseIf ((\_SB.PCI0.PEG0.DVID != 0xFFFF))
            {
                If ((GGIV (0x01080001) == Zero))
                {
                    MLTF = Zero
                }
                Else
                {
                    MLTF = One
                    \_SB.PCI0.PEG0.PEGP.NASV = \_SB.PCI0.PEG0.PEGP.DSSV
                }
            }
        }

MLTF presumably means multifunction and it's exactly the bit we've been working
with. But I haven't yet managed to get _PS0 to run this code. I get to the
GGIV(0x01080001) call, but it returns 0, so the bit doesn't get set.

I looked for some obvious connection to stuff in _DSM but I can't spot
anything. Can you clarify exactly what you saw that links _DSM and _PS0
together, and share your acpidump?

I tried understanding what GGIV() does but nothing is clear there. It ends up
reading bit 1 from physical memory address 0xfdac0408 which is under:
pci_bus 0000:00: resource 21 [mem 0xfd000000-0xfe7fffff window]
and I can't immediately spot any ACPI code that writes to that address.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3080 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (76 preceding siblings ...)
  2019-06-20  7:25   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-06-20  8:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-06-24  9:56   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (43 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-06-20  8:16 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1430 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #78 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Daniel Drake from comment #77)
> MLTF presumably means multifunction and it's exactly the bit we've been
> working with. But I haven't yet managed to get _PS0 to run this code. I get
> to the GGIV(0x01080001) call, but it returns 0, so the bit doesn't get set.
> 
> I tried understanding what GGIV() does but nothing is clear there. It ends
> up reading bit 1 from physical memory address 0xfdac0408 which is under:
> pci_bus 0000:00: resource 21 [mem 0xfd000000-0xfe7fffff window]
> and I can't immediately spot any ACPI code that writes to that address.

GGIV is a method name used by many vendors to read a GPIO pin. "Get GPIO Input
Value" or something like that.

Quite likely the GPIO pin in question is attached to HPD of an HDMI or DP port.
So if an external display is attached, GGIV(0x01080001) should return 1 and the
HDA is exposed, else it's hidden.

If the GPIO pin in question is on the PCH then you can download the spec for
the PCH from Intel's website to verify that the MMIO space at 0x01080001 is a
GPIO block. The GPIO pin could also be on the Nvidia card itself, in that case
physical address 0x01080001 would belong to a resource of the GPU's PCI device.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2282 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (77 preceding siblings ...)
  2019-06-20  8:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-06-24  9:56   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-07-11  7:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (42 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-06-24  9:56 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1348 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #79 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
Thanks, you're right, the value changes based on HDMI connector status.

So for this platform, \_SB.PCI0.PEG0 has a PG00 PowerResource that will set the
magic bit in _ON, and likewise \_SB.PCI0.PEG0.PEGP has a _PS0 that will set the
bit too.

This all sounds like it should set the appropriate state at boot time, but I
wouldn't expect these methods to be called when the HDMI connector is
hotplugged. And I can't see any linkage to anything more dynamic like _DSM.

Indeed booting Linux with HDMI already connected, the HDMI audio PCI device
appears. Same on Windows, testing without the nvidia driver installed.

I used the Clover UEFI bootloader to boot windows with a custom DSDT, modified
the GGIV() function to always return zero (disconnected) for this GPIO. Then
booting Windows with HDMI connected, the PCI device no longer appears.

Then I installed the Nvidia windows driver. Connecting HDMI either at boot or
later, the HDMI audio device appears on the PCI bus.

Conclusion: The nvidia windows driver directly controls the magic bit here,
triggering a PCI bus rescan too, without relying on ACPI.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2108 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (78 preceding siblings ...)
  2019-06-24  9:56   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-07-11  7:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-09-28  8:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (41 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-07-11  7:24 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 378 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #80 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
A patch titled "PCI: Enable NVIDIA HDA controllers" (effecively attachment
#137939) is headed into linux-next and potentially Linux 5.3. Testing
appreciated!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1233 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (79 preceding siblings ...)
  2019-07-11  7:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-09-28  8:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-09-28 10:08   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (40 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-09-28  8:28 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 807 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #81 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Daniel Drake from comment #80)
> A patch titled "PCI: Enable NVIDIA HDA controllers" (effecively attachment
> #137939 [details] [review]) is headed into linux-next and potentially Linux
> 5.3. Testing appreciated!

Hello there! This commit prevents vga_switcheroo from turning off dGPU (Geforce
540m) on my optimus machine as described here:
https://bbs.archlinux.org/viewtopic.php?pid=1865512#p1865512. I never had
problems with HDMI audio on this system - I think all connectors are connected
to the Intel GPU, yet NVIDIA HDA is still enabled by this patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1724 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (80 preceding siblings ...)
  2019-09-28  8:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-09-28 10:08   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-09-28 10:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (39 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-09-28 10:08 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1184 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #82 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Przemysław Kopa from comment #81)
> (In reply to Daniel Drake from comment #80)
> > A patch titled "PCI: Enable NVIDIA HDA controllers" (effecively attachment
> > #137939 [details] [review]) is headed into linux-next and potentially Linux
> > 5.3. Testing appreciated!
> 
> Hello there! This commit prevents vga_switcheroo from turning off dGPU
> (Geforce 540m) on my optimus machine as described here:
> https://bbs.archlinux.org/viewtopic.php?pid=1865512#p1865512. I never had
> problems with HDMI audio on this system - I think all connectors are
> connected to the Intel GPU, yet NVIDIA HDA is still enabled by this patch.

If the HDA is kept runtime resumed, e.g. if it is accessed by a user space
application, then the GPU is kept runtime resumed as well.

Check the runtime PM status of the HDA:
grep . /sys/bus/pci/devices/0000:01:00.1/power/*

Check if user space applications have opened the HDA:
lsof /dev/snd/controlC1

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2166 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (81 preceding siblings ...)
  2019-09-28 10:08   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-09-28 10:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-09-28 12:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (38 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-09-28 10:58 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1359 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #83 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
> Check the runtime PM status of the HDA:
> grep . /sys/bus/pci/devices/0000:01:00.1/power/*

This is the output of grep . /sys/bus/pci/devices/0000:01:00.1/power/*:

/sys/bus/pci/devices/0000:01:00.1/power/async:enabled
/sys/bus/pci/devices/0000:01:00.1/power/control:on
/sys/bus/pci/devices/0000:01:00.1/power/runtime_active_kids:0
/sys/bus/pci/devices/0000:01:00.1/power/runtime_active_time:122453
/sys/bus/pci/devices/0000:01:00.1/power/runtime_enabled:forbidden
/sys/bus/pci/devices/0000:01:00.1/power/runtime_status:active
/sys/bus/pci/devices/0000:01:00.1/power/runtime_suspended_time:4310
/sys/bus/pci/devices/0000:01:00.1/power/runtime_usage:1
/sys/bus/pci/devices/0000:01:00.1/power/wakeup:disabled

> Check if user space applications have opened the HDA:
> lsof /dev/snd/controlC1

Output of lsof /dev/snd/controlC1 is empty. Normally I'm using pulseaudio and
it grabs the card, but I uninstalled it for testing purposes and it doesn't
make a difference - card stays enabled.

Additionally, if I try to manually turn off dGPU using echo OFF >
/sys/kernel/debug/vgaswitcheroo/switch, it does nothing.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2185 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (82 preceding siblings ...)
  2019-09-28 10:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-09-28 12:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-09-28 12:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (37 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-09-28 12:28 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 595 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #84 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Przemysław Kopa from comment #83)
> This is the output of grep . /sys/bus/pci/devices/0000:01:00.1/power/*:
> 
> /sys/bus/pci/devices/0000:01:00.1/power/control:on

Something has forced the HDA on, hence it doesn't autosuspend.

Does the issue go away if you re-enable runtime suspend? Try:

echo auto > /sys/bus/pci/devices/0000:01:00.1/power/control

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1425 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (83 preceding siblings ...)
  2019-09-28 12:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-09-28 12:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-09-28 15:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (36 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-09-28 12:55 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 678 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #85 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
> Something has forced the HDA on, hence it doesn't autosuspend.
> 
> Does the issue go away if you re-enable runtime suspend? Try:
> 
> echo auto > /sys/bus/pci/devices/0000:01:00.1/power/control

Unfortunately, it doesn't - HDA still stays active.

cat /sys/bus/pci/devices/0000:01:00.1/power/control
auto

cat /sys/kernel/debug/vgaswitcheroo/switch
0:IGD:+:Pwr:0000:00:02.0
1:DIS-Audio: :DynPwr:0000:01:00.1
2:DIS: :DynPwr:0000:01:00.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1479 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (84 preceding siblings ...)
  2019-09-28 12:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-09-28 15:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-09-28 15:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (35 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-09-28 15:00 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 345 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #86 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
Please provide the output of "grep . /sys/bus/pci/devices/0000:01:00.1/power/*"
after echoing "auto" to its "control" file.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1125 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (85 preceding siblings ...)
  2019-09-28 15:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-09-28 15:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02  8:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (34 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-09-28 15:14 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1102 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #87 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Lukas Wunner from comment #86)
> Please provide the output of "grep .
> /sys/bus/pci/devices/0000:01:00.1/power/*" after echoing "auto" to its
> "control" file.

Here it is:
/sys/bus/pci/devices/0000:01:00.1/power/async:enabled
grep: /sys/bus/pci/devices/0000:01:00.1/power/autosuspend_delay_ms: Błąd
wejścia/wyjścia // translates to: "Input/output error"
/sys/bus/pci/devices/0000:01:00.1/power/control:auto
/sys/bus/pci/devices/0000:01:00.1/power/runtime_active_kids:0
/sys/bus/pci/devices/0000:01:00.1/power/runtime_active_time:105383
/sys/bus/pci/devices/0000:01:00.1/power/runtime_enabled:enabled
/sys/bus/pci/devices/0000:01:00.1/power/runtime_status:active
/sys/bus/pci/devices/0000:01:00.1/power/runtime_suspended_time:6695
/sys/bus/pci/devices/0000:01:00.1/power/runtime_usage:0
/sys/bus/pci/devices/0000:01:00.1/power/wakeup:disabled

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1974 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (86 preceding siblings ...)
  2019-09-28 15:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02  8:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02  8:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (33 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02  8:13 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 337 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #88 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
So we don't have clear insight as to why the device is not being runtime
suspended. I'll try to reproduce in our lab.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1097 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (87 preceding siblings ...)
  2019-10-02  8:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02  8:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02  9:44   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (32 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02  8:35 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 772 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #89 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
I didn't follow all of this, but I suspect you're hitting a known bug, please
see
http://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/dynamicpowermanagement.html#KnownIssuesAndW6426e

> 2. There is a known issue with the audio driver due to which the audio PCI function remains in an active state from the kernel version 4.19 and up. (from commit id: 37a3a98ef601f89100e3bb657fb0e190b857028c). Upstream kernel changes are being done to fix the issue. In the interim, the Audio PCI function needs to be disabled by using the following command.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1689 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (88 preceding siblings ...)
  2019-10-02  8:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02  9:44   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02  9:52   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (31 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02  9:44 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 754 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #90 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Maik Freudenberg from comment #89)

> > 2. There is a known issue with the audio driver due to which the audio PCI function remains in an active state from the kernel version 4.19 and up. (from commit id: 37a3a98ef601f89100e3bb657fb0e190b857028c). Upstream kernel changes are being done to fix the issue. In the interim, the Audio PCI function needs to be disabled by using the following command.

Wasn't this bug fixed already?
https://github.com/torvalds/linux/commit/fc09ab7a767394f9ecdad84ea6e85d68b83c8e21

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1679 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (89 preceding siblings ...)
  2019-10-02  9:44   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02  9:52   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02  9:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (30 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02  9:52 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 542 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #91 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
(In reply to Przemysław Kopa from comment #90)
> Wasn't this bug fixed already?
> https://github.com/torvalds/linux/commit/
> fc09ab7a767394f9ecdad84ea6e85d68b83c8e21

That looks promising! Since you are the bug reporter, could you please test it?
Or have you already confirmed that it fixes the issue reported here?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1435 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (90 preceding siblings ...)
  2019-10-02  9:52   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02  9:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02 10:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (29 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02  9:58 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 548 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #92 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Daniel Drake from comment #91)

> That looks promising! Since you are the bug reporter, could you please test
> it?
> Or have you already confirmed that it fixes the issue reported here?

Am I wrong, or was this patch already pulled in linux 4.20? In that case, it
obviously didn't solve my problem. ;)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1380 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (91 preceding siblings ...)
  2019-10-02  9:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02 10:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02 10:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (28 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02 10:14 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 418 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #93 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
Yes, that looks like history.

Lukas, do you have any further context on that link? Is it a historical remnant
or something still relevant? Which upstream kernel changes are being done to
fix it?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1178 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (92 preceding siblings ...)
  2019-10-02 10:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02 10:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02 10:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (27 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02 10:15 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 283 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #94 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
Sorry getting mixed up. Those last questions were went for Maik.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1043 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (93 preceding siblings ...)
  2019-10-02 10:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02 10:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02 12:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (26 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02 10:35 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 777 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #95 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
This is very fresh, about 1 month old, context is that the latest nvidia 435
driver added support for render offload and driver controlled dynamic runtime
pm (turing only).
So I don't expect Nvidia to talk about bugs only existing in old kernel
versions.
It seems to me that the mentioned commit from the nvidia docs breaks runtime-pm
on the nvhda device but the subsequent commit refered to by Przemysław Kopa
doesn't fix it.
As to what "ongoing works on the audio driver" means, this is out of my
knowledge, would need to poke nvidia staff about it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1548 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (94 preceding siblings ...)
  2019-10-02 10:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02 12:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02 12:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (25 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02 12:16 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 563 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #96 from Maik Freudenberg <hhfeuer-Mmb7MZpHnFY@public.gmane.org> ---
Partly unrelated but important, just enabling runtime pm on a turing gpu
without removing the subdevices as per the linked document leads to a
_devastating_ effect, the idle power consumption rising to insane 51Watts(!!).
This was first noticed when Ubuntu switched to that method to turn off the dgpu
for their gpu-manager/prime-select intel.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1324 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (95 preceding siblings ...)
  2019-10-02 12:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02 12:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02 12:32   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (24 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02 12:24 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1858 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #97 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Przemysław Kopa from comment #87)
> (In reply to Lukas Wunner from comment #86)
> > Please provide the output of "grep .
> > /sys/bus/pci/devices/0000:01:00.1/power/*" after echoing "auto" to its
> > "control" file.
> 
> Here it is:
> /sys/bus/pci/devices/0000:01:00.1/power/async:enabled
> grep: /sys/bus/pci/devices/0000:01:00.1/power/autosuspend_delay_ms: Błąd
> wejścia/wyjścia // translates to: "Input/output error"
> /sys/bus/pci/devices/0000:01:00.1/power/control:auto
> /sys/bus/pci/devices/0000:01:00.1/power/runtime_active_kids:0
> /sys/bus/pci/devices/0000:01:00.1/power/runtime_active_time:105383
> /sys/bus/pci/devices/0000:01:00.1/power/runtime_enabled:enabled
> /sys/bus/pci/devices/0000:01:00.1/power/runtime_status:active
> /sys/bus/pci/devices/0000:01:00.1/power/runtime_suspended_time:6695
> /sys/bus/pci/devices/0000:01:00.1/power/runtime_usage:0
> /sys/bus/pci/devices/0000:01:00.1/power/wakeup:disabled

Okay, there are no child devices keeping the HDA awake and no runtime PM
references are held on the HDA device either.  Why doesn't it runtime suspend? 
Chances are that the ->runtime_idle hook returns -EBUSY for some reason.  We've
had issues like this in the past, see bug #106597 and #106957.

I'm attaching a debug patch (the same that I've created for the other two bug
reports, but rebased on v5.3).  Would you be able to apply it to your kernel,
recompile, reboot, then attach the dmesg output to this bugzilla entry here?

You can add "log_buf_len=10M ignore_loglevel" to the command line to ensure
that dmesg isn't truncated and contains all debug output.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3055 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (96 preceding siblings ...)
  2019-10-02 12:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02 12:32   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02 17:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (23 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02 12:32 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 356 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #98 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
Created attachment 145614
  --> https://bugs.freedesktop.org/attachment.cgi?id=145614&action=edit
HDA runtime PM debug patch for v5.3

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1353 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (97 preceding siblings ...)
  2019-10-02 12:32   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02 17:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02 17:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (22 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02 17:13 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 287 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #99 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
Here is the dmesg dump generated when running patched kernel.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1042 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (98 preceding siblings ...)
  2019-10-02 17:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02 17:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-02 17:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (21 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02 17:15 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 400 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #100 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
Created attachment 145615
  --> https://bugs.freedesktop.org/attachment.cgi?id=145615&action=edit
Dmesg dump to present the problem of NVIDIA HDA not suspending correctly.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1394 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (99 preceding siblings ...)
  2019-10-02 17:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-02 17:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-03  3:50   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (20 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-02 17:45 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 850 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #145615|0                           |1
        is obsolete|                            |

--- Comment #101 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
Created attachment 145616
  --> https://bugs.freedesktop.org/attachment.cgi?id=145616&action=edit
Dmesg dump to present the problem of NVIDIA HDA not suspending correctly.

Dmesg dump to present the problem of NVIDIA HDA not suspending correctly.

NVIDIA HDA power control was manually set to "auto".

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2343 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (100 preceding siblings ...)
  2019-10-02 17:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-03  3:50   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-03  6:37   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (19 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-03  3:50 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1527 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #102 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
Thanks. azx_runtime_idle() is returning EBUSY because
azx_bus(chip)->codec_powered=0xf.

codec_powered is set during initialization via snd_hdac_bus_add_device(),
presumably to reflect that the device is definitely powered up at
initialization time.

It's unset during hdac_hdmi_runtime_suspend() (and/or during
hda_codec_runtime_suspend()) via the call to snd_hdac_codec_link_down().

I guess this implies that the HDA codec (hdac_hdmi.c) is expected to be fully
runtime suspended before the controller (hda_intel.c) runtime idle check is
executed, and that this is not happening.


Under /sys/bus/pci/devices/0000:01:00.1 you should see some subdirectories that
are named hdaudioC?D?. Those subdirectories in turn have power subdirectories
for runtime pm control.

In addition to the steps already taken, please could you set all the hdaudio*
subdevices power/control to auto too, then use grep to dump the power/
directory contents for all of the hdaudio* devices there and the controller.
And let us know if this has any effect on the issue at hand.

I did try 4 Asus products we currently have in the Endless lab but none of them
have a nvidia HDMI controller that can be exposed via the magic bit (and their
HDMI audio functionality does go through the integrated intel gpu).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2291 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (101 preceding siblings ...)
  2019-10-03  3:50   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-03  6:37   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-03  8:22   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (18 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-03  6:37 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 4321 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #103 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Daniel Drake from comment #102)
> Under /sys/bus/pci/devices/0000:01:00.1 you should see some subdirectories
> that are named hdaudioC?D?. Those subdirectories in turn have power
> subdirectories for runtime pm control.
> 
> In addition to the steps already taken, please could you set all the
> hdaudio* subdevices power/control to auto too, then use grep to dump the
> power/ directory contents for all of the hdaudio* devices there and the
> controller. And let us know if this has any effect on the issue at hand.

There are four of those - all of them were already set to "auto" on boot
(without me doing anything). HDA still stays active.

Here is the dump of "power" subdirectories:

/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/power/async:enabled
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/power/autosuspend_delay_ms:1000
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/power/control:auto
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/power/runtime_active_kids:0
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/power/runtime_active_time:226
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/power/runtime_enabled:enabled
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/power/runtime_status:suspended
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/power/runtime_suspended_time:117748
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/power/runtime_usage:0

/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D1/power/async:enabled
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D1/power/autosuspend_delay_ms:1000
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D1/power/control:auto
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D1/power/runtime_active_kids:0
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D1/power/runtime_active_time:242
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D1/power/runtime_enabled:enabled
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D1/power/runtime_status:suspended
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D1/power/runtime_suspended_time:117725
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D1/power/runtime_usage:0

/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D2/power/async:enabled
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D2/power/autosuspend_delay_ms:1000
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D2/power/control:auto
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D2/power/runtime_active_kids:0
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D2/power/runtime_active_time:275
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D2/power/runtime_enabled:enabled
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D2/power/runtime_status:suspended
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D2/power/runtime_suspended_time:117684
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D2/power/runtime_usage:0

/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D3/power/async:enabled
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D3/power/autosuspend_delay_ms:1000
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D3/power/control:auto
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D3/power/runtime_active_kids:0
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D3/power/runtime_active_time:264
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D3/power/runtime_enabled:enabled
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D3/power/runtime_status:suspended
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D3/power/runtime_suspended_time:117664
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D3/power/runtime_usage:0

/sys/bus/pci/devices/0000:01:00.1/power/async:enabled
grep: /sys/bus/pci/devices/0000:01:00.1/power/autosuspend_delay_ms: Błąd
wejścia/wyjścia // translates to: "Input/output error"
/sys/bus/pci/devices/0000:01:00.1/power/control:auto
/sys/bus/pci/devices/0000:01:00.1/power/runtime_active_kids:0
/sys/bus/pci/devices/0000:01:00.1/power/runtime_active_time:127936
/sys/bus/pci/devices/0000:01:00.1/power/runtime_enabled:enabled
/sys/bus/pci/devices/0000:01:00.1/power/runtime_status:active
/sys/bus/pci/devices/0000:01:00.1/power/runtime_suspended_time:5389
/sys/bus/pci/devices/0000:01:00.1/power/runtime_usage:0
/sys/bus/pci/devices/0000:01:00.1/power/wakeup:disabled

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 5200 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (102 preceding siblings ...)
  2019-10-03  6:37   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-03  8:22   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-03  9:17   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (17 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-03  8:22 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1662 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #104 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Daniel Drake from comment #102)
> Thanks. azx_runtime_idle() is returning EBUSY because
> azx_bus(chip)->codec_powered=0xf.
> 
> codec_powered is set during initialization via snd_hdac_bus_add_device(),
> presumably to reflect that the device is definitely powered up at
> initialization time.
> 
> It's unset during hdac_hdmi_runtime_suspend() (and/or during
> hda_codec_runtime_suspend()) via the call to snd_hdac_codec_link_down().
> 
> I guess this implies that the HDA codec (hdac_hdmi.c) is expected to be
> fully runtime suspended before the controller (hda_intel.c) runtime idle
> check is executed, and that this is not happening.

Right. However codec_powered is a bitmask and the position in the bitmask is
the "addr" member of struct hdac_device. We can see from the dmesg output that
there are four devices C1D0 .. C1D3. So only bits 0 .. 3 in codec_powered
should ever be set. How can it be that bit 15 (0xf) is set?

I'll see to it that I prepare another debug patch today to instrument all the
places where codec_powered is changed with printk's. But my suspicion is that
the bit may be set differently.  E.g. codec_mask is immediately preceding
codec_powered in the struct (assuming gcc doesn't change the order of the
members). If we happen to set a bit > 64 in codec_mask, we may inadvertantly
clobber codec_powered. So I'll try to instrument changes to surrounding members
as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2537 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (103 preceding siblings ...)
  2019-10-03  8:22   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-03  9:17   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-03 16:11   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (16 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-03  9:17 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 417 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #105 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
codec_powered has value 0xf which means bits 0,1,2,3 are set. Bit 15 would be
0x8000.

But I agree with the next step of looking closer at accesses to this variable.
Thanks for jumping on that!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1178 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (104 preceding siblings ...)
  2019-10-03  9:17   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-03 16:11   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-03 16:18   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (15 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-03 16:11 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 360 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #106 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
Created attachment 145627
  --> https://bugs.freedesktop.org/attachment.cgi?id=145627&action=edit
HDA runtime PM debug patch #2 for v5.3

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1364 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (105 preceding siblings ...)
  2019-10-03 16:11   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-03 16:18   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-04  0:21   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (14 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-03 16:18 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 830 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #107 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Daniel Drake from comment #105)
> codec_powered has value 0xf which means bits 0,1,2,3 are set. Bit 15 would
> be 0x8000.

Ugh, indeed, thanks for having my back Daniel, I should stay away from bugzilla
when half asleep. %-)

> But I agree with the next step of looking closer at accesses to this
> variable. Thanks for jumping on that!

I've just attached another debug patch, which is a variation of one I had done
for bug #106597, rebased on v5.3. Przemysław, could you try this one, again
setting "control" to "auto" on the HDA PCI device, and post the resulting
dmesg? Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1936 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (106 preceding siblings ...)
  2019-10-03 16:18   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-04  0:21   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-04 11:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (13 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-04  0:21 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1031 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #108 from Daniel Drake <dan-LrsmPHowOvpd3aXB8m+yKQ@public.gmane.org> ---
If codec devices are always child devices of the controller, then I also wonder
if codec_powered could be completely removed.

Seems like the PM core already ensures the children are inactive before
suspending the controller:

> The idle callback (a subsystem-level one, if present, or the driver one) is
> executed by the PM core whenever the device appears to be idle, which is
> indicated to the PM core by two counters, the device's usage counter and the
> counter of 'active' children of the device.
> 
>   * If any of these counters is decreased using a helper function provided by
>     the PM core and it turns out to be equal to zero, the other counter is
>     checked.  If that counter also is equal to zero, the PM core executes the
>     idle callback with the device as its argument.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1847 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (107 preceding siblings ...)
  2019-10-04  0:21   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-04 11:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-05 10:22   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (12 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-04 11:45 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 403 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #109 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
Created attachment 145640
  --> https://bugs.freedesktop.org/attachment.cgi?id=145640&action=edit
Dmesg dump to present the problem of NVIDIA HDA not suspending correctly #2.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1403 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (108 preceding siblings ...)
  2019-10-04 11:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-05 10:22   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-07 17:51   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (11 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-05 10:22 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 946 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #110 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Przemysław Kopa from comment #109)
> Created attachment 145640 [details]
> Dmesg dump to present the problem of NVIDIA HDA not suspending correctly #2.

Thanks. This is the same issue as bug #106957, only that one was for AMD cards
and yours is an Nvidia. It was fixed by commit 57cb54e53bdd ("ALSA: hda - Force
to link down at runtime suspend on ATI/AMD HDMI").

If you add "codec->link_down_at_suspend = 1;" to patch_nvhdmi() in
sound/pci/hda/patch_hdmi.c, the issue may go away.

The only question is whether your card's revision_id is listed in
snd_hda_id_hdmi[] such that patch_nvhdmi() is executed for your card. What does
"cat /sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/revision_id" say?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2282 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (109 preceding siblings ...)
  2019-10-05 10:22   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-07 17:51   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-07 18:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (10 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-07 17:51 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 989 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #111 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Lukas Wunner from comment #110)
> What does "cat /sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/revision_id" say?
It says: 0x100100

> If you add "codec->link_down_at_suspend = 1;" to patch_nvhdmi() in
> sound/pci/hda/patch_hdmi.c, the issue may go away.
> 
> The only question is whether your card's revision_id is listed in
> snd_hda_id_hdmi[] such that patch_nvhdmi() is executed for your card.

I added "HDA_CODEC_ENTRY(0x10de0403, "GPU 0403 HDMI/DP", patch_nvhdmi)" to
snd_hda_id_hdmi[] (PCI ID of my Nvidia HDA wasn't there) and
"codec->link_down_at_suspend = 1;" to patch_nvhdmi(). With those changes dGPU
and HDA suspended normally (after echoing "auto" to HDA control file), so I
think that this is definiteley the right track!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1926 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (110 preceding siblings ...)
  2019-10-07 17:51   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-07 18:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-16 16:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (9 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-07 18:12 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1491 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #112 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Przemysław Kopa from comment #111)
> (In reply to Lukas Wunner from comment #110)
> > What does "cat /sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/revision_id" say?
> It says: 0x100100
> 
> > If you add "codec->link_down_at_suspend = 1;" to patch_nvhdmi() in
> > sound/pci/hda/patch_hdmi.c, the issue may go away.
> > 
> > The only question is whether your card's revision_id is listed in
> > snd_hda_id_hdmi[] such that patch_nvhdmi() is executed for your card.
> 
> I added "HDA_CODEC_ENTRY(0x10de0403, "GPU 0403 HDMI/DP", patch_nvhdmi)" to
> snd_hda_id_hdmi[] (PCI ID of my Nvidia HDA wasn't there) and
> "codec->link_down_at_suspend = 1;" to patch_nvhdmi(). With those changes
> dGPU and HDA suspended normally (after echoing "auto" to HDA control file),
> so I think that this is definiteley the right track!

Glad to hear. You don't seem to have any commits in the kernel so far. Would
you like to try and bake these changes into a proper patch? If not I'll gladly
create and submit the patch myself but mentoring someone else make their first
contribution is more beneficial to the community, hence my question. You could
attach the patch to this bugzilla and we can provide you with comments before
you submit it to the list.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2481 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (111 preceding siblings ...)
  2019-10-07 18:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-16 16:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-16 20:38   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (8 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-16 16:24 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 671 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #113 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Lukas Wunner from comment #112)
>
> Glad to hear. You don't seem to have any commits in the kernel so far. Would
> you like to try and bake these changes into a proper patch? If not I'll
> gladly create and submit the patch myself but mentoring someone else make
> their first contribution is more beneficial to the community, hence my
> question.

Lukas, could you please handle it this time? Sorry for not posting sooner.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1514 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (112 preceding siblings ...)
  2019-10-16 16:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-16 20:38   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-17 13:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (7 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-16 20:38 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1330 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #114 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Przemysław Kopa from comment #113)
> (In reply to Lukas Wunner from comment #112)
> > Glad to hear. You don't seem to have any commits in the kernel so far. Would
> > you like to try and bake these changes into a proper patch? If not I'll
> > gladly create and submit the patch myself but mentoring someone else make
> > their first contribution is more beneficial to the community, hence my
> > question.
> 
> Lukas, could you please handle it this time? Sorry for not posting sooner.

Sure thing.

Just one question, you wrote that you had to add "HDA_CODEC_ENTRY(0x10de0403,
"GPU 0403 HDMI/DP", patch_nvhdmi)" to snd_hda_id_hdmi[] with the rationale that
the "PCI ID of my Nvidia HDA wasn't there".

This confuses me because the PCI device ID of the HDA controller is "0bea" and
"0403" are the 16 most significant bits of the PCI class ID.

HDA_CODEC_ENTRY() needs to match for the 32-bit HD audio vendor ID. Just to
double-check, could you execute "cat
/sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/vendor_id" and post the result
here? Is it really 0x10de0403? Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2290 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (113 preceding siblings ...)
  2019-10-16 20:38   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-17 13:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-20  7:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (6 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-17 13:15 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 652 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #115 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Lukas Wunner from comment #114)
> HDA_CODEC_ENTRY() needs to match for the 32-bit HD audio vendor ID. Just to
> double-check, could you execute "cat
> /sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/vendor_id" and post the result
> here? Is it really 0x10de0403? Thanks!

cat /sys/bus/pci/devices/0000:01:00.1/hdaudioC1D0/vendor_id
0x10de0014

You're right, I didn't fully understand what to put there. ;)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1499 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (114 preceding siblings ...)
  2019-10-17 13:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-20  7:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-20  7:43   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (5 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-20  7:41 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1124 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #116 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
@Przemysław Kopa:

The fix was applied by Takashi Iwai on Thursday Oct 17 with commit
94989e318b2f, it was merged to Linus' tree on Friday Oct 18 and will thus be
part of v5.4-rc4 due out later today. It should appear in v5.3-stable within 1
or 2 weeks. You may want to double-check that the issue is gone with this fix.

There's one problem remaining, you shouldn't have to manually echo "auto" to
the HDA's control file because we call pm_runtime_allow() on the HDA device in
drivers/pci/quirks.c:quirk_gpu_hda() -> pci_create_device_link(). Something
must be calling pm_runtime_forbid() afterwards, perhaps this is triggered from
user space on Arch Linux. I'm attaching a little debug patch which logs a
stacktrace to dmesg whenever pm_runtime_allow() / _forbid() is called for a
device. Feel free to attach dmesg output with this patch applied and I'll be
happy to take a look at it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1892 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (115 preceding siblings ...)
  2019-10-20  7:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-20  7:43   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-27 17:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (4 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-20  7:43 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 375 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #117 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
Created attachment 145778
  --> https://bugs.freedesktop.org/attachment.cgi?id=145778&action=edit
Debug patch to log invocations of pm_runtime_forbid()

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1409 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (116 preceding siblings ...)
  2019-10-20  7:43   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-27 17:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-27 18:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (3 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-27 17:58 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1385 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #118 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Lukas Wunner from comment #116)
> @Przemysław Kopa:
> 
> The fix was applied by Takashi Iwai on Thursday Oct 17 with commit
> 94989e318b2f, it was merged to Linus' tree on Friday Oct 18 and will thus be
> part of v5.4-rc4 due out later today. It should appear in v5.3-stable within
> 1 or 2 weeks. You may want to double-check that the issue is gone with this
> fix.

Thanks, I can happily confirm that the issue is fixed in v5.4-rc4. :)

> There's one problem remaining, you shouldn't have to manually echo "auto" to
> the HDA's control file because we call pm_runtime_allow() on the HDA device
> in drivers/pci/quirks.c:quirk_gpu_hda() -> pci_create_device_link().
> Something must be calling pm_runtime_forbid() afterwards, perhaps this is
> triggered from user space on Arch Linux. I'm attaching a little debug patch
> which logs a stacktrace to dmesg whenever pm_runtime_allow() / _forbid() is
> called for a device. Feel free to attach dmesg output with this patch
> applied and I'll be happy to take a look at it.

I'm attaching dmesg dump - last stack trace is generated after me echoing
"auto" to HDA control file.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2310 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (117 preceding siblings ...)
  2019-10-27 17:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-27 18:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-27 18:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (2 subsequent siblings)
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-27 18:00 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 337 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #119 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
Created attachment 145830
  --> https://bugs.freedesktop.org/attachment.cgi?id=145830&action=edit
Dmesg dump

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1205 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (118 preceding siblings ...)
  2019-10-27 18:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-27 18:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-10-28  6:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-12-04  8:44   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-27 18:33 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1899 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #120 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Przemysław Kopa from comment #118)
> (In reply to Lukas Wunner from comment #116)
> > There's one problem remaining, you shouldn't have to manually echo "auto" to
> > the HDA's control file because we call pm_runtime_allow() on the HDA device
> > in drivers/pci/quirks.c:quirk_gpu_hda() -> pci_create_device_link().
> > Something must be calling pm_runtime_forbid() afterwards, perhaps this is
> > triggered from user space on Arch Linux. I'm attaching a little debug patch
> > which logs a stacktrace to dmesg whenever pm_runtime_allow() / _forbid() is
> > called for a device. Feel free to attach dmesg output with this patch
> > applied and I'll be happy to take a look at it.
> 
> I'm attaching dmesg dump - last stack trace is generated after me echoing
> "auto" to HDA control file.

Okay the culprit is a tool called "tlp" which disables runtime PM on the HDA
controller via sysfs:

[    8.472292] snd_hda_intel 0000:01:00.1: pm_runtime_forbid
[    8.474196] CPU: 0 PID: 494 Comm: tlp Not tainted 5.4.0-rc4-mainline #1
[    8.477943] Call Trace:
[    8.477952]  dump_stack+0x5c/0x80
[    8.477957]  pm_runtime_forbid.cold+0x1b/0x38
[    8.477960]  control_store+0x78/0x80
[    8.477964]  kernfs_fop_write+0x10e/0x190

I'm not familiar with "tlp" at all but according to this page...

https://linrunner.de/en/tlp/docs/tlp-configuration.html#audio

... I suspect you may have set "SOUND_POWER_SAVE_CONTROLLER=N" or
"SOUND_POWER_SAVE_ON_AC=0" in /etc/default/tlp. If so, try if changing those
settings fixes the issue.

Some more info on "tlp" can be found here:

https://wiki.archlinux.org/index.php/TLP

Hope that helps!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3024 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (119 preceding siblings ...)
  2019-10-27 18:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-10-28  6:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2019-12-04  8:44   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-10-28  6:57 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 524 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #121 from Przemysław Kopa <prymoo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
(In reply to Lukas Wunner from comment #120)
> Okay the culprit is a tool called "tlp" which disables runtime PM on the HDA
> controller via sysfs:
Thanks, I fixed it by adding RUNTIME_PM_BLACKLIST="01:00.1" to the tlp config
file - it prevents tlp from controlling runtime PM for that device.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1375 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

* [Bug 75985] [NVC1] HDMI audio device only visible after rescan
       [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (120 preceding siblings ...)
  2019-10-28  6:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2019-12-04  8:44   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  121 siblings, 0 replies; 123+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-12-04  8:44 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 871 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

Martin Peres <martin.peres-GANU6spQydw@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |MOVED
             Status|NEW                         |RESOLVED

--- Comment #122 from Martin Peres <martin.peres-GANU6spQydw@public.gmane.org> ---
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been
closed from further activity.

You can subscribe and participate further through the new bug through this link
to our GitLab instance:
https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/issues/97.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2418 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 123+ messages in thread

end of thread, other threads:[~2019-12-04  8:44 UTC | newest]

Thread overview: 123+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-10 15:56 [Bug 75985] New: HDMI audio device only visible after rescan bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
     [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2014-03-10 16:00   ` [Bug 75985] [NVC1] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-10 16:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-10 23:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-10 23:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-09-15 23:52   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-09-16  6:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2016-07-16 17:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2016-11-05 22:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2016-12-22 23:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2016-12-22 23:05   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-09-26 10:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-09-26 22:50   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-09-28 12:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-09-30  2:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-10-04 21:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-10-12 15:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-10-14 19:36   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-10-15  4:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-11-10 23:32   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-11-11  0:59   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-18 16:06   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-22 19:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-23  2:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-27 16:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-27 17:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-28  2:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-28  3:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-03 19:34   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-03 20:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-03 20:25   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-03 21:27   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-04  7:51   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-04 11:18   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-04 23:37   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-02-27 12:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-01 10:42   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 10:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 12:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 13:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 13:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 14:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 15:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 15:47   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 17:54   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04  0:08   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04  0:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04  1:07   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04  1:23   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04  2:38   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04 10:23   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04 10:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04 12:47   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04 17:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-06 19:26   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-06 19:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-06 19:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-06 20:02   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-06 20:19   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-07 12:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-09 15:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-09 15:40   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-09 15:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-09 16:10   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-10  6:36   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-10 19:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-10 19:42   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-10 20:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-11 12:53   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-16  3:54   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-04-24 20:27   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-05-20  1:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-09-18 10:43   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-09-21 11:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-03-31  9:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-06-02 22:29   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-06-03 12:46   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-06-20  7:25   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-06-20  8:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-06-24  9:56   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-07-11  7:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28  8:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 10:08   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 10:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 12:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 12:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 15:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 15:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02  8:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02  8:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02  9:44   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02  9:52   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02  9:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 10:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 10:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 10:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 12:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 12:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 12:32   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 17:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 17:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 17:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03  3:50   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03  6:37   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03  8:22   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03  9:17   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03 16:11   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03 16:18   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-04  0:21   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-04 11:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-05 10:22   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-07 17:51   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-07 18:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-16 16:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-16 20:38   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-17 13:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-20  7:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-20  7:43   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-27 17:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-27 18:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-27 18:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-28  6:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-12-04  8:44   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.