Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autostart with KMS grab #183

Closed
Anvil5465 opened this issue Oct 12, 2024 · 2 comments
Closed

Autostart with KMS grab #183

Anvil5465 opened this issue Oct 12, 2024 · 2 comments

Comments

@Anvil5465
Copy link

I have tried making a system service for sunshine with KMS grab enabled, but I have been running into a lot of problems. Initially, the service simply wouldn't start at boot, but I was able to overcome this with a sudo crontab job (@reboot sleep 30 && systemctl start sunshine.service). However, I have reached a dead end that I can't seem to fix. For some reason, if sunshine is launched using my system service, it fails to create an audio device and stream the computer's audio. My system service file is below. I am using Ubuntu 24.10. Any help would be greatly appreciated.

[Unit]
Description=Sunshine self-hosted game stream host for Moonlight.
StartLimitIntervalSec=500
StartLimitBurst=5

[Service]
ExecStart=/bin/bash -c "PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run dev.lizardbyte.app.Sunshine"
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=graphical-session.target
@ReenigneArcher
Copy link
Collaborator

Here's some references for you:

We definitely need to improve the instructions around flatpak, but I'll close this since it will be handled upstream and then propagate here to flathub.

@ReenigneArcher ReenigneArcher closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2024
@Anvil5465
Copy link
Author

Thanks so much this is super helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants