Comment # 32 on bug 75985 from
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: