Skip to content

Instantly share code, notes, and snippets.

@harold-b
Created August 2, 2022 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harold-b/3965451b62cb642c5c6ed5458eb566b7 to your computer and use it in GitHub Desktop.
Save harold-b/3965451b62cb642c5c6ed5458eb566b7 to your computer and use it in GitHub Desktop.
Disable AER error spam on Asus Pro WS WRX80E-SAGE SE WIFI

Simple script to add to /etc/rc.local in order to disable AER spam issue on Asus Pro WS WRX80E-SAGE SE WIFI motherboards

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment