I want to gather the Edid information of the monitor.
I can get it from the xorg.0.log
file when I run X
with the -logverbose
option.
But the problem is that If I switch the monitor (unplug the current monitor and then plug-in another monitor), then there is no way to get this information.
Is there any way to get the EDID dynamically (at runtime)?
Or any utility/tool which will inform me as soon as monitor is connected and disconnected?
I am using the LFS-6.4.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
There is a tool called read-edid doing exactly what its name suggests.
Method 2
Try xrandr –verbose. It shows the RAW edid information and lots of other useful information for all monitors connected to your computer.
Example output, with only the EDID section:
$ xrandr --verbose (cut) EDID: 00ffffffffffff0030ae364000000000 00130103801e1378eaef259458568a29 24505400000001010101010101010101 0101010101018a25a02051841a303040 360030be100000195e1fa02051841a30 3040360030be100000190000000f0095 0a32950a2816090030e47302000000fe 004c503134315750332d544c413100ab (cut)
With regards to your last question, udev can inform you and let you run commands when a monitor is connected. It’s really easy to write bash scripts for udev events.
I’m not sure what you’re trying to do here, but I find xrandr very useful for automatically setting the monitor layout that I want whenever I plug or unplug external monitors at work or at home. You don’t need monitor serial for this. The simplified output name works fine. Run xrandr to see the outputs (monitors) available.
I run this script to set my preferred layout:
#!/bin/bash xrandr --output LVDS1 --auto xrandr --output DP2 --auto --right-of LVDS1
LVDS1 being the name of the notebook monitor, DPS2 the external one.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0