Skip to content

Comments

Potential Fix: lockups with HD Audio controller#155

Open
EDEADLINK wants to merge 1 commit intoWitko:masterfrom
EDEADLINK:master
Open

Potential Fix: lockups with HD Audio controller#155
EDEADLINK wants to merge 1 commit intoWitko:masterfrom
EDEADLINK:master

Conversation

@EDEADLINK
Copy link

@EDEADLINK EDEADLINK commented Aug 14, 2021

Turning the PCIe controller on before the HD audio controller is turned on
can lead to a hung tee processes, hung kernel tasks and other badness.

This introduces HDA_CONTROLLER_BUS_ID to the config
which if set will turn HD Audio Controller on
before the PCIe controller is turned on.
While this can cause a PCI error:

pci 0000:01:00.1: can't change power state from D3cold to D0 (config space inaccessible)

that's a lot better than hanging the system.

When turning off the cards the order doesn't seem to matter,
but we do need to turn Powersave for Both so that the card
actually turns off (Powertop reports ~10 Watts less draw).

I have no Idea why this works.
So I can't say for certain that it works.
But It could be the fix for a few of the issues mentioned in #137

If you have similar hangs please test this.
Especially if you get something similar to me in lspci -tvv

-[0000:00]-+ ...
           +-01.0-[01]--+-00.0  NVIDIA Corporation GP104BM [GeForce GTX 1070 Mobile]
           |            \-00.1  NVIDIA Corporation GP104 High Definition Audio Controller

or lspci

00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GP104BM [GeForce GTX 1070 Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)

Turning the PCIe controller on before the HD audio controller is turned on
can lead to hung tee processes, hung kernel tasks and other badness.

If HDA_CONTROLLER_BUS_ID is set we can turn the HD Audio Controller on
before the PCIe controller is turned on.
This can cause a PCI error:
>can't change power state from D3cold to D0 (config space inaccessible)
But that's better than hanging the system.

When turning off the card the order doesn't seem to matter.
But we do turn on Powersave for the HDA controller again,
as the nvidia card can't fully power off otherwise.
@EDEADLINK
Copy link
Author

EDEADLINK commented Aug 14, 2021

The behaviour is currently optional and only documented in the config.

If this is works on other machines we should document it in the README.
Maybe in the Setting the right bus id Section?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant