You are not logged in.

#1 2013-02-06 04:29:14

ke1v3y
Member
Registered: 2013-02-06
Posts: 16

[Solved] Making xRandR Changes Permanent

This is my first post on the Arch forums, so forgive any minor transgressions.

I am running my first Arch distro with Xfce as the DE and SLiM as my DM. I have a dual screen setup with two identical monitors configured using the aRandR GUI. I am relying on the open source drivers.

Using aRandR, I am able to get my setup to work beautifully; however, I am struggling to make it persistent at boot.


I followed the instructions in the wiki here, but have not had any luck to date.

My xorg.conf file is as follows:

Section "Monitor"
    Identifier  "VGA-0"
    Option      "Primary" "true"
    Option "Position" "0 0"
EndSection
#
Section "Monitor"
    Identifier  "DVI-0"
    Option      "RightOf" "VGA1"
EndSection

The output of xrandr -q is as follows:

Screen 0: minimum 320 x 200, current 2560 x 1024, maximum 4096 x 4096
VGA-0 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 340mm x 270mm
   1280x1024      60.0*+   75.0  
   1280x960       60.0  
   1280x800       74.9     59.8  
   1152x864       75.0  
   1280x768       74.9     59.9  
   1024x768       75.1     70.1     60.0  
   1024x576       60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   848x480        60.0  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
DVI-0 connected 1280x1024+1280+0 (normal left inverted right x axis y axis) 340mm x 270mm
   1280x1024      60.0*+   75.0  
   1280x960       60.0  
   1280x800       74.9     59.8  
   1152x864       75.0  
   1280x768       74.9     59.9  
   1024x768       75.1     70.1     60.0  
   1024x576       60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   848x480        60.0  
   640x480        72.8     75.0     66.7     60.0  
   720x400        70.1  
S-video disconnected (normal left inverted right x axis y axis)

Any idea what is wrong?

Last edited by ke1v3y (2013-02-06 06:16:48)

Offline

#2 2013-02-06 05:02:52

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

Re: [Solved] Making xRandR Changes Permanent

you can simply put the xrandr command in your .xinitrc or you could try it with a 10-monitor.conf since xorg.conf is no longer used.


Forum Rules

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

Offline

#3 2013-02-06 05:15:39

ke1v3y
Member
Registered: 2013-02-06
Posts: 16

Re: [Solved] Making xRandR Changes Permanent

I read that in some of the other forum posts, but in my noob-ness I didn't know what xrandr command I would need to load into my .xinitrc hmm

Offline

#4 2013-02-06 05:41:43

devrepublic
Member
Registered: 2013-02-06
Posts: 20

Re: [Solved] Making xRandR Changes Permanent

Hey k1v3y,

Since you mentioned you're using Xfce, here's what I did with mine:

Go to: Settings > Session and Startup > Add > Copy paste the xrandr command to the command box.

Here's a screenshot, might help:

http://i.imgur.com/DztulJI.png

I tried adding it to ~/.xinitrc before but for some reason it just won't work.

Last edited by devrepublic (2013-02-06 05:56:30)

Offline

#5 2013-02-06 05:58:20

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

Re: [Solved] Making xRandR Changes Permanent

ke1v3y wrote:

I read that in some of the other forum posts, but in my noob-ness I didn't know what xrandr command I would need to load into my .xinitrc hmm

xrandr --output DVI-0  --right-of VGA-0

Forum Rules

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

Offline

#6 2013-02-06 06:03:51

ke1v3y
Member
Registered: 2013-02-06
Posts: 16

Re: [Solved] Making xRandR Changes Permanent

EDIT: See post below

Last edited by ke1v3y (2013-02-06 06:10:05)

Offline

#7 2013-02-06 06:15:15

ke1v3y
Member
Registered: 2013-02-06
Posts: 16

Re: [Solved] Making xRandR Changes Permanent

By plugging lnxsible's command into my .xinitrc file, I was able to make the dual screen setup persistent through boots; the second monitor is activated after logging in, but before loading the desktop.

In case anyone is curious, my .xinitrc file looks like this:

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

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

xrandr --output DVI-0  --right-of VGA-0

# exec gnome-session
# exec startkde
exec startxfce4
# ...or the Window Manager of your choice

I'm going to mark this thread as solved; mods, do as you will cool

Offline

#8 2013-02-06 06:16:14

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

Re: [Solved] Making xRandR Changes Permanent

you have to mark your own thread solved by editing the 1st post and appending [SOLVED] to the thread title smile


Forum Rules

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

Offline

#9 2013-02-06 06:17:58

ke1v3y
Member
Registered: 2013-02-06
Posts: 16

Re: [Solved] Making xRandR Changes Permanent

Yeah, yeah... it took me a minute to find the right buttons tongue

Thanks for your help!

Offline

#10 2013-02-06 06:19:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Making xRandR Changes Permanent

ke1v3y wrote:

I'm going to mark this thread as solved; mods, do as you will cool

That's your job ;p

Edit your first post and prepend [Solved] to the title.


For extra credit, you could write a udev rule that detects when the second monitor is plugged in, and makes the xrandr change for you...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB