Half-Life 2

Half-Life 2

Not enough ratings
Half Life 2: Resolve issues with mod sounds (Modding on Linux)
By CounterClops
Noticed that some mods wouldn't have sounds for me in Half Life 2, while others would work fine. This offers a solution for those on Linux (mainly Fedora) who may be affected.
   
Award
Favorite
Favorited
Unfavorite
Issue
Some mods wouldn't have any sounds for me, when they seemed to work fine for others.
Background
I believe this mainly affects users running off some form of Fedora, I'm running off Bazzite myself, but when installing mods from the workshop I noticed that some mods wouldn't play their sounds. Looking into this, I thought maybe something was up with the mod, did some digging, noticed it used mp3 files when the core game seems to use wav, but that was a dead end.

In the end after a bit of digging I came across this[github.com].

Following the advice from the above, I confirmed through logs that my device was blocking it because of the mentioned security vulnerability in the Source sound system.
Solution
sudo ausearch -c 'hl2_linux' --raw | sudo audit2allow -M hl2linux sudo semodule -i hl2linux.pp

After doing the above my sound worked without issue, so I thought I'd make this guide as figuring out the above and finding it was a bit tedious.