Skip to content

Commit

Permalink
Add guide for setting custom res with nvidia on linux (LizardByte#1767)
Browse files Browse the repository at this point in the history
Co-authored-by: ReenigneArcher <[email protected]>
  • Loading branch information
ehabajmal and ReenigneArcher authored Oct 19, 2023
1 parent 8096364 commit 5b052d7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/source/about/guides/app_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
^^^^^^^

Expand Down

0 comments on commit 5b052d7

Please sign in to comment.