Open rcarmo opened 2 days ago
I have been doing some experimentation and running sudo sunshine
"works" in the sense that the service starts up, but with a different configuration.
I suspect that the sunshine-workaround
service that is also activated by the ujust
file is broken and fails to provide the right capabilities for the user service to start:
me@bazzite:~$ systemctl status sunshine-workaround.service
× sunshine-workaround.service - Workaround sunshine not having the correct caps
Loaded: loaded (/usr/lib/systemd/system/sunshine-workaround.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf
/etc/systemd/system/sunshine-workaround.service.d
└─override.conf
Active: failed (Result: exit-code) since Fri 2024-09-27 23:35:28 IST; 10h ago
Main PID: 4701 (code=exited, status=1/FAILURE)
CPU: 27ms
Sep 27 23:35:28 bazzite systemd[1]: Starting sunshine-workaround.service - Workaround sunshine not having the co>
Sep 27 23:35:28 bazzite setcap[4701]: Invalid file '/usr/bin/sunshine' for capability operation
Sep 27 23:35:28 bazzite systemd[1]: sunshine-workaround.service: Main process exited, code=exited, status=1/FAIL>
Sep 27 23:35:28 bazzite systemd[1]: sunshine-workaround.service: Failed with result 'exit-code'.
Sep 27 23:35:28 bazzite systemd[1]: Failed to start sunshine-workaround.service - Workaround sunshine not having>
/usr/bin/sunshine
is a link to sunshine-2024.911.215654.copr
I think this may need a deeper fix when installing the COPR package (and hence a change to the ujust
recipe or to the unit files being used).
Further experimentation with rpm-ostree
:
# get a temporary overlay
sudo rpm-ostree usroverlay
# try to get the workaround unit to work
cd /usr/bin/
sudo mv sunshine-2024.911.215654.copr sunshine
systemctl start sunshine-workaround.service
systemctl status sunshine-workaround.service
● sunshine-workaround.service - Workaround sunshine not having the correct caps
Loaded: loaded (/usr/lib/systemd/system/sunshine-workaround.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf
/etc/systemd/system/sunshine-workaround.service.d
└─override.conf
Active: active (exited) since Sat 2024-09-28 10:18:17 IST; 2min 50s ago
Process: 35569 ExecStartPre=/usr/bin/bash -c [ -x /usr/local/bin/.sunshine ] || /usr/bin/cp /usr/bin/sunshin>
Process: 35571 ExecStartPre=/usr/bin/bash -c /usr/bin/mount --bind /usr/local/bin/.sunshine /usr/bin/sunshin>
Process: 35572 ExecStartPre=/usr/bin/bash -c [ -x /usr/local/bin/.sunshine ] || /usr/bin/cp /usr/bin/sunshin>
Process: 35575 ExecStartPre=/usr/bin/bash -c /usr/bin/mount --bind /usr/local/bin/.sunshine /usr/bin/sunshin>
Process: 35576 ExecStart=/usr/bin/bash -c /usr/sbin/setcap 'cap_sys_admin+p' $(/usr/bin/readlink -f $(/usr/b>
Process: 35581 ExecStart=/usr/sbin/setcap cap_sys_admin+p /usr/bin/sunshine (code=exited, status=0/SUCCESS)
Main PID: 35581 (code=exited, status=0/SUCCESS)
CPU: 26ms
# Now try to restart the user service
systemctl --user restart sunshine.service
systemctl --user status sunshine.service
× sunshine.service - Self-hosted game stream host for Moonlight
Loaded: loaded (/usr/lib/systemd/user/sunshine.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/user/service.d
└─10-timeout-abort.conf
Active: failed (Result: core-dump) since Sat 2024-09-28 10:19:55 IST; 2min 24s ago
Duration: 1.179s
Process: 36459 ExecStartPre=/bin/sleep 5 (code=exited, status=0/SUCCESS)
Process: 36464 ExecStart=/usr/bin/sunshine (code=dumped, signal=ABRT)
Main PID: 36464 (code=dumped, signal=ABRT)
CPU: 405ms
Sep 28 10:19:50 bazzite systemd[5590]: sunshine.service: Failed with result 'core-dump'.
So the COPR binary still fails even with the capabilities correct. Still, we have two issues here:
ujust
recipe is broken, and the assumption that sunshine-workaround
works is wrong (at least for my current build), since it's trying to do setcaps
on a symlink, and that just plain doesn't workSo maybe sunshine
should move to be a system service (or, again, installed via flatpak
with the right permissions, in case that works)
Tagging @matte-schwartz for visibility.
Describe the bug
sunshine
is still completely unreliable for me. Installing it viaujust setup-sunshine
works, but the daemon crashes upon startup on current releases. See #1359, #1260 (where I bisected the issue to an upgrade inboost
) and other similar issues.What did you expect to happen?
I expected it to work. Also, for the
sunshine
COPR to be updated more frequently (and tested). Failing that, to have a flatpak alternative with the right duct taping for it to work (starting with launching correctly with Big Picture mode)Output of
rpm-ostree status
Hardware
Extra information or context
Note that the crash dump points to there being indeed a
boost
issue as bisected in #1260.