Last active
October 22, 2022 10:40
-
-
Save cnlohr/9375d6fc0097b50f73c4da7b75a20e83 to your computer and use it in GitHub Desktop.
Gettning NVIDIA to allow you to set arbitrary modes in xrandr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hacky, only works with startx, tested, october 2022 with 470.57.01 | |
Section "ServerLayout" | |
Identifier "Layout0" | |
Screen 0 "Screen0" 0 0 | |
InputDevice "Keyboard0" "CoreKeyboard" | |
InputDevice "Mouse0" "CorePointer" | |
Option "Xinerama" "0" | |
EndSection | |
Section "Files" | |
EndSection | |
Section "Module" | |
Load "dbe" | |
Load "extmod" | |
Load "type1" | |
Load "freetype" | |
Load "glx" | |
EndSection | |
Section "InputDevice" | |
# generated from default | |
Identifier "Mouse0" | |
Driver "mouse" | |
Option "Protocol" "auto" | |
Option "Device" "/dev/psaux" | |
Option "Emulate3Buttons" "no" | |
Option "ZAxisMapping" "4 5" | |
EndSection | |
Section "InputDevice" | |
# generated from default | |
Identifier "Keyboard0" | |
Driver "kbd" | |
EndSection | |
Section "Monitor" | |
# HorizSync source: edid, VertRefresh source: edid | |
Identifier "DP-4" | |
VendorName "Unknown" | |
ModelName "AU Optronics Corporation" | |
HorizSync 40.1-275.1 | |
VertRefresh 40-144.0 | |
DisplaySize 192 108 | |
Option "DPMS" | |
#PreferredMode "1920x1080_144" | |
# Adding this gives it a sad. | |
#ModeLine "1920x1080_60" 148.35 1920 2008 2052 2200 1080 1084 1089 1125 +hsync -vsync | |
# WORKS!! | |
Modeline "1920x1080_144" 368.14 1920 1968 2000 2102 1080 1090 1095 1216 +hsync -vsync | |
EndSection | |
Section "Monitor" | |
Identifier "DP-2" | |
HorizSync 15.1 - 175.1 | |
VertRefresh 15.0 - 190 | |
#PreferredMode "nreal_default" | |
Modeline "1920_1080_60" 150 1920 1952 1968 2000 1080 1089 1094 1250 +hsync +vsync | |
# ModeLine "1920x1080_cnl" 148.35 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync # working | |
# ModeLine "1280x720_cnl" 74.18 1280 1390 1430 1650 720 725 730 750 +hsync +vsync # working | |
# ModeLine "640x480_cnl" 25.17 640 656 752 800 480 490 492 525 -hsync -vsync # not working | |
EndSection | |
Section "Device" | |
Identifier "Device0" | |
Driver "nvidia" | |
Option "UseDisplayDevice" "DP-4" | |
Option "Monitor-DP-2" "DP-2" | |
Option "Monitor-DP-4" "DP-4" | |
VendorName "NVIDIA Corporation" | |
BoardName "NVIDIA GeForce RTX 2070" | |
EndSection | |
Section "Screen" | |
Identifier "Screen0" | |
Device "Device0" | |
Monitor "DP-2" | |
Monitor "DP-4" | |
DefaultDepth 24 | |
Option "Stereo" "0" | |
Option "nvidiaXineramaInfoOrder" "DP-4" | |
Option "HorizSync" "DP-2: 25-180; DP-4: 25-180" | |
Option "VertRefresh" "DP-2: 2-180; DP-4: 2-180" | |
# Option "metamodes" "DP-4: 1920x1080_144 +0+0 {AllowGSYNC=Off}, DP-2: nreal_default +1920+0" | |
Option "metamodes" "DP-2: 1920x1080_60 +1920+0; DP-4: 1920x1080_144 +0+0" | |
Option "SLI" "Off" | |
Option "MultiGPU" "Off" | |
Option "BaseMosaic" "off" | |
Option "UseEDID" "false" | |
Option "ModeDebug" "true” | |
#Option "ExactModeTimingsDVI" "true" | |
#Option "ModeValidation" "NoVesaModes, NoXServerModes, NoPredefinedModes, NoEdidModes, NoUserModes, NoMaxPClkCheck" | |
Option "ExactModeTimingsDVI" "true" | |
Option "ModeValidation" "NoEdidModes, NoMaxPClkCheck, AllowNonEdidModes" | |
SubSection "Display" | |
Depth 24 | |
EndSubSection | |
EndSection | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also this is another example of setting modes with EDID disabled.