Documentation: Startup call for Linux+Flatpak (sudo -i PULSE_SERVER...) is incorrect
Closed this issue · 8 comments
Is there an existing issue for this?
- I have searched the existing issues
Is your issue described in the documentation?
- I have read the documentation
Is your issue present in the latest beta/pre-release?
This issue is present in the latest pre-release
Describe the Bug
The startup call (sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run dev.lizardbyte.app.Sunshine
) that is documented in several places for running Sunshine (Flatpak) on Linux is incorrect.
If the Linux system is set to a language other than English, this no longer works, as pactl info
returns the information block localized in this case and this causes the awk match for "Server String" to not be found. This prevents audio from working in Sunshine subsequently.
I have searched several places, the incorrect startup call is documented here:
https://docs.lizardbyte.dev/projects/sunshine/en/master/md_docs_2getting__started.html
https://flathub.org/apps/dev.lizardbyte.app.Sunshine
Suggestion to correct this:
sudo -i PULSE_SERVER=unix:/run/user/$(id -u $whoami)/pulse/native flatpak run dev.lizardbyte.sunshine
This startup call should work in all cases, regardless of what the localization setting is. However, this assumes that the pulse server is always available under /run/user/{id}/pulse/native. On Fedora (which I am using) this is the case, but I am not 100% sure if this is the case for other Linux distributions as well.
Expected Behavior
The startup call should be corrected an all relevant places of the documentation.
Additional Context
No response
Host Operating System
Linux
Operating System Version
Fedora 40
Architecture
64 bit
Sunshine commit or version
documentation
Package
Linux - flatpak
GPU Type
Nvidia
GPU Model
not relevant
GPU Driver/Mesa Version
not relevant
Capture Method
KMX (Linux)
Config
not relevant
Apps
No response
Relevant log output
not relevant
I don't use flatpak, but could this be because of a difference between a "system" and "user" level installation?
Are you comfortable opening a PR to correct this? If so, these are the files that need to be updated:
Sunshine/docs/getting_started.md
Line 233 in 0107ca4
Hello again.
I don't use flatpak, but could this be because of a difference between a "system" and "user" level installation?
I am not an expert on this matter either, but no. I think this is simply because of the localized output of pactl info
and the matching that only assumes that the output is English. Which is not the case on all installations, of course.
Are you comfortable opening a PR to correct this? If so, these are the files that need to be updated: ...
Yes, I have sent you a pull request accordingly: #3264
Kubuntu 24.10 here. This solved the issue and works well IF the sunshine.service is installed at system level. It won't be able to setup the notification icon, but it works.
If I try to go the --user sunshine.service approach the flatpak won't work since it is missing the cap_sys_admin+p capability. The one-shot service to setup the extra capability, suggested here #2840, doesn't seem to work with the sunshine service installed at user level.
I shared my setup here: https://discord.com/channels/804382334370578482/1294409772761616414
And this is how the service is currently looking for me, at system level:
[Unit]
Description=Self-hosted game stream host for Moonlight
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
Environment="PULSE_SERVER=unix:/run/user/1000/pulse/native"
ExecStart=flatpak run dev.lizardbyte.app.Sunshine
ExecStop=flatpak kill dev.lizardbyte.app.Sunshine
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=graphical.target
@dramirezRT thanks for the info here and on Discord!
Hopefully the setcap won't be an issue much longer. From my understanding it won't be necessary once #2507 is merged.
I still get the same error even with your new command. It starts when I run the flatpak with sudo -i flatpak run ddev.lizardbyte.app.Sunshine
. I suppose that's not optimal. I've been trying to get Sunshine to work on Fedora 40 for days but I'm no step closer. The RPM doesn't work because of outdated dependencies and I can't build it from source unless I install CUDA (I don't have an NVIDIA GPU).
@luigiistcrazy please try Sunshine from copr https://copr.fedorainfracloud.org/coprs/lizardbyte
@luigiistcrazy please try Sunshine from copr https://copr.fedorainfracloud.org/coprs/lizardbyte
Oh this works wonderfully, thank you so much. Is there any way to contribute to the Documentation? It requires quite some updated information and instructions.
Yes, though a PR... but note the "latest" docs are for v0.23.1... "master" docs are for the latest beta/pre-release.