You are not logged in.

#1 2010-08-23 02:07:35

threePhase
Member
From: United States
Registered: 2010-06-11
Posts: 8

[SOLVED] Run xrandr on ever startx

I'm currently attempting a dual monitor setup and I have found that the best fix for my setup is to run:

xrandr --output DVI-1 --auto --right-of DVI-0

What I am trying to do is run this after I run startx but it never seems to work out. I have tried placing it in .xinitrc, here is what that looks like:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
 exec startxfce4
 xrandr --output DVI-1 --auto --right-of DVI-0

Any suggestions would be greatly appreciated.

Thanks

Last edited by threePhase (2010-08-25 07:59:42)

Offline

#2 2010-08-23 02:13:03

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Run xrandr on ever startx

Try to execute xrandr first and startxfce4 later.

What kind of graphics card and driver are you using?

Last edited by karol (2010-08-23 02:17:04)

Offline

#3 2010-08-23 02:42:11

threePhase
Member
From: United States
Registered: 2010-06-11
Posts: 8

Re: [SOLVED] Run xrandr on ever startx

Yeah I tried switching the order but still the second monitor fails to work properly. I'm currently running a Radeon HD 2600XT (RV630) with the xf86-video-ati driver.

Offline

#4 2010-08-23 02:45:36

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] Run xrandr on ever startx

I have a Radeon HD 2400XT and I use xf86-video-ati as well. This is what I use in my xinitrc

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#


 eval `cat $HOME/.fehbg` &
 xrandr --output DVI-1 --auto --right-of DVI-0
 xsetroot -cursor_name left_ptr
 numlockx &
 echo "Starting at $(date)" >> ~/.config/i3/i3log
 exec i3 -V >> ~/.config/i3/i3log
 #sleep 1
 #exec musca >> /dev/null

I also had to create this 10-monitor.conf under /etc/X11/xorg.conf.d/  or you can even place the following in your xorg.conf. Both seem to work the same way.

Section "Device"
        Identifier      "ATI Technologies HD2400XT Pro"
        Driver          "radeon"
        #Option         "Monitor-DVI-0" "Monitor0"
        #Option         "Monitor-DVI-1" "Monitor1"
EndSection
Section "Monitor"
        Identifier      "DVI-0"
        Option          "DPMS" "true"
EndSection
Section "Monitor"
        Identifier      "DVI-1"
        Option          "DPMS" "true"
EndSection
Section "Screen"
       Identifier       "Screen0"
       Device           "ATI Technologies HD2400XT Pro"
       Monitor          "DVI-0"
       DefaultDepth     24
   
       SubSection "Display"
           Depth                24
           Modes                "1680x1050" "1280x1024" "1440x900" "1280x800" "1152x864" "1280x720" "1280x768" "832x624" "800x600" "640x480" "720x400"
           # ADD A VIRTUAL LINE TO PROVIDE FOR THE LARGEST SCREENS YOU WILL HOTPLUG 
           Virtual              2960 2960 
       EndSubSection
EndSection
Section "Screen"
       Identifier       "Screen1"
       Device           "ATI Technologies HD2400XT Pro"
       Monitor          "DVI-0"
       DefaultDepth     24
   
       SubSection "Display"
           Depth                24
           Modes                "1280x1024" "1280x800" "1280x768" "800x600" "640x480"
           # ADD A VIRTUAL LINE TO PROVIDE FOR THE LARGEST SCREENS YOU WILL HOTPLUG 
           Virtual              2960 2960 
       EndSubSection
EndSection

Section "ServerLayout"
        Identifier      "DualScreen"
        Screen          0 "Screen0"
        Screen          1 "Screen1" RightOf "Screen0"
EndSection

Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#5 2010-08-23 02:48:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Run xrandr on ever startx

@ threePhase
Where did your specify what DVI-0 and DVI-1 are? Do you have xorg.conf?

Offline

#6 2010-08-23 05:28:02

Proofrific
Member
Registered: 2008-01-05
Posts: 215

Re: [SOLVED] Run xrandr on ever startx

Does running your xrandr command work when you're already in your desktop environment?

xrandr --output DVI-1 --auto --right-of DVI-0

Offline

#7 2010-08-23 08:11:15

threePhase
Member
From: United States
Registered: 2010-06-11
Posts: 8

Re: [SOLVED] Run xrandr on ever startx

