Because of my new work now I only use debian testing in my desktop box. I have a little gigabyte next to my TV and, if you remember, my nasty samsung model is always boycotting me (using an HDMI connector the TV uses a mode in which a little zone at the four edges is missing, other samsung models have a screen fit option that avoids this issue, but in mine that option is missing; if common VGA connection is used then the TV does not send the EDIDs to the computer). I am not going to buy another samsung TV in my whole life, that is for sure. But after upgrading the box I discovered that (again) the resolution was 1024x768 and not to the correct 1360x768 that is supported in VGA, that mode line was configured in the xorg.conf file and now, something had changed, and it did not work. To my surprise debian testing has moved to wayland and now the X11 configuration is not used (if I logged in using X11 it worked again with the proper resolution).
I do not know if I am going to use wayland or X11 but at least I wanted to know how to configure a custom mode line in wayland to have both options available, and I finally discovered it in this post answer. Now you have to add the mode line in EDID format and configure the kernel to boot using that EDID. The steps are quite easy:
Akatrevorjay has created an easy project to change any X11 mode line in an EDID file. So first clone the project.
git clone https://github.com/akatrevorjay/edid-generator.git
cd edid-generator
Install some required packages.
sudo apt-get install zsh edid-decode automake dos2unix
The project has some standard mode lines already present but I had to add my custom one. This creates a 1360x768.S definition file for the mode line.
./modeline2edid - <<< 'Modeline "1360x768" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync'
Compile and create the binary EDID files.
make
Copy the ones you are interested in to the /lib/firmware/edid directory.
sudo cp 1024x768.bin 1360x768.bin /lib/firmware/edid/
Finally add the EDID you want to configure in the kernel at grub level. The option drm_kms_helper.edid_firmware=edid/<resolution>.bin should be added to the GRUB_CMDLINE_LINUX variable in the /etc/default/grub file (In debian this option is empty by default).
GRUB_CMDLINE_LINUX="drm_kms_helper.edid_firmware=edid/1360x768.bin"
You can first try adding manually the option editing the boot line in grub (in the grub menu you can click e to edit the line and start with the option manually added, you also need to do this if you make any mistake and the kernel does not boot).
Update the grub.
sudo update-grub
And that is all. When you restart the box, it uses the new resolution in the complete boot process. I do not know if I will continue with wayland or I switch back to X11 (think that this box is mainly used to browse internet, watch youtube videos, series and films, listen to music and so on and so forth), for the moment I have not seen any issue but you never know. As always, the entry is mainly for me, next time I will have the information here, easy access.
Regards!
Comments