I was trying to open a VNC session to interact remotely with a flutter application. However, I've noticed that once a VNC session is opened, touch input on the target does not work anymore and even if the VNC session is closed the touch inputs are still not functioning.
Environment:
I use Torizon OS on an iMX8M Plus, so I have to work through containers. However, it should be reproducible with similar steps on any platform. I have an image with flutter-elinux built into it:
FROM --platform=linux/arm64/v8 torizon/weston-vivante:3 AS runtime
ARG DEBIAN_FRONTEND=noninteractive
# Build environment dependencies for flutter-elinux
RUN apt-get -y update && apt-get install -y \
build-essential clang cmake \
curl git pkg-config \
ninja-build unzip wget \
libgtk2.0-dev libglib2.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
libgl-dev libegl-dev libegl1 libegl1-mesa-dev libgtk-3-dev \
libxkbcommon-dev libgles2-mesa-dev \
libwayland-dev wayland-protocols \
libavfilter8 libopencl1 \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa \
gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-pulseaudio v4l-utils \
locales
# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Clone Flutter 3.16.0
RUN git clone --branch 3.16.0 https://github.com/sony/flutter-elinux.git
# Add flutter-elinux to the path
ENV PATH="${PATH}:/home/torizon/flutter-elinux/bin"
I run it with a weston image with ENABLE_VNC=1 on the target. Torizon OS uses that environment variable to call weston with --backend=vnc-backend.so:
As you can see, I don't find the wl_pointer_listener.motion and wl_pointer_listener.button events anymore, there is just xdg_wm_base_listener.ping whenever I click somewhere in the VNC window.
As a side note, both RDP/VNC work fine for me on the same weston backend (in other wayland apps). I don't lose touch input on my device. There is some wayland apps though where the behavior is different (e.g. certain versions of Chromium in a VNC session will not receive any mouse/keyboard input but input on the target keeps functioning).
Hello,
I was trying to open a VNC session to interact remotely with a flutter application. However, I've noticed that once a VNC session is opened, touch input on the target does not work anymore and even if the VNC session is closed the touch inputs are still not functioning.
Environment:
I use Torizon OS on an iMX8M Plus, so I have to work through containers. However, it should be reproducible with similar steps on any platform. I have an image with flutter-elinux built into it:
I run it with a weston image with ENABLE_VNC=1 on the target. Torizon OS uses that environment variable to call weston with
--backend=vnc-backend.so
:I called the flutter-elinux image
flutter-client
:Then, I create a sample app, run it to try, build flutter-client with the debug engine .so from the sample and open a VNC session:
While I use Torizon OS with containers, this should be reproducible elsewhere.
Steps to reproduce
As you can see, I don't find the wl_pointer_listener.motion and wl_pointer_listener.button events anymore, there is just xdg_wm_base_listener.ping whenever I click somewhere in the VNC window.
For me, this seems similar to a discussion I saw on the Torizon forums (https://community.toradex.com/t/weston-rdp-vnc-no-mouse-input/19841/11) and a patch was mentioned which consists in supporting multiple wl_seats (https://github.com/Igalia/cog/commit/8e8b8218a7133d410ab657ee69b27fb029d85be7). The related issue (https://github.com/Igalia/cog/issues/214) mentions that "Wayland platform module only picks input events from the first event sources (keyboard, touch, pointer, etc.) advertised by the compositor".
I also could reproduce the problem with RDP.
As a side note, both RDP/VNC work fine for me on the same weston backend (in other wayland apps). I don't lose touch input on my device. There is some wayland apps though where the behavior is different (e.g. certain versions of Chromium in a VNC session will not receive any mouse/keyboard input but input on the target keeps functioning).
Best regards,