Hello there…
I had a strange video problem that I managed to fix by piecing different forum information together. I wanted to share it for the benefit of others. Let me explain:
Symptoms:
First I noticed that one day my monitor started to flicker every 30s or so… did this for a couple days… before I started getting annoyed enough to do something.
Second I rebooted and when the computer restarted I was in 1024x768 and there was no option to move to my default 1280x1024.
Third I noticed in the boot messages “EDID checksum is invalid, remainder is 10”, this is an error that I never saw before.
Fourth: The problem does not occur in windows (thus likely a software issue)
System Information
Moniter: LG Flatron L1950S
Motherboard: M3N78-VM
Graphics: NVIDIA GeForce 8200 Chipset (onboard)
Operating System OpenSuse 11.4 and OpenSuse 12.1 (upgraded to 12.1 trying to fix the problem)
Diagnosis:
The EDID is used to configure the monitor in X windows. I suspect that a driver/software was updated and either the EDID was misread or misinterpreted. This same driver was not giving the proper signal to the monitor causing it to flicker.
When the system rebooted the error was caught in the boot process so X-windows fell back on a default VGA configuration.
The solution
In summary manually configure X-Windows to give the correct monitor signal. I will explain my approach because old tools like ‘sax’ and ‘xvidtune’ failed to work.
First in the terminal run the command where h-res and v-res are the desired resolution:
%> cvt <h-res> <v-res> 60
This will spit out a mode line like: ““1280x1024_60.00” 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync”. This line provides most of the values you need to configure X-Windows.
However many of these values are inaccurate and still need to be tweaked. Without xvidtune I felt that it was necessary to create my own version using ‘xrandr’. xrandr allows you to manually adjust running x-windows settings from the command line. The first script is tryMode:
# this is the trymode script
# Must replace this
OUTPUT="VGA-1"
# Name this to the resolution you want
NAME="1280x1024"
NEW_MODE="$NAME $@"
xrandr --newmode $NEW_MODE
xrandr --addmode $OUTPUT $NAME
xrandr --output $OUTPUT --mode $NAME
the next is reset:
# this is the reset script
# Change this to the same OUTPUT as the other script
OUTPUT="VGA-1"
# Change this to the same NAME as the other script
NAME="1280x1024"
# Change this to the current default of the system (the low-res default)
DEFAULT_NAME="1024x768"
xrandr --output $OUTPUT --mode $DEFAULT_NAME
xrandr --delmode $OUTPUT $NAME
xrandr --rmmode $NAME
You need to give the correct value to the OUTPUT variable. The way to get that is start->Applications->Configure Desktop->Hardware->Display and Monitor->Size & Orientation. There you will see a button called “Identify Outputs” Press it and that output will be shown. NAME can be anything but the logical choice is your desired resolution. Finally DEFAULT_NAME is found by simply runing xrandr without arguments. The entry with the star is the ‘DEFAULT_NAME’.
So the usage of this script is as follows:
%> ./tryMode 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
Notice that the arguments are merely the numbers and text given by the mode line (without the identifier “1280x1024_60.00”). This will force the system to use the new settings. This is where you will see problems and want to revert back to the default to try a new set of values. To reset the monitor you run this other script I created. If you do not run ‘reset’ any second invocation to ‘tryMode’ will not work again. So you must run reset to try another mode.
%> ./reset
Now I have to explain how to tweak the settings. Most of those numbers are really just microsecond timing constants that the monitor/graphics use to interpret/generate video signal. So they are meaningless enough that you just have to adjust them by trial and error. Note avoid large changes or else you can ruin your monitor.
%> ./tryMode 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
^^^^^
Monitor Bandwidth in MHz (see monitor specs but you shouldn't have to change this)
%> ./tryMode 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
^^^^^^^^^
Horizontal Position, adjust by adding or subtracting. Both numbers must be adjusted together. So if you add 10 you must add 10 to both.
%> ./tryMode 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
^^^^^
Horizontal Width
%> ./tryMode 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
^^^^^^^^^
Vertical Position (as before both numbers are adjusted together)
%> ./tryMode 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
^^^^^^
Vertical Hieght
Now after a few iterations you will have the mode settings that give an acceptable display. Now we move to the task of making these setting permanent. There are two files that you will need to edit. The first is
/etc/X11/xorg.conf.d/50-monitor.conf
Mine is shown here:
Section "Monitor"
# HorizSync source: builtin, VertRefresh source: builtin
# This can be any name
Identifier "Flatron"
# Again this can be any name
VendorName "LG"
# In my xorg this was set to the same value as OUTPUT so... not sure if this can be something else.
ModelName "VGA-1"
# This is something that you need to set using the moniter specs
HorizSync 30.0 - 83.0
# This is something that you need to set using the moniter specs
VertRefresh 56.0 - 75.0
# This is where you set the mode name and the values you found with trymode
ModeLine "1280x1024" 135.00 1280 1343 1471 1732 1024 1027 1034 1063 -hsync +vsync
# This sets this mode to the default
Option "Preferred Mode" "1280x1024"
EndSection
The setting you got from trymode go on the ModeLine setting after the “Name”. Many of the setting are identical to those in the trymode script. The two new ones HorizSync and HorizSync you must find yourself in the monitor specifications.
Now this is not enough, you have to tell X-11 that this is the Monitor that you want to use. This is done in the following file.
/etc/X11/xorg.conf.d/50-screen.conf
Section "Screen"
Identifier "Default Screen"
Device "Default Device"
# This must have the same value as the variable 'Identifier' in the other config file
Monitor "Flatron"
EndSection
Above I have shown my configuration. Most of it is simple the only thing you need to do is make sure that the ‘Monitor’ variable is the same value as the ‘Identifier’ variable in the other file. Warning this configuration will only work for single monitor. To have two you will need to read https://wiki.archlinux.org/index.php/Xrandr
So now you have made the changes. To test them out simply log out and log back in. This forces X to reload the settings. If you get the same display you got from ‘trymode’ than everything was done correctly and you can now be happy you fixed a problem.
Notes
This fix does not eliminate the EDID error messages. These will still persist. There are grub command line options (i.e. nomodeset ) that will suppress the EDID checks and in-turn the error message. However this will affect the graphics speed. There are others… but really didn’t go to deep. By manually setting xorg you sidestep this problem and it no longer matters.