You are not logged in.

#1 2010-06-13 00:19:22

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

[SOLVED]Changing monitor resolution on the fly

I have a monitor which can change its orientation from Landscape to Portrait. I have a ATI 2400XT Pro video card and it works great in windows. This helps when I am reading/debugging an extremely long method or want to step thru code.

I was wondering if I could get the same effect using simply xrandr or will I have to use the proprietary ATI drivers?

I tried :

 xrandr --size 1680x1050

and

xrandr --size 1050x1680

But they don't seem to do anything.

Here is my complete xorg.conf :

########################################
Section "Device"
    Identifier    "ATI Technologies HD2400XT Pro"
    Driver        "ati"
EndSection
Section "Monitor"
    Identifier    "DVI-1"
    Option        "DPMS" "true"
EndSection
Section "Monitor"
    Identifier    "DVI-0"
    HorizSync       30.0 - 72.0
        VertRefresh      50.0 - 120.0
    Option        "DPMS" "true"
    Option        "RightOf" "DVI-1"
EndSection
Section "Screen"
       Identifier    "Default Screen"
       Device        "ATI Technologies HD2400XT Pro"
       Monitor        "DVI-1"
       DefaultDepth    24
  
       SubSection "Display"
           Depth        24
           Modes        "1680x1050" "1050x1680" "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

######################################

Last edited by Inxsible (2010-07-13 06:01:04)


Forum Rules

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

Offline

#2 2010-06-13 01:31:17

masterkoppa
Member
Registered: 2009-04-14
Posts: 92

Re: [SOLVED]Changing monitor resolution on the fly

Do you use a DE by any chance? if you do you might get better results by using the GUI tools provided by the DE. Specially if you use KDE, on system settings theres an easy to use tool to change stuff like this. Otherwise i would recommend you read [wiki]xrandr[/wiki]. I believe that those commands you posted are incorrect, acording to the wiki you have to specify the output you will modify.

Hope this helps.

Offline

#3 2010-06-13 01:42:50

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

Re: [SOLVED]Changing monitor resolution on the fly

masterkoppa wrote:

Do you use a DE by any chance? if you do you might get better results by using the GUI tools provided by the DE. Specially if you use KDE, on system settings theres an easy to use tool to change stuff like this. Otherwise i would recommend you read [wiki]xrandr[/wiki]. I believe that those commands you posted are incorrect, acording to the wiki you have to specify the output you will modify.

Hope this helps.

No I do not use a DE. I should have mentioned that in my first post. I use Musca. I have also updated my first post to put in my xorg.conf


Forum Rules

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

Offline

#4 2010-06-13 02:00:47

masterkoppa
Member
Registered: 2009-04-14
Posts: 92

Re: [SOLVED]Changing monitor resolution on the fly

Did you try xrandr with the --output option?? If im not mistaken you must explicitly state the output you will modify.

Offline

#5 2010-06-13 02:15:46

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

Re: [SOLVED]Changing monitor resolution on the fly

xrandr --output DVI-1 --size 1050x1680

does nothing either sad

here's my xrandr output

╔═[22:15]═[inxs@ wolfdale]
╚═══===═══[~]>> xrandr
Screen 0: minimum 320 x 200, current 2960 x 1050, maximum 8192 x 8192
DIN disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1280x1024+1680+0 (normal left inverted right x axis y axis) 338mm x 270mm
   1280x1024      60.0*+
   1152x864       75.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  
DVI-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 433mm x 271mm
   1680x1050      60.0*+
   1280x1024      75.0     60.0  
   1440x900       59.9  
   1280x800       59.8  
   1152x864       75.0  
   1280x720       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

Last edited by Inxsible (2010-06-13 02:17:48)


Forum Rules

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

Offline

#6 2010-06-13 02:41:09

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

Re: [SOLVED]Changing monitor resolution on the fly

I also tried

xrandr --output DVI-1 --rotate right

Both my monitors went blank and then into power save mode and the only way I could get back in was by doing a hard reset.


Forum Rules

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

Offline

#7 2010-06-13 02:49:10

Square
Member
Registered: 2008-06-11
Posts: 435

Re: [SOLVED]Changing monitor resolution on the fly

To start up my external monitor, I need to issue either

xrandr --output VGA1 --auto
OR
xrandr --output VGA1 --mode 1024x768 --rate 75.1

Replace VGA1 and the other options with the correct info and try that smile

Then you can

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

or whatever you want to do with it.

