nixos-hardware/lenovo/legion/16ach6h
ChaosAttractor 262146dc76 Override edid of built-in display
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 <Mic92@users.noreply.github.com>
2022-12-17 18:38:06 +08:00
..
edid Override edid of built-in display 2022-12-17 18:38:06 +08:00
default.nix Override edid of built-in display 2022-12-17 18:38:06 +08:00
README.md Add some data about the device used 2022-11-24 00:12:24 +01:00

Setup at the time of testing

$ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.0.9, NixOS, 22.11 (Raccoon), 22.11beta19.c9538a9b707`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.0`
 - channels(root): `"nixos-22.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
$ lspci
...
01:00.0 VGA compatible controller: NVIDIA Corporation GA104M [GeForce RTX 3070 Mobile / Max-Q] (rev a1)
...
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne (rev c5)
...