Page MenuHomeSolus

Update Sunshine to 0.15.0
ClosedPublic

Authored by Jacek on Aug 15 2022, 8:59 PM.

Details

Summary

WARNING! Developer has changed config files location, if you wish to keep your current settings and game list you need to move them to the new location:
cp /etc/sunshine/apps_linux.json ~/.config/sunshine/apps.json
cp /etc/sunshine/sunshine.conf ~/.config/sunshine/sunshine.conf
Also if you want to utilise KMS, you will need to execute sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
Changelog:

  • Improved Pulse/Pipewire compatibility
  • Properly catch exceptions in stream broadcast handlers
  • Wayland support, wlroots only
  • Fixed a bug causes stuttering
Test Plan

Copied my config files, as described above, streamed to Moonlight on my PS Vita, without any problems

Diff Detail

Repository
R5262 sunshine
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Jacek created this revision.Aug 15 2022, 8:59 PM
Jacek requested review of this revision.Aug 15 2022, 8:59 PM
Jacek updated this revision to Diff 32933.Aug 15 2022, 9:01 PM

Remove one argument that is no longer needed

Jacek added a comment.Aug 15 2022, 9:03 PM

They changed the config file location, so users will need to manually move them, or configure it again. I don't see an easy way to patch it.

algent added a subscriber: algent.Sep 5 2022, 2:29 PM

They changed the config file location, so users will need to manually move them, or configure it again. I don't see an easy way to patch it.

Moving files from /etc to /usr/share will be reported by eopkg as a broken package.

Jacek added a comment.Sep 5 2022, 3:54 PM

They changed the config file location, so users will need to manually move them, or configure it again. I don't see an easy way to patch it.

Moving files from /etc to /usr/share will be reported by eopkg as a broken package.

Should I move them to /etc then? Or can they stay how the creator intended?

ZenurikSD requested changes to this revision.EditedOct 27 2022, 6:36 PM
ZenurikSD added a subscriber: ZenurikSD.

Hello!

Just wanted to report that this package does not work correctly under Wayland because of a build issue. It does not find a wayland display and instead uses X11 to screenshare.

I asked about this on LizardByte's discord (which AFAIK theirs is the currently supported version of Sunshine) so this is a summary of the conversation I've had with one of their devs.:

ReenigneArcher
They should reach out to me since they seem to be having issues with the build
This
%cmake .. -D SUNSHINE_ASSETS_DIR=share/sunshine/assets -D SUNSHINE_CONFIG_DIR=share/sunshine/config -D SUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine
should become (after next release... coming very soon)
%cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/etc -DSUNSHINE_ASSETS_DIR=share/sunshine -DSUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine -DSUNSHINE_ENABLE_WAYLAND=ON -DSUNSHINE_ENABLE_X11=ON -DSUNSHINE_ENABLE_DRM=ON -DSUNSHINE_ENABLE_CUDA=ON
Normally we use /usr but since it seems like they have an issue with that it can be changed to /etc
Config directory is removed on next release and only assets directory will be needed.
WAYLAND doesn't appear to be enabled in the build, unless it's automatically on in Cmake (I forget if it is or not)

Zenurik
Should I report this issue with them? Or updating their package to 0.15.0 would solve it?

ReenigneArcher
They'll need to set the build commands properly.
They can reach out here or on GitHub discussions for guidance on the build.


I'm sorry but I'm not able to help with much else since I'm not a developer, this is about the most I can understand.
This is the thread from their discord: https://discord.com/channels/804382334370578482/1035223999631863929
And the link to join: https://discord.gg/d6MpcrbYQs

This revision now requires changes to proceed.Oct 27 2022, 6:36 PM
Jacek added a comment.EditedOct 27 2022, 9:11 PM

Hello!
Just wanted to report that this package does not work correctly under Wayland because of a build issue. It does not find a wayland display and instead uses X11 to screenshare.

Thank you for being interesting in it! Are you sure your are testing it on Sway, as I think that is the only supported Wayland compositor... at least when I was packaging it.
Wayland is enabled by default, but if it isn't build, then I must have forgot to include some dependency, but I thought I made sure I was building it... So are you using supported compositor?
And I will look into other things they suggested, thanks!
Edit: Oh, it should work on other compositors too! Then I need to dig into it. Could you just check you did setup the KMS? And I will try to look into it when I get time: https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/usage.html#linux But also doing the KMS is to force X11 on Wayland... Is that the only way, they recommended it for other Wayland users: https://github.com/LizardByte/Sunshine/issues/426

Thank you for being interesting in it! Are you sure your are testing it on Sway, as I think that is the only supported Wayland compositor... at least when I was packaging it.

