If I have only the internal monitor (LVDS1) with an xrandr -o left command. Now I want to attach a second monitor, say to HDMI1. Then I'd like to rotate only the internal monitor, but not the external one. I tried the following (with no external attached though, since I am mobile currently), but that does not do anything:

xrandr --output LVDS1 -o left

How can I rotate only one monitor?

I do need some command line, since I want to put this into a script.

  • are you using an nvidia graphics card?
    – tomodachi
    Jul 31, 2012 at 23:14
  • No, I use the Intel Card in the i5. Aug 2, 2012 at 12:01

2 Answers 2


The trick is to use the newer --rotate instead of -o which needs to be used with a --output argument:

xrandr --output "$internal" --rotate "$xrandr_rotation"


xrandr --output LVDS1 --rotate left
xrandr --output LVDS1 --rotate right
xrandr --output LVDS1 --rotate normal
xrandr --output LVDS1 --rotate inverted
  • 1
    and you can string these together for -- like so: xrandr --output VGA1 --auto --output HDMI2 --auto --right-of VGA1 or for |- like so: xrandr --output VGA1 --auto --pos 0x0 --rotate left --output HDMI2 --auto --pos 1200x300 May 20, 2014 at 7:47
  • 1
    You can use xrandr --query to find the name of the display adapter output that your monitor is plugged into (the above example, the monitor is plugged into LVDS1).
    – mathandy
    Jun 7, 2017 at 2:08
  • You are a savior! Whey the manpage still says -o is beyond me! Here we are, seven years later ... Apr 25, 2019 at 20:12
  • when i do this command, which works it leaves a large black bar running across my background image, as if the background image is no longer properly aligned with the screen. Any suggestions? Sep 9 at 2:05

If you open the System Settings and choose Displays there, you can select the monitor to rotate, and choose which rotation to use, for each individual monitor you wish to rotate.

  • 2
    This is nice, but not scriptable. So I need something which I can invoke from the command line. Jul 3, 2012 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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