Randr rotation doesn't work

I tried to rotate one of my screens using xrandr, but nvidia driver doesn’t support it:

$ xrandr --output DP-3-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-3-2 --mode 1920x1080 --pos 1920x0 --rotate normal --output DP-2 --mode 1920x1080 --pos 3840x0 --rotate right --output eDP-1 --off

xrandr: output DP-2 cannot use rotation “right” reflection “none”

nvidia-settings tells me that “PRIME displays cannot be controlled by nvidia-settings and must be configured by an external RandR capable tool.” Setting meta modes via nvidia-settings does not do anything (won’t even print an error). I suppose there is no point in setting up metamodes in xorg.conf.

Here is contents of my nvidia-bug-report.log.gz: https://drive.google.com/file/d/0BzWoHuz3g6H1akFpYUpzdi1zUUU/view?usp=sharing

PS: nouveau driver can rotate DP-3-2 but is not able to wake it up after turning it off via xrandr --off.

Did you try xrandr --output DP-2 --rotate right or left ?

I tried both:

$ xrandr --output DP-2 --rotate right
xrandr: output DP-2 cannot use rotation "right" reflection "none"
$ xrandr --output DP-2 --rotate left
xrandr: output DP-2 cannot use rotation "left" reflection "none"

If you connect only one display to GPU board [DP-2] and unplug all other display and hit the command ?

Same thing happens. Note that I’m using thinkpad laptop connected via docking station. I can’t undock it because DP-2 is not on the notebook, only on dock. I ran these commands:

$ xrandr
Screen 0: minimum 8 x 8, current 5760 x 1080, maximum 16384 x 16384
eDP-1 connected
   1920x1080     60.02 +  59.93
   1680x1050     59.95    59.88
   1600x1024     60.17
   1400x1050     59.98
   1280x1024     60.02
   1440x900      59.89
   1280x960      60.00
   1360x768      59.80    59.96
   1152x864      60.00
   1024x768      60.04    60.00
   960x720       60.00
   928x696       60.05
   896x672       60.01
   960x600       60.00
   960x540       59.99
   800x600       60.00    60.32    56.25
   840x525       60.01    59.88
   800x512       60.17
   700x525       59.98
   640x512       60.02
   720x450       59.89
   640x480       60.00    59.94
   680x384       59.80    59.96
   576x432       60.06
   512x384       60.00
   400x300       60.32    56.34
   320x240       60.05
DP-1 disconnected
HDMI-1 disconnected
DP-2 disconnected 1920x1080+3840+0 0mm x 0mm
HDMI-2 disconnected
DP-3 disconnected
HDMI-3 disconnected
DP-3-1 disconnected 1920x1080+0+0 0mm x 0mm
DP-3-2 connected 1920x1080+1920+0 527mm x 296mm
   1920x1080     60.00*+  50.00    59.94
   1600x1200     60.00
   1600x900      60.00
   1280x1024     75.02    60.02
   1152x864      75.00
   1280x720      60.00    50.00    59.94
   1024x768      75.08    60.00
   800x600       75.00    60.32
   720x576       50.00
   720x480       60.00    59.94
   640x480       75.00    60.00    59.94
   720x400       70.08
DP-3-3 disconnected

$ xrandr --output DP-2 --rotate left
xrandr: output DP-2 cannot use rotation "left" reflection "none"

$ xrandr --output DP-2 --rotate right
xrandr: output DP-2 cannot use rotation "right" reflection "none"

It seems that RandRRotation is not used even though I have it in my xorg.conf, see here:

[  1120.448] (--) Depth 24 pixmap format is 32 bpp
[  1120.448] (==) modeset(G0): Backing store enabled
[  1120.448] (==) modeset(G0): Silken mouse enabled
[  1120.448] (II) modeset(G0): RandR 1.2 enabled, ignore the following RandR disabled message.
[  1120.511] (==) modeset(G0): DPMS enabled
[  1120.511] (WW) modeset(G0): Option "AllowEmptyInitialConfiguration" is not used
[  1120.511] (WW) modeset(G0): Option "IgnoreDisplayDevices" is not used
[  1120.511] (WW) modeset(G0): Option "RandRRotation" is not used
[  1120.629] (II) NVIDIA: Using 12288.00 MB of virtual memory for indirect memory
[  1120.629] (II) NVIDIA:     access.
[  1120.675] (II) NVIDIA(0): Built-in logo is bigger than the screen.
[  1120.675] (II) NVIDIA(0): Setting mode "NULL"
[  1120.682] (==) NVIDIA(0): Disabling shared memory pixmaps
[  1120.682] (==) NVIDIA(0): Backing store enabled
[  1120.682] (==) NVIDIA(0): Silken mouse enabled
[  1120.683] (==) NVIDIA(0): DPMS enabled
[  1120.683] (WW) NVIDIA(0): Option "RandRRotation" is not used
[  1120.683] (II) Loading sub module "dri2"
[  1120.683] (II) LoadModule: "dri2"
[  1120.683] (II) Module "dri2" already built-in
[  1120.683] (II) NVIDIA(0): [DRI2] Setup complete
[  1120.683] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[  1120.683] (--) RandR disabled
[  1120.687] (II) SELinux: Disabled on system
[  1120.688] (II) Initializing extension GLX
[  1120.688] (II) Indirect GLX disabled.

And this is my xorg.conf:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"

Section "Screen"
    Identifier "intel"
    Device "intel"

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:2@0:0:0"
    Option "ConstrainCursor" "off"
    Option "RandRRotation" "on"

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
    Option "RandRRotation" "on"

Yeah. This is because Canonical patches X to unconditionally disable rotation for PRIME. Our driver does support rotation. Please connect Canonical.

Please also see:

Bug-Ubuntu: https://launchpad.net/bugs/1386620
Bug-Ubuntu: https://launchpad.net/bugs/1308515
Bug-Ubuntu: https://launchpad.net/bugs/1489696

The three Ubuntu-Bugs are marked as resolved by now. The issue however persists. Is there a way for Ubuntu users to rotate the screen with Nvidia drivers? Can I install an unpatched x-server? What’s the outlook n this?