# Conflicts:
#	.github/workflows/ci-copr.yml
#	.github/workflows/ci-flatpak.yml
#	.github/workflows/ci-homebrew.yml
#	.github/workflows/ci-linux.yml
#	.github/workflows/ci-windows.yml
#	.github/workflows/ci.yml
#	.github/workflows/localize.yml
#	README.md
#	scripts/icons/convert_and_pack.sh
#	src/config.cpp
#	src/config.h
#	src/confighttp.cpp
#	src/logging.cpp
#	src/video.cpp
#	src_assets/common/assets/web/config.html
#	src_assets/common/assets/web/public/assets/locale/en.json
#	src_assets/common/assets/web/public/assets/locale/it.json
#	src_assets/windows/misc/gamepad/install-gamepad.bat
#	third-party/build-deps
#	third-party/moonlight-common-c
#	tools/CMakeLists.txt
This commit is contained in:
Yukino Song
2025-08-03 13:52:19 +08:00
43 changed files with 487 additions and 486 deletions

View File

@@ -1291,7 +1291,7 @@ editing the `conf` file in a text editor. Use the examples as reference.
<td colspan="2">
Remap the requested resolution and FPS to another display mode.<br>
Depending on the [dd_resolution_option](#dd_resolution_option) and
[dd_refresh_rate_option](#dd_refresh_rate_option) values, the following mapping
[dd_refresh_rate_option](#dd_refresh_rate_option) values, the following mapping
groups are available:
<ul>
<li>`mixed` - both options are set to `auto`.</li>
@@ -1302,7 +1302,7 @@ editing the `conf` file in a text editor. Use the examples as reference.
`refresh_rate_only` - only [dd_refresh_rate_option](#dd_refresh_rate_option) is set to `auto`.
</li>
</ul>
For each of those groups, a list of fields can be configured to perform remapping:
For each of those groups, a list of fields can be configured to perform remapping:
<ul>
<li>
`requested_resolution` - resolution that needs to be matched in order to use this remapping entry.
@@ -1312,10 +1312,10 @@ editing the `conf` file in a text editor. Use the examples as reference.
<li>`final_refresh_rate` - refresh rate value to be used if the entry was matched.</li>
</ul>
If `requested_*` field is left empty, it will match <b>everything</b>.<br>
If `final_*` field is left empty, the original value will not be remapped and either a requested, manual
or current value is used. However, at least one `final_*` must be set, otherwise the entry is considered
If `final_*` field is left empty, the original value will not be remapped and either a requested, manual
or current value is used. However, at least one `final_*` must be set, otherwise the entry is considered
invalid.<br>
@note{"Optimize game settings" must be enabled on client side for ANY entry with `resolution`
@note{"Optimize game settings" must be enabled on client side for ANY entry with `resolution`
field to be considered.}
@note{First entry to be matched in the list is the one that will be used.}
@tip{`requested_resolution` and `final_resolution` can be omitted for `refresh_rate_only` group.}
@@ -1392,6 +1392,32 @@ editing the `conf` file in a text editor. Use the examples as reference.
</tr>
</table>
### minimum_fps_target
<table>
<tr>
<td>Description</td>
<td colspan="2">
Sunshine tries to save bandwidth when content on screen is static or a low framerate. Because many clients expect a constant stream of video frames, a certain amount of duplicate frames are sent when this happens. This setting controls the lowest effective framerate a stream can reach.
</td>
</tr>
<tr>
<td>Default</td>
<td colspan="2">@code{}
0
@endcode</td>
</tr>
<tr>
<td rowspan="3">Choices</td>
<td>0</td>
<td>Use half the stream's FPS as the minimum target.</td>
</tr>
<tr>
<td>1-1000</td>
<td>Specify your own value. The real minimum may differ from this value.</td>
</tr>
</table>
## Network
### upnp

View File

@@ -84,9 +84,35 @@ client only 1 Gbit/s or Wi-Fi. Similarly, a 1 Gbps host may be too fast for a
client having only a 100 Mbps interface.
As a workaround the transmission speed of the host NIC can be reduced: 1 Gbps
instead of 2.5 or 100 Mbps instead of 1 Gbps. (A technically more advanced
instead of 2.5 or 100 Mbps instead of 1 Gbps. A technically more advanced
solution would be to configure traffic shaping rules at the OS-level, so that
only Sunshine's traffic is slowed down.)
only Sunshine's traffic is slowed down.
Such a solution on Linux could look like that:
```bash
# 1) Remove existing qdisc (pfifo_fast)
sudo tc qdisc del dev <NIC> root
# 2) Add HTB root qdisc with default class 1:1
sudo tc qdisc add dev <NIC> root handle 1: htb default 1
# 3) Create class 1:1 for full 10 Gbit/s (all other traffic)
sudo tc class add dev <NIC> parent 1: classid 1:1 htb \
rate 10000mbit ceil 10000mbit burst 32k
# 4) Create class 1:10 for Sunshine game stream at 1 Gbit/s
sudo tc class add dev <NIC> parent 1: classid 1:10 htb \
rate 1000mbit ceil 1000mbit burst 32k
# 5) Filter UDP source port 47998 into class 1:10
sudo tc filter add dev <NIC> protocol ip parent 1: prio 1 \
u32 match ip protocol 17 0xff \
match ip sport 47998 0xffff flowid 1:10
```
In that way only the Sunshine traffic is limited by 1 Gbit. This is not persistent on reboots.
If you use a different port for the game stream you need to adjust the last command.
Sunshine versions > 0.23.1 include improved networking code that should
alleviate or even solve this issue (without reducing the NIC speed).