From 262146dc7631b962b515e7e972930f6e12607d7f Mon Sep 17 00:00:00 2001 From: ChaosAttractor <46527539+LostAttractor@users.noreply.github.com> Date: Fri, 16 Dec 2022 07:59:45 +0800 Subject: [PATCH] Override edid of built-in display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the problem that the edid of the built-in display only provided 60hz mode when use Hybrid Graphics It appears to be a Lenovo firmware issue and i try to fix it. This issue still reproducible on BIOS version GKCN58WW(22/12/16) Lenovo Legion 5 Pro is a laptop which support a technology called "DDG" that can allow you switch between discrete graphics mode and hybrid mode (optiums). In discrete graphics mode, the firmware provides the correct edid and anything works fine, the built-in display work well at 165hz. But if switch to hybrid mode, the firmware provides a different edid, causing the built-in display only can work at 60hz. So I extracted the edid file of discrete graphics mode and override the edid that built-in display provide to solve this problem. Co-Authored-By: Jörg Thalheim --- lenovo/legion/16ach6h/default.nix | 3 +++ lenovo/legion/16ach6h/edid/16ach6h.bin | Bin 0 -> 384 bytes lenovo/legion/16ach6h/edid/default.nix | 15 +++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 lenovo/legion/16ach6h/edid/16ach6h.bin create mode 100644 lenovo/legion/16ach6h/edid/default.nix diff --git a/lenovo/legion/16ach6h/default.nix b/lenovo/legion/16ach6h/default.nix index db13b9f..afdc7d9 100644 --- a/lenovo/legion/16ach6h/default.nix +++ b/lenovo/legion/16ach6h/default.nix @@ -7,8 +7,11 @@ ../../../common/gpu/nvidia/prime.nix ../../../common/pc/laptop ../../../common/pc/laptop/ssd + ./edid ]; + hardware.amdgpu.loadInInitrd = lib.mkDefault false; + hardware.nvidia.prime = { amdgpuBusId = "PCI:6:0:0"; nvidiaBusId = "PCI:1:0:0"; diff --git a/lenovo/legion/16ach6h/edid/16ach6h.bin b/lenovo/legion/16ach6h/edid/16ach6h.bin new file mode 100644 index 0000000000000000000000000000000000000000..87256135d9cf7597594d013d06d1814148d2f91e GIT binary patch literal 384 zcmZSh4+ac;`3zzVARx!cvQ)z@0Z`;0gLANdh(d@lL*sD@VD92*sB6fjz{JGFEX(ki zwSnOo8!Ka0mP)P^0|OJY%~A%IER`%3pavR){{_O83=GVSB5U*+TmN&;XV7PmXRv2$ QW?*7qrLol@