Solved Some of Xorg's default video modelines drive VGA CRT out of sync

Hey everyone, I currently use a 30-71khz LG VGA CRT as my main display. It's going out of sync when I try to use some of Xorg's builtin modelines. The monitor is working perfectly otherwise. It's hooked up to a notebook with Radeon graphics.

If I calculate a modeline with cvt and then add it using xrandr's --newmode and --addmode options, it works great. Any arbitrary resolution I make up works. 320x200@160hz for doom, 1920x1080@60hz for movies, any oddball resolution I ever tried works as long as it's in the 30-71kHz range.

If I try to simply change to one of Xorg's builtin modelines, for example xrandr --output VGA-1 --mode 800x600 --rate 70 the monitor shrieks and shuts itself off. It shortly comes back on with an out of frequency message. In this example, it reports that it was actually being fed 87.6kHz with a vertical refresh rate of 70Hz. That means the signal was around 1200 lines tall. The values reported by the monitor vary wildly depending on the modeline chosen. Once it couldn't sync because the vertical frequency was only 14Hz.

At this point if I try to ctrl+alt+fx back to the console, sometimes the monitor just turns off completely. Sometimes I can get to the console but it'll be in some very uncommon resolution with a low refresh rate, different from the 640x480@85hz I have set for the console. If I manage to kill X and then start it again, the monitor will go out of sync once more or X will be at some very weird doublescanned resolution. Only way to get everything back to normal is to reboot the machine.

I could just use my own modelines that work everytime and everything would be fine. Problem is, when applications try to switch resolution by themselves, they choose Xorg's modelines. In practice, this means that lately my monitor's been going out of sync whenever I try to run ezquake.

Any clues are appreciated, thanks a lot.
 
The cost of a modern, new or refurbished TFT/LCD monitor will be returned after 6-12 month by savings in your electricity bill. Visit your municipal waste disposal.
 
I didn't want to get into this, but here we go. LCD screens suck. The blacks look grey and the colors are washed out. Anything but the more expensive models are stuck with 60hz. The picture's only sharp when they're on their fixed native resolution. Running games on such resolutions requires more powerful hardware vs running games at 640x480 or 800x600 on a CRT, which offsets the savings with the display's power consumption. But if saving money is really what you're after, buy yourself 10 CRTs for the price of a single LCD and never waste a dime on a monitor again.

Buying a LCD wouldn't fix my original problem either, since they can't change resolution without ending up with a blurry mess onscreen anyway. And even if I did buy one to save electricity on everyday work, I'd still keep my CRT around for movies and games, which just look insanely better on one.

Telling someone to trash a CRT that's been working perfectly fine for the past 12 years is just all around bad advice. It's also bad for the environment. And it's just sad because there's a lot of people who'd love to have one. If you're gonna go that route just list it online for free or something.
 
CRT is cat-friendly, and that's all that matters. Cats love CRT and they can't knock it over.
They can still piss on them though. So always be on the lookout.

Anyway, decided to revisit this thread with the solution.

The cause seems to be with the new modesetting radeon drivers. While the old driver probed the modes correctly, the new one probes modes that simply can't be displayed on the monitor:

Code:
[ 29032.129] (II) modeset(0): Modeline "800x600"x120.0   81.00  800 832 928 1080 600 600 602 625 doublescan +hsync +vsync (75.0 kHz d)

xorg.conf's man page seems to hint at what to do:

When modes are specified explicitly in the Monitor section (with the Mode, ModeLine, or UseModes keywords), built-in modes with the same names are not included.

Below is an example configuration file that sets the horizontal and vertical frequency ranges of the monitors so modelines that would drive them out of sync are excluded. It also replaces some modelines with custom modelines, so 300x200 is displayed at double refresh rate instead of doublescan, for example:

/usr/local/etc/X11/xorg.conf.d/10-monitor.conf:
Code:
Section "Monitor"
        Identifier      "DVI-I-1"
        VertRefresh     50-160
        HorizSync       30-71
        Modeline        "1536x1152"  147.75  1536 1640 1800 2064  1152 1155 1159 1195 -hsync +vsync
        Modeline        "1360x1024"  115.00  1360 1448 1584 1808  1024 1027 1037 1063 -hsync +vsync
        Modeline        "1024x768"   94.50  1024 1096 1200 1376  768 771 775 809 -hsync +vsync
        Modeline        "800x600"   67.25  800 848 928 1056  600 603 607 639 -hsync +vsync
        Modeline        "640x480"   57.25  640 680 744 848  480 483 487 521 -hsync +vsync
        Modeline        "640x400"   59.75  640 680 744 848  400 403 409 442 -hsync +vsync
        Modeline        "320x240"   17.00  320 336 360 400  240 243 247 267 -hsync +vsync
        Modeline        "320x200"   12.25  320 336 360 400  200 203 209 220 -hsync +vsync
        Modeline        "mvs" 34.00  912 936 1024 1136  230 233 243 250 -hsync +vsync
        Option          "PreferredMode" "1024x768"
        Option          "Primary" "true"
EndSection

Section "Monitor"
        Identifier      "VGA-1"
        VertRefresh     50-160
        HorizSync       30-71
        Modeline        "1536x1152"  147.75  1536 1640 1800 2064  1152 1155 1159 1195 -hsync +vsync
        Modeline        "1360x1024"  115.00  1360 1448 1584 1808  1024 1027 1037 1063 -hsync +vsync
        Modeline        "1024x768"   94.50  1024 1096 1200 1376  768 771 775 809 -hsync +vsync
        Modeline        "800x600"   67.25  800 848 928 1056  600 603 607 639 -hsync +vsync
        Modeline        "640x480"   57.25  640 680 744 848  480 483 487 521 -hsync +vsync
        Modeline        "640x400"   59.75  640 680 744 848  400 403 409 442 -hsync +vsync
        Modeline        "320x240"   17.00  320 336 360 400  240 243 247 267 -hsync +vsync
        Modeline        "320x200"   12.25  320 336 360 400  200 203 209 220 -hsync +vsync
        Modeline        "mvs" 34.00  912 936 1024 1136  230 233 243 250 -hsync +vsync
        Option          "PreferredMode" "1024x768"
        Option          "RightOf" "DVI-I-1"
EndSection
 
Back
Top