- 1 Resetting an out-of-range resolution
- 2 Dynamically testing different resolutions
- 3 Adding undetected resolutions
- 4 Making xrandr changes persistent
- 5 Troubleshooting
- 6 Obtaining modelines from Windows program PowerStrip
- 7 Scripts
Resetting an out-of-range resolution
Dynamically testing different resolutions
You can either use the Template:Codeline GUI tool to experiment with different resolutions, or the more powerful Template:Codeline command-line tool. It shows you the names of different outputs available on your system (LVDS, VGA-0, etc.) and resolutions available on each:
Screen 0: minimum 320 x 200, current 1400 x 1050, maximum 1400 x 1400 VGA disconnected (normal left inverted right x axis y axis) LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 286mm x 214mm 1400x1050 60.0*+ 50.0 [...]
You can direct xrandr to set a different resolution like this:
xrandr --output LVDS --mode 1024x768
The refresh rate may also be changed, either at the same time or independently:
xrandr --output LVDS --mode 1024x768 --rate 75
Adding undetected resolutions
Due to buggy hardware or drivers, your monitor's correct resolutions may not always be detected. For example, the EDID data block queried from your monitor may be incorrect.
If the mode already exists, but just isn't associated for the particular output, you can add it like this:
xrandr --addmode S-video 800x600
If the mode doesn't yet exist, you'll need to create it first by specifying a modeline:
xrandr --newmode <Mode Line>
You may create a modeline using the Template:Codeline or Template:Codeline utility. For example, if you want to add a mode with resolution 800x600, you can enter the following command: (The output is shown following.)
$ cvt 800 600 # 800x600 59.86 Hz (CVT 0.48M3) hsync: 37.35 kHz; pclk: 38.25 MHz Modeline "800x600_60.00" 38.25 800 832 912 1024 600 603 607 624 -hsync +vsync
Then copy the information after the word "Modeline" into the xrandr command:
xrandr --newmode "800x600_60.00" 38.25 800 832 912 1024 600 603 607 624 -hsync +vsync
Making xrandr changes persistent
There are several ways to make xrandr customizations permanent from session to session:
Setting resolution changes in xorg.conf (Preferred)
While Template:Codeline is largely empty these days, it can still be used for setting up resolutions. For example:
Setting xrandr commands in xprofile
This method has the disadvantage of occurring fairly late in the startup process thus it will not alter the resolution of the Display Manager if you use one.
Setting xrandr commands in kdm/gdm startup scripts
This process requires root access and mucking around in system config files, but will take effect earlier in the startup process than using xprofile.
Resolution lower than expected
Try this first
If you video card is recognized but the resolution is lower than you expect, you may try this.
Background: ATI X1550 based video card and two LCD monitors DELL 2408(up to 1920x1200) and Samsung 206BW(up to 1680x1050). Upon first login after installation, the resolution default to 1152x864. xrandr does not list any resolution higher than 1152x864. You may want to try editing /etc/X11/xorg.conf, add a section about virtual screen, logout, login and see if this helps. If not then read on.
Change xorg.conf Template:File
About the numbers: DELL on the left and Samsung on the right. So the virtual width is of sum of both LCD width 3600=1920+1680; Height then is figured as the max of them, which is max(1200,1050)=1200. If you put one LCD above the other, use this calculation instead: (max(width1, width2), height1+height2).
Use cvt/xrandr tool to add the highest mode the LCD can do
The actual order was different, as I tried to add new mode to one LCD at a time. Below is the combined/all-in-one quote
$ cvt 1920 1200 60 # 1920x1200 59.88 Hz (CVT 2.30MA) hsync: 74.56 kHz; pclk: 193.25 MHz Modeline "1920x1200_60.00" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync $ cvt 1680 1050 60 # 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz Modeline "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync $ xrandr --newmode "1920x1200_60.00" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync $ xrandr --newmode "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync $ xrandr --addmode DVI-1 "1920x1200_60.00" $ xrandr --addmode DVI-0 "1680x1050_60.00"