-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(linux): Split service unit into privileged and unprivileged variants #4619
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
fix(linux): Split service unit into privileged and unprivileged variants #4619
Conversation
|
Note that I'm not sure how this impacts flatpak functionality. I assume that CAP_SYS_ADMIN cannot be set anyway, so splitting the service makes no sense, but I changed the code (and AppImage too) just to keep it consistent with the traditional packaging formats. |
|
Bundle ReportBundle size has no change ✅ |
|
It's no problem if you want to do this after merging the branch to master. This will transparently change the default capture method for Wayland users from KMS to XDG, and performance will be poor if/until frame pacing gets improved, so users might not be happy until they realise the service switch is necessary. Apart from that, perhaps it's worth discussing if we want to reverse the logic and install a sunshine-xdg service instead -- but that's slightly confusing, as the unprivileged service is likely to fix the X11 capture backend as well. X11 users may also not realize that KMS capture is normally used even for their X11 sessions (and probably performs better than the real X11 capture backend). |
|
I think it makes more sense to merge this into the XDG pr branch, before merging it into master. If you think it's better I can leave the PR open for a while longer and try to improve the frame pacing before it's merged |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/linux/add-xdg-portal-grab #4619 +/- ##
==================================================================
+ Coverage 15.10% 15.12% +0.02%
==================================================================
Files 95 95
Lines 19708 19708
Branches 9067 9067
==================================================================
+ Hits 2977 2981 +4
- Misses 14892 15422 +530
+ Partials 1839 1305 -534
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Significant changes may be necessary to improve pacing. To sketch it out:
This helps, but still doesn't improve things substantially, as KWin's fps monitor still shows a 180fps render rate on a 60Hz screen.
Then we need to extract the pts timestamps from the pipewire metadata and convert to a monotonic time point that can be fed to img->frame_timestamp to be consumed by Moonlight for its pacing code. |
ac222ae
into
LizardByte:feat/linux/add-xdg-portal-grab
|
The squash merge seems to have folded some of your previous sunshine-kms changes into my commit that I reverted in separate commits? It probably would have been better to rebase by removing your two commits and my two reverts? But if the branch will ultimately be squashed into one commit whenever it's merged to master, I suppose it doesn't matter. Sorry if OT, I'm a bit rusty on how github resolves merges. |
|
I probably should have removed those commits in the other branch before merging. I will squash when it goes to master, so it will just be one commit (co-authored by everyone who contributed to the PR branch). |



Description
Split service unit into privileged and unprivileged variants needed for XDG Portal. Technically a breaking change because the default "sunshine" service will now run unprivileged, so user action is needed to restore KMS capture functionality (switch to sunshine-kms service).
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage