Skip to content

Instantly share code, notes, and snippets.

@lwy123177
Last active July 15, 2023 16:15
Show Gist options
  • Save lwy123177/51b70564fab9faf22a1652ba8c47958f to your computer and use it in GitHub Desktop.
Save lwy123177/51b70564fab9faf22a1652ba8c47958f to your computer and use it in GitHub Desktop.
# Source: https://www.reddit.com/r/SteamDeck/comments/tzfxuh/guide_add_more_1610_screen_resolutions_for_fsr/?sort=new
#!/bin/sh
# New resolution calculate command example:
# $ cvt 640 400 60
#
# outputs:
# Modeline "640x400_60.00" 20.00 640 664 720 800 400 403 409 417 -hsync +vsync
#
# Add new modes below such as:
xrandr --newmode "640x400_60.00" 20.00 640 664 720 800 400 403 409 417 -hsync +vsync
xrandr --newmode "768x480_60.00" 28.75 768 792 864 960 480 483 489 500 -hsync +vsync
xrandr --newmode "800x500_60.00" 30.75 800 824 896 992 500 503 509 521 -hsync +vsync
xrandr --newmode "928x580_60.00" 42.75 928 968 1056 1184 580 583 589 603 -hsync +vsync
xrandr --newmode "960x600_60.00" 45.25 960 992 1088 1216 600 603 609 624 -hsync +vsync
xrandr --newmode "1152x720_60.00" 66.75 1152 1208 1320 1488 720 723 729 748 -hsync +vsync
xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
xrandr --newmode "1920x1200_60.00" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync
xrandr --newmode "2560x1080_60.00" 230.00 2560 2720 2992 3424 1080 1083 1093 1120 -hsync +vsync
xrandr --newmode "2560x1080_75.00" 294.00 2560 2744 3016 3472 1080 1083 1093 1130 -hysnc +vsync
xrandr --newmode "1792x768_60.00" 111.75 1792 1880 2064 2336 768 771 781 798 -hsync +vsync
xrandr --newmode "1792x768_75.00" 143.75 1792 1904 2088 2384 768 771 781 805 -hysnc +vsync
for res in "640x400_60.00" "768x480_60.00" "800x500_60.00" "928x580_60.00" "960x600_60.00" "1152x720_60.00" "1440x900_60.00" "1680x1050_60.00" "1920x1200_60.00" "2560x1080_60.00" "2560x1080_75.00" "1792x768_60.00" "1792x768_75.00"; do
echo "adding $res";
xrandr --addmode XWAYLAND0 $res || continue;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment