I'm experiencing resolution issues with my dual monitor setup and an nVidia card under Linux, what should I do?
Sat, 2009-02-14 22:35 — admin
X.org supports something called "MetaModes" which lets you define different resolutions in X that you can instantly switch to without having to restart the X server or log out.
This example is only tested on a computer with an integrated nvidia chip, but should work with different graphic devices as well.
Find the resolution of your two monitors.
If you're using nvidia, run nvidia-settings, then click the X Server Display Configuration item in the tree view to the right.
Your screens will show the correct resolutions in the left part of the configuration window.
Note down the resolutions.
Open your xorg.conf file (usually located in /etc/X11/xorg.conf), and scroll down to the "Screen" section.
Comment out any "Option MetaModes ..." lines you may have there already, by putting a # in front of the line (should look something like "#Option MetaModes ..." after commenting it out).
Now, paste the following line in, under the line you commented out:
Option "MetaModes" "1680x1050,1600x1200;NULL,1600x1200;1680x1050,NULL"
The "MetaModes" setting is a semicolon-separated list of resolution combinations, defined like this:
"screen1,screen2". The first resolution should be whatever your currently running.
The second one in this example says that "screen1" should be off (NULL), and screen2 should run with 1600x1200 resolution. Use whatever you had in your nvidia-settings for your screen2.
The third one is similar, just the other way around, with the second monitor (screen2) turned off, and the first monitor running with maximum resolution.
The fourth one in my example has the first monitor running with max resolution (because it is the one that provides the *tallest* resolution (1050)), and the second one running the highest resolution that gives me the same height (1050).
Now, save this file, log out and log back in. (You may have to restart your X server - if so, just log out, press CTRL+ALT+Backspace, and then log in).
In hedgewars, in the screen section, you should now have several resolutions to choose from!
As an added bonus, you can also change the resolution on the fly in your Desktop Environment (GNOME or KDE), by running the screen resolution configuration tool (krandrtray in KDE, "Screen Resolution" in GNOME), and switch to any of the metamodes you defined earlier.
This example is only tested on a computer with an integrated nvidia chip, but should work with different graphic devices as well.
Find the resolution of your two monitors.
If you're using nvidia, run nvidia-settings, then click the X Server Display Configuration item in the tree view to the right.
Your screens will show the correct resolutions in the left part of the configuration window.
Note down the resolutions.
Open your xorg.conf file (usually located in /etc/X11/xorg.conf), and scroll down to the "Screen" section.
Comment out any "Option MetaModes ..." lines you may have there already, by putting a # in front of the line (should look something like "#Option MetaModes ..." after commenting it out).
Now, paste the following line in, under the line you commented out:
Option "MetaModes" "1680x1050,1600x1200;NULL,1600x1200;1680x1050,NULL"
The "MetaModes" setting is a semicolon-separated list of resolution combinations, defined like this:
"screen1,screen2". The first resolution should be whatever your currently running.
The second one in this example says that "screen1" should be off (NULL), and screen2 should run with 1600x1200 resolution. Use whatever you had in your nvidia-settings for your screen2.
The third one is similar, just the other way around, with the second monitor (screen2) turned off, and the first monitor running with maximum resolution.
The fourth one in my example has the first monitor running with max resolution (because it is the one that provides the *tallest* resolution (1050)), and the second one running the highest resolution that gives me the same height (1050).
Now, save this file, log out and log back in. (You may have to restart your X server - if so, just log out, press CTRL+ALT+Backspace, and then log in).
In hedgewars, in the screen section, you should now have several resolutions to choose from!
As an added bonus, you can also change the resolution on the fly in your Desktop Environment (GNOME or KDE), by running the screen resolution configuration tool (krandrtray in KDE, "Screen Resolution" in GNOME), and switch to any of the metamodes you defined earlier.