More monitor fun with Natty Narwhal – rotating one screen

  After struggling with Natty’s multiple monitor support last week, I thought I’d test my luck again and try rotating screens.  My current favorite monitor is the Dell P2411H, a sturdy little 24" monitor that has more degrees of freedom than you’d imagine possible.  One of these degrees is the monitor’s ability to rotate 90 degrees, letting me comfortably fit over 130 lines of code vertically on the screen.  Less scrolling, more coding!

  Since I’m writing a post about this, you might have guessed that something didn’t work.  If you guessed that Natty completely broke xrandr rotation, well, you are unfortunately correct.  Luckily, all was not lost.  Here’s the fix (which will blast any other settings you have):

  1. Make sure you’re not using compiz/Unity!  As I mentioned last week, make sure that your current session is Ubuntu Classic (no effects), and, even better, change your default session under Administration->Login Window.
  2. OK, now start by moving your old xorg.conf out of the way from console:  $ sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.1
  3. Next up, run the nvidia-settings wizard: $ sudo nvidia-settings
    1. Under X Server Display Configuration, set up each of your monitors as a separate X screen.
    2. Check the Xinerama box.
    3. Save the X configuration file with the button in the lower right.
    4. I’m going to assume you can figure this out.  If not, there’s plenty of discussion on the Ubuntu forums about using nvidia-settings.
  4. Now open your xorg.conf in a text editor, e.g.: $ sudo gedit /etc/X11/xorg.conf
    1. Find the monitor that you’d like rotated, probably by looking for the ModelName field under Monitor section.  Note the Monitor’s Identifier, e.g., Monitor0.
    2. Find the screen that corresponds to this Monitor.  In general, nvidia-settings will match the numbers up, so Monitor0 will be controlled by Screen0.
    3. Add the following two options under the proper Screen section:
      1. Option         "RandRRotation" "on"
      2. Option         "Rotate" "CCW"
    4. Save the file!
  5. Log out and log back in.

  You should now be set!  Good luck.