You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, greetings to anyone who reads this and thank you for your work.
I'm aware that there is a series of discussions regarding headless behavior right now, so I'll clarify, even if it isn't needed, these are my specs and use case.
OS: NixOS on unstable flake, 64 bits.
GPU: AMD RX 6800 XT.
GPU Driver/Mesa Version: radv/Mesa 24.2.4.
Sunshine version 0.23.1 from nixpkgs.
Capture Method: wlr (kind of required for headless rn).
Currently, at least in the linux version, Sunshine takes into account if the user connecting requested host audio to be enabled or not (On Moonlight, this is done via the "Play audio on PC" option).
If this option is enabled, Sunshine simply requests a link for the default audio sink/device's monitor output directly.
If it isn't, then it creates a new sink, makes it the default and links every source to it.
Right now, I'm using a script that runs a nested headless Sway session and a Sunshine instance inside it. This allows me to keep using my PC while a stream session is running inside (so long as there is a joystick connected. virtual mouse is not exactly supported rn? as addressed here).
However, this instance is of course connected to my users' main Pipewire session, and so it keeps this behavior.
My workaround for having sound isolated from the main is exporting PIPEWIRE_NODE="sunshine" on the launch script so every process inside it is "forced" to connect to the sink created by Sunshine, and manually unlinking by running pw-link -d $(pw-metadata 0 default.audio.sink | rg "\{\"name\":.*\"\}" -o | jq -r '.name') sunshine.
This said, I believe that when Sunshine is asked not to play audio on PC, it should hijack audio only from the programs it launches instead of all of them.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Select Topic Area
Feature Request
Body
First of all, greetings to anyone who reads this and thank you for your work.
I'm aware that there is a series of discussions regarding headless behavior right now, so I'll clarify, even if it isn't needed, these are my specs and use case.
OS: NixOS on unstable flake, 64 bits.
GPU: AMD RX 6800 XT.
GPU Driver/Mesa Version: radv/Mesa 24.2.4.
Sunshine version 0.23.1 from nixpkgs.
Capture Method: wlr (kind of required for headless rn).
Currently, at least in the linux version, Sunshine takes into account if the user connecting requested host audio to be enabled or not (On Moonlight, this is done via the "Play audio on PC" option).
If this option is enabled, Sunshine simply requests a link for the default audio sink/device's monitor output directly.
If it isn't, then it creates a new sink, makes it the default and links every source to it.
Right now, I'm using a script that runs a nested headless Sway session and a Sunshine instance inside it. This allows me to keep using my PC while a stream session is running inside (so long as there is a joystick connected. virtual mouse is not exactly supported rn? as addressed here).
However, this instance is of course connected to my users' main Pipewire session, and so it keeps this behavior.
My workaround for having sound isolated from the main is exporting PIPEWIRE_NODE="sunshine" on the launch script so every process inside it is "forced" to connect to the sink created by Sunshine, and manually unlinking by running
pw-link -d $(pw-metadata 0 default.audio.sink | rg "\{\"name\":.*\"\}" -o | jq -r '.name') sunshine
.sway.sh
sway-headless.conf
This said, I believe that when Sunshine is asked not to play audio on PC, it should hijack audio only from the programs it launches instead of all of them.
Again, thank you for your work and best regards.
Beta Was this translation helpful? Give feedback.
All reactions