Problem with a monitor with a broken edid...!

Hyprland version 0.56.2
PASTE YOUR HYPRLAND VERSION HERE (hyprctl version), BETWEEN THE BACKTICKS. DO NOT REMOVE ANY FORMATTING.

Ok, I just spent a few hours trying to get hyprland to work with my 1680x1050 16:10 monitor and failed, despite the help from the google ai, and it had a few impressive ideas on the topic!
broken edid → 1024x768.
I tried a modeline I got from my xorg.conf, I am sure the modeline was read because I made a mistake a forgot the coma at the end of the mode line and got an error, but after fixing it, the mode is just ignored, it doesn’t appear anywhere.
The google AI tried to generate a custom edid file for this 1680x1050 mode, but the nvidia driver never accepted it. It’s read, because 1st error was because it didn’t find the file, but it’s rejected, bad edid file.
I even tried to pass this edid file directly through the nvidia xorg driver, using the option line in xorg.conf:
Option “CustomEDID” “DVI-D-1:/usr/lib/firmware/edid/1680x1050.bin”
The line was accepted and read, but of course wayland doesn’t care about that, and I was still stuck in 1024x768.
Well with xorg it’s trivial to force a 1680x1050 mode with a broken edid. Is there really no way to force this mode in wayland then ?!!
It’s with the proprietary nvidia driver.

Well I found a solution, I’ll post it here in case it’s useful to someone else : there is a very helpful page on broken edid here : Guide how to achieve better resolution with broken EDID. Two methods are used: xorg.conf config and kernel params. · GitHub

You learn from here the existence of the get-edid package. This tool taught me that my edid is still readable, it detected it on i2c bus 5, only the checksum byte was wrong. decode-edid gave me all the infos inside + what the correct checksum should be. So I saved the edid to a firmware file, and fixed the checksum with a hex editor (it’s the last byte). Then loaded the edid from a linux kernel option :

nvidia_drm.modeset=1 drm.edid_firmware=DVI-D-1:edid/philips.bin

1 reboot later, everything was fixed! I have a working edid again, and I am not limited to 1024x768 anymore!