How to rotate display including mouse cursor on

Started by att2, June 15, 2017, 11:51:51 pm

Previous topic - Next topic

att2

I have an olimex a20 olinuxino lime2 with emmc;
OS=debian 8.3 jessie;

I want to rotate the screen ;
I changed usr/share/X11/xorg.conf/99-something.conf and added

Quoteoption "rotate" "cw"


Now the screen is rotated but the mouse cursor is not rotated.

The mouse position is incorrect. When you e.g. select a rectangle the upper left corner of the
rectangle does not match the mouse position. Neither does the movement of the mouse direction match the actually moved mouse. You select a totally different rectangle than you would guess, and you select it in a totally different direction opposite to your real mouse movements.

So how to get the mouse right once you have rotated the display?


LubOlimex

Are you using a real mouse or you are using the touchscreen and meaning the mouse cursor? For the first touchscreen calibration after you have rotated the display - use a mouse instead of the touchscreen. Alternatively, again edit 99-calibration.conf (or create it if it is missing) and enter manually the coordinates, they should come as number in this line:

Option "Calibration" "236 26301 169 16412" - note that these are not actual values that I have tested; just pointing out where the calibration variables are stored - the four numbers are the coordinates of the crosses that you need to press during calibration.
Technical support and documentation manager at Olimex

SR-Digitronic

September 06, 2017, 11:32:42 am #2 Last Edit: September 22, 2017, 03:42:46 pm by SR-Digitronic
I can confirm this issue.
I added also added that to my xorg.conf and use a 4 inch LCD display with touch.
        Option          "Rotate" "UD"
Mouse cursor is turned upside down.
The cursor is displayed where I pressed with my finger, but the click gets registered at a different location.
ts_calibrate is displayed upside down, which is not a surprise since it does not use Xorg.

And when I invert the cursor via xorg, the clicks are still slightly off
        Option "InvertX" "on"
        Option "InvertY" "on"


So this maybe results from using an rotated framebuffer together with tslib. fbturbo uses a shadow framebuffer to realize the rotation.

Edit: It's the same when I use a hardware mouse via x2x
Edit: confused upside down and clockwise

SR-Digitronic

September 22, 2017, 04:38:34 pm #3 Last Edit: September 22, 2017, 04:40:44 pm by SR-Digitronic
I finally got it fixed!

Quote from: att2 on June 15, 2017, 11:51:51 pm
When you e.g. select a rectangle the upper left corner of the rectangle does not match the mouse position.


If you want Xorg to draw the cursor: (Cursor is where the click happens and gets displayed rotated)
        Option          "HWCursor" "false"

Quote from: att2 on June 15, 2017, 11:51:51 pm
you select it in a totally different direction opposite to your real mouse movements.


This needs some changes in /usr/share/X11/xorg.conf.d/90-calibration.conf

90° / CW:
Option "InvertY" "on"
Option "SwapAxes" "1"


180° / UD:
Option "InvertX" "on"
Option "InvertY" "on"


If it is still a bit off, try
su olimex -c "DISPLAY=:0.0 xinput_calibrator"

Important: xinput_calibrator does not permanently change your X settings, you have to manually write it to 90-calibration.conf

att2

Hello,
I still have the same problem: The mouse cursor is not rotated.
Moving the mouse I can see that the mouse system "believes" it is working in non-rotated mode.
The symptoms of this unwanted behaviour are as following: I cannot move the mouse cursor up to the upper/left edge of the screen. The upper/left edge is displaced by Y coordinate approximately 400 pixels (my guess).
Even if I can move the mouse around (in a wrong way) and if I click on a button or window, the clicked area is displaced from the locaction on the screen by seveal hundred pixels. I cannot click on the "start" button, because this is displaced.
I have tried everything that is written in here: a) edit xorg.conf with hwcursor false
b) edit 90-calibration.conf with all sort of options (rotate ccw, etc.)
c) change option calibration values

Nothing helped. So please, please help me again, the mouse cursor problem is really annoying.

I am using a real mouse connected on the USB port and not the touch screen.