Jump to content
  • Announcements

    • spinynorman

      Mandriva Official Documentation

      Official documentation for extant versions of Mandriva can be found at doc.mandriva.com.   Documentation for the latest release may take some time to appear there. You can install all the manuals from the main repository if you have Mandriva installed - files are prefixed mandriva-doc.
    • paul

      Forum software upgrade   10/29/17

      So you may have noticed the forum software has upgraded !!!
      A few things that have changed. We no longer have community blogs (was never really used) We no longer have a portal page.
      We can discuss this, and decide whether it is needed (It costs money) See this thread: Here
Sign in to follow this  
ramfree17

XD-02: How do I add resolutions or change refresh rates?

Recommended Posts

Browse: [About the FAQ Forum] [Table of Contents] [FAQs] [Contribute] [XD: XFree86, desktops, Gnome, KDE...]

 

XD-02: How do I add resolutions or change refresh rates?

 

Board member and translator qeldroma has written an excellent writeup regarding this topic which i will paste below....

 

====================================================

Many people request help according their X-settings.

 

Here you'll find answers if you..

...want to understand a little bit your XF86Config(-4) file

...want to change possible resolutions

...want to change refresh-rates

 

!!! IMPORTANT: YOU are responsible for changing your settings !!!

!!! IMPORTANT: Only use settings, your hardware supports !!!

 

Some PREs':

To change between console (textmode) and Screen (X, graphical-mode) use <ctrl><alt>-F1...F6 for the consoles, <ctrl><alt>-F7...F10 for maximum four X-screens.

 

To start a X-session, type "X" for terminal 0 (F7), or "X :0"..."X :3" for terminal 0 to 3.

To start it in the background, add "&".

Example:

"X :2 &" - This will start X on F9, going to the background, so your console is not blocked.

 

To start a X-based program, you'll have to define, on WHICH X-session it has to start. For that, you'll have to change the variable "display".

 

If you want to start XTerm on F8, type following (beginning on console 0):

1. "X :1 &"

2. <ctrl><alt>-F1

3. "export DISPLAY=0:1" (0 for localhost)

4. "xterm &"

5. <ctrl><alt>-F8

 

And YES, you can start SEVERAL X-sessions parallel on your machine, perhaps to do change settings, without going back to init 3.

 

-------------------------------------------------------------

1. XF86Config: How it works

In this file, you'll find all possible settings concerning your screen and graphic-card combination.

To make it easier, i removed all comments in the following examples.

 

First, my complete file:

 

Section "Files"

   FontPath "unix/:-1"

EndSection



Section "ServerFlags"

   AllowMouseOpenFail

EndSection



Section "Module"

   Load "dbe"

   Load "v4l"

   Load "extmod"

   Load "type1"

   Load "freetype"

   Load "/usr/X11R6/lib/modules/extensions/libglx.so"

EndSection



Section "InputDevice"

   Identifier "myKbd"

   Driver "Keyboard"

   Option "XkbModel" "pc105"

   Option "XkbLayout" "de"

EndSection



Section "InputDevice"

   Identifier "wheelMouse"

   Driver "mouse"

   Option "Protocol" "IMPS/2"

   Option "Device" "/dev/psaux"

   Option "ZAxisMapping" "4 5"

EndSection



Section "Monitor"

   Identifier "Studioworks900B"

   VendorName "LG"

   HorizSync 30-96

   VertRefresh 50-160

EndSection



Section "Device"

   Identifier "AGP-V7100"

   VendorName "Asus"

   BoardName "NVIDIA GeForce2 DDR (generic)"

   Driver "nvidia"

   Option "NoLogo" "on"

   Option "CursorShadow" "on"

EndSection



Section "Screen"

   Identifier "myResolutions"

   Device "AGP-V7100"

   Monitor "Studioworks900B"

   DefaultColorDepth 24

   

   Subsection "Display"

       Depth 8

       Modes "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"

   EndSubsection

   

   Subsection "Display"

       Depth 15

       Modes "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"

   EndSubsection

   

   Subsection "Display"

       Depth 16

       Modes "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"

   EndSubsection

   

   Subsection "Display"

       Depth 24

       Modes "1400x1050" "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"

   EndSubsection

EndSection



Section "ServerLayout"

   Identifier "layout1"

   InputDevice "myKbd" "CoreKeyboard"

   InputDevice "wheelMouse" "CorePointer"

   Screen "myResolutions"

EndSection

 

- At the beginning is defined, where to search for fonts.

- Serverflags are serverflags. ;) (Details in "man XF86Config")

