You are not logged in.
If the only metric is the xrandr output, do you (still) use
Option "ConstantDPI" "FALSE"
in the device section?
Does
xrandr --output DP-4 --off; xrandr --output DP-4 --auto
alter the size?
Offline
I tried it with commented and uncommented ConstantDPI option - it only works if I physically remove and insert the cable.
I tried xrandr and xset - the physical size is reported incorrectly until I remove the cable.
This seems to be related to the behavior described in kernel mode setting article.
But of course replugging the monitor is very tedious ...
Any more ideas?
Offline
This seems to be related to the behavior described in kernel mode setting article.
If you are doing early KMS, you must include the custom EDID file in the initramfs, otherwise you will run into problems.
Those apply to the drm edid replacement.
Btw. the very first line in this thread was
My monitor is reporting a wrong physical size leading to an incorrect DPI calculation.
And for that you know how to manipulate the DPI to a random value and w/ the DPI disparity between your outputs, that's the only reliable way to get to a desired value anyway.
Offline
However, I need xrandr to report the correct physical size. There are other tools that I use that rely on the output of xrandr.
I know that replugging the monitor temporarily leads to the correct behavior.
Now my question is: What is the mechanism behind replugging the monitor and can this be replicated in software?
Thanks for your help!
Offline
Forget the virtual "replugging", you're trying to undermine HDCP, which will likely require driver exposure.
The interesting question is why the edid isn't applied when the server starts.
nb. your custom edid has
Maximum Image Size : 940 mm x 540 mm
but the detailed timings still have
[ 9505.113] (--) NVIDIA(GPU-0): Image Size : 600 mm x 340 mm
[ 9505.113] (--) NVIDIA(GPU-0): --- EDID for LG Electronics LG HDR 4K (DP-4) ---
[ 9505.113] (--) NVIDIA(GPU-0): EDID Version : 1.4
[ 9505.113] (--) NVIDIA(GPU-0): Manufacturer : GSM
[ 9505.113] (--) NVIDIA(GPU-0): Monitor Name : LG Electronics LG HDR 4K
[ 9505.113] (--) NVIDIA(GPU-0): Product ID : 0x7707
[ 9505.113] (--) NVIDIA(GPU-0): 32-bit Serial Number : 0x000a37a3
[ 9505.113] (--) NVIDIA(GPU-0): Serial Number String :
[ 9505.113] (--) NVIDIA(GPU-0): Manufacture Date : 2020, week 10
[ 9505.113] (--) NVIDIA(GPU-0): DPMS Capabilities : Standby
[ 9505.113] (--) NVIDIA(GPU-0): Input Type : Digital
[ 9505.113] (--) NVIDIA(GPU-0): Prefer first detailed timing : Yes
[ 9505.113] (--) NVIDIA(GPU-0): Supports Continuous Frequency: No
[ 9505.113] (--) NVIDIA(GPU-0): EDID 1.4 YCbCr 422 support : Yes
[ 9505.113] (--) NVIDIA(GPU-0): EDID 1.4 YCbCr 444 support : Yes
[ 9505.113] (--) NVIDIA(GPU-0): Maximum Image Size : 940 mm x 540 mm
[ 9505.113] (--) NVIDIA(GPU-0): Valid HSync Range : 30.0 kHz - 135.0 kHz
[ 9505.113] (--) NVIDIA(GPU-0): Valid VRefresh Range : 56.0 Hz - 61.0 Hz
[ 9505.113] (--) NVIDIA(GPU-0): EDID maximum pixel clock : 560.0 MHz
[ 9505.113] (--) NVIDIA(GPU-0): CEA-861 extension block # : 0
…
[ 9505.113] (--) NVIDIA(GPU-0): Detailed Timings:
[ 9505.113] (--) NVIDIA(GPU-0): 3840 x 2160 @ 60 Hz
[ 9505.113] (--) NVIDIA(GPU-0): Pixel Clock : 533.25 MHz
[ 9505.113] (--) NVIDIA(GPU-0): HRes, HSyncStart : 3840, 3888
[ 9505.113] (--) NVIDIA(GPU-0): HSyncEnd, HTotal : 3920, 4000
[ 9505.113] (--) NVIDIA(GPU-0): VRes, VSyncStart : 2160, 2214
[ 9505.113] (--) NVIDIA(GPU-0): VSyncEnd, VTotal : 2219, 2222
[ 9505.113] (--) NVIDIA(GPU-0): H/V Polarity : +/-
[ 9505.113] (--) NVIDIA(GPU-0): Image Size : 600 mm x 340 mm
[ 9505.113] (--) NVIDIA(GPU-0): RGB 444 bpcs : 6, 8, 10
[ 9505.113] (--) NVIDIA(GPU-0): YUV 444 bpcs : 8, 10
[ 9505.113] (--) NVIDIA(GPU-0): YUV 422 bpcs : 8, 10
[ 9505.113] (--) NVIDIA(GPU-0): 3840 x 1136 @ 18 Hz
[ 9505.113] (--) NVIDIA(GPU-0): Pixel Clock : 266.64 MHz
[ 9505.113] (--) NVIDIA(GPU-0): HRes, HSyncStart : 3840, 3848
[ 9505.113] (--) NVIDIA(GPU-0): HSyncEnd, HTotal : 3992, 4000
[ 9505.113] (--) NVIDIA(GPU-0): VRes, VSyncStart : 1136, 1190
[ 9505.113] (--) NVIDIA(GPU-0): VSyncEnd, VTotal : 1195, 3758
[ 9505.113] (--) NVIDIA(GPU-0): H/V Polarity : +/-
[ 9505.113] (--) NVIDIA(GPU-0): Image Size : 600 mm x 340 mm
[ 9505.113] (--) NVIDIA(GPU-0): RGB 444 bpcs : 6, 8, 10
[ 9505.113] (--) NVIDIA(GPU-0): YUV 444 bpcs : 8, 10
[ 9505.113] (--) NVIDIA(GPU-0): YUV 422 bpcs : 8, 10
Offline
That was it: I did not know that there are multiple places in the edid file for which you need to set the physical size. Now xrandr reports the correct dimensions without needing to replug the monitor. (However, it only works if the xorg config file contains the customedid option - it does not work as kernel option.)
Offline