Actually I'm on KDE, I do know it's not officially supported yet, but didn't realize things might be different in other Wayland compositors. I don't think I'm able to test that at the moment sadly.

Edit: Oh, it should work on other compositors too! Then I need to dig into it. Could you just check you did setup the KMS? And I will try to look into it when I get time: https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/usage.html#linux But also doing the KMS is to force X11 on Wayland... Is that the only way, they recommended it for other Wayland users: https://github.com/LizardByte/Sunshine/issues/426

I tried via KMS but the result was the same. I did make sure to disable it before confirming the issue here though.

@ZenurikSD I build it again, and it definitely builds with support for wayland: -- Found Wayland: /usr/lib64/libwayland-client.so;/usr/lib64/libwayland-server.so;/usr/lib64/libwayland-egl.so;/usr/lib64/libwayland-cursor.so
So I don't know how can I fix it.
Oh, and one more thing, you build this package.yml, right? Just making sure, because the build currently in the repos is an ancient 0.10.1, this revision 0.14.1 didn't get accepted yet. So you build the new version posted here yourself and it didn't work, right?

Jacek updated this revision to Diff 33434.Mon, Oct 31, 12:09 AM

Clean up the package.yml

Oh, and one more thing, you build this package.yml, right? Just making sure, because the build currently in the repos is an ancient 0.10.1, this revision 0.14.1 didn't get accepted yet. So you build the new version posted here yourself and it didn't work, right?

I didn't, the report I made was based on the version currently in the repos (0.10.1) and I did not test with this new revision. I can try it later if I figure out how to build a package lol

Jacek added a comment.Tue, Nov 1, 12:18 PM

@ZenurikSD Awesome, that means there is probably nothing wrong with this build.
You can download the .eopkg from here: https://send.vis.ee/download/a7836816afd78baa/#RzuiSW2VOzVUZB9zs8ocGA
And make sure to move your config as I described in the description of this diff, at the top of the page.

Staudey added a subscriber: Staudey.

@ZenurikSD I had a feeling this was the case. The proper place to do this would've been the "Report an issue" form from the main page https://dev.getsol.us/maniphest/task/edit/form/1/
Putting those reports into the discussion of pending patches just distracts from the patch itself (as we've seen here).

Also please don't "Request Changes" to a revision.

That aside, thanks for providing some input from the (current) Sunshine dev ๐Ÿ˜ƒ

Jacek updated this revision to Diff 33450.Tue, Nov 1, 3:17 PM

Update to 0.15.0 and update instructions accordingly

Jacek retitled this revision from Update Sunshine to 0.14.1 to Update Sunshine to 0.15.0.Tue, Nov 1, 3:19 PM
Jacek edited the summary of this revision. (Show Details)
Staudey accepted this revision.Tue, Nov 1, 11:34 PM

LGTM, thanks! I guess we can live with the change in config location if the (new) dev insists on a different approach. And using .config in $HOME is more palatable than copying over the config in usr/share as it was with 0.14

I did adjust your patch a bit to remove the KMS troubleshooting step from the package description (though not from the changelog). I don't want us to have command line instructions in package details. This might be the perfect being the enemy of the good, but the sunshine docs are linked in several places, and I trust users to be able to check them out for an networking tool if they have a specific issue. Maybe I can think of a better approach in the future, which doesn't involve the package description (e.g. in the case of VirtualBox we link to our Help Center, but this might be overkill for just a single command as it is here). If it comes to user complaints/frustration, you can point to this and blame me and my aesthetic sensibilities ๐Ÿ˜€

This revision is now accepted and ready to land.Tue, Nov 1, 11:34 PM
This revision was automatically updated to reflect the committed changes.

@ZenurikSD I had a feeling this was the case. The proper place to do this would've been the "Report an issue" form from the main page https://dev.getsol.us/maniphest/task/edit/form/1/
Putting those reports into the discussion of pending patches just distracts from the patch itself (as we've seen here).
Also please don't "Request Changes" to a revision.
That aside, thanks for providing some input from the (current) Sunshine dev ๐Ÿ˜ƒ

I see, I should probably be more careful next time then! But I'm glad it was still useful. From someone that uses Solus daily I really appreciate the work you all do.

@ZenurikSD No harm done; it's an easy mistake to make if you're unfamiliar with our dev tracker, I guess. Be sure to test the package once it hits the stable repository with the next Friday sync (and if there are still Wayland issues you can then create a report as described above)

Jacek added a comment.Wed, Nov 2, 12:22 AM

@ZenurikSD I tested it again on KDE Wayland, the newest 0.15.0, and it still complains it is missing specifically wlroots stuff. So I think it is worth consulting devs if it can actually fully work on other Wayland compositors than Sway, or only with KMS.