Skip to content
Henryk Paluch edited this page Dec 30, 2021 · 3 revisions

EDID

EDID is protocol that allows OS to read supported resolution from plain VGA monitor (there is I2C EEPROM in monitor with compressed resolution table and graphics card use standard I2C protocol to read these data).

To query more

We can use xrandr without arguments (my monitor is VGA Samsung SyncMaster):

xrandr

Should output something like:

Screen 0: minimum 8 x 8, current 1440 x 900, maximum 32767 x 32767
eDP1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 410mm x 260mm
   1440x900      59.89*+  74.98  
   1400x900      59.96    59.88  
   1368x768      59.88    59.85  
   1280x800      59.81    60.00    59.91  
   1152x864      75.00  
   1280x720      59.86    59.74  
   1024x768      75.03    70.07    60.00  
   1024x576      59.90    59.82  
   832x624       74.55  
   960x540       59.63    59.82  
   800x600       72.19    75.00    60.32    56.25  
   864x486       59.92    59.57  
   720x450       60.00  
   640x480       75.00    72.81    75.00    66.67    59.94  
   720x405       59.51    58.99  
   720x400       70.08  
   640x360       59.84    59.32  
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Now we know that eDP1 is connected to monitor (VGA output on ZOTAC PC).

We can use tool parse-edid to dump values from kernel EDID in /sys:

  • install package (tested on openSUSE LEAP 15.3):

    sudo zypper in read-edid

And try this command (the path is specific to my hardware setup):

parse-edid < /sys/class/drm/card0-eDP-1/edid

Should output something like:

Checksum Correct

Section "Monitor"
	Identifier "SyncMaster"
	ModelName "SyncMaster"
	VendorName "SAM"
	# Monitor Manufactured week 42 of 2008
	# EDID version 1.4
	# Analog Display
	Option "SyncOnGreen" "true"
	DisplaySize 410 260
	Gamma 2.20
	Option "DPMS" "true"
	Horizsync 30-81
	VertRefresh 56-75
	# Maximum pixel clock is 140MHz
	#Not giving standard mode: 1440x900, 60Hz
	#Not giving standard mode: 1440x900, 75Hz
	#Not giving standard mode: 1280x1024, 60Hz
	#Not giving standard mode: 1280x960, 60Hz
	#Not giving standard mode: 1152x864, 75Hz
	Modeline 	"Mode 0" -hsync +vsync 
EndSection

Override EDID

TODO

I have complex setup (using KVM data switch) and Linux is often unable to read EDID properly.

At first we should backup EDID data when detection works using command like:

cd ~/some_backup_directory
cp /sys/class/drm/card0-eDP-1/edid edid-zotac-samsung

Now verify that EDID is correct:

parse-edid < edid-zotac-samsung 

TODO: Overriding EDID...

Possible solutions:

The problem is that output from parse-edid is not valid /etc/X11/xorg.conf.d/50-monitor.conf although it may looks like that. This line:

Modeline 	"Mode 0" -hsync +vsync 

Had to be replaced with output from this command:

cvt 1440 900

# 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
Modeline "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync

(see https://forums.linuxmint.com/viewtopic.php?t=209450) You should also check Modeline outputs from /var/log/Xorg.0.log whose are altough grablled (invalid x0 suffix and 55.93 kHz....)

TODO: Test hotfix from above:

# NOT YET TESTED
cvt 1440 900

# 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
Modeline "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync

xrandr --newmode "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync
xrandr --addmode eDP1 "1440x900_60.00"
xrandr --mode "1440x900_60.00"
Clone this wiki locally