Skip to content

Instantly share code, notes, and snippets.

@muka
Created February 13, 2023 19:08
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 muka/d5492a25252a5edf332934201705dfe7 to your computer and use it in GitHub Desktop.
Save muka/d5492a25252a5edf332934201705dfe7 to your computer and use it in GitHub Desktop.
restart sound after sleep
#!/bin/sh
case "$1" in
post)
for DEVICE_ID in `lspci -D |grep Audio|awk '{print $1}'`
do
echo 1 > /sys/bus/pci/devices/${DEVICE_ID}/remove
done
sleep 1
echo 1 > /sys/bus/pci/rescan
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment