Linux 4 Tegra Display Resolutions, Rotation, Scaling, and Flipped Mouse Pointer

Hello People,

My goal is to have the display resolution of 804x1286 and to have the display rotated ninety degrees (landscape) making it 1286 x 804.

When I boot Ubuntu I only see one display resolution available. The resolution is 1200x1900 and it is in portrait mode.

I have attempted to add resolutions to xorg.conf manually and tried to use xrandr to add resolutions. These attempts appear to have failed.

I have been able to use xrandr to scale the resolution. Combined with the option to rotate the display using the display options applet, I can get what I want. However, this does not apply to other window managers (xubuntu or lubuntu, for example) and has to be performed upon every reboot.
When I do this, the cursor appears flipped and reversed, i.e. moving down and to the right moves the cursor up and to the left … kinda.

How can I add display resolutions so that I can select them from the display applet and are available to xubuntu, lubuntu, etc)?

Thank you,

=thoth=

Some Info:

gtf 1286 804 60

# 1288x804 @ 60.00 Hz (GTF) hsync: 49.92 kHz; pclk: 84.26 MHz
Modeline "1288x804_60.00"  84.26  1288 1352 1488 1688  804 805 808 832  -HSync +Vsync

xrandr

Screen 0: minimum 8 x 8, current 1200 x 1920, maximum 16384 x 16384
DSI-0 connected primary 1200x1920+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1200x1920      60.0*+
HDMI-0 disconnected (normal left inverted right x axis y axis)

xrandr --q1

SZ:    Pixels          Physical       Refresh
*0   1200 x 1920   ( 406mm x 650mm )  *50
 1   1024 x 768    ( 346mm x 260mm )   51
 2    800 x 600    ( 270mm x 203mm )   52
 3    640 x 480    ( 216mm x 162mm )   53
 4   1200 x 675    ( 406mm x 228mm )   54
Current rotation - normal
Current reflection - none
Rotations possible - normal left inverted right
Reflections possible - X Axis Y Axis

Does not exist:

/etc/X11/xorg.conf.d/10-monitor.conf

and is instead located at

/usr/share/X11/xorg.conf.d/10-monitor.conf

/usr/share/X11/xorg.conf.d/10-monitor.conf (one attempt to add a mode)

Section "Monitor"
  Identifier "Monitor0"
  Modeline "1280x800_60.00"  83.46  1280 1344 1480 1680  800 801 804 828  -HSync +Vsync
EndSection
Section "Screen"
  Identifier "Screen0"
  Device "DSI-0"
  Monitor "Monitor0"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "1280x800_60.00"
  EndSubSection

/etc/X11/xorg.conf

# Copyright (c) 2011-2013 NVIDIA CORPORATION.  All Rights Reserved.
#
# This is the minimal configuration necessary to use the Tegra driver.
# Please refer to the xorg.conf man page for more configuration
# options provided by the X server, including display-related options
# provided by RandR 1.2 and higher.

# Disable extensions not useful on Tegra.
Section "Module"
    Disable     "dri"
    SubSection  "extmod"
        Option  "omit xfree86-dga"
    EndSubSection
EndSection

/etc/X11/xorg.conf.jetson-tk1

# Copyright (c) 2011-2014 NVIDIA CORPORATION.  All Rights Reserved.
#
# This is the minimal configuration necessary to use the Tegra driver.
# Please refer to the xorg.conf man page for more configuration
# options provided by the X server, including display-related options
# provided by RandR 1.2 and higher.

# Disable extensions not useful on Tegra.
Section "Module"
    Disable     "dri"
    SubSection  "extmod"
        Option  "omit xfree86-dga"
    EndSubSection
EndSection

Section "Device"
    Identifier  "Tegra0"
    Driver      "nvidia"
EndSection

Section "Monitor"
   Identifier "DSI-0"
   Option    "Ignore"
EndSection

Hello,

My fix for this is to use xinput to adjust a matrix used by something to determine cursor position.

xinput set-prop touch --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1

I use a script to make the three adjustments I need:

#!/bin/bash

# Use XRandR to rotate left once.
xrandr -o left


# Use XRandR to scale the display to sixty-six percent.
#       1286x804
#       XRandR = X Rotate and Resize
xrandr --output DSI-0 --scale 0.66666x0.66666


# Use XInput to change the Coordinate Transformation Matrix.
xinput set-prop touch --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1

I did note that when I use xrandr … --rotate to rotate the screen instead of xrandr -o, the end result seems to differ a bit.

Additionally, I am doing this with xubuntu.

=thoth=