Ok so I think the problem is with edid not beeing correctly read.
To fix this we need to give the kernel the right EDID.
Pleas try following:
- download this edid. https://docs.nefarius.at/research/PG278Q.bin
- put it in
/etc/nixos
- Than put this in your config:
boot.kernelParams = [ "drm.edid_firmware=DP-2:edid/PG278Q.bin " "video=DP-2:e" ];
hardware.firmware = [
(
pkgs.runCommand "edid.bin" { } ''
mkdir -p $out/lib/firmware/edid
cp ${./PG278Q.bin } $out/lib/firmware/edid/edid.bin
''
)];