|
|
#1 | |
|
Registered User
Join Date: Jan 2007
Posts: 2
|
Short version:
What is the proper syntax for the modeline when adding it with XNVCTRLSetStringAttribute? Long version: I compiled the sample program in the nvidia-settings source tarball /nvidia-settings-1.0/samples/nv-control-dpy and am trying to use it to add a modeline to the current modepool. When I run the command ./nv-control-dpy --add-modeline 0x00020000 "1280x720 74.2 1280 1344 1352 1648 720 725 730 750 -HSync -VSync" it returns Failed to add the modeline "1280x720" to DFP-1's mode pool. I also cannot delete modelines even when I copy paste the exact modeline printed when I query all available modelines. All the other functions of the program work perfectly so it must be something to do with my syntax. So I looked at the NVCtrl.h and it says /* * NV_CTRL_STRING_ADD_MODELINE - Adds a ModeLine to the specified * display device. The ModeLine is not added if validation fails. * * The ModeLine string should have the same syntax as a ModeLine in * the X configuration file; e.g., * * "1600x1200" 229.5 1600 1664 1856 2160 1200 1201 1204 1250 +HSync +VSync */ So somehow my modelines aren't passing validation. I even copy-pasted the example modeline and it didn't work. I'm probably doing something stupid. Can anybody tell the exact proper syntax? |
|
|
|
|
|
|
#2 | |
|
Registered User
Join Date: Jan 2007
Posts: 2
|
Update:
I figured out how to successfully remove modelines. When I query the list of available modelines, they come back like source=xserver :: "320x240d60" 12.6 320 328 376 400 240 490 492 524 DoubleScan -HSync -VSync In order to delete that modeline I just refer to it as "320x240d60" when I run the program. i.e. ./nv-control-dpy --delete-modeline 0x00020000 "320x240d60" This works great. I cannot add modelines in the same way however. So I am stuck. |
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Aug 2003
Posts: 1,026
|
The problem is probably not the syntax, but the checks that the driver makes to compare your modeline with the EDID data received from the screen.
E.g. when your screen says "my native resolution is 1280x1024" and you send a modeline that says "use 1600x1200 resolution" the driver will reject the modeline. You can turn that off with an option in the X configuration file. |
|
|
|
|
|
#4 | |
|
Registered User
Join Date: Jan 2007
Posts: 119
|
I'm sorry to bump this ancient thread, but could some developer put some light upon us?
I've disabled the relevant checks in xorg.conf, but i still have that problem. |
|
|
|
|
|
|
#5 |
|
Registered User
|
Sorry to resurrect this very old thread, but not much has changed... so:
I'm trying to use the NV-control API to add modelines. To test, I'm also using the nv-control-dpy sample. It fails to add modelines, on the whole. I got it once, with an odd modeline, but not reliably. Is this an EDID check problem? Our xorg.conf tries to hit every possible 'ignore EDID' flag. Does nv-control not have an equivalent? Bruce |
|
|
|
|
|
#6 | |
|
NVIDIA Corporation
Join Date: Mar 2005
Posts: 2,487
|
Try running "nvidia-xconfig --mode-debug" or starting X with "startx -- -logverbose 6". I believe it will log mode validation failures to /var/log/Xorg.0.log even if they're added at runtime via NV-CONTROL. Hopefully that will tell you why your modes are being rejected.
|
|
|
|
|
|
|
#7 |
|
Registered User
Join Date: Jan 2007
Posts: 119
|
@AaronP, as staded here:
http://www.nvnews.net/vbulletin/showthread.php?t=156273 Even trying to add a 'just deleted and working' modeline, fails. Also, adding a modeline to xorg.conf works, the same modeline is refused when using 'nv-control-dpy --add-modeline' |
|
|
|
|
|
#8 |
|
Registered User
|
@kokoko3k - did you try the startverbose tip and check the log yet? I haven't had a chance.
Bruce |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Jan 2007
Posts: 119
|
Yes i did, all it says is "Invalid modeline"
Here's what i did (successfully removed an edid modeline from the edid pool and unsucessfully tried to add it again) Code:
Gozer ~ # nv-control-dpy --print-used-modelines|grep -i edid DFP-0: source=xserver, source=vesa, source=edid :: "nvidia-auto-select" 108.000 1280 1328 1440 1688 1024 1025 1028 1066 +HSync +VSync DFP-0: source=xserver, source=vesa, source=edid :: "1280x1024_75" 135.000 1280 1296 1440 1688 1024 1025 1028 1066 +HSync +VSync DFP-0: source=xserver, source=vesa, source=edid :: "1280x960_60" 108.000 1280 1376 1488 1800 960 961 964 1000 +HSync +VSync DFP-0: source=xserver, source=vesa, source=edid :: "1152x864" 108.000 1152 1216 1344 1600 864 865 868 900 +HSync +VSync DFP-0: source=xserver, source=vesa, source=edid :: "1024x768_75" 78.750 1024 1040 1136 1312 768 769 772 800 +HSync +VSync DFP-0: source=xserver, source=vesa, source=edid :: "1024x768_70" 75.000 1024 1048 1184 1328 768 771 777 806 -HSync -VSync DFP-0: source=xserver, source=vesa, source=edid :: "1024x768_60" 65.000 1024 1048 1184 1344 768 771 777 806 -HSync -VSync DFP-0: source=xserver, source=vesa, source=edid :: "800x600_75" 49.500 800 816 896 1056 600 601 604 625 +HSync +VSync DFP-0: source=xserver, source=vesa, source=edid :: "800x600_72" 50.000 800 856 976 1040 600 637 643 666 +HSync +VSync DFP-0: source=xserver, source=vesa, source=edid :: "800x600_60" 40.000 800 840 968 1056 600 601 605 628 +HSync +VSync DFP-0: source=xserver, source=vesa, source=edid :: "800x600_56" 36.000 800 824 896 1024 600 601 603 625 +HSync +VSync DFP-0: source=xserver, source=vesa, source=edid :: "640x480_75" 31.500 640 656 720 840 480 481 484 500 -HSync -VSync DFP-0: source=edid :: "640x480_73" 31.500 640 656 696 832 480 481 484 520 -HSync -VSync DFP-0: source=edid :: "640x480_60" 25.180 640 648 744 800 480 482 484 525 -HSync -VSync Gozer ~ # nv-control-dpy --delete-modeline 0x00010000 "1024x768_70" Using NV-CONTROL extension 1.27 on :1 Connected Display Devices: DFP-0 (0x00010000): Samsung SyncMaster DFP-1 (0x00020000): Samsung SyncMaster Deleted modeline "1024x768_70" from DFP-0's mode pool. Gozer ~ # nv-control-dpy --add-modeline 0x00010000 "1024x768_70" 75.000 1024 1048 1184 1328 768 771 777 806 -HSync -VSync Using NV-CONTROL extension 1.27 on :1 Connected Display Devices: DFP-0 (0x00010000): Samsung SyncMaster DFP-1 (0x00020000): Samsung SyncMaster Failed to add the modeline "1024x768_70" to DFP-0's mode pool. Gozer ~ # nv-control-dpy --add-modeline 0x00010000 "1024x768_70" "75.000 1024 1048 1184 1328 768 771 777 806 -HSync -VSync" Using NV-CONTROL extension 1.27 on :1 Connected Display Devices: DFP-0 (0x00010000): Samsung SyncMaster DFP-1 (0x00020000): Samsung SyncMaster Failed to add the modeline "1024x768_70" to DFP-0's mode pool. Gozer ~ # nv-control-dpy --add-modeline 0x00010000 "1024x768_70 75.000 1024 1048 1184 1328 768 771 777 806 -HSync -VSync" Using NV-CONTROL extension 1.27 on :1 Connected Display Devices: DFP-0 (0x00010000): Samsung SyncMaster DFP-1 (0x00020000): Samsung SyncMaster Failed to add the modeline "1024x768_70 75.000 1024 1048 1184 1328 768 771 777 806 -HSync -VSync" to DFP-0's mode pool. Code:
Gozer ~ # tail /var/log/Xorg.1.log [355601.374] (II) AT Translated Set 2 keyboard: Configuring as keyboard [355601.374] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD) [355601.374] (**) Option "xkb_rules" "evdev" [355601.374] (**) Option "xkb_model" "evdev" [355601.374] (**) Option "xkb_layout" "it" [355601.374] (II) XKB: Reusing cached keymap [355766.637] (WW) NVIDIA(0): Invalid ModeLine "1024x768_70" [355784.359] (WW) NVIDIA(0): Invalid ModeLine "1024x768_70" [355791.730] (WW) NVIDIA(0): Invalid ModeLine "1024x768_70 75.000 1024 1048 1184 1328 [355791.730] (WW) NVIDIA(0): 768 771 777 806 -HSync -VSync" |
|
|
|
|
|
#10 | |
|
NVIDIA Corporation
Join Date: Mar 2005
Posts: 2,487
|
Quote:
Code:
nv-control-dpy --add-modeline 0x00010000 '"1024x768_70" 75.000 1024 1048 1184 1328 768 771 777 806 -HSync -VSync' |
|
|
|
|
|
|
#11 |
|
Registered User
Join Date: Jan 2007
Posts: 119
|
Great, finally i managed to add a modeline 'runtime', thanks AaronP.
I needed to do both things (double quotes and using a different name) |
|
|
|
|
|
#12 |
|
Registered User
|
So, in nv-control-dpy (and the API), the same thing? I was trying modelines with no name, and that didn't work. The modeline name in quotes should be the key? I'll try it.
Bruce |
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SuSe 8.0 Problems. | GaMMa | NVIDIA Linux | 19 | 09-26-02 06:51 AM |
| Syntax error in rc.modules | Kevin | NVIDIA Linux | 2 | 07-30-02 06:55 PM |
| Syntax error when compiling NVOpenGL SDK | thursto77 | NVIDIA Linux | 2 | 07-29-02 05:55 PM |