[TX2][DISPLAY] We want to rotate screen for our 10'1" lcd panel.

Hi Nvidia:
Our lcd panel in our project is portrait. (800x1280)

We want to rotate our screen to 1280 x 800. (landscape)

We tried to use xrandr command to rotate screen.
It failed by it can’t open display.
But our lcd panel driver can show ubuntu normally.

root@tegra-ubuntu:~# xrandr -o left
Can’t open display

Can you provide some method for us to rotate screen?
Or tell us how to fix the problem “xrandr can’t open display”.

The xrandr command has to be associated with the display it functions on. If you run directly in the GUI, then inheritance does the job. If not, then from the GUI, run “echo $DISPLAY”. It’ll be something like “:0” or “:1”. Use that in the non-GUI while logged in as the same user which is logged in to the GUI, e.g.:

export DISPLAY=:1
xrandr -o left
# Alternately, without setting DISPLAY in the environment:
DISPLAY=:1 xrandr -o left

It works fine. Thanks!