Last edited by Square (2010-06-13 02:51:36)


 

Offline

#8 2010-06-13 05:16:54

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

Re: [SOLVED]Changing monitor resolution on the fly

Thanks. It gives me this

╔═[01:13]═[inxs @ wolfdale]
╚═══===═══[~]>> xrandr --output DVI-1 --mode 1050x1680 --rate 60.0
xrandr: cannot find mode 1050x1680

so I tried adding a new mode

╔═[01:16]═[inxs @ wolfdale]
╚═══===═══[~]>> xrandr --addmode DVI-1 1050x1680 --rate 60.0
xrandr: cannot find mode "1050x1680"

Last edited by Inxsible (2010-06-13 05:18:32)


Forum Rules

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

Offline

#9 2010-06-13 05:27:45

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED]Changing monitor resolution on the fly

Then you need to add that mode to your xorg.conf or something.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#10 2010-06-13 06:04:48

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

Re: [SOLVED]Changing monitor resolution on the fly

fsckd wrote:

Then you need to add that mode to your xorg.conf or something.

yup already there. See my xorg.conf in the first post.


Forum Rules

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

Offline

#11 2010-06-13 16:54:35

masterkoppa
Member
Registered: 2009-04-14
Posts: 92

Re: [SOLVED]Changing monitor resolution on the fly

EDIT: Sorry missread the xorg.conf....
I have no clue whatsoever with it doesn't work, sorry.

After searching for a while theres some pakages in aur that might help:

arandr
lxrandr

Try these tools to see if it helps

Last edited by masterkoppa (2010-06-13 17:00:40)

Offline

#12 2010-06-13 17:46:43

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

Re: [SOLVED]Changing monitor resolution on the fly

masterkoppa wrote:

EDIT: Sorry missread the xorg.conf....
I have no clue whatsoever with it doesn't work, sorry.

After searching for a while theres some pakages in aur that might help:

arandr
lxrandr

Try these tools to see if it helps

Thanks masterkoppa, but those are just frontend utilities that use xrandr itself. So I don't think that would help me much. I think more than adding that mode, I would have to look  into --rotate right option. Like  I mentioned, it made my monitors blank, so obviously its doing something. I just need to figure out what !! smile


Forum Rules

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

Offline

#13 2010-06-13 18:31:15

masterkoppa
Member
Registered: 2009-04-14
Posts: 92

Re: [SOLVED]Changing monitor resolution on the fly

Yeah but ussually these tools have been tested extensively and have specific checks and hacks for making the backend work. Thats why i recomended these tools. Also its a very nice convinience to have, specially since they don't have many dependencies...

Offline

#14 2010-06-13 19:29:12

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED]Changing monitor resolution on the fly

rotate does nothing for me, I use xrandr -o right or instead of right use left. To get back to normal use normal. Try that and see what happens.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#15 2010-06-13 19:47:27

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

Re: [SOLVED]Changing monitor resolution on the fly

fsckd wrote:

rotate does nothing for me, I use xrandr -o right or instead of right use left. To get back to normal use normal. Try that and see what happens.

╔═[15:46]═[inxs @ wolfdale]
╚═══===═══[~]>> xrandr --output DVI-0 -o right

No errors, but doesn't change the orientation either :-(


Forum Rules

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

Offline

#16 2010-06-13 20:19:49

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED]Changing monitor resolution on the fly

Ok, here's what you do. Get yourself a sawed off shotgun and a rusty old pickup. Drive to the house of an X.org dev. Bang on the front door while loudly screaming obscenities and fire a few warning shots through the windows. When the police arrive, stake your place on the porch and fight back. At the trial, emotionally describe how it was all because you couldn't get xrandr to rotate a second monitor. The dev will feel pity for you and offer some assistance. Voilà! Problem solved and all you'll have to give for it is 10+ years of jail time. big_smile


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#17 2010-06-13 20:45:45

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: [SOLVED]Changing monitor resolution on the fly

I'll just post my script:

#!/bin/sh

case $1 in
    -p) # for portrait
        # external monitor rotated to portrait; above internal laptop
        # monitor
        echo "External monitor"
        xrandr --output LVDS1 --mode 1280x800 --output HDMI1 --rotate left --above LVDS1 --mode 1680x1050
        xrandr --output LVDS1 --pos -115x1680 ;;
    -i) # for internal
        # external monitor off
        echo "No external monitor"
        xrandr --output LVDS1 --mode 1280x800 --output HDMI1 --off ;;
    -e) # for external
        # internal monitor off
        echo "Only external monitor"
        xrandr --output HDMI1 --mode 1680x1050 --output LVDS1 --off ;;
    *)  # standard layout; no flags: external and internal next to
        # each other, no rotation
        echo "External monitor widescreen"
        xrandr --output LVDS1 --mode 1280x800 --output HDMI1 --rotate normal --above LVDS1 --mode 1680x1050
        xrandr --output LVDS1 --pos 200x1050 ;;