- Modules defines all modules for your layout, that have to be loaded to work properly. If you want OpenGL, then a type of "glx" module must be loaded, depending on your hardware. This is like finetuning: some modules just add some features, like video acceleration, etc..

- The inputdevices are..well.. inputdevices :shock: (IMPORTANT: every device needs its own "Section" - "EndSection")

- The monitor section defines your monitor. Here you can tune your settings. This is the place for modelines, too.

- The device section defines your graphic-cards. All graca-specific flags (options) have to be defined here.

- A screen is a compilation of graca, monitor and wanted resolution/color-combinations. Every display-subsection represents a colordepth.

- And finally a layout defines the complete "scene".

 

What you can figure out is, that you can define MORE THAN ONE graca, monitor, input device, etc.... Then you define the different layouts and tell the server, which layout he has to use. For details, again, look at "man XF86Config". That results in the possibility to use severall graca/monitor layouts AT THE SAME TIME.

 

-------------------------------------------------------------

2. Changing possible resolutions/refresh rates

The way is to try them and if they DON'T work, to finetune them.

 

2.1 Trying wanted resolutions - skip this if you want only to change refresh rate

There are several resolutions that work "on the fly". If you want to add p.e. "1152x864". The only section you'll have to modify is the screen-section.

Just add the wanted resolution to all colordepths you'll want it to be in. Remember that the FIRST resolution in the line is the default.

 

Section "Screen"

   Identifier "myResolutions"

   Device "AGP-V7100"

   Monitor "Studioworks900B"

   DefaultColorDepth 24

   

   Subsection "Display"

       Depth 8

       Modes "1152x864" "1400x1050" "1024x768" "800x600" "640x480"

   EndSubsection

   

   Subsection "Display"

       Depth 15

       Modes "1152x864" "1400x1050" "1024x768" "800x600" "640x480"

   EndSubsection

   

   Subsection "Display"

       Depth 16

       Modes "1152x864" "1400x1050" "1024x768" "800x600" "640x480"

   EndSubsection

   

   Subsection "Display"

       Depth 24

       Modes "1152x864" "1400x1050" "1024x768" "800x600" "640x480"

   EndSubsection

EndSection

 

Then go back to console and make a "X -probeonly". This will check your configuration and logs all to "/var/log/XFree86.0.1". If there are no errors, you can try it with "X". If it switches to your new resolution, all is done.

If it doesn't or, if it does, but the screen is unreadable or the refreshrate is wrong, go to the next step. Remember "<ctrl>-<alt>-Backspace" to kill X.

 

2.2 Defining a modeline (change refresh rate, too)

The way now is: first getting a basic modeline that will be used to begin. Then finetune it if necessary.

 

2.2.1 Getting a modeline

Please check out this link to find out your first modeline. Just type in your wanted resolution and refresh rate.

Following an example:

 

# 1024x768 @ 100Hz,  81.00 kHz hsync

Mode "1024x768"

   DotClock    110.16

   HTimings  1024 1056 1168 1360

   VTimings  768 772 776 810

EndMode

 

That above is EXACT THE SAME AS:

 

Modeline "1024x768" 110.16

 

Paste one of that examples in your "/etc/X11/XFreeconfig-4" file, in your monitors section.

 

Voilà.

 

Please check again if it works via "X -probeonly" and, if it worked, "X &".

If you now have to resize or move the window, you'll have to use "xvidtune". Don't panic, it's easy...

 

While X is working on "<ctrl>-<alt>+<F7>", type in the console "export DISPLAY=0:0". Afterwards "xvidtune". Then switch back to X again (<alt>-<F7>).

 

Click on the auto button to see the result of your changings immediately.

After using the sizing and moving buttons, you'll just have to modify the modeline. Therefor notice the colored values.

 

xvid-example.gif

 

You see 1 vertical.

 

Result:

Section "Monitor"

   Identifier "Studioworks900B"

   VendorName "LG"

   HorizSync 30-96

   VertRefresh 50-160

   Modeline "1024x768" 110.16 1024 1056 1168 1360 768 772 776 810

EndSection

or

Section "Monitor"

   Identifier "Studioworks900B"

   VendorName "LG"

   HorizSync 30-96

   VertRefresh 50-160

   Mode "1024x768"

      DotClock    110.16

      HTimings  1024 1056 1168 1360

      VTimings  768 772 776 810

   EndMode

EndSection

 

Now it's done. Have fun!

====================================================

 

 

 

Reference Link(s):

http://mandrakeusers.org/index.php?showtopic=576

Share this post


Link to post
Share on other sites
Sign in to follow this  

×