View Single Post
Old 02-02-07, 07:42 PM   #1
Registered User
Join Date: Jan 2007
Posts: 2
Question modeline syntax? Please hel

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?
tribble222 is offline   Reply With Quote