Skip to content

Commit 671bf89

Browse files
committed
work around for Steam resetting audio
1 parent c2f0ce5 commit 671bf89

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

manifest

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,4 +323,8 @@ postinstallhook() {
323323

324324
# Disable SPDIF/IEC958 audio output
325325
sudo sed -e '/\[Mapping iec958/,+5 s/^/#/' -i '/usr/share/alsa-card-profile/mixer/profile-sets/default.conf'
326+
327+
# Replace wpctl with a wrapper to work around Steam resetting audio
328+
mv /usr/bin/wpctl /usr/libexec/wpctl
329+
mv /usr/bin/wpctl-wrapper /usr/bin/wpctl
326330
}

rootfs/usr/bin/wpctl-wrapper

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#! /bin/bash
2+
3+
parents=$(pstree --show-parents $$)
4+
5+
steam_parent=0
6+
if echo "$parents" | grep "\-steam\-" &> /dev/null; then
7+
steam_parent=1
8+
fi
9+
10+
if [[ "$steam_parent" == "1" ]] && [[ "$1" == "clear-default" ]]; then
11+
exit 0
12+
fi
13+
14+
/usr/libexec/wpctl $@

0 commit comments

Comments
 (0)