Skip to content

Instantly share code, notes, and snippets.

@csgordon
Last active September 20, 2023 18:29
Show Gist options
  • Save csgordon/98892813e37615051670ea6144043c61 to your computer and use it in GitHub Desktop.
Save csgordon/98892813e37615051670ea6144043c61 to your computer and use it in GitHub Desktop.
Forcing correct mode resolution based on (saved) output from cvt
#!/bin/sh
# Secret is the -r option to cvt. The rest of these settings are based on that modeline.
# Also important, for NVidia cards, this only works with the Noveau driver, not the proprietary one.
# cvt -r 2560 1440
xrandr --newmode "2560x1440R" 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync
xrandr --addmode DP-1 "2560x1440R"
xrandr --output DP-1 --mode 2560x1440R --rate 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment