Touchscreen rotation with weston on wayland.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Touchscreen rotation with weston on wayland.

10,394 Views
new_user_
Contributor I

Hi,

We have i.mx6 board with a yocto-build (has weston service integrated with wayland compositor). We are facing issues with auto-rotate. Basically, we have configured the weston.ini file as per the documentation (weston.ini attached below). When we rotate the display the UI rotates but touchscreen doesn't rotate. When we rotate it by 180 degree the UI rotates as expected, but when we click on one of the menu for it opens other one (Example attached for reference). We have tried multiple configurations (as I was browsing the internet for solutions) but none of them works as expected.

We are using

Board : Toradex iMX6 Colibri board
BSP Version : BSP5
Weston version : 9
Touch Driver : STMPE-TS
Touch Driver Version : 1.0.1
Screen Connector : LVDS

Could anyone suggest any solution to resolve the issue.

P.S. I've attached westion.ini as weston_ini.txt as it's not supported. Also, libinput.rules, touchscreen.rules and save-calibration.sh is in other.txt file.

Tags (1)
0 Kudos
Reply
7 Replies

10,347 Views
new_user_
Contributor I

Hi  

Yes, we modified the transform (Normal, 180, rotate-180, flipped) and verified the rotation. The screen is rotating, flipping as expected. But touch is working only with 0 degree / normal even though the screen rotates to 180 or flipped. Touch works only for 0 degree. We modified the calibration.sh and kept values for 0 degrees separately and 180 degrees separately and verified. But no success. 

 

[core]
idle-time=0
use-g2d=1
xwayland=true
require-input=false

[shell]
panel-location=""
panel-position=none
locking=false
allow-zap=true
num-workspaces=1

[libinput]
enable-tap=true
touchscreen_calibrator=true
calibration_helper=/usr/bin/save-calibration.sh

[output]
name=fbdev
mode=640x480@60
transform=normal
#transform=rotate-180
#transform=flipped

[screen-share]
command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize

[input-method]
path=/usr/lib/invalidPath/weston-keyboard

[keyboard]
keymap_layout=ch
vt-switching=false

[xwayland]
path=/usr/bin/Xwayland

 

As you are saying touch function is combined with weston. But here, touch and screen rotation work differently

0 Kudos
Reply

10,295 Views
RoseCliver
Contributor I

Thanks a lot. It also help my query.

Best Wishes MyCenturaHealth
0 Kudos
Reply

10,298 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @new_user_ 

Are you using QT to develop application?

0 Kudos
Reply

10,280 Views
new_user_
Contributor I
No, we're using GTK3 and GTKMM3 for UI.
0 Kudos
Reply

10,276 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Here is libinput section, maybe you can add rotation=x.

 

#[libinput]
#enable-tap=true
#tap-and-drag=true
#tap-and-drag-lock=true
#disable-while-typing=false
#middle-button-emulation=true
#left-handed=true
#rotation=90
#accel-profile=flat
#accel-speed=.9
#natural-scroll=true
#scroll-method=edge
# For button-triggered scrolling:
#scroll-method=button
#scroll-button=BTN_RIGHT

 

0 Kudos
Reply

10,179 Views
new_user_
Contributor I

Hi @Zhiming_Liu 

We've tried the solution that you've mentioned above but it didn't work. If it helps here is a bit more about how we are implementing auto-rotation, we are using GPIO to rotate the display as shown below (by running a shell script from /usr/bin/). This causes the display to rotate as we desire but doesn't rotate the touch. We thought that if libinput and GPIO could communicate somehow then maybe it could work. Just a speculation at this point. Suggestions are welcome.

Following are the relevant lines from the script:

Rotating Screen using gpio pins:
-----------------------------------------------
For 0 degree rotation:
echo 1 > /sys/class/gpio/gpio89/value
echo 0 > /sys/class/gpio/gpio88/value

For 180 degree rotation:
echo 0 > /sys/class/gpio/gpio89/value
echo 1 > /sys/class/gpio/gpio88/value

0 Kudos
Reply

10,351 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

The touch function is combined with weston. How do you realize UI rotation? Have you modify the transform in weston.ini

0 Kudos
Reply