You are not logged in.

#1 2012-08-28 17:09:32

nghiavd
Member
Registered: 2010-10-02
Posts: 11

Xrandr custom resolution with nvidia driver

My monitor's maximum resolution is not detected properly. It should be 1280x1024 but Intel and Nvidia blob graphics drivers only detect a maximum of 1024x768 on default. I can get custom resolution working perfectly using the Xrandr archwiki on the Intel graphics. A couple of days ago, I bought a new Asus Nvidia 450, tried the same commands from the wiki but it just does not work. I'm stuck at the xrandr --addmode command:

xrandr --addmode VGA-0 1280x1024_60.00
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  153 (RANDR)
  Minor opcode of failed request:  18 (RRAddOutputMode)
  Serial number of failed request:  29
  Current serial number in output stream:  30

P/S: On Windows, this resolution is detected without any tinkering.

Offline

#2 2012-08-28 17:10:57

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Xrandr custom resolution with nvidia driver

The nvidia driver doesn't yet support adding resolutions through the xrandr commandline app. Use MetaModes.

Offline

#3 2012-08-28 17:46:48

nghiavd
Member
Registered: 2010-10-02
Posts: 11

Re: Xrandr custom resolution with nvidia driver

Would you be kind enough to teach me how to use it? I have been searching and all I found is how to set up dual screens, not custom resolution.

Offline

#4 2012-08-28 17:54:03

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: Xrandr custom resolution with nvidia driver

Just google MetaModes nvidia and you'll find lots of info.  Handholding is kind of discouraged around here--or not @ Gusar. wink

Last edited by bgc1954 (2012-08-28 18:20:46)


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#5 2012-08-28 18:13:46

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Xrandr custom resolution with nvidia driver

In theory:

Section "Device"
    Identifier  "Nvidia Card"
    Driver      "nvidia"
    Modeline    "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
    Option      "MetaModes" "1280x1024_60.00"
EndSection

No idea if this also works in practice smile

Another possibility, again only theory:

Section "Monitor"
    Identifier  "Monitor0"
    Modeline    "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
EndSection

Section "Device"
    Identifier  "Nvidia Card"
    Driver      "nvidia"
EndSection

Section "Screen"
    Identifier  "Screen0"
    Device      "Nvidia Card"
    Monitor     "Monitor0"
    SubSection  "Display"
        Depth   32
        Modes   "1280x1024_60.00"
    EndSubSection
EndSection

Offline

#6 2012-08-29 08:59:53

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Xrandr custom resolution with nvidia driver

bgc1954 wrote:

or not @ Gusar. wink

Generally you're right, but xrandr1.2 is new to Nvidia and even I have no idea how exactly things work. Hence the "in theory" remarks in my post smile. So I decided to do a bit of hand-holding this time, because I myself am interested to know whether what I've posted actually works.

Last edited by Gusar (2012-08-29 09:00:34)

Offline

#7 2012-08-29 13:22:54

nghiavd
Member
Registered: 2010-10-02
Posts: 11

Re: Xrandr custom resolution with nvidia driver

After messing around with xorg.conf, I finally got the custom resolution running. This is my xorg.conf:

Section "Monitor"
    # HorizSync source: builtin, VertRefresh source: builtin
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "CRT-1"
    HorizSync       28.0 - 83.0
    VertRefresh     60
    Option         "DPMS"
    Modeline       "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTS 450"
#    Modeline    "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
    Option      "MetaModes" "1280x1024_60.00"
    Option "UseEDID" "FALSE"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
#    Option         "nvidiaXineramaInfoOrder" "CRT-1"
#    Option         "metamodes" "1280x1024_60.00 +0+0"
    SubSection     "Display"
        Depth       24
	Modes      "1280x1024" "1024x768"
    EndSubSection
EndSection

Notice the VertRefresh in Monitor. I have to set it to exactly 60 instead of 43.0 - 72.0 as created from the nvidia-settings.

Offline

Board footer

Powered by FluxBB