SOLUTION FOR THE REFRESH RATE SAGA!
After spending countless hours figuring out what, how and why to fix this issue and dealing with certain caveats, I managed to overcome this problem.
For starters, you need a edid.bin file from Windows by extracting it with CRU. This is the best way to do so as Legion hardware was (sadly) built with Windows in mind.
Boot up your favorite linux distribution and type the following commands in the terminal:
BEFORE RUNNING THE COMMAND BELOW, UNPLUG ALL EXTERNAL DISPLAYS!
Get the display ID by running:
for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done
My display ID is eDP-1 or eDP-2 (switching distributions changes this id. Not sure why and how)
Then, we need to create a folder and move the edid.bin file there:
sudo mkdir /lib/firmware/edid && sudo cp (path to edid file)/edid.bin /lib/firmware/edid
Then, you will need to add some parameters in GRUB/systemd-boot:
GRUB
sudo nano /etc/default/grub
*Add these in LINUX_DEFAULT section: *
amdgpu.freesync_video=1 drm.edid_firmware=x:edid/edid.bin video=x:e
*update GRUB by running update-grub or other methods you use. Reboot*
SYSTEMD-BOOT
sudo nano /efi/loader/entries/(conf file of your current boot. make sure it's not the rollback file!)
*Add these in OPTIONS section:*
amdgpu.freesync_video=1 drm.edid_firmware=x:edid/edid.bin video=x:e
*Reboot*
*change x with the display id you found earlier.*
*amdgpu command is only for amd hardware*.
Confirmed linux distributions that work based on what I did earlier:
- Ubuntu : Works.
- Linux mint : Works…sort of. It didn’t acknowledge my edid file until I did 2-3 reboots.
- Pop_OS : Old Gnome version, refuses to acknowledge the edid file (probably throws an error but I couldn’t catch it…)
- EndeavourOS : Works only if you DON’T use KDE PLASMA (it’s either a plasma issue or something related to vrr. Not sure yet)
- Manjaro : Same as EndeavourOS
- Fedora : Same as EndeavourOS
- Kubuntu : Throws an error=-2, doesn’t read the edid file for some reason.
(UPDATE 2024 : This method works in all major distros. Wayland + nvidia 560 and above will fix any duplicated refresh rate values, as well as changing them very well!)
If you use this method, at least for now don’t use it on distributions that bundle Plasma(Maybe plasma version 6 will fix this issue?) as the default DE or a very old version of the current DEs. Not sure what causes this and I can’t look into this even further. I did notice something rather strange : Gnome with VRR patch sometimes plays nicely with the edid file, other times refuses to acknowledge it. (noticed this on Nobara.)
This is also a semi fix as if you reduce the resolution, you will be forced back to the highest refresh rate. Maybe there is more to be done here, but that’s past my knowledge and time. So, I invite others to contribute here. Good luck!
Gobble Gobble.