diff --git a/README.rst b/README.rst index 41ae6d84..fbc78658 100644 --- a/README.rst +++ b/README.rst @@ -36,7 +36,7 @@ System Requirements | +------------------------------------------------------------+ | | Linux/Debian: 11 (bullseye) | | +------------------------------------------------------------+ -| | Linux/Fedora: 36+ | +| | Linux/Fedora: 37+ | | +------------------------------------------------------------+ | | Linux/Ubuntu: 20.04+ (focal) | +------------+------------------------------------------------------------+ diff --git a/docs/source/about/advanced_usage.rst b/docs/source/about/advanced_usage.rst index dc6e5f16..7a43779c 100644 --- a/docs/source/about/advanced_usage.rst +++ b/docs/source/about/advanced_usage.rst @@ -43,7 +43,7 @@ location by modifying the configuration file. To manually configure sunshine you may edit the `conf` file in a text editor. Use the examples as reference. -.. Hint:: Some settings are not available within the web ui. +.. hint:: Some settings are not available within the web ui. General ------- @@ -130,7 +130,7 @@ gamepad **Description** The type of gamepad to emulate on the host. - .. Caution:: Applies to Windows only. + .. caution:: Applies to Windows only. **Choices** @@ -157,7 +157,7 @@ ds4_back_as_touchpad_click ^^^^^^^^^^^^^^^^^^^^^^^^^^ **Description** - .. Hint:: Only applies when gamepad is set to ds4 manually. Unused in other gamepad modes. + .. hint:: Only applies when gamepad is set to ds4 manually. Unused in other gamepad modes. Allow Select/Back inputs to also trigger DS4 touchpad click. Useful for clients looking to emulate touchpad click on Xinput devices. @@ -174,7 +174,7 @@ motion_as_ds4 ^^^^^^^^^^^^^ **Description** - .. Hint:: Only applies when gamepad is set to auto. + .. hint:: Only applies when gamepad is set to auto. If a client reports that a connected gamepad has motion sensor support, emulate it on the host as a DS4 controller. @@ -192,7 +192,7 @@ touchpad_as_ds4 ^^^^^^^^^^^^^^^ **Description** - .. Hint:: Only applies when gamepad is set to auto. + .. hint:: Only applies when gamepad is set to auto. If a client reports that a connected gamepad has a touchpad, emulate it on the host as a DS4 controller. @@ -212,7 +212,7 @@ back_button_timeout **Description** If the Back/Select button is held down for the specified number of milliseconds, a Home/Guide button press is emulated. - .. Tip:: If back_button_timeout < 0, then the Home/Guide button will not be emulated. + .. tip:: If back_button_timeout < 0, then the Home/Guide button will not be emulated. **Default** ``-1`` @@ -242,7 +242,7 @@ key_repeat_frequency **Description** How often keys repeat every second. - .. Tip:: This configurable option supports decimals. + .. tip:: This configurable option supports decimals. **Default** ``24.9`` @@ -263,7 +263,7 @@ always_send_scancodes Disable if keys on the client are generating the wrong input on the host. - .. Caution:: Applies to Windows only. + .. caution:: Applies to Windows only. **Default** ``enabled`` @@ -297,7 +297,7 @@ native_pen_touch This can be useful to disable for older applications without native pen/touch support. - .. Caution:: Applies to Windows only. + .. caution:: Applies to Windows only. **Default** ``enabled`` @@ -313,9 +313,9 @@ keybindings **Description** Sometimes it may be useful to map keybindings. Wayland won't allow clients to capture the Win Key for example. - .. Tip:: See `virtual key codes `__ + .. tip:: See `virtual key codes `__ - .. Hint:: keybindings needs to have a multiple of two elements. + .. hint:: keybindings needs to have a multiple of two elements. **Default** .. code-block:: text @@ -358,7 +358,7 @@ adapter_name **Description** Select the video card you want to stream. - .. Tip:: To find the name of the appropriate values follow these instructions. + .. tip:: To find the name of the appropriate values follow these instructions. **Linux + VA-API** Unlike with `amdvce` and `nvenc`, it doesn't matter if video encoding is done on a different GPU. @@ -374,13 +374,17 @@ adapter_name To be supported by Sunshine, it needs to have at the very minimum: ``VAProfileH264High : VAEntrypointEncSlice`` - .. Todo:: macOS + .. todo:: macOS **Windows** .. code-block:: batch tools\dxgi-info.exe + .. note:: For hybrid graphics systems, DXGI reports the outputs are connected to whichever graphics adapter + that the application is configured to use, so it's not a reliable indicator of how the display is + physically connected. + **Default** Sunshine will select the default video card. @@ -390,7 +394,7 @@ adapter_name adapter_name = /dev/dri/renderD128 - .. Todo:: macOS + .. todo:: macOS **Windows** .. code-block:: text @@ -403,7 +407,7 @@ output_name **Description** Select the display number you want to stream. - .. Tip:: To find the name of the appropriate values follow these instructions. + .. tip:: To find the name of the appropriate values follow these instructions. **Linux** During Sunshine startup, you should see the list of detected monitors: @@ -419,7 +423,7 @@ output_name You need to use the value before the colon in the output, e.g. ``1``. - .. Todo:: macOS + .. todo:: macOS **Windows** .. code-block:: batch @@ -435,7 +439,7 @@ output_name output_name = 0 - .. Todo:: macOS + .. todo:: macOS **Windows** .. code-block:: text @@ -448,7 +452,7 @@ fps **Description** The fps modes advertised by Sunshine. - .. Note:: Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested + .. note:: Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested fps is supported. **Default** @@ -465,7 +469,7 @@ resolutions **Description** The resolutions advertised by Sunshine. - .. Note:: Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested + .. note:: Some versions of Moonlight, such as Moonlight-nx (Switch), rely on this list to ensure that the requested resolution is supported. **Default** @@ -509,7 +513,7 @@ audio_sink **Description** The name of the audio sink used for audio loopback. - .. Tip:: To find the name of the audio sink follow these instructions. + .. tip:: To find the name of the audio sink follow these instructions. **Linux + pulseaudio** .. code-block:: bash @@ -533,9 +537,9 @@ audio_sink tools\audio-info.exe - .. Tip:: If you have multiple audio devices with identical names, use the Device ID instead. + .. tip:: If you have multiple audio devices with identical names, use the Device ID instead. - .. Tip:: If you want to mute the host speakers, use `virtual_sink`_ instead. + .. tip:: If you want to mute the host speakers, use `virtual_sink`_ instead. **Default** Sunshine will select the default audio device. @@ -563,9 +567,9 @@ virtual_sink The audio device that's virtual, like Steam Streaming Speakers. This allows Sunshine to stream audio, while muting the speakers. - .. Tip:: See `audio_sink`_! + .. tip:: See `audio_sink`_! - .. Tip:: These are some options for virtual sound devices. + .. tip:: These are some options for virtual sound devices. - Stream Streaming Speakers (Linux, macOS, Windows) @@ -585,7 +589,7 @@ install_steam_audio_drivers **Description** Installs the Steam Streaming Speakers driver (if Steam is installed) to support surround sound and muting host audio. - .. Tip:: This option is only supported on Windows. + .. tip:: This option is only supported on Windows. **Default** ``enabled`` @@ -634,7 +638,7 @@ port Mic (unused) 48002 UDP +13 ================ ============ =========================== -.. Attention:: Custom ports may not be supported by all Moonlight clients. +.. attention:: Custom ports may not be supported by all Moonlight clients. **Default** ``47989`` @@ -677,7 +681,7 @@ pkey **Description** The private key used for the web UI and Moonlight client pairing. For best compatibility, this should be an RSA-2048 private key. - .. Warning:: Not all Moonlight clients support ECDSA keys or RSA key lengths other than 2048 bits. + .. warning:: Not all Moonlight clients support ECDSA keys or RSA key lengths other than 2048 bits. **Default** ``credentials/cakey.pem`` @@ -693,7 +697,7 @@ cert **Description** The certificate used for the web UI and Moonlight client pairing. For best compatibility, this should have an RSA-2048 public key. - .. Warning:: Not all Moonlight clients support ECDSA keys or RSA key lengths other than 2048 bits. + .. warning:: Not all Moonlight clients support ECDSA keys or RSA key lengths other than 2048 bits. **Default** ``credentials/cacert.pem`` @@ -786,7 +790,7 @@ channels - Clients connected through WAN and LAN have different bitrate constraints. - Decoders may require different settings for color. - .. Warning:: CPU usage increases for each distinct video stream generated. + .. warning:: CPU usage increases for each distinct video stream generated. **Default** ``1`` @@ -802,7 +806,7 @@ fec_percentage **Description** Percentage of error correcting packets per data packet in each video frame. - .. Warning:: Higher values can correct for more network packet loss, but at the cost of increasing bandwidth usage. + .. warning:: Higher values can correct for more network packet loss, but at the cost of increasing bandwidth usage. **Default** ``20`` @@ -821,7 +825,7 @@ qp **Description** Quantization Parameter. Some devices don't support Constant Bit Rate. For those devices, QP is used instead. - .. Warning:: Higher value means more compression, but less quality. + .. warning:: Higher value means more compression, but less quality. **Default** ``28`` @@ -837,7 +841,7 @@ min_threads **Description** Minimum number of threads used for software encoding. - .. Note:: Increasing the value slightly reduces encoding efficiency, but the tradeoff is usually worth it to gain + .. note:: Increasing the value slightly reduces encoding efficiency, but the tradeoff is usually worth it to gain the use of more CPU cores for encoding. The ideal value is the lowest value that can reliably encode at your desired streaming settings on your hardware. @@ -855,7 +859,7 @@ hevc_mode **Description** Allows the client to request HEVC Main or HEVC Main10 video streams. - .. Warning:: HEVC is more CPU-intensive to encode, so enabling this may reduce performance when using software + .. warning:: HEVC is more CPU-intensive to encode, so enabling this may reduce performance when using software encoding. **Choices** @@ -886,7 +890,7 @@ av1_mode **Description** Allows the client to request AV1 Main 8-bit or 10-bit video streams. - .. Warning:: AV1 is more CPU-intensive to encode, so enabling this may reduce performance when using software + .. warning:: AV1 is more CPU-intensive to encode, so enabling this may reduce performance when using software encoding. **Choices** @@ -917,7 +921,7 @@ capture **Description** Force specific screen capture method. - .. Caution:: Applies to Linux only. + .. caution:: Applies to Linux only. **Choices** @@ -933,7 +937,7 @@ capture or `nvlax `__. wlr Capture for wlroots based Wayland compositors via DMA-BUF. kms DRM/KMS screen capture from the kernel. This requires that sunshine has cap_sys_admin capability. - See :ref:`Linux Setup `. + See :ref:`Linux Setup `. x11 Uses XCB. This is the slowest and most CPU intensive so should be avoided if possible. ========= =========== @@ -979,9 +983,9 @@ sw_preset **Description** The encoder preset to use. - .. Note:: This option only applies when using software `encoder`_. + .. note:: This option only applies when using software `encoder`_. - .. Note:: From `FFmpeg `__. + .. note:: From `FFmpeg `__. A preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower preset will provide better compression (compression is quality per filesize). This means that, for example, if @@ -1023,9 +1027,9 @@ sw_tune **Description** The tuning preset to use. - .. Note:: This option only applies when using software `encoder`_. + .. note:: This option only applies when using software `encoder`_. - .. Note:: From `FFmpeg `__. + .. note:: From `FFmpeg `__. You can optionally use -tune to change settings based upon the specifics of your input. @@ -1061,7 +1065,7 @@ nvenc_preset Higher numbers improve compression (quality at given bitrate) at the cost of increased encoding latency. Recommended to change only when limited by network or decoder, otherwise similar effect can be accomplished by increasing bitrate. - .. Note:: This option only applies when using NVENC `encoder`_. + .. note:: This option only applies when using NVENC `encoder`_. **Choices** @@ -1096,7 +1100,7 @@ nvenc_twopass This allows to detect more motion vectors, better distribute bitrate across the frame and more strictly adhere to bitrate limits. Disabling it is not recommended since this can lead to occasional bitrate overshoot and subsequent packet loss. - .. Note:: This option only applies when using NVENC `encoder`_. + .. note:: This option only applies when using NVENC `encoder`_. **Choices** @@ -1127,9 +1131,9 @@ nvenc_realtime_hags Currently NVIDIA drivers may freeze in encoder when HAGS is enabled, realtime priority is used and VRAM utilization is close to maximum. Disabling this option lowers the priority to high, sidestepping the freeze at the cost of reduced capture performance when the GPU is heavily loaded. - .. Note:: This option only applies when using NVENC `encoder`_. + .. note:: This option only applies when using NVENC `encoder`_. - .. Caution:: Applies to Windows only. + .. caution:: Applies to Windows only. **Choices** @@ -1158,7 +1162,7 @@ nvenc_h264_cavlc Prefer CAVLC entropy coding over CABAC in H.264 when using NVENC. CAVLC is outdated and needs around 10% more bitrate for same quality, but provides slightly faster decoding when using software decoder. - .. Note:: This option only applies when using H.264 format with NVENC `encoder`_. + .. note:: This option only applies when using H.264 format with NVENC `encoder`_. **Choices** @@ -1186,7 +1190,7 @@ qsv_preset **Description** The encoder preset to use. - .. Note:: This option only applies when using quicksync `encoder`_. + .. note:: This option only applies when using quicksync `encoder`_. **Choices** @@ -1219,7 +1223,7 @@ qsv_coder **Description** The entropy encoding to use. - .. Note:: This option only applies when using H264 with quicksync `encoder`_. + .. note:: This option only applies when using H264 with quicksync `encoder`_. **Choices** @@ -1248,7 +1252,7 @@ amd_quality **Description** The encoder preset to use. - .. Note:: This option only applies when using amdvce `encoder`_. + .. note:: This option only applies when using amdvce `encoder`_. **Choices** @@ -1277,7 +1281,7 @@ amd_rc **Description** The encoder rate control. - .. Note:: This option only applies when using amdvce `encoder`_. + .. note:: This option only applies when using amdvce `encoder`_. **Choices** @@ -1307,7 +1311,7 @@ amd_usage **Description** The encoder usage profile, used to balance latency with encoding quality. - .. Note:: This option only applies when using amdvce `encoder`_. + .. note:: This option only applies when using amdvce `encoder`_. **Choices** @@ -1337,7 +1341,7 @@ amd_preanalysis **Description** Preanalysis can increase encoding quality at the cost of latency. - .. Note:: This option only applies when using amdvce `encoder`_. + .. note:: This option only applies when using amdvce `encoder`_. **Default** ``disabled`` @@ -1353,7 +1357,7 @@ amd_vbaq **Description** Variance Based Adaptive Quantization (VBAQ) can increase subjective visual quality. - .. Note:: This option only applies when using amdvce `encoder`_. + .. note:: This option only applies when using amdvce `encoder`_. **Default** ``enabled`` @@ -1369,7 +1373,7 @@ amd_coder **Description** The entropy encoding to use. - .. Note:: This option only applies when using H264 with amdvce `encoder`_. + .. note:: This option only applies when using H264 with amdvce `encoder`_. **Choices** @@ -1398,7 +1402,7 @@ vt_software **Description** Force Video Toolbox to use software encoding. - .. Note:: This option only applies when using macOS. + .. note:: This option only applies when using macOS. **Choices** @@ -1428,9 +1432,9 @@ vt_realtime **Description** Realtime encoding. - .. Note:: This option only applies when using macOS. + .. note:: This option only applies when using macOS. - .. Warning:: Disabling realtime encoding might result in a delayed frame encoding or frame drop. + .. warning:: Disabling realtime encoding might result in a delayed frame encoding or frame drop. **Default** ``enabled`` @@ -1446,7 +1450,7 @@ vt_coder **Description** The entropy encoding to use. - .. Note:: This option only applies when using macOS. + .. note:: This option only applies when using macOS. **Choices** diff --git a/docs/source/about/guides/app_examples.rst b/docs/source/about/guides/app_examples.rst index e0bc5432..514bb5c7 100644 --- a/docs/source/about/guides/app_examples.rst +++ b/docs/source/about/guides/app_examples.rst @@ -3,7 +3,7 @@ App Examples Since not all applications behave the same, we decided to create some examples to help you get started adding games and applications to Sunshine. -.. Attention:: Throughout these examples, any fields not shown are left blank. You can enhance your experience by +.. attention:: Throughout these examples, any fields not shown are left blank. You can enhance your experience by adding an image or a log file (via the ``Output`` field). Common Examples @@ -23,267 +23,330 @@ Desktop Steam Big Picture ^^^^^^^^^^^^^^^^^ -.. Note:: Steam is launched as a detached command because Steam starts with a process that self updates itself and the original +.. note:: Steam is launched as a detached command because Steam starts with a process that self updates itself and the original process is killed. Since the original process ends it will not work as a regular command. -+----------------------+------------------------------------------+----------------------------------+-----------------------------------+ -| **Field** | **Linux** | **macOS** | **Windows** | -+----------------------+------------------------------------------+----------------------------------+-----------------------------------+ -| Application Name | ``Steam Big Picture`` | -+----------------------+------------------------------------------+----------------------------------+-----------------------------------+ -| Detached Commands | ``setsid steam steam://open/bigpicture`` | ``open steam://open/bigpicture`` | ``steam steam://open/bigpicture`` | -+----------------------+------------------------------------------+----------------------------------+-----------------------------------+ -| Image | ``steam.png`` | -+----------------------+------------------------------------------+----------------------------------+-----------------------------------+ +.. tab:: Linux + + +----------------------+------------------------------------------+ + | Application Name | ``Steam Big Picture`` | + +----------------------+------------------------------------------+ + | Detached Commands | ``setsid steam steam://open/bigpicture`` | + +----------------------+------------------------------------------+ + | Image | ``steam.png`` | + +----------------------+------------------------------------------+ + +.. tab:: macOS + + +----------------------+----------------------------------+ + | Application Name | ``Steam Big Picture`` | + +----------------------+----------------------------------+ + | Detached Commands | ``open steam://open/bigpicture`` | + +----------------------+----------------------------------+ + | Image | ``steam.png`` | + +----------------------+----------------------------------+ + +.. tab:: Windows + + +----------------------+-----------------------------------+ + | Application Name | ``Steam Big Picture`` | + +----------------------+-----------------------------------+ + | Detached Commands | ``steam steam://open/bigpicture`` | + +----------------------+-----------------------------------+ + | Image | ``steam.png`` | + +----------------------+-----------------------------------+ Epic Game Store game ^^^^^^^^^^^^^^^^^^^^ -.. Note:: Using URI method will be the most consistent between various games, but does not allow a game to be launched +.. note:: Using URI method will be the most consistent between various games, but does not allow a game to be launched using the "Command" and therefore the stream will not end when the game ends. URI (Epic) """""""""" -+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| **Field** | **Windows** | -+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Application Name | ``Surviving Mars`` | -+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Detached Commands | ``cmd /C "start com.epicgames.launcher://apps/d759128018124dcabb1fbee9bb28e178%3A20729b9176c241f0b617c5723e70ec2d%3AOvenbird?action=launch&silent=true"`` | -+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ +.. tab:: Windows + + +----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Detached Commands | ``cmd /C "start com.epicgames.launcher://apps/d759128018124dcabb1fbee9bb28e178%3A20729b9176c241f0b617c5723e70ec2d%3AOvenbird?action=launch&silent=true"`` | + +----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ Binary (Epic w/ working directory) """""""""""""""""""""""""""""""""" -+----------------------+-----------------------------------------------+ -| **Field** | **Windows** | -+----------------------+-----------------------------------------------+ -| Application Name | ``Surviving Mars`` | -+----------------------+-----------------------------------------------+ -| Command | ``cmd /c "MarsEpic.exe"`` | -+----------------------+-----------------------------------------------+ -| Working Directory | ``C:\Program Files\Epic Games\SurvivingMars`` | -+----------------------+-----------------------------------------------+ +.. tab:: Windows + + +----------------------+-----------------------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+-----------------------------------------------+ + | Command | ``cmd /c "MarsEpic.exe"`` | + +----------------------+-----------------------------------------------+ + | Working Directory | ``C:\Program Files\Epic Games\SurvivingMars`` | + +----------------------+-----------------------------------------------+ Binary (Epic w/o working directory) """"""""""""""""""""""""""""""""""" -+----------------------+--------------------------------------------------------------+ -| **Field** | **Windows** | -+----------------------+--------------------------------------------------------------+ -| Application Name | ``Surviving Mars`` | -+----------------------+--------------------------------------------------------------+ -| Command | ``"C:\Program Files\Epic Games\SurvivingMars\MarsEpic.exe"`` | -+----------------------+--------------------------------------------------------------+ +.. tab:: Windows + +----------------------+--------------------------------------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+--------------------------------------------------------------+ + | Command | ``"C:\Program Files\Epic Games\SurvivingMars\MarsEpic.exe"`` | + +----------------------+--------------------------------------------------------------+ Steam game ^^^^^^^^^^ -.. Note:: Using URI method will be the most consistent between various games, but does not allow a game to be launched +.. note:: Using URI method will be the most consistent between various games, but does not allow a game to be launched using the "Command" and therefore the stream will not end when the game ends. URI (Steam) """"""""""" -+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+ -| **Field** | **Linux** | **macOS** | **Windows** | -+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+ -| Application Name | ``Surviving Mars`` | -+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+ -| Detached Commands | ``setsid steam steam://rungameid/464920`` | ``open steam://rungameid/464920`` | ``cmd /C "start steam://rungameid/464920"`` | -+----------------------+-------------------------------------------+-----------------------------------+---------------------------------------------+ +.. tab:: Linux + + +----------------------+-------------------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+-------------------------------------------+ + | Detached Commands | ``setsid steam steam://rungameid/464920`` | + +----------------------+-------------------------------------------+ + +.. tab:: macOS + + +----------------------+-----------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+-----------------------------------+ + | Detached Commands | ``open steam://rungameid/464920`` | + +----------------------+-----------------------------------+ + +.. tab:: Windows + + +----------------------+---------------------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+---------------------------------------------+ + | Detached Commands | ``cmd /C "start steam://rungameid/464920"`` | + +----------------------+---------------------------------------------+ Binary (Steam w/ working directory) """"""""""""""""""""""""""""""""""" -+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+ -| **Field** | **Linux** | **macOS** | **Windows** | -+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+ -| Application Name | ``Surviving Mars`` | -+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+ -| Command | ``MarsSteam`` | ``cmd /c "MarsSteam.exe"`` | -+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+ -| Working Directory | ``~/.steam/steam/SteamApps/common/Survivng Mars`` | ``C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars`` | -+----------------------+-------------------------+-------------------------+------------------------------------------------------------------+ +.. tab:: Linux + + +----------------------+---------------------------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+---------------------------------------------------+ + | Command | ``MarsSteam`` | + +----------------------+---------------------------------------------------+ + | Working Directory | ``~/.steam/steam/SteamApps/common/Survivng Mars`` | + +----------------------+---------------------------------------------------+ + +.. tab:: macOS + + +----------------------+---------------------------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+---------------------------------------------------+ + | Command | ``MarsSteam`` | + +----------------------+---------------------------------------------------+ + | Working Directory | ``~/.steam/steam/SteamApps/common/Survivng Mars`` | + +----------------------+---------------------------------------------------+ + +.. tab:: Windows + + +----------------------+------------------------------------------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+------------------------------------------------------------------+ + | Command | ``MarsSteam.exe`` | + +----------------------+------------------------------------------------------------------+ + | Working Directory | ``C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars`` | + +----------------------+------------------------------------------------------------------+ Binary (Steam w/o working directory) """""""""""""""""""""""""""""""""""" -+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+ -| **Field** | **Linux** | **macOS** | **Windows** | -+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+ -| Application Name | ``Surviving Mars`` | -+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+ -| Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` | ``"C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars\MarsSteam.exe"`` | -+----------------------+------------------------------+------------------------------+----------------------------------------------------------------------------------+ +.. tab:: Linux -Linux ------ + +----------------------+-------------------------------------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+-------------------------------------------------------------+ + | Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` | + +----------------------+-------------------------------------------------------------+ -Changing Resolution and Refresh Rate (Linux - X11) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. tab:: macOS -+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| **Field** | **Value** | -+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| Command Preparations | Do: ``sh -c "xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}\" --rate ${SUNSHINE_CLIENT_FPS}"`` | -| +---------------------------------------------------------------------------------------------------------------------------------------+ -| | Undo: ``xrandr --output HDMI-1 --mode 3840x2160 --rate 120`` | -+----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------+-------------------------------------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+-------------------------------------------------------------+ + | Command | ``~/.steam/steam/SteamApps/common/Survivng Mars/MarsSteam`` | + +----------------------+-------------------------------------------------------------+ -.. hint:: - The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS and iOS devices, since they use non standard resolutions. +.. tab:: Windows - You can update the ``Do`` command to this: - .. code-block:: bash + +----------------------+----------------------------------------------------------------------------------+ + | Application Name | ``Surviving Mars`` | + +----------------------+----------------------------------------------------------------------------------+ + | Command | ``"C:\Program Files (x86)\Steam\steamapps\common\Surviving Mars\MarsSteam.exe"`` | + +----------------------+----------------------------------------------------------------------------------+ - bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\"" +Prep Commands +------------- - The ``set-custom-res.sh`` will have this content: - .. code-block:: bash - - #!/bin/bash - - # Get params and set any defaults - width=${1:-1920} - height=${2:-1080} - refresh_rate=${3:-60} - - # You may need to adjust the scaling differently so the UI/text isn't too small / big - scale=${4:-0.55} - - # Get the name of the active display - display_output=$(xrandr | grep " connected" | awk '{ print $1 }') - - # Get the modeline info from the 2nd row in the cvt output - modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2') - xrandr_mode_str=${modeline//Modeline \"*\" /} - mode_alias="${width}x${height}" - - echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}" - xrandr --newmode ${mode_alias} ${xrandr_mode_str} - xrandr --addmode ${display_output} ${mode_alias} - - # Reset scaling - xrandr --output ${display_output} --scale 1 - - # Apply new xrandr mode - xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale} - - # Optional reset your wallpaper to fit to new resolution - # xwallpaper --zoom /path/to/wallpaper.png - -Changing Resolution and Refresh Rate (Linux - Wayland) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| **Field** | **Value** | -+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+ -| Command Preparations | Do: ``sh -c "wlr-xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz\""`` | -| +-------------------------------------------------------------------------------------------------------------------------------------+ -| | Undo: ``wlr-xrandr --output HDMI-1 --mode 3840x2160@120Hz`` | -+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - -Changing Resolution and Refresh Rate (Linux - KDE Plasma - Wayland and X11) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -+----------------------+----------------------------------------------------------------------------------------------------------------------------------+ -| **Field** | **Value** | -+----------------------+----------------------------------------------------------------------------------------------------------------------------------+ -| Command Preparations | Do: ``sh -c "kscreen-doctor output.HDMI-A-1.mode.${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}"`` | -| +----------------------------------------------------------------------------------------------------------------------------------+ -| | Undo: ``kscreen-doctor output.HDMI-A-1.mode.3840x2160@120`` | -+----------------------+----------------------------------------------------------------------------------------------------------------------------------+ - -Changing Resolution (Linux - NVIDIA) +Changing Resolution and Refresh Rate ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -+----------------------+------------------------------------------------------------------------------------------------------+ -| **Field** | **Value** | -+----------------------+------------------------------------------------------------------------------------------------------+ -| Command Preparations | Do: ``sh -c "${HOME}/scripts/set-custom-res.sh ${SUNSHINE_CLIENT_WIDTH} ${SUNSHINE_CLIENT_HEIGHT}"`` | -| +------------------------------------------------------------------------------------------------------+ -| | Undo: ``sh -c "${HOME}/scripts/set-custom-res.sh 3840 2160"`` | -+----------------------+------------------------------------------------------------------------------------------------------+ +.. tab:: Linux -The ``set-custom-res.sh`` will have this content: - .. code-block:: bash + .. tab:: X11 - #!/bin/bash + +----------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | Command Preparations | Do: ``sh -c "xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}\" --rate ${SUNSHINE_CLIENT_FPS}"`` | + | +------------------------------------------------------------------------------------------------------------------------------------+ + | | Undo: ``xrandr --output HDMI-1 --mode 3840x2160 --rate 120`` | + +----------------------+------------------------------------------------------------------------------------------------------------------------------------+ - # Get params and set any defaults - width=${1:-1920} - height=${2:-1080} - output=${3:-HDMI-1} - nvidia-settings -a CurrentMetaMode="${output}: nvidia-auto-select { ViewPortIn=${width}x${height}, ViewPortOut=${width}x${height}+0+0 }" + .. hint:: + The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS and iOS devices, since they use non standard resolutions. -Flatpak -^^^^^^^ + You can update the ``Do`` command to this: + .. code-block:: bash -.. Attention:: Because Flatpak packages run in a sandboxed environment and do not normally have access to the host, - the Flatpak of Sunshine requires commands to be prefixed with ``flatpak-spawn --host``. + bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\"" -macOS ------ + The ``set-custom-res.sh`` will have this content: + .. code-block:: bash -Changing Resolution and Refresh Rate (macOS) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + #!/bin/bash -.. Note:: This example uses the `displayplacer` tool to change the resolution. - This tool can be installed following instructions in their - `GitHub repository `__. + # Get params and set any defaults + width=${1:-1920} + height=${2:-1080} + refresh_rate=${3:-60} -+----------------------+-----------------------------------------------------------------------------------------------+ -| **Field** | **Value** | -+----------------------+-----------------------------------------------------------------------------------------------+ -| Command Preparations | Do: ``displayplacer "id: res:1920x1080 hz:60 scaling:on origin:(0,0) degree:0"`` | -| +-----------------------------------------------------------------------------------------------+ -| | Undo: ``displayplacer "id: res:3840x2160 hz:120 scaling:on origin:(0,0) degree:0"`` | -+----------------------+-----------------------------------------------------------------------------------------------+ + # You may need to adjust the scaling differently so the UI/text isn't too small / big + scale=${4:-0.55} -Windows -------- + # Get the name of the active display + display_output=$(xrandr | grep " connected" | awk '{ print $1 }') -Changing Resolution and Refresh Rate (Windows) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + # Get the modeline info from the 2nd row in the cvt output + modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2') + xrandr_mode_str=${modeline//Modeline \"*\" /} + mode_alias="${width}x${height}" -.. Note:: This example uses the `QRes` tool to change the resolution and refresh rate. - This tool can be downloaded from their `SourceForge repository `__. + echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}" + xrandr --newmode ${mode_alias} ${xrandr_mode_str} + xrandr --addmode ${display_output} ${mode_alias} -+----------------------+------------------------------------------------------------------------------------------------------------------+ -| **Field** | **Value** | -+----------------------+------------------------------------------------------------------------------------------------------------------+ -| Command Preparations | Do: ``cmd /C FullPath\qres.exe /x:%SUNSHINE_CLIENT_WIDTH% /y:%SUNSHINE_CLIENT_HEIGHT% /r:%SUNSHINE_CLIENT_FPS%`` | -| +------------------------------------------------------------------------------------------------------------------+ -| | Undo: ``cmd /C FullPath\qres.exe /x:3840 /y:2160 /r:120`` | -+----------------------+------------------------------------------------------------------------------------------------------------------+ + # Reset scaling + xrandr --output ${display_output} --scale 1 -Elevating Commands (Windows) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + # Apply new xrandr mode + xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale} -If you've installed Sunshine as a service (default), you can now specify if a command should be elevated with adminsitrative privileges. -Simply enable the elevated option in the WEB UI, or add it to the JSON configuration. -This is an option for both prep-cmd and regular commands and will launch the process with the current user without a UAC prompt. + # Optional reset your wallpaper to fit to new resolution + # xwallpaper --zoom /path/to/wallpaper.png -.. Note:: It's important to write the values "true" and "false" as string values, not as the typical true/false values in most JSON. + .. tab:: Wayland -**Example** - .. code-block:: json + +----------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | Command Preparations | Do: ``sh -c "wlr-xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz\""`` | + | +-----------------------------------------------------------------------------------------------------------------------------------+ + | | Undo: ``wlr-xrandr --output HDMI-1 --mode 3840x2160@120Hz`` | + +----------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - { - "name": "Game With AntiCheat that Requires Admin", - "output": "", - "cmd": "ping 127.0.0.1", - "exclude-global-prep-cmd": "false", - "elevated": "true", - "prep-cmd": [ - { - "do": "powershell.exe -command \"Start-Streaming\"", - "undo": "powershell.exe -command \"Stop-Streaming\"", - "elevated": "false" - } - ], - "image-path": "" - } + .. tab:: KDE Plasma (Wayland, X11) + + +----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | Command Preparations | Do: ``sh -c "kscreen-doctor output.HDMI-A-1.mode.${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}"`` | + | +----------------------------------------------------------------------------------------------------------------------------------+ + | | Undo: ``kscreen-doctor output.HDMI-A-1.mode.3840x2160@120`` | + +----------------------+----------------------------------------------------------------------------------------------------------------------------------+ + + .. tab:: NVIDIA + + +----------------------+------------------------------------------------------------------------------------------------------+ + | Command Preparations | Do: ``sh -c "${HOME}/scripts/set-custom-res.sh ${SUNSHINE_CLIENT_WIDTH} ${SUNSHINE_CLIENT_HEIGHT}"`` | + | +------------------------------------------------------------------------------------------------------+ + | | Undo: ``sh -c "${HOME}/scripts/set-custom-res.sh 3840 2160"`` | + +----------------------+------------------------------------------------------------------------------------------------------+ + + The ``set-custom-res.sh`` will have this content: + .. code-block:: bash + + #!/bin/bash + + # Get params and set any defaults + width=${1:-1920} + height=${2:-1080} + output=${3:-HDMI-1} + nvidia-settings -a CurrentMetaMode="${output}: nvidia-auto-select { ViewPortIn=${width}x${height}, ViewPortOut=${width}x${height}+0+0 }" + +.. tab:: macOS + + .. tab:: displayplacer + + .. note:: This example uses the `displayplacer` tool to change the resolution. + This tool can be installed following instructions in their + `GitHub repository `__. + + +----------------------+-----------------------------------------------------------------------------------------------+ + | Command Preparations | Do: ``displayplacer "id: res:1920x1080 hz:60 scaling:on origin:(0,0) degree:0"`` | + | +-----------------------------------------------------------------------------------------------+ + | | Undo: ``displayplacer "id: res:3840x2160 hz:120 scaling:on origin:(0,0) degree:0"`` | + +----------------------+-----------------------------------------------------------------------------------------------+ + +.. tab:: Windows + + .. tab:: QRes + + .. note:: This example uses the `QRes` tool to change the resolution and refresh rate. + This tool can be downloaded from their `SourceForge repository `__. + + +----------------------+------------------------------------------------------------------------------------------------------------------+ + | Command Preparations | Do: ``cmd /C FullPath\qres.exe /x:%SUNSHINE_CLIENT_WIDTH% /y:%SUNSHINE_CLIENT_HEIGHT% /r:%SUNSHINE_CLIENT_FPS%`` | + | +------------------------------------------------------------------------------------------------------------------+ + | | Undo: ``cmd /C FullPath\qres.exe /x:3840 /y:2160 /r:120`` | + +----------------------+------------------------------------------------------------------------------------------------------------------+ + +Additional Considerations +------------------------- + +.. tab:: Linux + + .. tab:: Flatpak + + .. attention:: Because Flatpak packages run in a sandboxed environment and do not normally have access to the + host, the Flatpak of Sunshine requires commands to be prefixed with ``flatpak-spawn --host``. + +.. tab:: Windows + + **Elevating Commands (Windows)** + + If you've installed Sunshine as a service (default), you can specify if a command should be elevated with + administrative privileges. Simply enable the elevated option in the WEB UI, or add it to the JSON configuration. + This is an option for both prep-cmd and regular commands and will launch the process with the current user without a + UAC prompt. + + .. note:: It is important to write the values "true" and "false" as string values, not as the typical true/false + values in most JSON. + + **Example** + .. code-block:: json + + { + "name": "Game With AntiCheat that Requires Admin", + "output": "", + "cmd": "ping 127.0.0.1", + "exclude-global-prep-cmd": "false", + "elevated": "true", + "prep-cmd": [ + { + "do": "powershell.exe -command \"Start-Streaming\"", + "undo": "powershell.exe -command \"Stop-Streaming\"", + "elevated": "false" + } + ], + "image-path": "" + } diff --git a/docs/source/about/guides/guides.rst b/docs/source/about/guides/guides.rst index 3bda39ed..2e72e94f 100644 --- a/docs/source/about/guides/guides.rst +++ b/docs/source/about/guides/guides.rst @@ -7,4 +7,4 @@ Collection of guides written by the community! :maxdepth: 2 app_examples - linux/linux + linux diff --git a/docs/source/about/guides/linux/linux.rst b/docs/source/about/guides/linux.rst similarity index 80% rename from docs/source/about/guides/linux/linux.rst rename to docs/source/about/guides/linux.rst index 4af2a8c1..a7c456d2 100644 --- a/docs/source/about/guides/linux/linux.rst +++ b/docs/source/about/guides/linux.rst @@ -5,5 +5,6 @@ Collection of Sunshine Linux host guides. .. toctree:: :maxdepth: 1 + :glob: - headless_ssh + linux/* diff --git a/docs/source/about/guides/linux/headless_ssh.rst b/docs/source/about/guides/linux/headless_ssh.rst index 1a4e9439..b86bc8a7 100644 --- a/docs/source/about/guides/linux/headless_ssh.rst +++ b/docs/source/about/guides/linux/headless_ssh.rst @@ -42,7 +42,7 @@ Once you are done, you will need to perform these 3 steps: **Step 2** can be replaced with autologin and starting sunshine as a service or putting ``sunshine &`` in your ``.xinitrc`` file if you start your X server with ``startx``. In this case, the workaround for ``/dev/uinput`` permissions is not needed because the udev rule would be triggered - for "physical" login. See :ref:`Linux Setup `. I personally think autologin compromises the + for "physical" login. See :ref:`Linux Setup `. I personally think autologin compromises the security of the PC, so I went with the remote SSH route. I use the PC more than for gaming, so I don't need a virtual display everytime I turn on the PC (E.g running updates, config changes, file/media server). @@ -264,7 +264,7 @@ we will need to update the sudo configuration to execute this without being prom script to be executed with ``sudo``. .. note:: - After I setup the :ref:`udev rule ` to get access to ``/dev/uinput``, + After I setup the :ref:`udev rule ` to get access to ``/dev/uinput``, I noticed when I sshed into the host without physical login, the ACL permissions on ``/dev/uinput`` were not changed. So I asked `reddit `__. @@ -273,7 +273,7 @@ we will need to update the sudo configuration to execute this without being prom **Setup Script** -This script will take care of any precondtions prior to starting up sunshine. +This script will take care of any preconditions prior to starting up sunshine. Run the following to create a script named something like ``sunshine-setup.sh``: .. code-block:: bash @@ -522,5 +522,5 @@ If you have any feedback and any suggestions, feel free to make a post on Discor .. seealso:: Now that you have a virtual display, you may want to automate changing the resolution - and refresh rate prior to connecting to an app. See :ref:`Changing Resolution and - Refresh Rate ` for more information. + and refresh rate prior to connecting to an app. See :ref:`Changing Resolution and Refresh Rate + ` for more information. diff --git a/docs/source/about/installation.rst b/docs/source/about/installation.rst deleted file mode 100644 index be7510ad..00000000 --- a/docs/source/about/installation.rst +++ /dev/null @@ -1,258 +0,0 @@ -Installation -============ -The recommended method for running Sunshine is to use the `binaries`_ bundled with the `latest release`_. - -.. Attention:: Additional setup is required after installation. See - :ref:`Setup `. - -Binaries --------- -Binaries of Sunshine are created for each release. They are available for Linux, macOS, and Windows. -Binaries can be found in the `latest release`_. - -.. Tip:: Some third party packages also exist. See - :ref:`Third Party Packages `. - -Docker ------- -Docker images are available on `Dockerhub.io`_ and `ghcr.io`_. - -See :ref:`Docker ` for additional information. - -Linux ------ -Follow the instructions for your preferred package type below. - -**CUDA Compatibility** - -CUDA is used for NVFBC capture. - -.. Tip:: See `CUDA GPUS `__ to cross reference Compute Capability to your GPU. - -.. table:: - :widths: auto - - =========================================== ============== ============== ================================ - Package CUDA Version Min Driver CUDA Compute Capabilities - =========================================== ============== ============== ================================ - PKGBUILD User dependent User dependent User dependent - sunshine.AppImage 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 - sunshine.pkg.tar.zst 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 - sunshine_{arch}.flatpak 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90 - sunshine-debian-bookworm-{arch}.deb 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90 - sunshine-debian-bullseye-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 - sunshine-fedora-38-{arch}.rpm unavailable unavailable none - sunshine-fedora-39-{arch}.rpm unavailable unavailable none - sunshine-ubuntu-20.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 - sunshine-ubuntu-22.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 - =========================================== ============== ============== ================================ - -AppImage -^^^^^^^^ -According to AppImageLint the supported distro matrix of the AppImage is below. - -- [✖] Debian oldstable (buster) -- [✔] Debian stable (bullseye) -- [✔] Debian testing (bookworm) -- [✔] Debian unstable (sid) -- [✔] Ubuntu kinetic -- [✔] Ubuntu jammy -- [✔] Ubuntu focal -- [✖] Ubuntu bionic -- [✖] Ubuntu xenial -- [✖] Ubuntu trusty -- [✖] CentOS 7 - -#. Download ``sunshine.AppImage`` to your home directory. -#. Open terminal and run the following code. - - .. code-block:: bash - - ./sunshine.AppImage --install - -Start: - .. code-block:: bash - - ./sunshine.AppImage --install && ./sunshine.AppImage - -Uninstall: - .. code-block:: bash - - ./sunshine.AppImage --remove - -Archlinux PKGBUILD -^^^^^^^^^^^^^^^^^^ -#. Open terminal and run the following code. - - .. code-block:: bash - - wget https://github.com/LizardByte/Sunshine/releases/latest/download/PKGBUILD - makepkg -fi - -Uninstall: - .. code-block:: bash - - pacman -R sunshine - -Archlinux pkg -^^^^^^^^^^^^^ -#. Open terminal and run the following code. - - .. code-block:: bash - - wget https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.pkg.tar.zst - pacman -U --noconfirm sunshine.pkg.tar.zst - -Uninstall: - .. code-block:: bash - - pacman -R sunshine - -Debian Package -^^^^^^^^^^^^^^ -#. Download ``sunshine-{ubuntu-version}.deb`` and run the following code. - - .. code-block:: bash - - sudo apt install -f ./sunshine-{ubuntu-version}.deb - -.. Note:: The ``{ubuntu-version}`` is the version of ubuntu we built the package on. If you are not using Ubuntu and - have an issue with one package, you can try another. - -.. Tip:: You can double click the deb file to see details about the package and begin installation. - -Uninstall: - .. code-block:: bash - - sudo apt remove sunshine - -Flatpak Package -^^^^^^^^^^^^^^^ -#. Install `Flatpak `__ as required. -#. Download ``sunshine_{arch}.flatpak`` and run the following code. - - .. Note:: Be sure to replace ``{arch}`` with the architecture for your operating system. - - System level (recommended) - .. code-block:: bash - - flatpak install --system ./sunshine_{arch}.flatpak - - User level - .. code-block:: bash - - flatpak install --user ./sunshine_{arch}.flatpak - - Additional installation (required) - .. code-block:: bash - - flatpak run --command=additional-install.sh dev.lizardbyte.sunshine - -Start: - X11 and NVFBC capture (X11 Only) - .. code-block:: bash - - flatpak run dev.lizardbyte.sunshine - - KMS capture (Wayland & X11) - .. code-block:: bash - - sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') flatpak run dev.lizardbyte.sunshine - -Uninstall: - .. code-block:: bash - - flatpak run --command=remove-additional-install.sh dev.lizardbyte.sunshine - flatpak uninstall --delete-data dev.lizardbyte.sunshine - -RPM Package -^^^^^^^^^^^ -#. Add `rpmfusion` repositories by running the following code. - - .. code-block:: bash - - sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ - https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm - -#. Download ``sunshine.rpm`` and run the following code. - - .. code-block:: bash - - sudo dnf install ./sunshine.rpm - -.. Tip:: You can double click the rpm file to see details about the package and begin installation. - -Uninstall: - .. code-block:: bash - - sudo dnf remove sunshine - -macOS ------ -Sunshine on macOS is experimental. Gamepads do not work. Other features may not work as expected. - -dmg -^^^ -.. Warning:: The `dmg` does not include runtime dependencies. - -#. Download the ``sunshine.dmg`` file and install it. - -Uninstall: - .. code-block:: bash - - cd /etc/sunshine/assets - uninstall_pkg.sh - -Portfile -^^^^^^^^ -#. Install `MacPorts `__ -#. Update the Macports sources. - - .. code-block:: bash - - sudo nano /opt/local/etc/macports/sources.conf - - Add this line, replacing your username, below the line that starts with ``rsync``. - ``file:///Users//ports`` - - ``Ctrl+x``, then ``Y`` to exit and save changes. - -#. Download the ``Portfile`` to ``~/Downloads`` and run the following code. - - .. code-block:: bash - - mkdir -p ~/ports/multimedia/sunshine - mv ~/Downloads/Portfile ~/ports/multimedia/sunshine/ - cd ~/ports - portindex - sudo port install sunshine - -#. The first time you start Sunshine, you will be asked to grant access to screen recording and your microphone. - -Uninstall: - .. code-block:: bash - - sudo port uninstall sunshine - -Windows -------- - -Installer -^^^^^^^^^ -#. Download and install ``sunshine-windows-installer.exe`` - -.. Attention:: You should carefully select or unselect the options you want to install. Do not blindly install or enable - features. - -To uninstall, find Sunshine in the list `here `__ and select "Uninstall" from the overflow -menu. Different versions of Windows may provide slightly different steps for uninstall. - -Standalone -^^^^^^^^^^ -#. Download and extract ``sunshine-windows-portable.zip`` - -To uninstall, delete the extracted directory which contains the ``sunshine.exe`` file. - -.. _latest release: https://github.com/LizardByte/Sunshine/releases/latest -.. _Dockerhub.io: https://hub.docker.com/repository/docker/lizardbyte/sunshine -.. _ghcr.io: https://github.com/orgs/LizardByte/packages?repo_name=sunshine diff --git a/docs/source/about/setup.rst b/docs/source/about/setup.rst new file mode 100644 index 00000000..bed5d8b7 --- /dev/null +++ b/docs/source/about/setup.rst @@ -0,0 +1,610 @@ +Setup +===== +.. _latest release: https://github.com/LizardByte/Sunshine/releases/latest + +The recommended method for running Sunshine is to use the `binaries`_ bundled with the `latest release`_. + +Binaries +-------- +Binaries of Sunshine are created for each release. They are available for Linux, macOS, and Windows. +Binaries can be found in the `latest release`_. + +.. tip:: Some third party packages also exist. See + :ref:`Third Party Packages `. + No support will be provided for third party packages! + +Install +------- +.. tab:: Docker + + .. warning:: The Docker images are not recommended for most users. No support will be provided! + + Docker images are available on `Dockerhub.io `__ + and `ghcr.io `__. + + See :ref:`Docker ` for additional information. + +.. tab:: Linux + + **CUDA Compatibility** + + CUDA is used for NVFBC capture. + + .. tip:: See `CUDA GPUS `__ to cross reference Compute Capability to your GPU. + + .. table:: + :widths: auto + + =========================================== ============== ============== ================================ + Package CUDA Version Min Driver CUDA Compute Capabilities + =========================================== ============== ============== ================================ + PKGBUILD User dependent User dependent User dependent + sunshine.AppImage 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 + sunshine.pkg.tar.zst 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 + sunshine_{arch}.flatpak 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90 + sunshine-debian-bookworm-{arch}.deb 12.0.0 525.60.13 50;52;60;61;62;70;75;80;86;90 + sunshine-debian-bullseye-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 + sunshine-fedora-38-{arch}.rpm unavailable unavailable none + sunshine-fedora-39-{arch}.rpm unavailable unavailable none + sunshine-ubuntu-20.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 + sunshine-ubuntu-22.04-{arch}.deb 11.8.0 450.80.02 35;50;52;60;61;62;70;75;80;86;90 + =========================================== ============== ============== ================================ + + .. tab:: AppImage + + According to AppImageLint the supported distro matrix of the AppImage is below. + + - ✔ Debian bullseye + - ✔ Debian bookworm + - ✔ Debian trixie + - ✖ Debian sid + - ✔ Ubuntu mantic + - ✔ Ubuntu lunar + - ✔ Ubuntu jammy + - ✔ Ubuntu focal + - ✖ Ubuntu bionic + - ✖ Ubuntu xenial + - ✖ Ubuntu trusty + - ✖ CentOS 7 + + #. Download ``sunshine.AppImage`` to your home directory. + + .. code-block:: bash + + cd ~ + wget https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.AppImage + + #. Open terminal and run the following code. + + .. code-block:: bash + + ./sunshine.AppImage --install + + Start: + .. code-block:: bash + + ./sunshine.AppImage --install && ./sunshine.AppImage + + Uninstall: + .. code-block:: bash + + ./sunshine.AppImage --remove + + .. tab:: Archlinux PKGBUILD + + #. Open terminal and run the following code. + + .. code-block:: bash + + wget https://github.com/LizardByte/Sunshine/releases/latest/download/PKGBUILD + makepkg -fi + + Uninstall: + .. code-block:: bash + + pacman -R sunshine + + .. tab:: Archlinux pkg + + #. Open terminal and run the following code. + + .. code-block:: bash + + wget https://github.com/LizardByte/Sunshine/releases/latest/download/sunshine.pkg.tar.zst + pacman -U --noconfirm sunshine.pkg.tar.zst + + Uninstall: + .. code-block:: bash + + pacman -R sunshine + + .. tab:: Debian Package + + #. Download ``sunshine-{distro}-{distro-version}-{arch}.deb`` and run the following code. + + .. code-block:: bash + + sudo apt install -f ./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. + + .. tip:: You can double click the deb file to see details about the package and begin installation. + + Uninstall: + .. code-block:: bash + + sudo apt remove sunshine + + .. tab:: Flatpak Package + + .. important:: The instructions provided here are for the version supplied in the `latest release`_, which does + not necessarily match the version in the Flathub repository! + + #. Install `Flatpak `__ as required. + #. Download ``sunshine_{arch}.flatpak`` and run the following code. + + .. note:: Be sure to replace ``{arch}`` with the architecture for your operating system. + + System level (recommended) + .. code-block:: bash + + flatpak install --system ./sunshine_{arch}.flatpak + + User level + .. code-block:: bash + + flatpak install --user ./sunshine_{arch}.flatpak + + Additional installation (required) + .. code-block:: bash + + flatpak run --command=additional-install.sh dev.lizardbyte.sunshine + + Start: + X11 and NVFBC capture (X11 Only) + .. code-block:: bash + + flatpak run dev.lizardbyte.sunshine + + KMS capture (Wayland & X11) + .. code-block:: bash + + sudo -i PULSE_SERVER=unix:$(pactl info | awk '/Server String/{print$3}') \ + flatpak run dev.lizardbyte.sunshine + + Uninstall: + .. code-block:: bash + + flatpak run --command=remove-additional-install.sh dev.lizardbyte.sunshine + flatpak uninstall --delete-data dev.lizardbyte.sunshine + + .. tab:: RPM Package + + #. Add `rpmfusion` repositories by running the following code. + + .. code-block:: bash + + sudo dnf install \ + https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ + https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm + + #. Download ``sunshine-{distro}-{distro-version}-{arch}.rpm`` and run the following code. + + .. code-block:: bash + + sudo dnf install ./sunshine-{distro}-{distro-version}-{arch}.rpm + + .. note:: The ``{distro-version}`` is the version of the distro we built the package on. The ``{arch}`` is the + architecture of your operating system. + + .. tip:: You can double click the rpm file to see details about the package and begin installation. + + Uninstall: + .. code-block:: bash + + sudo dnf remove sunshine + + The `deb`, `rpm`, `Flatpak` and `AppImage` packages should handle these steps automatically. + Third party packages may not. + + Sunshine needs access to `uinput` to create mouse and gamepad events. + + #. Create `udev` rules. + .. code-block:: bash + + echo 'KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | \ + sudo tee /etc/udev/rules.d/85-sunshine.rules + + #. Optionally, configure autostart service + + - filename: ``~/.config/systemd/user/sunshine.service`` + - contents: + .. code-block:: cfg + + [Unit] + Description=Sunshine self-hosted game stream host for Moonlight. + StartLimitIntervalSec=500 + StartLimitBurst=5 + + [Service] + ExecStart= + Restart=on-failure + RestartSec=5s + #Flatpak Only + #ExecStop=flatpak kill dev.lizardbyte.sunshine + + [Install] + WantedBy=graphical-session.target + + .. table:: + :widths: auto + + ======== ============================================== =============== + package ExecStart Auto Configured + ======== ============================================== =============== + aur /usr/bin/sunshine ✔ + deb /usr/bin/sunshine ✔ + rpm /usr/bin/sunshine ✔ + AppImage ~/sunshine.AppImage ✔ + Flatpak flatpak run dev.lizardbyte.sunshine ✔ + ======== ============================================== =============== + + **Start once** + .. code-block:: bash + + systemctl --user start sunshine + + **Start on boot** + .. code-block:: bash + + systemctl --user enable sunshine + + #. Additional Setup for KMS + .. note:: ``cap_sys_admin`` may as well be root, except you don't need to be root to run it. It is necessary to + allow Sunshine to use KMS. + + **Enable** + .. code-block:: bash + + sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine)) + + **Disable (for Xorg/X11)** + .. code-block:: bash + + sudo setcap -r $(readlink -f $(which sunshine)) + + #. Reboot + .. code-block:: bash + + sudo reboot now + +.. tab:: macOS + + .. important:: Sunshine on macOS is experimental. Gamepads do not work. Other features may not work as expected. + + .. tab:: dmg + + .. warning:: The `dmg` does not include runtime dependencies. This package is not recommended for most users. + No support will be provided! + + #. Download the ``sunshine.dmg`` file and install it. + + Uninstall: + .. code-block:: bash + + cd /etc/sunshine/assets + uninstall_pkg.sh + + .. tab:: Portfile + + #. Install `MacPorts `__ + #. Update the Macports sources. + + .. code-block:: bash + + sudo nano /opt/local/etc/macports/sources.conf + + Add this line, replacing your username, below the line that starts with ``rsync``. + ``file:///Users//ports`` + + ``Ctrl+x``, then ``Y`` to exit and save changes. + + #. Download the ``Portfile`` to ``~/Downloads`` and run the following code. + + .. code-block:: bash + + mkdir -p ~/ports/multimedia/sunshine + cd ~/ports/multimedia/sunshine + curl -O https://github.com/LizardByte/Sunshine/releases/latest/download/Portfile + cd ~/ports + portindex + sudo port install sunshine + + #. The first time you start Sunshine, you will be asked to grant access to screen recording and your microphone. + + #. Optionally, install service + + .. code-block:: bash + + sudo port load Sunshine + + Uninstall: + .. code-block:: bash + + sudo port uninstall sunshine + + Sunshine can only access microphones on macOS due to system limitations. To stream system audio use + `Soundflower `__ or + `BlackHole `__. + + .. note:: Command Keys are not forwarded by Moonlight. Right Option-Key is mapped to CMD-Key. + + .. caution:: Gamepads are not currently supported. + +.. tab:: Windows + + .. tab:: Installer + + #. Download and install ``sunshine-windows-installer.exe`` + + .. attention:: You should carefully select or unselect the options you want to install. Do not blindly install or + enable features. + + To uninstall, find Sunshine in the list `here `__ and select "Uninstall" from the + overflow menu. Different versions of Windows may provide slightly different steps for uninstall. + + .. tab:: Standalone + + .. warning:: By using this package instead of the installer, performance will be reduced. This package is not + recommended for most users. No support will be provided! + + #. Download and extract ``sunshine-windows-portable.zip`` + #. Open command prompt as administrator + #. Firewall rules + + Install: + .. code-block:: bash + + cd /d {path to extracted directory} + scripts/add-firewall-rule.bat + + Uninstall: + .. code-block:: bash + + cd /d {path to extracted directory} + scripts/delete-firewall-rule.bat + + #. Virtual Gamepad Support + + Install: + .. code-block:: bash + + cd /d {path to extracted directory} + scripts/install-gamepad.bat + + Uninstall: + .. code-block:: bash + + cd /d {path to extracted directory} + scripts/uninstall-gamepad.bat + + #. Windows service + + Install: + .. code-block:: bash + + cd /d {path to extracted directory} + scripts/install-service.bat + scripts/autostart-service.bat + + Uninstall: + .. code-block:: bash + + cd /d {path to extracted directory} + scripts/uninstall-service.bat + + To uninstall, delete the extracted directory which contains the ``sunshine.exe`` file. + +Usage +----- +#. If Sunshine is not installed/running as a service, then start sunshine with the following command, unless a start + command is listed in the specified package `install`_ instructions above. + + .. note:: A service is a process that runs in the background. This is the default when installing Sunshine from the + Windows installer. Running multiple instances of Sunshine is not advised. + + **Basic usage** + .. code-block:: bash + + sunshine + + **Specify config file** + .. code-block:: bash + + sunshine /sunshine.conf + + .. note:: You do not need to specify a config file. + If no config file is entered the default location will be used. + + .. attention:: The configuration file specified will be created if it doesn't exist. + + **Start Sunshine over SSH (Linux/X11)** + Assuming you are already logged into the host, you can use this command + + .. code-block:: bash + + ssh @ 'export DISPLAY=:0; sunshine' + + If you are logged into the host with only a tty (teletypewriter), you can use ``startx`` to start the + X server prior to executing sunshine. + You nay need to add ``sleep`` between ``startx`` and ``sunshine`` to allow more time for the display to be ready. + + .. code-block:: bash + + ssh @ 'startx &; export DISPLAY=:0; sunshine' + + .. tip:: You could also utilize the ``~/.bash_profile`` or ``~/.bashrc`` files to setup the ``DISPLAY`` + variable. + + .. seealso:: + + See :ref:`Remote SSH Headless Setup + ` on + how to setup a headless streaming server without autologin and dummy plugs (X11 + NVidia GPUs) + +#. Configure Sunshine in the web ui + + The web ui is available on `https://localhost:47990 `__ by default. You may replace + `localhost` with your internal ip address. + + .. attention:: Ignore any warning given by your browser about "insecure website". This is due to the SSL certificate + being self signed. + + .. caution:: If running for the first time, make sure to note the username and password that you created. + + #. Add games and applications. + #. Adjust any configuration settings as needed. + +#. In Moonlight, you may need to add the PC manually. +#. When Moonlight requests for you insert the pin: + + - Login to the web ui + - Go to "PIN" in the Navbar + - Type in your PIN and press Enter, you should get a Success Message + - In Moonlight, select one of the Applications listed + +Network +------- +The Sunshine user interface will be available on port 47990 by default. + +.. warning:: Exposing ports to the internet can be dangerous. Do this at your own risk. + +Arguments +--------- +To get a list of available arguments run the following: + +.. tab:: General + + .. code-block:: bash + + sunshine --help + +.. tab:: AppImage + + .. code-block:: bash + + ./sunshine.AppImage --help + +.. tab:: Flatpak + + .. code-block:: bash + + flatpak run --command=sunshine dev.lizardbyte.Sunshine --help + +Shortcuts +--------- +All shortcuts start with ``CTRL + ALT + SHIFT``, just like Moonlight + +- ``CTRL + ALT + SHIFT + N`` - Hide/Unhide the cursor (This may be useful for Remote Desktop Mode for Moonlight) +- ``CTRL + ALT + SHIFT + F1/F12`` - Switch to different monitor for Streaming + +Application List +---------------- +- Applications should be configured via the web UI. +- A basic understanding of working directories and commands is required. +- You can use Environment variables in place of values +- ``$(HOME)`` will be replaced by the value of ``$HOME`` +- ``$$`` will be replaced by ``$``, e.g. ``$$(HOME)`` will be become ``$(HOME)`` +- ``env`` - Adds or overwrites Environment variables for the commands/applications run by Sunshine +- ``"Variable name":"Variable value"`` +- ``apps`` - The list of applications +- Advanced users may want to edit the application list manually. The format is ``json``. +- Example ``json`` application: + .. code-block:: json + + { + "cmd": "command to open app", + "detached": [ + "some-command", + "another-command" + ], + "image-path": "/full-path/to/png-image", + "name": "An App", + "output": "/full-path/to/command-log-file", + "prep-cmd": [ + { + "do": "some-command", + "undo": "undo-that-command" + } + ], + "working-dir": "/full-path/to/working-directory" + } + + - ``cmd`` - The main application + - ``detached`` - A list of commands to be run and forgotten about + + - If not specified, a process is started that sleeps indefinitely + + - ``image-path`` - The full path to the cover art image to use. + - ``name`` - The name of the application/game + - ``output`` - The file where the output of the command is stored + - ``auto-detach`` - Specifies whether the app should be treated as detached if it exits quickly + - ``prep-cmd`` - A list of commands to be run before/after the application + + - If any of the prep-commands fail, starting the application is aborted + - ``do`` - Run before the application + + - If it fails, all ``undo`` commands of the previously succeeded ``do`` commands are run + + - ``undo`` - Run after the application has terminated + + - Failures of ``undo`` commands are ignored + + - ``working-dir`` - The working directory to use. If not specified, Sunshine will use the application directory. + +- For more examples see :ref:`app examples `. + +Considerations +-------------- +- On Windows, Sunshine uses the Desktop Duplication API which only supports capturing from the GPU used for display. + If you want to capture and encode on the eGPU, connect a display or HDMI dummy display dongle to it and run the games + on that display. +- When an application is started, if there is an application already running, it will be terminated. +- When the application has been shutdown, the stream shuts down as well. + + - For example, if you attempt to run ``steam`` as a ``cmd`` instead of ``detached`` the stream will immediately fail. + This is due to the method in which the steam process is executed. Other applications may behave similarly. + - This does not apply to ``detached`` applications. + +- The "Desktop" app works the same as any other application except it has no commands. It does not start an application, + instead it simply starts a stream. If you removed it and would like to get it back, just add a new application with + the name "Desktop" and "desktop.png" as the image path. +- For the Linux flatpak you must prepend commands with ``flatpak-spawn --host``. + +HDR Support +----------- +Streaming HDR content is supported for Windows hosts with NVIDIA, AMD, or Intel GPUs that support encoding HEVC Main 10. +You must have an HDR-capable display or EDID emulator dongle connected to your host PC to activate HDR in Windows. + +- Ensure you enable the HDR option in your Moonlight client settings, otherwise the stream will be SDR. +- A good HDR experience relies on proper HDR display calibration both in Windows and in game. HDR calibration can differ significantly between client and host displays. +- We recommend calibrating the display by streaming the Windows HDR Calibration app to your client device and saving an HDR calibration profile to use while streaming. +- You may also need to tune the brightness slider or HDR calibration options in game to the different HDR brightness capabilities of your client's display. +- Older games that use NVIDIA-specific NVAPI HDR rather than native Windows 10 OS HDR support may not display in HDR. +- Some GPUs can produce lower image quality or encoding performance when streaming in HDR compared to SDR. + +.. seealso:: + `Arch wiki on HDR Support for Linux `__ and + `Reddit Guide for HDR Support for AMD GPUs + `__ + +Tutorials and Guides +-------------------- +Tutorial videos are available `here `_. + +Guides are available :doc:`here <./guides/guides>`. + +.. admonition:: Community! + + Tutorials and Guides are community generated. Want to contribute? Reach out to us on our discord server. diff --git a/docs/source/about/third_party_packages.rst b/docs/source/about/third_party_packages.rst index d45188c4..3d650928 100644 --- a/docs/source/about/third_party_packages.rst +++ b/docs/source/about/third_party_packages.rst @@ -1,7 +1,7 @@ Third Party Packages ==================== -.. Danger:: These packages are not maintained by LizardByte. Use at your own risk. +.. danger:: These packages are not maintained by LizardByte. Use at your own risk. AUR --- @@ -35,18 +35,3 @@ Solus .. image:: https://img.shields.io/badge/dynamic/xml.svg?color=orange&label=Solus&style=for-the-badge&prefix=v&query=%2F%2Ftr%5B%40id%3D%27solus%27%5D%2Ftd%5B3%5D%2Fspan%2Fa&url=https%3A%2F%2Frepology.org%2Fproject%2Fsunshine%2Fversions&logo=solus :alt: Solus Version :target: https://dev.getsol.us/source/sunshine - -Legacy GitHub Repo ------------------- - -.. Attention:: This repo is not maintained. Thank you to Loki for bringing this amazing project to life! - -.. image:: https://img.shields.io/static/v1.svg?label=repo&message=loki-47-6F-64/sunshine&color=blue&style=for-the-badge&logo=github - :alt: GitHub Maintainer - :target: https://github.com/loki-47-6F-64/sunshine/releases - -.. image:: https://img.shields.io/github/last-commit/loki-47-6F-64/sunshine.svg?style=for-the-badge&logo=github - :alt: GitHub last commit - -.. image:: https://img.shields.io/github/release-date/loki-47-6F-64/sunshine.svg?style=for-the-badge&logo=github - :alt: GitHub Release Date diff --git a/docs/source/about/usage.rst b/docs/source/about/usage.rst deleted file mode 100644 index b59df128..00000000 --- a/docs/source/about/usage.rst +++ /dev/null @@ -1,314 +0,0 @@ -Usage -===== -#. See the `setup`_ section for your specific OS. -#. If you did not install the service, then start sunshine with the following command, unless a start command is listed - in the specified package :ref:`installation ` instructions. - - .. Note:: A service is a process that runs in the background. Running multiple instances of Sunshine is not - advised. - - **Basic usage** - .. code-block:: bash - - sunshine - - **Specify config file** - .. code-block:: bash - - sunshine /sunshine.conf - - .. Note:: You do not need to specify a config file. If no config file is entered the default location will be used. - - .. Attention:: The configuration file specified will be created if it doesn't exist. - - **Start Sunshine over SSH (Linux/X11)** - Assuming you are already logged into the host, you can use this command - - .. code-block:: bash - - ssh @ 'export DISPLAY=:0; sunshine' - - If you are logged into the host with only a tty (teletypewriter), you can use ``startx`` to start the - X server prior to executing sunshine. - You nay need to add ``sleep`` between ``startx`` and ``sunshine`` to allow more time for the display to be ready. - - .. code-block:: bash - - ssh @ 'startx &; export DISPLAY=:0; sunshine' - - .. tip:: You could also utilize the ``~/.bash_profile`` or ``~/.bashrc`` files to setup the ``DISPLAY`` - variable. - - .. seealso:: - - See :ref:`Remote SSH Headless Setup - ` on - how to setup a headless streaming server without autologin and dummy plugs (X11 + NVidia GPUs) - -#. Configure Sunshine in the web ui - - The web ui is available on `https://localhost:47990 `__ by default. You may replace - `localhost` with your internal ip address. - - .. Attention:: Ignore any warning given by your browser about "insecure website". This is due to the SSL certificate - being self signed. - - .. Caution:: If running for the first time, make sure to note the username and password that you created. - - **Add games and applications.** - This can be configured in the web ui. - - .. Note:: Additionally, apps can be configured manually. `src_assets//config/apps.json` is an example of a - list of applications that are started just before running a stream. This is the directory within the GitHub - repo. - -#. In Moonlight, you may need to add the PC manually. -#. When Moonlight request you insert the correct pin on sunshine: - - - Login to the web ui - - Go to "PIN" in the Navbar - - Type in your PIN and press Enter, you should get a Success Message - - In Moonlight, select one of the Applications listed - -Network -------- -The Sunshine user interface will be available on port 47990 by default. - -.. Warning:: Exposing ports to the internet can be dangerous. Do this at your own risk. - -Arguments ---------- -To get a list of available arguments run the following: - .. code-block:: bash - - sunshine --help - -Setup ------ - -Linux -^^^^^ -The `deb`, `rpm`, `Flatpak` and `AppImage` packages handle these steps automatically. Third party packages may not. - -Sunshine needs access to `uinput` to create mouse and gamepad events. - -#. Create `udev` rules. - .. code-block:: bash - - echo 'KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"' | \ - sudo tee /etc/udev/rules.d/85-sunshine.rules - -#. Optionally, configure autostart service - - - filename: ``~/.config/systemd/user/sunshine.service`` - - contents: - .. code-block:: cfg - - [Unit] - Description=Sunshine self-hosted game stream host for Moonlight. - StartLimitIntervalSec=500 - StartLimitBurst=5 - - [Service] - ExecStart= - Restart=on-failure - RestartSec=5s - #Flatpak Only - #ExecStop=flatpak kill dev.lizardbyte.sunshine - - [Install] - WantedBy=graphical-session.target - - .. table:: - :widths: auto - - ======== ============================================== =============== - package ExecStart Auto Configured - ======== ============================================== =============== - aur /usr/bin/sunshine ✔ - deb /usr/bin/sunshine ✔ - rpm /usr/bin/sunshine ✔ - AppImage ~/sunshine.AppImage ✔ - Flatpak flatpak run dev.lizardbyte.sunshine ✔ - ======== ============================================== =============== - - **Start once** - .. code-block:: bash - - systemctl --user start sunshine - - **Start on boot** - .. code-block:: bash - - systemctl --user enable sunshine - -#. Additional Setup for KMS - .. Note:: ``cap_sys_admin`` may as well be root, except you don't need to be root to run it. It is necessary to - allow Sunshine to use KMS. - - **Enable** - .. code-block:: bash - - sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine)) - - **Disable (for Xorg/X11)** - .. code-block:: bash - - sudo setcap -r $(readlink -f $(which sunshine)) - -#. Reboot - .. code-block:: bash - - sudo reboot now - -macOS -^^^^^ -Sunshine can only access microphones on macOS due to system limitations. To stream system audio use -`Soundflower `__ or -`BlackHole `__. - -.. Note:: Command Keys are not forwarded by Moonlight. Right Option-Key is mapped to CMD-Key. - -.. Caution:: Gamepads are not currently supported. - -Configure autostart service - **MacPorts** - .. code-block:: bash - - sudo port load Sunshine - -Windows -^^^^^^^ -For gamepad support, install `Nefarius Virtual Gamepad `__ - -Sunshine firewall - **Add rule** - .. code-block:: batch - - cd /d "C:\Program Files\Sunshine\scripts" - add-firewall-rule.bat - - **Remove rule** - .. code-block:: batch - - cd /d "C:\Program Files\Sunshine\scripts" - remove-firewall-rule.bat - -Sunshine service - **Enable** - .. code-block:: batch - - cd /d "C:\Program Files\Sunshine\scripts" - install-service.bat - - **Disable** - .. code-block:: batch - - cd /d "C:\Program Files\Sunshine\scripts" - uninstall-service.bat - -Shortcuts ---------- -All shortcuts start with ``CTRL + ALT + SHIFT``, just like Moonlight - -- ``CTRL + ALT + SHIFT + N`` - Hide/Unhide the cursor (This may be useful for Remote Desktop Mode for Moonlight) -- ``CTRL + ALT + SHIFT + F1/F12`` - Switch to different monitor for Streaming - -Application List ----------------- -- Applications should be configured via the web UI. -- A basic understanding of working directories and commands is required. -- You can use Environment variables in place of values -- ``$(HOME)`` will be replaced by the value of ``$HOME`` -- ``$$`` will be replaced by ``$``, e.g. ``$$(HOME)`` will be become ``$(HOME)`` -- ``env`` - Adds or overwrites Environment variables for the commands/applications run by Sunshine -- ``"Variable name":"Variable value"`` -- ``apps`` - The list of applications -- Advanced users may want to edit the application list manually. The format is ``json``. -- Example ``json`` application: - .. code-block:: json - - { - "cmd": "command to open app", - "detached": [ - "some-command", - "another-command" - ], - "image-path": "/full-path/to/png-image", - "name": "An App", - "output": "/full-path/to/command-log-file", - "prep-cmd": [ - { - "do": "some-command", - "undo": "undo-that-command" - } - ], - "working-dir": "/full-path/to/working-directory" - } - - - ``cmd`` - The main application - - ``detached`` - A list of commands to be run and forgotten about - - - If not specified, a process is started that sleeps indefinitely - - - ``image-path`` - The full path to the cover art image to use. - - ``name`` - The name of the application/game - - ``output`` - The file where the output of the command is stored - - ``auto-detach`` - Specifies whether the app should be treated as detached if it exits quickly - - ``prep-cmd`` - A list of commands to be run before/after the application - - - If any of the prep-commands fail, starting the application is aborted - - ``do`` - Run before the application - - - If it fails, all ``undo`` commands of the previously succeeded ``do`` commands are run - - - ``undo`` - Run after the application has terminated - - - Failures of ``undo`` commands are ignored - - - ``working-dir`` - The working directory to use. If not specified, Sunshine will use the application directory. - -- For more examples see :ref:`app examples `. - -Considerations --------------- -- On Windows, Sunshine uses the Desktop Duplication API which only supports capturing from the GPU used for display. - If you want to capture and encode on the eGPU, connect a display or HDMI dummy display dongle to it and run the games - on that display. -- When an application is started, if there is an application already running, it will be terminated. -- When the application has been shutdown, the stream shuts down as well. - - - For example, if you attempt to run ``steam`` as a ``cmd`` instead of ``detached`` the stream will immediately fail. - This is due to the method in which the steam process is executed. Other applications may behave similarly. - -- The "Desktop" app works the same as any other application except it has no commands. It does not start an application, - instead it simply starts a stream. If you removed it and would like to get it back, just add a new application with - the name "Desktop" and "desktop.png" as the image path. -- For the Linux flatpak you must prepend commands with ``flatpak-spawn --host``. - -HDR Support ------------ -Streaming HDR content is supported for Windows hosts with NVIDIA, AMD, or Intel GPUs that support encoding HEVC Main 10. -You must have an HDR-capable display or EDID emulator dongle connected to your host PC to activate HDR in Windows. - -- Ensure you enable the HDR option in your Moonlight client settings, otherwise the stream will be SDR. -- A good HDR experience relies on proper HDR display calibration both in Windows and in game. HDR calibration can differ significantly between client and host displays. -- We recommend calibrating the display by streaming the Windows HDR Calibration app to your client device and saving an HDR calibration profile to use while streaming. -- You may also need to tune the brightness slider or HDR calibration options in game to the different HDR brightness capabilities of your client's display. -- Older games that use NVIDIA-specific NVAPI HDR rather than native Windows 10 OS HDR support may not display in HDR. -- Some GPUs can produce lower image quality or encoding performance when streaming in HDR compared to SDR. - -.. seealso:: - `Arch wiki on HDR Support for Linux `__ and - `Reddit Guide for HDR Support for AMD GPUs - `__ - -Tutorials and Guides --------------------- -Tutorial videos are available `here `_. - -Guides are available :doc:`here <./guides/guides>`. - -.. admonition:: Community! - - Tutorials and Guides are community generated. Want to contribute? Reach out to us on our discord server. diff --git a/docs/source/building/linux.rst b/docs/source/building/linux.rst index 9982998c..fdd8be7f 100644 --- a/docs/source/building/linux.rst +++ b/docs/source/building/linux.rst @@ -183,7 +183,7 @@ CUDA ---- If the version of CUDA available from your distro is not adequate, manually install CUDA. -.. Tip:: The version of CUDA you use will determine compatibility with various GPU generations. +.. tip:: The version of CUDA you use will determine compatibility with various GPU generations. See `CUDA compatibility `__ for more info. Select the appropriate run file based on your desired CUDA version and architecture according to @@ -199,7 +199,7 @@ If the version of CUDA available from your distro is not adequate, manually inst Build ----- -.. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing. +.. attention:: Ensure you are in the build directory created during the clone step earlier before continuing. .. code-block:: bash diff --git a/docs/source/building/macos.rst b/docs/source/building/macos.rst index d64e4572..c14751c2 100644 --- a/docs/source/building/macos.rst +++ b/docs/source/building/macos.rst @@ -26,7 +26,7 @@ Install Requirements Build ----- -.. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing. +.. attention:: Ensure you are in the build directory created during the clone step earlier before continuing. .. code-block:: bash diff --git a/docs/source/building/windows.rst b/docs/source/building/windows.rst index 6c8b844f..8e83c58e 100644 --- a/docs/source/building/windows.rst +++ b/docs/source/building/windows.rst @@ -34,7 +34,7 @@ Install dependencies: Build ----- -.. Attention:: Ensure you are in the build directory created during the clone step earlier before continuing. +.. attention:: Ensure you are in the build directory created during the clone step earlier before continuing. .. code-block:: bash diff --git a/docs/source/contributing/localization.rst b/docs/source/contributing/localization.rst index ef2c811c..2ca91280 100644 --- a/docs/source/contributing/localization.rst +++ b/docs/source/contributing/localization.rst @@ -41,10 +41,10 @@ situations. For example if a system tray icon is added it should be localized as std::string msg = boost::locale::translate("Hello world!"); -.. Tip:: More examples can be found in the documentation for +.. tip:: More examples can be found in the documentation for `boost locale `__. -.. Warning:: This is for information only. Contributors should never include manually updated template files, or +.. warning:: This is for information only. Contributors should never include manually updated template files, or manually compiled language files in Pull Requests. Strings are automatically extracted from the code to the `locale/sunshine.po` template file. The generated file is diff --git a/docs/source/contributing/testing.rst b/docs/source/contributing/testing.rst index e3ed0734..e4b3ae10 100644 --- a/docs/source/contributing/testing.rst +++ b/docs/source/contributing/testing.rst @@ -59,5 +59,5 @@ Format inplace with rstfmt Unit Testing ------------ -.. Todo:: Sunshine does not currently have any unit tests. If you would like to help us improve please get in contact +.. todo:: Sunshine does not currently have any unit tests. If you would like to help us improve please get in contact with us, or make a PR with suggested changes. diff --git a/docs/source/gamestream/gamestream.rst b/docs/source/gamestream/gamestream.rst index a0cabbd3..74e468f4 100644 --- a/docs/source/gamestream/gamestream.rst +++ b/docs/source/gamestream/gamestream.rst @@ -8,7 +8,7 @@ Migration --------- We have developed a simple migration tool to help you migrate your GameStream games and apps to Sunshine automatically. Please check out our `GSMS `__ project if you're interested in an automated -migration option. At the time of writing this GSMS offers the ability to migrate your custom games and apps. The +migration option. GSMS offers the ability to migrate your custom and auto-detected games and apps. The working directory, command, and image are all set in Sunshine's ``apps.json`` file. The box-art image is also copied to a specified directory. diff --git a/docs/source/about/changelog.rst b/docs/source/history/changelog.rst similarity index 100% rename from docs/source/about/changelog.rst rename to docs/source/history/changelog.rst diff --git a/docs/source/legal/legal.rst b/docs/source/legal/legal.rst index 4fb55b04..3fd3b8f2 100644 --- a/docs/source/legal/legal.rst +++ b/docs/source/legal/legal.rst @@ -1,6 +1,6 @@ Legal ===== -.. Attention:: This documentation is for informational purposes only and is not intended as legal advice. If you have +.. attention:: This documentation is for informational purposes only and is not intended as legal advice. If you have any legal questions or concerns about using Sunshine, we recommend consulting with a lawyer. Sunshine is licensed under the GPL-3.0 license, which allows for free use and modification of the software. diff --git a/docs/source/source_code/src/platform/common.rst b/docs/source/source_code/src/platform/common.rst index 3e09f6db..ec0ca47a 100644 --- a/docs/source/source_code/src/platform/common.rst +++ b/docs/source/source_code/src/platform/common.rst @@ -1,4 +1,4 @@ common ====== -.. Todo:: Add common.h +.. todo:: Add common.h diff --git a/docs/source/source_code/src/platform/linux/graphics.rst b/docs/source/source_code/src/platform/linux/graphics.rst index 0ecd4b99..2f44e109 100644 --- a/docs/source/source_code/src/platform/linux/graphics.rst +++ b/docs/source/source_code/src/platform/linux/graphics.rst @@ -1,4 +1,4 @@ graphics ======== -.. Todo:: Add graphics.h +.. todo:: Add graphics.h diff --git a/docs/source/source_code/src/platform/linux/misc.rst b/docs/source/source_code/src/platform/linux/misc.rst index 155a8302..2e30a58e 100644 --- a/docs/source/source_code/src/platform/linux/misc.rst +++ b/docs/source/source_code/src/platform/linux/misc.rst @@ -1,4 +1,4 @@ misc ==== -.. Todo:: Add misc.h +.. todo:: Add misc.h diff --git a/docs/source/source_code/src/platform/linux/x11grab.rst b/docs/source/source_code/src/platform/linux/x11grab.rst index 8b8ef0f3..c0c2f7cc 100644 --- a/docs/source/source_code/src/platform/linux/x11grab.rst +++ b/docs/source/source_code/src/platform/linux/x11grab.rst @@ -1,4 +1,4 @@ x11grab ======= -.. Todo:: Add x11grab.h +.. todo:: Add x11grab.h diff --git a/docs/source/source_code/src/platform/macos/av_audio.rst b/docs/source/source_code/src/platform/macos/av_audio.rst index 4d36dfd7..92f04868 100644 --- a/docs/source/source_code/src/platform/macos/av_audio.rst +++ b/docs/source/source_code/src/platform/macos/av_audio.rst @@ -1,4 +1,4 @@ av_audio ======== -.. Todo:: Add av_audio.h +.. todo:: Add av_audio.h diff --git a/docs/source/source_code/src/platform/macos/av_img_t.rst b/docs/source/source_code/src/platform/macos/av_img_t.rst index 74ef60c9..4fa8510d 100644 --- a/docs/source/source_code/src/platform/macos/av_img_t.rst +++ b/docs/source/source_code/src/platform/macos/av_img_t.rst @@ -1,4 +1,4 @@ av_img_t ======== -.. Todo:: Add av_img_t.h +.. todo:: Add av_img_t.h diff --git a/docs/source/source_code/src/platform/macos/av_video.rst b/docs/source/source_code/src/platform/macos/av_video.rst index f6fd1e5b..179b180b 100644 --- a/docs/source/source_code/src/platform/macos/av_video.rst +++ b/docs/source/source_code/src/platform/macos/av_video.rst @@ -1,4 +1,4 @@ av_video ======== -.. Todo:: Add av_video.h +.. todo:: Add av_video.h diff --git a/docs/source/source_code/src/platform/macos/nv12_zero_device.rst b/docs/source/source_code/src/platform/macos/nv12_zero_device.rst index ecab415e..8e236a51 100644 --- a/docs/source/source_code/src/platform/macos/nv12_zero_device.rst +++ b/docs/source/source_code/src/platform/macos/nv12_zero_device.rst @@ -1,4 +1,4 @@ nv12_zero_device ================ -.. Todo:: Add nv12_zero_device.h +.. todo:: Add nv12_zero_device.h diff --git a/docs/source/source_code/src/platform/windows/PolicyConfig.rst b/docs/source/source_code/src/platform/windows/PolicyConfig.rst index 1e6bb024..a47e89ac 100644 --- a/docs/source/source_code/src/platform/windows/PolicyConfig.rst +++ b/docs/source/source_code/src/platform/windows/PolicyConfig.rst @@ -1,4 +1,4 @@ PolicyConfig ============ -.. Todo:: Add PolicyConfig.h +.. todo:: Add PolicyConfig.h diff --git a/docs/source/source_code/src/platform/windows/display.rst b/docs/source/source_code/src/platform/windows/display.rst index b8566de8..033e22e2 100644 --- a/docs/source/source_code/src/platform/windows/display.rst +++ b/docs/source/source_code/src/platform/windows/display.rst @@ -1,4 +1,4 @@ display ======= -.. Todo:: Add display.h +.. todo:: Add display.h diff --git a/docs/source/source_code/src/utility.rst b/docs/source/source_code/src/utility.rst index 08174df6..80ffd14a 100644 --- a/docs/source/source_code/src/utility.rst +++ b/docs/source/source_code/src/utility.rst @@ -1,4 +1,4 @@ utility ======= -.. Todo:: Add utility.h +.. todo:: Add utility.h diff --git a/docs/source/toc.rst b/docs/source/toc.rst index 7b182a2c..53ffe687 100644 --- a/docs/source/toc.rst +++ b/docs/source/toc.rst @@ -3,13 +3,11 @@ :caption: About about/overview - about/installation + about/setup about/docker about/third_party_packages - about/usage about/guides/guides about/advanced_usage - about/changelog .. toctree:: :maxdepth: 2 @@ -54,3 +52,9 @@ :caption: source source_code/source_code + +.. toctree:: + :maxdepth: 2 + :caption: History + + history/changelog diff --git a/docs/source/troubleshooting/linux.rst b/docs/source/troubleshooting/linux.rst index 7458aa58..8fc08b2e 100644 --- a/docs/source/troubleshooting/linux.rst +++ b/docs/source/troubleshooting/linux.rst @@ -13,14 +13,14 @@ If you see the above error in the Sunshine logs, compiling `Mesa` manually, may be required. See the official Mesa3D `Compiling and Installing `__ documentation for instructions. -.. Important:: You must re-enable the disabled encoders. You can do so, by passing the following argument to the build +.. important:: You must re-enable the disabled encoders. You can do so, by passing the following argument to the build system. You may also want to enable decoders, however that is not required for Sunshine and is not covered here. .. code-block:: bash -Dvideo-codecs=h264enc,h265enc -.. Note:: Other build options are listed in the +.. note:: Other build options are listed in the `meson options `__ file. KMS Streaming fails