Simple script to add to /etc/rc.local in order to disable AER spam issue on Asus Pro WS WRX80E-SAGE SE WIFI motherboards
NOTE: This was given to us thanks to https://gist.github.com/zekome/35db528b33206e68f18439ad7fabfcd5
This will disable the error spam for each pcie device listed in the ids
array
#!/bin/bash
set -eo pipefail
#
# Disable dmseg error spam on some pcie devices
#
device_ids=(
0000:61:00.0
0000:2b:00.0
)
mask=$((~1))
for id in "${device_ids[@]}"; do
echo "Disabling severity bit on pcie device $id"
value=$(setpci -v -s "$id" CAP_EXP+0x8.w | sed -nr 's/.*=\s([0-9]+)/0x\1/p')
value=$((value & mask))
value=$(printf '0x%x' $value)
setpci -v -s "$id" CAP_EXP+0x8.w=$value
done