LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Query and change X server resolution?? (https://www.linuxquestions.org/questions/debian-26/query-and-change-x-server-resolution-229744/)

bruno buys 09-12-2004 02:36 PM

Query and change X server resolution??
 
Hi,
I am trying to either query my X server to know which res is it running and to change it to 1280x1024 if its not.
Can you guys help me? Below is my /etc/X11/XF86Config-4 file. It was written with "dpkg-reconfigure xserver-xfree86", and I think its ok, but I'm not sure its running in 1280x1024.
How do I figure it?
Thanks!

kernel is 2.6.5-1.k7

### BEGIN DEBCONF SECTION
# XF86Config-4 (XFree86 server configuration file) generated by dexconf, the
# Debian X Configuration tool, using values from the debconf database.
#
# Edit this file with caution, and see the XF86Config-4 manual page.
# (Type "man XF86Config-4" at the shell prompt.)
#
# If you want your changes to this file preserved by dexconf, only make changes
# before the "### BEGIN DEBCONF SECTION" line above, and/or after the
# "### END DEBCONF SECTION" line below.
#
# To change things within the debconf section, run the command:
# dpkg-reconfigure xserver-xfree86
# as root. Also see "How do I add custom sections to a dexconf-generated
# XF86Config or XF86Config-4 file?" in /usr/share/doc/xfree86-common/FAQ.gz.

Section "Files"
FontPath "unix/:7100" # local font server
# if the local font server has problems, we can fall back on these
FontPath "/usr/lib/X11/fonts/misc"
FontPath "/usr/lib/X11/fonts/cyrillic"
FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/Type1"
FontPath "/usr/lib/X11/fonts/Speedo"
FontPath "/usr/lib/X11/fonts/100dpi"
FontPath "/usr/lib/X11/fonts/75dpi"
EndSection

Section "Module"
Load "GLcore"
Load "bitmap"
Load "dbe"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "pex5"
Load "record"
Load "speedo"
Load "type1"
Load "vbe"
Load "xie"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/ttyS0"
Option "Protocol" "Microsoft"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
Identifier "Generic Mouse"
Driver "mouse"
Option "SendCoreEvents" "true"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection

Section "Device"
Identifier "Generic Video Card"
Driver "nv"
VideoRam 64000
EndSection

Section "Monitor"
Identifier "Samsung syncMaster 753v"
HorizSync 28-49
VertRefresh 43-72
Option "DPMS"
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Generic Video Card"
Monitor "Samsung syncMaster 753v"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1280x1024"
EndSubSection
SubSection "Display"
Depth 4
Modes "1280x1024"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x1024"
EndSubSection
SubSection "Display"
Depth 15
Modes "1280x1024"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x1024"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "Generic Mouse"
EndSection

Section "DRI"
Mode 0666
EndSection

### END DEBCONF SECTION

HappyTux 09-12-2004 03:11 PM

Re: Query and change X server resolution??
 
Quote:

Originally posted by bruno buys
[B]Hi,
I am trying to either query my X server to know which res is it running and to change it to 1280x1024 if its not.
Can you guys help me? Below is my /etc/X11/XF86Config-4 file. It was written with "dpkg-reconfigure xserver-xfree86", and I think its ok, but I'm not sure its running in 1280x1024.
How do I figure it?
Thanks!

kernel is 2.6.5-1.k7
Check in the /var/log/XFree86.0.log for the way X detects it and change this in your config file.
Quote:



Section "Monitor"
Identifier "Samsung syncMaster 753v"
HorizSync 28-49
VertRefresh 43-72
Option "DPMS"
EndSection
To
Code:

Section "Monitor"
 Identifier "Samsung syncMaster 753v"
 HorizSync 30-70
 VertRefresh 50-160
 Option  "DPMS"
EndSection

That is the proper refresh rates according to this page I found with a quick google search.

fphillips 09-12-2004 03:19 PM

An easy way to find the current res is to type xwininfo in an xterm. The cursor turns to crosshairs, click on the desktop. It's probably already at 1280x1024, since that's the only mode you have in your conf. It will also give you the color depth.

bruno buys 09-12-2004 04:55 PM

Hi philips and tux,
You guys kick big! With xwininfo I could determine the resolution was indeed 1024x768, and by editing the config file to the suggested syncs by tux, I could load it with 1280x1024. Very happy now!

Very thanks!!

Last question: why the reconfigure script defaulted to this values?
HorizSync 28-49
VertRefresh 43-72

HappyTux 09-12-2004 06:21 PM

Quote:

Originally posted by bruno buys
Hi philips and tux,
You guys kick big! With xwininfo I could determine the resolution was indeed 1024x768, and by editing the config file to the suggested syncs by tux, I could load it with 1280x1024. Very happy now!

Very thanks!!

Last question: why the reconfigure script defaulted to this values?
HorizSync 28-49
VertRefresh 43-72

Conservative defaults so they do not fry older monitors, that is one of the first things people should do after setting up X is change those to what their monitor actually supports. Good to hear you got it going BTW.


All times are GMT -5. The time now is 10:59 PM.