From 7ce92b41617b40db40d11c4c0e68132109b3fca9 Mon Sep 17 00:00:00 2001 From: ich777 Date: Mon, 21 Mar 2022 09:08:46 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=9Eamd-vendor-reset.plg=E2=80=9C=20=C3=A4?= =?UTF-8?q?ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- amd-vendor-reset.plg | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/amd-vendor-reset.plg b/amd-vendor-reset.plg index 1287678..ccf68ac 100644 --- a/amd-vendor-reset.plg +++ b/amd-vendor-reset.plg @@ -2,7 +2,7 @@ - + @@ -13,6 +13,9 @@ +###2022.03.21 +- Added change for reset_method for Kernel 5.15+ + ###2021.06.23 - Changed package download repo @@ -108,6 +111,18 @@ else echo fi +#Change reset_method for installed AMD VGA adapters for Kernel 5.15+ +#https://github.com/gnif/vendor-reset/issues/46#issuecomment-992282166 +TARGET_V="5.14.99" +COMPARE="$(uname -r | cut -d '-' -f1) +$TARGET_V" +if [ "$TARGET_V" != "$(echo "$COMPARE" | sort -V | tail -1)" ]; then + while read -r line + do + echo 'device_specific' > $(find /sys/bus/pci/devices/* -name "*$line")/reset_method + done <<< "$(lspci -nn | grep -E "VGA compatible controller|Display controller" | grep -E "AMD|ATI|Advanced Micro Devices" | awk '{print $1}')" +fi + #Install icon if [ ! -f "&emhttp;/images/&name;.png" ]; then if [ ! -d "&emhttp;/images" ]; then