Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Fix: lockups with HD Audio controller #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions config/nvidia-xrun
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ REMOVE_DEVICE=1
# Bus ID of the PCI express controller
CONTROLLER_BUS_ID=0000:00:01.0

# Turning the PCIe controller on when the HD audio controller is turned off
# can lead to hung tee processes, hung kernel tasks and total system lockups.
# If HDA_CONTROLLER_BUS_ID is set to the Bus ID of the NVIDIA HD audio controller
# it will be turned on before the PCIe controller is.
#
# Bus ID of the HD audio controller
#HDA_CONTROLLER_BUS_ID=0000:01:00.1

# Bus ID of the graphic card
DEVICE_BUS_ID=0000:01:00.0

Expand Down
13 changes: 13 additions & 0 deletions nvidia-xrun
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,24 @@ function turn_off_gpu {
execute "sudo tee /sys/bus/pci/devices/${DEVICE_BUS_ID}/power/control <<<auto"
fi

if [ -n "$HDA_CONTROLLER_BUS_ID" ]; then
echo 'Enabling powersave for the HD audio controller'
execute "sudo tee /sys/bus/pci/devices/${HDA_CONTROLLER_BUS_ID}/power/control <<<auto"
fi

echo 'Enabling powersave for the PCIe controller'
execute "sudo tee /sys/bus/pci/devices/${CONTROLLER_BUS_ID}/power/control <<<auto"
}

function turn_on_gpu {

if [ -n "$HDA_CONTROLLER_BUS_ID" ]; then
echo 'Turning on the HD audio controller:'
echo " This may throw a pci_err: \"can't change power state [...] (config space inaccessible)\""
echo " But it can avoid some lockups. "
execute "sudo tee /sys/bus/pci/devices/${HDA_CONTROLLER_BUS_ID}/power/control <<<on"
fi

echo 'Turning the PCIe controller on to allow card rescan'
execute "sudo tee /sys/bus/pci/devices/${CONTROLLER_BUS_ID}/power/control <<<on"

Expand Down