I am using an i.MX7 with Torizon OS (ARMv7), and I am running my application on it.
I have already deployed a project on Torizon Cloud to run Weston in the background. That setup is working fine. On top of Weston, I want to run a PySide2 application.
I tried using a systemd service to start my application automatically on Weston. The application starts successfully, but the touch input does not work.
Below is my app.service file:
torizon@colibri-imx7-emmc-06673340:~$ cat /etc/systemd/system/app.service
[Unit]
Description=Octo App (Wayland Client)
After=docker.service systemd-udevd.service
Requires=docker.service
[Service]
WorkingDirectory=/home/torizon/
Wait for Wayland
ExecStartPre=/bin/bash -c ‘until [ -e /tmp/1000-runtime-dir/wayland-0 ]; do sleep 1; done’
Wait for input subsystem
ExecStartPre=/bin/bash -c ‘until [ -d /dev/input ]; do sleep 1; done’
ExecStartPre=/bin/bash -c ‘until ls /dev/input/event* >/dev/null 2>&1; do sleep 1; done’
Wait for udev (VERY IMPORTANT)
ExecStartPre=/bin/bash -c ‘udevadm settle’
Small delay for stability
ExecStartPre=/bin/sleep 2
Run docker properly
ExecStart=/usr/bin/docker compose up
ExecStop=/usr/bin/docker compose down
Restart=always
User=torizon
[Install]
WantedBy=multi-user.target
also check my docker-compose.yml
services:
app:
image: intersense123/octo:1
privileged: true
depends_on:
- weston
environment:
- QT_QPA_PLATFORM=wayland
- XDG_RUNTIME_DIR=/tmp/1000-runtime-dir
- QT_QPA_GENERIC_PLUGINS=evdevtouch
- QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event0
- QT_WAYLAND_DISABLE_WINDOWDECORATION=1
cap_add:
- SYS_TIME
- NET_ADMIN
- SYS_BOOT
volumes:
- /tmp:/tmp
- /tmp/1000-runtime-dir:/tmp/1000-runtime-dir
- /dev:/dev
- /media:/media
- /sys:/sys
- /etc/machine-id:/etc/machine-id:ro
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /var/run/systemd:/var/run/systemd
- /run/dbus:/run/dbus
- /run/udev:/run/udev
- /home/torizon/Precigo/precigo.db:/home/torizon/app/precigo.db
- /home/torizon/Precigo/OctoPreciGo.db:/home/torizon/app/OctoPreciGo.db
- /home/torizon/Precigo/Octo_CSV:/home/torizon/app/Octo_CSV
devices:
- /dev/ttymxc0
- /dev/rtc0
- /dev/rtc1
network_mode: host
If i run using docker-compose up it runs perfect and touch also works but sometime touch not works.
My goal is:
- Run the PySide2 application on Weston
- Enable autorun at boot
- Ensure touch input works correctly
Could someone guide me on how to properly configure this setup or what might be causing the touch issue?