HOWTO: Rotate the screen in Linux using Nvidia

Posted by Bob Hazard On Monday, 23 November 2009 9 comments

When you open the normal display options in Ubuntu the choice to rotate your display in landscape or portrait mode is disabled if you are using proprietary NVIDIA drivers.

It turns out that NVIDIA disabled it for performance reasons and if you edit the xorg.conf file you can rotate the screen using xrandr.

TIP: If you are uncomfortable editing the system files make a backup of xorg.conf first because you might loose the desktop if you make a mistake. Copying the file back will restore the previous settings.

Open the /etc/X11/xorg.conf file in a text editor as root such as
gksu gedit /etc/X11/xorg.conf

Then look for the device section which should have the name of your graphics card, and add an option at the end which I have highlighted in bold:

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8800 GTS"
Option "RandRRotation" "true"

If you are using twinview with two monitors then you may have a second device1 add this line to that section as well

Save the file and log out so that the xserver will restart and apply the changes.

Now you can rotate the screen using the xrandr command (x rotate & resize) such as:
xrandr -o left

To restore the rotation use
xrandr -o normal
There are many options which you can see using xrandr --help or a quick google search


jwill said...

Works, but I get some performance issues (massive tearing on window movement). Probably something to do with optimizations for wide, fat resolutions. My resolution is 1080x1920, which is pretty ridiculous (but nice for coding).

Or Nvidia just doesn't like xrandr that much. On Windows, there's a rotation util included in the nvidia software...

Bob Hazard said...

If you are using compiz try enabling vsync. Tearing usually occurs when it draws faster than you monitor's refresh rate, such as 60hz

Martin Ankerl said...

awesome, thanks! this is great for reading stuff.

RedBaron said...

Awesome. Thanks for the helpful tip. Now I have to figure out how to get my tablet pointer orientated to the new -o right orientation, make a script for simple setting and I'm done. :) Must not be many folks using Linux with tablet PC's. :(

cyrux said...

Yeah, thanks
How do you guys come up with this stuff.

Kakemphaton said...
This comment has been removed by the author.
The Rock said...

New Year is the time for celebrations and joy. People have always celebrated New Year’s Eve with a lot of pomp and show.2018

Bradley Cooper said...

if you want to download valentines day image than you can visit our site and you can check out valentines day hd pictures

Omni Verma said...

ibps clerk exam papers download and IBPS Clerk last year papers in pdf