No sound over HDMI after Nvidia driver update

Out of curiosity, would

sed -r '/ACTION==\"add\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\"0x040300\", ATTR{remove}=\"1\"/ s/ACTION==\"add\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\"0x040300\", ATTR{remove}=\"1\"/#ACTION==\"add\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\"0x040300\", ATTR{remove}=\"1\"/' /etc/udev/rules.d/90-mhwd-prime-powermanagement.rules

work in this instance?

I apologize, I know it’s long lol

I don’t know, you could try it. The contents of the file are available in the “Automated Setup” section.

So, it does work you just have to:

mv /etc/udev/rules.d/90-mhwd-prime-powermanagement.rules /etc/udev/rules.d/90-mhwd-prime-powermanagement.rules.old

then

sed -r '/ACTION==\"add\", SUBSYSTEM==\"pci\", ATTR\{vendor\}==\"0x10de\", ATTR\{class\}==\"0x040300\", ATTR\{remove\}=\"1\"/ s/ACTION==\"add\", SUBSYSTEM==\"pci\", ATTR\{vendor\}==\"0x10de\", ATTR\{class\}==\"0x040300\", ATTR\{remove\}=\"1\"/#ACTION==\"add\", SUBSYSTEM==\"pci\", ATTR\{vendor\}==\"0x10de\", ATTR\{class\}==\"0x040300\", ATTR\{remove\}=\"1\"/' /etc/udev/rules.d/90-mhwd-prime-powermanagement.rules.old > /etc/udev/rules.d/90-mhwd-prime-powermanagement.rules

About to make a script to do it automatically for people.

Don’t have time to test it at the moment, but this is what I came up with:

#!/bin/sh
FILE1=/etc/udev/rules.d/90-mhwd-prime-powermanagement.rules
FILE2=/etc/udev/rules.d/90-mhwd-prime-powermanagement.rules.old
FILE3=./sample.txt
if test -f "$FILE1"; then
    mv $FILE1 $FILE2
    sed -r '/ACTION==\"add\", SUBSYSTEM==\"pci\", ATTR\{vendor\}==\"0x10de\", ATTR\{class\}==\"0x040300\", ATTR\{remove\}=\"1\"/ s/ACTION==\"add\", SUBSYSTEM==\"pci\", ATTR\{vendor\}==\"0x10de\", ATTR\{class\}==\"0x040300\", ATTR\{remove\}=\"1\"/#ACTION==\"add\", SUBSYSTEM==\"pci\", ATTR\{vendor\}==\"0x10de\", ATTR\{class\}==\"0x040300\", ATTR\{remove\}=\"1\"/' $FILE2 > $FILE1
else
    mv $FILE3 $FILE1
fi

where FILE3 would be a text file in the same directory as the script containing:

# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"

# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"

# Remove NVIDIA Audio devices, if present
#ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1"

# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"

# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"

I have the same problem with my laptop and now my hdmi sound work perfectly.

Thanks a lot :grinning:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.