xrandr : get the precise mode refresh rate like Gnome does

Prunk Dump prunkdump at gmail.com
Sun Sep 1 11:33:10 UTC 2019


I Xorg Team !

I'm the network administrator of a french high school and I need the
generate my Linux client display configuration by command line.

To configure the display, Gnome use a monitors.xml file where the
randr configuration is stored. I know now how to generate the majority
of the entries of this file except the "rate" parameter :

<mode>
  <width>1440</width>
  <height>900</height>
  <rate>59.887443542480469</rate>
</mode>

A rate=60 is not accepted by Gnome. It's seems that I need at least 3
good digits after the dot to make the file work ( rate=59.887 works ).

But the xrandr command give me only 2 digits :
~#  xrandr
Screen 0: minimum 320 x 200, current 2704 x 1050, maximum 8192 x 8192
DP-1 connected primary 1024x768+0+0 (normal left inverted right x axis
y axis) 256mm x 192mm
...
    1440x900      59.89
...

Does someone know how to get this precise refresh rate value from randr ?

Thanks.

Regards,

Baptiste.


More information about the xorg mailing list