Alright, I made a 10-monitor config as Inxsible suggested and it seems to be working properly now. Before I wasn't using any conf files and just letting X11 try to figure it out. I believe what was happening was that it was trying to display the same resolution on both monitors and one of the monitors didn't support the resolution it was trying to use. That way when I activated that command with the --auto option it simply was correcting the resolution of the second monitor. I am still having an issue however (forgot to mention this earlier), for some reason the actual desktop is bleeding off the monitor. For example, my cursor as able to travel a bit above the to boundary of the screen or top toolbar on my window is partially cut off. Any ideas on how to fix that as well?

P.S.: Thanks so much again for all the help guys!

Offline

#8 2010-08-23 08:49:23

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] Run xrandr on ever startx

have you put down the correct monitor resolutions in the 10-monitor.conf file?

try

xrandr

to find out the supported resolutions for each of your monitors.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#9 2010-08-23 09:22:42

threePhase
Member
From: United States
Registered: 2010-06-11
Posts: 8

Re: [SOLVED] Run xrandr on ever startx

Yeah it all seems to be configured correctly but still the problem persists. Is there anyway to force a sort of boundary?

Offline

#10 2010-08-23 09:25:27

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] Run xrandr on ever startx

If you have defined the correct modes then the ServerLayout section should set the correct boundaries.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#11 2010-08-23 09:34:46

threePhase
Member
From: United States
Registered: 2010-06-11
Posts: 8

Re: [SOLVED] Run xrandr on ever startx

Well I'm fairly certain I have everything in correct working order. Here is my 10-monitor:

Section "Device"
        Identifier      "ATI Technologies HD 2600XT"
        Driver          "radeon"
        #Option         "Monitor-DVI-0" "Monitor0"
        #Option         "Monitor-DVI-1" "Monitor1"
EndSection
Section "Monitor"
        Identifier      "DVI-0"
        Option          "DPMS" "true"
EndSection
Section "Monitor"
        Identifier      "DVI-1"
#    DisplaySize    708 398        #In millimeters
        Option          "DPMS" "true"
EndSection
Section "Screen"
       Identifier       "Screen0"
       Device           "ATI Technologies HD 2600XT"
       Monitor          "DVI-0"
       DefaultDepth     24
   
       SubSection "Display"
           Depth                24
       Modes        "1280x1024" "1280x960" "1152x864" "1024x768" "832x624" "800x600" "640x480" "720x400"
           # ADD A VIRTUAL LINE TO PROVIDE FOR THE LARGEST SCREENS YOU WILL HOTPLUG 
           Virtual              2560 2560 
       EndSubSection
EndSection
Section "Screen"
       Identifier       "Screen1"
       Device           "ATI Technologies HD 2600XT"
       Monitor          "DVI-1"
       DefaultDepth     24
   
       SubSection "Display"
           Depth                24
       Modes         "1280x720" "1920x1080" "720x480" "640x480"
           # ADD A VIRTUAL LINE TO PROVIDE FOR THE LARGEST SCREENS YOU WILL HOTPLUG 
           Virtual              2560 2560 
       EndSubSection
EndSection

Section "ServerLayout"
        Identifier      "DualScreen"
        Screen          0 "Screen0"
        Screen          1 "Screen1" RightOf "Screen0"
EndSection

And here is the output from xrandr:

Screen 0: minimum 320 x 200, current 2560 x 1024, maximum 8192 x 8192
DVI-0 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 375mm x 301mm
   1280x1024      60.0*+   75.0  
   1280x960       75.0     70.0     60.0  
   1152x864       75.0     70.0     60.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
DIN disconnected (normal left inverted right x axis y axis)
DVI-1 connected 1280x720+1280+0 (normal left inverted right x axis y axis) 1600mm x 900mm
   1280x720       60.0*+
   1920x1080      60.0  
   720x480        59.9  
   640x480        60.0  

Last edited by threePhase (2010-08-23 09:36:16)

Offline

#12 2010-08-23 09:45:25

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] Run xrandr on ever startx

you virtual mode line is incorrect.

1280 + 1280 = 2560
but 1024 + 720 != 2560

Your virtual mode should be 2560 1744. Try to see if that changes anything.

EDIT : I just noticed that mine is incorrect as well. But I just notice the mouse going beyond on my smaller screen.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#13 2010-08-23 09:53:34

threePhase
Member
From: United States
Registered: 2010-06-11
Posts: 8

Re: [SOLVED] Run xrandr on ever startx

Ah I see. I did notice that earlier but I forgot to ask about it. However, even after changing that I am still getting that bleed.

EDIT: I think this actually might be an issue with the LCD Tv itself stretching the screen rather than the output coming from the machine. That being said I mark this as solved as my main issue was indeed resolved.

Last edited by threePhase (2010-08-25 07:58:43)

Offline

Board footer

Powered by FluxBB