esac

As you can see in the "-p" section, you just use --mode as if the monitor weren't rotated (in my case, 1680x1050 instead of 1050x1680).

Though I rather like fsckd's… solution.

Last edited by Runiq (2010-06-13 20:47:06)

Offline

#18 2010-06-13 21:46:47

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

Re: [SOLVED]Changing monitor resolution on the fly

fsckd wrote:

Ok, here's what you do. Get yourself a sawed off shotgun and a rusty old pickup. Drive to the house of an X.org dev. Bang on the front door while loudly screaming obscenities and fire a few warning shots through the windows. When the police arrive, stake your place on the porch and fight back. At the trial, emotionally describe how it was all because you couldn't get xrandr to rotate a second monitor. The dev will feel pity for you and offer some assistance. Voilà! Problem solved and all you'll have to give for it is 10+ years of jail time. big_smile

HA !! I plan to put the gun on his head and make him work until i can change the orientation. Then to destroy all evidence i burn everything......EVERYTHING !!!




MUHAHAHAHAHAHHAHAHAHAH


Forum Rules

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

Offline

#19 2010-06-13 22:06:09

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

Re: [SOLVED]Changing monitor resolution on the fly

Runiq, I tried the --rotate command in xrandr and if I use anything but normal in rotate, my monitors go off and the only thing i can do is a hard reset. I do not know why my WM shortcuts should also get disabled, but I cannot even exit X thru Alt + Shift + e which is a short cut in i3.


This just aint working out ! Damn it !


Forum Rules

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

Offline

#20 2010-06-13 22:10:10

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: [SOLVED]Changing monitor resolution on the fly

Inxsible wrote:

Runiq, I tried the --rotate command in xrandr and if I use anything but normal in rotate, my monitors go off and the only thing i can do is a hard reset. I do not know why my WM shortcuts should also get disabled, but I cannot even exit X thru Alt + Shift + e which is a short cut in i3.


This just aint working out ! Damn it !

Ah, okay, sorry. I thought you didn't try that exact line.

Does it perhaps work if you delete those Mode lines in xorg.conf? Maybe the two are interfering somehow…?

Offline

#21 2010-06-13 22:12:52

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

Re: [SOLVED]Changing monitor resolution on the fly

Runiq wrote:

Ah, okay, sorry. I thought you didn't try that exact line.

Does it perhaps work if you delete those Mode lines in xorg.conf? Maybe the two are interfering somehow…?

I will try that as well and let you guys know. Thanks.


Forum Rules

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

Offline

#22 2010-07-13 05:53:47

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

Re: [SOLVED]Changing monitor resolution on the fly

Any further pointers regarding this would be helpful.....

Thanks


Forum Rules

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

Offline

#23 2010-07-13 06:00:47

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

Re: [SOLVED]Changing monitor resolution on the fly

Never mind. I finally got it solved.


Forum Rules

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

Offline

#24 2010-07-13 06:02:56

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

Re: [SOLVED]Changing monitor resolution on the fly

Place the following line in the Device section:
Option "RandRRotation" "True"


Edit:

> Never mind. I finally got it solved.
You start to p*ss me off, ya know. IIRC it's the third time you beat me to it in the last couple hours :-)

So, how did you solve it?

Last edited by karol (2010-07-13 06:04:28)

Offline

#25 2010-07-13 06:14:15

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

Re: [SOLVED]Changing monitor resolution on the fly

Yeah

xrandr --output DVI-0 --rotate left

does what I need. Thr trouble was that I had to remove the mode 1050x1680 that I had manually put in xorg.conf. due to this mode in the xorg.conf, when I used the rotate switch with xrandr, bad things happened and the only recourse was hard reset.

Runiq had mentioned that kind of. But earlier I had removed both modes 1680x1050 and 1050x1680. So it didn't work at that time. I needed 1680x1050 but I had to remove 1050x1680 tongue

Last edited by Inxsible (2010-07-13 06:15:52)


Forum Rules

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

Offline

Board footer

Powered by FluxBB