feat(linux)!: Support streaming through XDG portals and Pipewire (#4417)
Co-authored-by: Carlos Garnacho <carlosg@gnome.org> Co-authored-by: Carson Katri <Carson.katri@gmail.com> Co-authored-by: Bond <bond-d@ukr.net> Co-authored-by: d.bondarev <d.bondarev@crm-onebox.com> Co-authored-by: Conn O'Griofa <connogriofa@gmail.com>
This commit is contained in:
parent
5dbeb74f0d
commit
874880e5ea
23 changed files with 1338 additions and 68 deletions
|
|
@ -274,16 +274,11 @@ flatpak install --user ./sunshine_{arch}.flatpak
|
|||
flatpak run --command=additional-install.sh dev.lizardbyte.app.Sunshine
|
||||
```
|
||||
|
||||
##### Run with NVFBC capture (X11 Only)
|
||||
##### Run with NVFBC capture (X11 Only) or XDG Portal (Wayland Only)
|
||||
```bash
|
||||
flatpak run dev.lizardbyte.app.Sunshine
|
||||
```
|
||||
|
||||
##### Run with KMS capture (Wayland & X11)
|
||||
```bash
|
||||
sudo -i PULSE_SERVER=unix:/run/user/$(id -u $whoami)/pulse/native flatpak run dev.lizardbyte.app.Sunshine
|
||||
```
|
||||
|
||||
##### Uninstall
|
||||
```bash
|
||||
flatpak run --command=remove-additional-install.sh dev.lizardbyte.app.Sunshine
|
||||
|
|
@ -405,37 +400,21 @@ After adding yourself to the group, log out and log back in for the changes to t
|
|||
|
||||
### Linux
|
||||
|
||||
#### KMS Capture
|
||||
|
||||
> [!WARNING]
|
||||
> Capture of most Wayland-based desktop environments will fail unless this step is performed.
|
||||
#### Services
|
||||
|
||||
> [!NOTE]
|
||||
> `cap_sys_admin` may as well be root, except you don't need to be root to run the program. This is necessary to
|
||||
> allow Sunshine to use KMS capture.
|
||||
|
||||
##### Enable
|
||||
```bash
|
||||
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
|
||||
```
|
||||
|
||||
#### X11 Capture
|
||||
For X11 capture to work, you may need to disable the capabilities that were set for KMS capture.
|
||||
|
||||
```bash
|
||||
sudo setcap -r $(readlink -f $(which sunshine))
|
||||
```
|
||||
|
||||
#### Service
|
||||
> Two service unit files are available. Pick "sunshine" for unprivileged XDG Portal or X11 capture, otherwise
|
||||
> pick "sunshine-kms" for privileged KMS capture.
|
||||
|
||||
**Start once**
|
||||
```bash
|
||||
systemctl --user start sunshine
|
||||
```
|
||||
|
||||
**Start on boot**
|
||||
**Start on boot (unprivileged; swap logic for KMS)**
|
||||
```bash
|
||||
systemctl --user enable sunshine
|
||||
systemctl --user --now disable sunshine-kms
|
||||
systemctl --user --now enable sunshine
|
||||
```
|
||||
|
||||
### macOS
|
||||
|
|
|
|||
|
|
@ -160,16 +160,18 @@ sudo usermod -aG input $USER
|
|||
```
|
||||
|
||||
### KMS Streaming fails
|
||||
If screencasting fails with KMS, you may need to run the following to force unprivileged screencasting.
|
||||
If screencasting fails with KMS, you may be using the unprivileged sunshine service unit. Switch to the privileged
|
||||
sunshine-kms service:
|
||||
|
||||
```bash
|
||||
sudo setcap -r $(readlink -f $(which sunshine))
|
||||
systemctl --user --now disable sunshine
|
||||
systemctl --user --now enable sunshine-kms
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> The above command will not work with the AppImage or Flatpak packages. Please refer to the
|
||||
> [AppImage setup](md_docs_2getting__started.html#appimage) or
|
||||
> [Flatpak setup](md_docs_2getting__started.html#flatpak) for more specific instructions.
|
||||
> The above commands will not work with the AppImage or Flatpak packages, as KMS screencasting
|
||||
> requires elevated privileges which are not allowed by their respective packaging security policies.
|
||||
> As an alternative, XDG Portal capture is recommended.
|
||||
|
||||
### KMS streaming fails on Nvidia GPUs
|
||||
If KMS screen capture results in a black screen being streamed, you may need to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue