LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-19-2009, 05:19 AM   #1
miner49er
Member
 
Registered: Feb 2006
Location: Bristol, UK
Distribution: Debian
Posts: 74

Rep: Reputation: 15
Force specific refresh for specific resolution


Hi there folks,

I have recently been given an old LCD. It works great with Ubuntu at full resolution 1280x1024 60hz but I'm currently working on a game that runs at 320x200. I'm using SDL for this and the resolution changes just fine, the problem is that the refresh rate appears to get set at 70Hz and the LCD shows an "Out of range" warning that doesn't go away.

I think I'm looking for a setting in the Xorg.conf file to force the refresh rate to 60hz but the config file in ubuntu is pretty sparse: here it is:



# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "gb"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
EndSection

Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
Option "ReferenceClock" "29.500MHz"
EndSection

Section "Monitor"
Identifier "Configured Monitor"
HorizSync 30 - 72
VertRefresh 50 - 85
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
Defaultdepth 24
Option "AddARGBGLXVisuals" "True"
EndSection

Section "ServerLayout"
Identifier "Default Layout"
screen "Default Screen"
EndSection

Section "Module"
Load "glx"
Load "vnc"
EndSection
 
Old 03-19-2009, 12:22 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536
The first thing to do directly related to your problem, is to adjust the "VertRefresh" line in the "Monitor" section.
Change it to read:

VertRefresh 60.0

or if it complains about not having a low-high range (it might, but probably not) then use:

VertRefresh 60.0 - 60.0

Ideally though, even though it is an LCD panel, it probably has a small range at which it is designed to operate. Check online for the user guide or owner manual for the monitor, or in the actual user guide if you have it, or on the label on back of the monitor, and get the manufacturers intended specs for the horiz and vert refresh, and set them accordingly.

You will need to reboot or kill/restart X with CTRL-ALT-BACKSPACE for the changes to be in effect.
 
Old 03-20-2009, 02:36 AM   #3
miner49er
Member
 
Registered: Feb 2006
Location: Bristol, UK
Distribution: Debian
Posts: 74

Original Poster
Rep: Reputation: 15
Fantastic, that fixed it!

Can't believe I didn't see that really...

Thanks a lot dude!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Force users to connect from specific IP lifeismusic434 Linux - Server 1 12-13-2008 09:08 AM
Force xorg to use specific monitor resolution / disable DDC? slacky Linux - Hardware 3 09-19-2008 08:47 AM
Way to force a specific value for system uptime? soliax Linux - Kernel 8 09-10-2008 12:18 AM
Force packets to a specific interface glowe Linux - Networking 1 06-13-2007 03:43 PM
how to force sendmail to use a specific interface Finlay Linux - Networking 5 05-14-2006 03:13 PM


All times are GMT -5. The time now is 07:29 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration