Locking display settings in Linux?

Maluno

Senior member
Mar 28, 2005
697
0
0
When I attempt to play any of a number of full screen opengl games on my fedora core 3 box, I get a black screen, and the monitor says "frequency out of range please change signal timings." I am assuming that the game is the culprit, and that it is adjusting my refresh rates or something similar, and the end result is unstable settings for my monitor.

I was wondering if there was any way for me to lock display settings, such as refresh rate, and screen resolution, etc so that I could force the game to work with my settings. Basically, is there any way to prevent applications from changing these settings?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Well you control possible refresh rates and resolutions with your X configuration file. Depending on what version of Linux of what Linux distro your using it's either /etc/X11/XF96Config-4 /etc/X11/xorg.conf

If your using a newer Distro with X.org it will use either of: xorg.conf, XF86Config-4, XF86Config, in that order, preferablly xorg.conf.

But the syntax is pretty much the same between all of them. Open them up with your favorite text editor and edit them to suite yourself. Be sure to make a copy of the config so if you make a mistake or a typo then you can copy the old config back over the messed up one and get back your settings that you know that work.

You use the 'Monitor' section to set aviable refresh rates, and the 'Screen' section to pick aviable color depth and resolutions.

here is my settings:
Section "Monitor"
Identifier "syncmaster"
VendorName "Samsung"
ModelName "SyncMaster997df"
HorizSync 30.0-96
VertRefresh 50.0-160.0
Option "dpms"
EndSection

The important thing is the HorizSync and VertRefresh.. the identifier is used to tell what monitor to use in other parts of the config file. You generally don't touch that.

Section "Screen"
Identifier "left"
Device "nvidia0"
Monitor "syncmaster"
DefaultDepth 24
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Again the important part is the Modes and the Depth. Generally you don't mess with the names unless you know what your doing.

If you want to see the details of what each section and line means check out either
man XF86Config-4
man XF86Config
man xorg.conf (I beleive)

Also looking around on the internet there are lots of sample files to look at.
 

Maluno

Senior member
Mar 28, 2005
697
0
0
So by limiting the settings in my x config I will limit the possible settings that the apps can change to?