Black screen amdgpu error: no EDID read

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:

  1. download this edid. https://docs.nefarius.at/research/PG278Q.bin
  2. put it in /etc/nixos
  3. 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
    ''
  )];
sources

Copying Custom EDID - #25 by adana
ASUS PG278Q Monitor on Linux - Nefarius™ Project Documentation