From 5b052d7c2c059aa26fdf79cc87885af2f461f544 Mon Sep 17 00:00:00 2001 From: Ehab Ajmal <33014707+ehabajmal@users.noreply.github.com> Date: Thu, 19 Oct 2023 10:43:42 -0400 Subject: [PATCH] Add guide for setting custom res with nvidia on linux (#1767) Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> --- docs/source/about/guides/app_examples.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/source/about/guides/app_examples.rst b/docs/source/about/guides/app_examples.rst index 4cb45b7d5c1..e0bc543253a 100644 --- a/docs/source/about/guides/app_examples.rst +++ b/docs/source/about/guides/app_examples.rst @@ -197,6 +197,28 @@ Changing Resolution and Refresh Rate (Linux - KDE Plasma - Wayland and X11) | | Undo: ``kscreen-doctor output.HDMI-A-1.mode.3840x2160@120`` | +----------------------+----------------------------------------------------------------------------------------------------------------------------------+ +Changing Resolution (Linux - NVIDIA) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ++----------------------+------------------------------------------------------------------------------------------------------+ +| **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"`` | ++----------------------+------------------------------------------------------------------------------------------------------+ + +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 }" + Flatpak ^^^^^^^