[Linux / Ubuntu 20.04.2 LTS "focal"] correct or custom mode lines for secondary monitor

Hello nVidia,

I have two PCs with nVidia cards, one tower under Widnows with GTX 980 the other the laptop under Linux with GTX 1060 (mobile). I’ve got an issue with the second when using the official nVidia driver (460) (whereas the nouveau driver doesn’t have the issue I must point out).

For my professional use in the pandemics, I connected an old iiyama VM Pro 514 (HM204DT) secondary CRT monitor, but yet capable of 1600x1200@100 Hz. Alas the HDMI → VGA converter I use doesn’t support maximum frequencies, but I can still access to 1280x960@100Hz as consolation prize. It’s got huge frequency capabilities indeed. Back in the old days, when it was my primary display, I used it with such high-end settings. Guaranteed.

However, with recent cards, powerful modes aren’t supported anymore. Also, based on EDID, far less modes are accessible than really supported.

Besides, the CRT is my secondary display and the “Monitor1” section I might define (with modelines) seems ignored. I don’t even know if the driver takes modelines into account for the primary display.

  1. How can I specify additional video modes (as I do with nouveau driver with xrandr)? xrandr commands are rejected.
  2. How do I make those video mode settings permanent (in xorg.conf maybe)?
  3. How do I get past the valid EDID limitation to make aforementioned settings possible?

With the help of cvt, I generated the following modelines. How do I make them taken into account?

#GENERATED WITH CVT, UNOFFICIAL, USE AT YOUR OWN RISKS
Section “Monitor”
Identifier “Monitor1”
VendorName “iiyama”
ModelName “HM204DT” # HM204DT Vision Master Pro 514
HorizSync 30.0 - 142.0
VertRefresh 50.0 - 200.0
Option “DPMS”
Modeline “640x400_70.00” 23.25 640 664 720 800 400 403 409 420 -hsync +vsync
Modeline “640x480_60.00” 23.75 640 664 720 800 480 483 487 500 -hsync +vsync
Modeline “640x480_85.00” 35.00 640 664 728 816 480 483 487 507 -hsync +vsync
Modeline “800x600_85.00” 56.75 800 848 928 1056 600 603 607 633 -hsync +vsync
Modeline “1024x768_85.00” 94.50 1024 1096 1200 1376 768 771 775 809 -hsync +vsync
Modeline “1280x1024_85.00” 159.50 1280 1376 1512 1744 1024 1027 1034 1078 -hsync +vsync
Modeline “1600x1200_85.00” 235.00 1600 1728 1896 2192 1200 1203 1207 1262 -hsync +vsync
Modeline “1920x1440_85.00” 339.50 1920 2072 2280 2640 1440 1443 1447 1514 -hsync +vsync
Modeline “2048x1536_85.00” 388.50 2048 2216 2440 2832 1536 1539 1543 1615 -hsync +vsync
Modeline “1024x768_100.00” 112.25 1024 1096 1200 1376 768 771 775 816 -hsync +vsync
Modeline “1280x960_100.00” 177.50 1280 1376 1512 1744 960 963 967 1020 -hsync +vsync
Modeline “1600x1200_100.00” 281.00 1600 1736 1904 2208 1200 1203 1207 1274 -hsync +vsync
Modeline “1024x768_120.00” 137.75 1024 1104 1208 1392 768 771 775 826 -hsync +vsync
Modeline “1280x960_120.00” 217.75 1280 1384 1520 1760 960 963 967 1032 -hsync +vsync
Option “PreferredMode” “1280x960_100.00”
EndSection

Thanks. Regards.

edit#1: after having tested forcing an edid-generator generated EDID with success with the right options:

Option “ConnectedMonitor” “DP-0;HDMI-0”
Option “CustomEDID” “HDMI-0: /etc/X11/edid/HDMI-0_HD204DT_preffered_edid.bin”
Option “IgnoreEDID” “false”
Option “UseEDID” “true”

…I managed to force the video mode of the second screen, but the driver only accepted the 60Hz version of my custom EDID, not the 100Hz (in the standard section of the EDID). So to speak, the driver seems to evict non standard video modes even when the EDID tells it’s the only one that works (leaving me with an active monitor with no modes, yes that’s possible, xrandr even tells this to me).

The EDID:
$ edid-decode 1280x960_100.bin
edid-decode (hex):

00 ff ff ff ff ff ff 00 31 d8 00 00 00 00 00 00
05 16 01 03 6d 21 19 78 ea 5e c0 a4 59 4a 98 25
20 50 54 00 00 00 81 68 01 01 01 01 01 01 01 01
01 01 01 01 01 01 56 45 00 d0 51 c0 3c 30 60 88
34 00 4d fa 10 00 00 1e 00 00 00 ff 00 4c 69 6e
75 78 20 23 30 0a 20 20 20 20 00 00 00 fd 00 63
65 64 66 12 00 0a 20 20 20 20 20 20 00 00 00 fc
00 31 32 38 30 78 39 36 30 5f 31 30 30 0a 00 30


EDID version: 1.3
Manufacturer: LNX Model 0 Serial Number 0
Made in week 5 of 2012
Analog display, Input voltage level: 0.7/0.7 V
Sync: Separate Composite Serration
Maximum image size: 33 cm x 25 cm
Gamma: 2.20
DPMS levels: Standby Suspend Off
RGB color display
First detailed timing is preferred timing
Color Characteristics
Red: 0.6416, 0.3486
Green: 0.2919, 0.5957
Blue: 0.1474, 0.1250
White: 0.3125, 0.3281
Established Timings I & II: none
Standard Timings
1280x960 100.000 Hz 4:3 101.700 kHz 178.992 MHz (GTF)
Detailed mode: Clock 177.500 MHz, 333 mm x 250 mm
1280 1376 1512 1744 ( 96 136 232)
960 963 967 1020 ( 3 4 53)
+hsync +vsync
VertFreq: 99.782 Hz, HorFreq: 101.778 kHz
Display Product Serial Number: Linux #0
Display Range Limits
Monitor ranges (GTF): 99-101 Hz V, 100-102 kHz H, max dotclock 180 MHz
Display Product Name: 1280x960_100
Checksum: 0x30

edit#2:
1280x960@100 below is rejected:
Modeline “1280x960_100” 177.50 1280 1376 1512 1744 960 963 967 1020 -hsync +vsync ratio=4:3 vfreq=100

1280x960@60 is accepted at 60Hz, not using detailed description of the EDID (indeed, below it’s still a 100Hz modeline, but edid-generator forces back to 60Hz in the standard section of the EDID without the vfreq=100 option, the detailed section is still at 100Hz but ignored)
Modeline “1280x960_100” 177.50 1280 1376 1512 1744 960 963 967 1020 -hsync +vsync ratio=4:3