hyprctl monitors -j rounds monitor scale to 2 decimals #15151
DescriptionWhen a monitor is configured with a high-precision scale such as This makes the JSON IPC state lossy for tools that need to round-trip monitor configuration or validate whether the resulting logical resolution lands on whole pixels. I originally opened this as issue #15150, but it was auto-closed with a request to open a discussion instead. ReproductionConfigure a monitor with: monitorv2 {
output = desc:Microstep MPG321UR-QD
mode = 3840x2160@143.99
position = 0x0
scale = 1.33333
}Reload Hyprland, then run: hyprctl monitors -jExpected resultThe monitor JSON reports the configured precision: "scale": 1.33333Actual resultThe monitor JSON reports only two decimals: "scale": 1.33Why this mattersFor a 3840x2160 monitor:
That is a sharp integer logical resolution. If tools read back
That looks like a fractional/non-sharp resolution even though the configured value was sharp. VersionNotesThe generated config file contains |
Replies: 1 comment 1 reply
|
I see the same thing with 1.875 hl.monitor({
output = "desc:...",
mode = "3840x2160@240.0",
position = "0x0",
scale = 1.875,
bitdepth = 10
}) |
#15628 fixes this