From 06b990eac72615c01d422af006b6f1015882d9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Wiewi=C3=B3ra?= Date: Thu, 1 Feb 2024 20:53:47 +0100 Subject: [PATCH] Added Wayland files --- README.md | 26 ++++++++++++++++++++++++++ Wayland/displays-edid | 10 ++++++++++ Wayland/displays.modelines | 3 +++ 3 files changed, 39 insertions(+) create mode 100755 Wayland/displays-edid create mode 100644 Wayland/displays.modelines diff --git a/README.md b/README.md index d9e1cf9..258713c 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,33 @@ In this case, there are 2 options. First is to pass `video` kernel parameter(but ### Modifying EDID https://askubuntu.com/questions/973499/wayland-how-to-set-a-custom-resolution +```bash +# Install nessesary packages +sudo apt install zsh edid-decode automake dos2unix +# Clone tools +git clone https://gitea.wrzooz.pl/repaste/edid-generator.git +cd edid-generator + +# Prepare new edid files +./modeline2edid ../RX7900XTPowerDrawFix/Wayland/displays.modelines +make + +# Place EDID files in target location +sudo mkdir /usr/lib/firmware/edid +sudo cp 1200p_61.bin /usr/lib/firmware/edid/ +sudo cp 1440p_61.bin /usr/lib/firmware/edid/ + +# Add those files to initramfs so driver can load them +cp ./Wayland/displays-edid /usr/share/initramfs-tools/hooks/displays-edid +sudo chmod +x /usr/share/initramfs-tools/hooks/displays-edid +sudo update-initramfs -u + +# Make kernel use that files +sudo nano /etc/default/grub +#add drm.edid_firmware=DP-1:edid/1200p_61.bin,DP-3:edid/1200p_61.bin into GRUB_CMDLINE_LINUX_DEFAULT +sudo update-grub +``` ### Testing diff --git a/Wayland/displays-edid b/Wayland/displays-edid new file mode 100755 index 0000000..438ce14 --- /dev/null +++ b/Wayland/displays-edid @@ -0,0 +1,10 @@ +#!/bin/sh -e +# Copy patched EDID blob + +if [ "$1" = "prereqs" ]; then exit 0; fi + +. /usr/share/initramfs-tools/hook-functions + +copy_file edid /usr/lib/firmware/edid/1200p_61.bin +copy_file edid /usr/lib/firmware/edid/1440p_61.bin + diff --git a/Wayland/displays.modelines b/Wayland/displays.modelines new file mode 100644 index 0000000..c4194c8 --- /dev/null +++ b/Wayland/displays.modelines @@ -0,0 +1,3 @@ +Modeline "1200p_61" 196.53 1920 2048 2256 2592 1200 1201 1204 1243 -HSync +Vsync ratio=16:10 +Modeline "1440p_61" 317.24 2560 2744 3024 3488 1440 1441 1444 1491 -HSync +Vsync ratio=16:9 +Modeline "1200p_61" 196.53 1920 2048 2256 2592 1200 1201 1204 1243 -HSync +Vsync ratio=16:10