Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have two Monitors and am using Arch Linux, setup like this:

  • 1280x1024(primary)
  • 1680x1050.(secondary)
  • ATI RADEON X1300
  • Open source ATI driver

On the boot screen my primary monitor(17") have correct resolution, my second CLONES the first and has same resolution(1280x1024).

I have to run xrandr TWICE after starting X to get correct resolution.

xrandr --output DVI-0 --mode 1280x1024 --output DVI-1 --mode 1680x1050 --left-of DVI-0

I tried to make this permanent, by adding the xrandr command to .xinitrc, but it didn't work. Now, if I wan't to get the correct resolution on both monitors, after starting X, I run xrandr TWICE.

I didn't define anything in xorg.conf (nor do I know how :) ) What can I do to fix this?

share|improve this question
    
Please write, how exactly did you put xrandr command in your .xinitrc. I have a similar setup and it works this way. –  rozcietrzewiacz Jul 29 '11 at 10:02
    
If you have to run it twice, and .xinitrc does not work, maybe try later. In my case, I use KDE, and I have option to setup scripts to be run after login, so my screens are setup after I successfully login. –  Grzegorz Wierzowiecki Sep 13 '11 at 22:07
    
Are you sure that your display manager even executes ~/.xinitrc? If it's in there and it is executed, it should work. Otherwise, your DM probably has an equivalent. –  Chris Down Sep 16 '11 at 1:46
add comment

2 Answers

I ran into this problem a couple times as well.

For some reason, my screens have a nasty habit of changing their "name" sometimes, rendering whatever piece of code I set out with xrandr useless.

First double check that the monitors are correctly identified:

xmax@max-desktop:~> xrandr
Screen 0: minimum 320 x 200, current 3360 x 1050, maximum 3360 x 1050
DFP1 disconnected (normal left inverted right x axis y axis)
DFP2 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      59.9*+
   1400x1050      59.9  
   1600x900       59.9  
   1360x1024      59.9  
   1280x1024      75.0     60.0  
   1440x900       59.9  
   1280x960       60.0  
   1280x800       60.0  
   1152x864       59.9     75.0  
   1280x768       60.0  
   1280x720       60.0  
   1024x768       75.0     60.0  
   800x600        75.0     60.3     56.2  
   640x480        75.0     59.9  
CRT1 disconnected (normal left inverted right x axis y axis)
CRT2 connected 1680x1050+1680+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      59.9*+
   1400x1050      59.9  
   1600x900       59.9  
   1360x1024      59.9  
   1280x1024      75.0     60.0  
   1440x900       75.0     59.9  
   1280x960       60.0  
   1280x800       60.0  
   1152x864       59.9     75.0  
   1280x768       60.0  
   1280x720       60.0  
   1024x768       75.0     60.0  
   800x600        75.0     60.3     56.2  
   640x480        75.0     59.9  

If the names are right, then I suspect that the system is NOT reading ~/.xinitrc at boot or you've entered the command incorrectly.

share|improve this answer
add comment

Putting xrandr commands in .xinitrc is not a proper way to store permanent settings. You should use xorg.conf instead.

So start from removing the xrandr lines from your .xinitrc, and then create (or edit) an /etc/X11/xorg.conf file. It should look exactly like this (no more content is needed unless you want to configure keyboard, mouse or similar devices):

Section "Monitor"
     Identifier "First monitor"
     Option     "PreferredMode"   "1280x1024"
EndSection

Section "Monitor"
     Identifier "Second monitor"
     Option     "PreferredMode"   "1680x1050"
     Option     "LeftOf"          "First monitor"
EndSection

Section "Device"
    Identifier  "Radeon X1300"
    Driver      "radeon"
    Option      "Monitor-DVI-0"   "First monitor"
    Option      "Monitor-DVI-1"   "Second monitor"
EndSection
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.