We use two different approaches to listing the display modes on the system:
- For single-screen configuration use version 1.1 protocol XRRGetScreenInfo/XRRConfigRates/XRRConfigSizes
- For multi-screen configuration use version 1.2 protocol: XRRGetScreenResources/XRRGetOutputInfo/XRRModeInfo
Unfortunately, the current code does not work for some specific double scan modes, it doubles the real refresh rate. If this refresh rate will be passed to the Xserver later it could hang/crash.
The same bug existed in xrandr utility before version 1.4:
https://bugs.freedesktop.org/show_bug.cgi?id=37043
https://gitlab.freedesktop.org/xorg/app/xrandr/commit/7fd4f18b649f22fad4dbf9fc64b69b3e7f172207
Looks like we should drop the code for single-screen configuration, and always use the multi-screen code patched by the fix above.