Skip to content

Commit

Permalink
docs(troubleshoot): add network testing with iPerf3 (#2866)
Browse files Browse the repository at this point in the history
Co-authored-by: ReenigneArcher <[email protected]>
  • Loading branch information
gschintgen and ReenigneArcher authored Jul 17, 2024
1 parent 1f4e109 commit b93756a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/source/about/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Install

.. code-block:: bash
sudo apt install -f ./sunshine-{distro}-{distro-version}-{arch}.deb
sudo dpkg -i ./sunshine-{distro}-{distro-version}-{arch}.deb
.. note:: The ``{distro-version}`` is the version of the distro we built the package on. The ``{arch}`` is the
architecture of your operating system.
Expand Down
31 changes: 31 additions & 0 deletions docs/source/troubleshooting/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,37 @@ Also, if you have many controllers already directly connected to the host, it mi
Sunshine provided controller (connected to the guest) is the "first" one. In Linux this can be accomplished on USB
devices by finding the device in `/sys/bus/usb/devices/` and writing `0` to the `authorized` file.

Network performance test
------------------------
For real-time game streaming the most important characteristic of the network
path between server and client is not pure bandwidth but rather stability and
consistency (low latency with low variance, minimal or no packet loss).

The network can be tested using the multi-platform tool `iPerf3 <https://iperf.fr>`__.

On the Sunshine host ``iperf3`` is started in server mode:

.. code-block:: bash
iperf3 -s
On the client device iperf3 is asked to perform a 60-second UDP test in reverse
direction (from server to client) at a given bitrate (e.g. 50 Mbps):

.. code-block:: bash
iperf3 -c {HostIpAddress} -t 60 -u -R -b 50M
Watch the output on the client for packet loss and jitter values. Both should be
(very) low. Ideally packet loss remains less than 5% and jitter below 1ms.

For Android clients use `PingMaster <https://play.google.com/store/apps/details?id=com.appplanex.pingmasternetworktools>`__.

For iOS clients use `HE.NET Network Tools <https://apps.apple.com/us/app/he-net-network-tools/id858241710>`__.

If you are testing a remote connection (over the internet) you will need to
forward the port 5201 (TCP and UDP) from your host.

Packet loss (Buffer overrun)
----------------------------
If the host PC (running Sunshine) has a much faster connection to the network
Expand Down
8 changes: 5 additions & 3 deletions docs/source/troubleshooting/linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ documentation for instructions.
KMS Streaming fails
-------------------
If screencasting fails with KMS, you may need to run the following to force unprivileged screencasting.
.. code-block:: bash

sudo setcap -r $(readlink -f $(which sunshine))
.. code-block:: bash
sudo setcap -r $(readlink -f $(which sunshine))
.. note:: The above command will not work with the AppImage or Flatpak packages.
Please refer to the :ref:`Setup guide <about/setup:Install>` for more
Expand All @@ -37,8 +38,9 @@ If screencasting fails with KMS, you may need to run the following to force unpr
KMS streaming fails on Nvidia GPUs
----------------------------------
If KMS screen capture results in a black screen being streamed, you may need to
set the parameter `modeset=1` for Nvidia's kernel module. This can be done by
set the parameter ``modeset=1`` for Nvidia's kernel module. This can be done by
adding the following directive to the kernel command line:

.. code-block::
nvidia_drm.modeset=1
Expand Down

0 comments on commit b93756a

Please sign in to comment.