Steam for Linux

Steam for Linux

PEAK and microphone
I bought PEAK and tried to play but my teammates couldn't hear me, and I looked into settings and found that game sees only Monitor of *speakers devices* as avaliable microphones (I have ubuntu and PipeWire). I created virtual speakers and connected my mic to them (with Helvum) and then in game choose monitor_of virtualspeakers and it works

Then I wanted to automate, so I wrote scripts that create and delete virtual speakers. I tested scripts via terminal and they work perfectly, but I added them to launch in Steam in game properties like this

/home/username/bin/create_virtual_speakers.sh ; %command% ; /home/username/bin/delete_virtual_speakers.sh
(I replaced username with my, and it works this way in terminal)

And it doesn't work, script doen't even launch, so I can't debug it. I've tried to write it in different ways but then the game itself could not lauch sometimes. I've tried to google, but I can't find anything (like steam manual how to run scripts before and after a game), articles are old and outdated probly.

How do I make it work or at least debug? Like scripts don't even run, Steam doesn't say anything, no any popup windows

Update: sorry for not clarifying but I am more interested in understanding how to run scripts before and after a game than fixing my specific problem with game (especially because it's already solved kinda), I've described problem with the game for context
Last edited by HellHusband; 2 Jul @ 7:32am
< >
Showing 1-7 of 7 comments
Zyro 2 Jul @ 4:19am 
How did you install Steam? Are you using a Flatpak version by chance?
There are reasons why the scripts may not work correctly if called the way you are doing it. Running scripts this way through steam is different than the command line.

Steam isn't running a shell and may not inherit things like your PATH variable.

I would need to see the scripts to evaluate.

Or you could try this. it might work:

bash -c '/home/username/bin/create_virtual_speakers.sh && %command% && /home/username/bin/delete_virtual_speakers.sh'

There could be Ubuntu specific issues as well, which is what Zyro is getting at. I'm not an Ubuntu user, but as I understand it Canonical has created a snap version of Steam that gets installed if you install Steam using Ubuntu's store or package manager.

If you using the snap version, you might try using the deb package from valve instead. You may find you don't even need these scripts.
Last edited by AngryBeard; 2 Jul @ 5:28am
DaMu 2 Jul @ 6:16am 
Re: Peak specifically, devs are aware that there is a bug with the needed microphone unable to be selected. Go to their discussions and contribute, but trim the fat from this question.

Specifically, describe what you tried to do in game, what you know works outside of PEAK, and what your fix does that works only for PEAK.

And for the love of God, stop mentioning your love story with ChatGPT. Especially if you don't have a problem with what it creates, or if you don't show the scripts at all, it's pointless to mention.
Originally posted by Zyro:
How did you install Steam? Are you using a Flatpak version by chance?
No, It's installed with snap
Originally posted by AngryBeard:
bash -c '/home/username/bin/create_virtual_speakers.sh && %command% && /home/username/bin/delete_virtual_speakers.sh'
game doesn't launch

Originally posted by AngryBeard:
I would need to see the scripts to evaluate.
Script to create looks like this

#!/bin/bash
pactl load-module module-null-sink sink_name=VirtualSink sink_properties=device.description=VirtualSink

And to delete

#!/bin/bash
module_id=$(pactl list short modules | grep module-null-sink | grep VirtualSink | awk '{print $1}')
if [ -n "$module_id" ]; then
pactl unload-module "$module_id"
fi
Last edited by HellHusband; 2 Jul @ 2:00pm
Originally posted by HellHusband:
Originally posted by AngryBeard:
bash -c '/home/username/bin/create_virtual_speakers.sh && %command% && /home/username/bin/delete_virtual_speakers.sh'
game doesn't launch

Originally posted by AngryBeard:
I would need to see the scripts to evaluate.
Script to create looks like this

#!/bin/bash
pactl load-module module-null-sink sink_name=VirtualSink sink_properties=device.description=VirtualSink

And to delete

#!/bin/bash
module_id=$(pactl list short modules | grep module-null-sink | grep VirtualSink | awk '{print $1}')
if [ -n "$module_id" ]; then
pactl unload-module "$module_id"
fi


The 1st potential problem is that you are using the snap version which is sandboxed. Steam in this configuration may not have permissions to access your bin directory.

The 2nd potential problem is that when you add this to the launch options, it may not be aware of your $PATH variable, therefore, it may not know what/where pactl is.

Just an FYI, Valve engineer Timothée “TTimo” Besset explicitly stated that Valve is not involved in the Snap packaging and doesn’t support it. I can't link to it because he said it on Mastodon.
Zyro 2 Jul @ 11:05pm 
Originally posted by HellHusband:
Originally posted by Zyro:
How did you install Steam? Are you using a Flatpak version by chance?
No, It's installed with snap

It seems the game has specific problems, but be aware that Snap could keep your games from accessing some system resources as well.
< >
Showing 1-7 of 7 comments
Per page: 1530 50