Chain Manager screen lock up on Vangelis (Resolved)

Hi @jofemodo and @riban,

I’m writing to follow up on the UI freeze issue I’m experiencing on my Pi 5 + Minix SF10T setup. I’ve been doing some deep diagnostics to help narrow this down.

Key Findings:

  1. Hardware seems stable: My setup works perfectly in Oram. The issue is specific to Vangelis.

  2. Reproducibility: It happens consistently not only with the OPT button but also when touching an instrument chain to access its options. Essentially, any interaction that triggers “Chain Options” causes a crash.

  3. Log Evidence: When it happens, I see EXIT STATUS => 101 and the X server connection is lost. I also noticed repeated multitouch warnings: 'Touch' object has no attribute 'y_root'.

Question: Could you explain how the “Chain Options” logic (or the GUI event handling) differs between Oram and Vangelis? It seems like Vangelis is much more sensitive to touch events in this specific context.

I am more than willing to run further tests, patch files, or collect specific debug data if you point me in the right direction. My goal is to get this resolved not just for me, but for other users with similar setups.

Best regards,

2 Likes

Hi @riban!

Could this warning from the log be useful to diagnose the problem?

Hi @Aethermind ,

Do bold touch OPT/ADMIN shows admin menú? In my case It does as expected and not freezing the ui. This IS really confusing: short touch fails and bold touch work.

Best regards

Hmmm… :thinking: Weird indeed. Not sure about it, probably tried also bold presses, but will check anyway. :+1:

Hi @smespresati,

I checked, and can report that in my case bold (or long) pressing OPT and Chain Manager does not make any difference: it freezes the GUI and isolates the cursor action from anything than pointing.

It is plausible that your issues relate to how multitouch is managed in zynthian. Try rolling back to before the last significant change to multitouch with this command:

git checkout 58814e8126f3ba0c340f0f36089a0083e0a672a8

and test whether you still have the same issue. You can restore back to the latest vangelis with the command:

git checkout vangelis

2 Likes

Thanks @riban :slight_smile:

It seems promising! I will try that this evening at the Zynthians, and will get back here.

Cheers :rainbow:

Thanks, @riban I will check it later this afternoon.

Hi, @riban , I couldn`t wait and I tried your advice. It works!!

1 Like

That is great! Now we need to figure out what breaks it. This could be labourious, but I know you are both willing to put in the effort to resolve this… :wink:

Now try this to see if it breaks:

git checkout 631c645d6e160f58f04c1456b5d368f193aa5cd6

The previous command has reverted to immediately before the last change to multitouch and this command rolls it forward one step to immediately after that change. This will help us to see if it is this change that triggered the issue.

This worked using this setup:

but doesn’t work if I use the setup that matches reolution of my touchscreen (and works in Oram) as follow:

In the other hand:

git checkout 631c645d6e160f58f04c1456b5d368f193aa5cd6

doesn’t work neither using Generic HDMI nor Wavesahare (is the profile that worked for me in Oram changing resolution to match my Minix sf10t).

Another weird things that is happening is, when rebooting, the splash image presented is Oram, despite is branch Vangelis.

Finally, I want you to consider if it’s worth it if the patch to multitouch that I use, maybe usefull for others (in case that this not break functionality for official kits or other supported hardware). This patch makes easy to configure some types of touch interfaces without the need to tweak/configure anything else)

#!/bin/bash
echo “— Configuración Maestra: Detección y Parcheo Blindado —”

1. Rutas

DRIVER_PATH=“/zynthian/zynthian-ui/zyngui/multitouch.py”
DATA_DIR=“/zynthian/zynthian-my-data/scripts”
mkdir -p “$DATA_DIR”

2. Restaurar original

cd /zynthian/zynthian-ui
git checkout zyngui/multitouch.py

3. Detectar y guardar configuración (sin tocar el código, solo para registro)

Buscamos eventos de entrada en /dev/input

DEVICE_PATH=$(grep -l “ABS_MT_SLOT” /sys/class/input/event*/device/capabilities/abs | head -n 1 | sed ‘s//sys/class/input/(.*)/device/capabilities/abs//dev/input/\1/’)
[ -z “$DEVICE_PATH” ] && DEVICE_PATH=“/dev/input/event0”
echo “DEVICE_PATH=$DEVICE_PATH” > “$DATA_DIR/touch-device.txt”

4. Aplicar tu Parche de Detección (Probado)

sed -i ‘s/if idev_caps[ecodes.EV_ABS][ecodes.ABS_Z][0] == ecodes.ABS_MT_SLOT:/if ecodes.EV_ABS in idev_caps and ecodes.ABS_MT_SLOT in idev_caps[ecodes.EV_ABS]:/’ “$DRIVER_PATH”

5. Aplicar tu Parche de Robustez (Probado)

sed -i ‘s/logging.info(f"Multitouch device {self.device_name} disconnected")/logging.warning(“Táctil perdido… Reintentando en 2s”); import time; time.sleep(2); self.open_device()/’ “$DRIVER_PATH”
sed -i ‘/break/d’ “$DRIVER_PATH”

echo “— Aplicado con éxito —”
systemctl restart zynthian

Wow, I very much look forward to trying your workaround, once at home in a couple of hours! :grinning_face::star:

I suspect this may be caused by vc4-kms-v3d overlay which significantaly changes the interface to the display. Is this actually required for your screen? This setting enables 3D (kinda GPU) functionality that zynthian does not use.

This does not look like the right way to implement this. If there is an advantage to using this modification then we should put it in the code, not dynamically patch the code. I need more info on what this is actually doing and why. I think you described this in another thread or issue ticket.

Hi @riban,

In my case (Waveshare 15.6" + Pi5 Gb) the roll-back statement didn’t find anything related stored in the Zynthian system:

root@zynthian://zynthian# git checkout 58814e8126f3ba0c340f0f36089a0083e0a672a8 
fatal: not a git repository (or any of the parent directories): .git

Hi @Aethermind , you have to run the command this way.

/zynthian/zynthian-ui/git checkout 58814e8126f3ba0c340f0f36089a0083e0a672a8

2 Likes

YES, now it works! The keypad is always on and touching the upper right corner doesn’t toggle it. Furthermore, there is obviously no Chain Manager call from bold pressing the top bar.

But finally OPT shows the chain manager, and chains can be added and edited!

What should I do now: rolling further back?..

Thanks :slightly_smiling_face:

1 Like

The next step is to review the changes that trigger this issue. I have already highlighted that vc4-kms-v3d is not currently supported nor required by zynthian so it will be good to remove that from the equation. I will look for that elusive “time” to do further investigation…

Alright! So, for the time being I will leave this touchscreen custom build as it is, obviously ignoring the recycle sign that would restore Vangelis to the testing state with the video issue. Right?

And, of course, later I will re-assemble the other custom setup based on Raspberry Pi500+ with HDMI and mouse, and apply the same roll-back command.

Cheers!

1 Like

Hi @riban, this is part of the multitouch.py code that I’ve patched.

line patched is:

if ecodes.EV_ABS in idev_caps and ecodes.ABS_MT_SLOT in idev_caps[ecodes.EV_ABS]:

and these ones:

logging.warning(“Táctil perdido… Reintentando en 2s”)

import time time.sleep(2)

self.open_device()

This is how it looks like.

def open_device(self):
“”" Open the input device to allow multitouch driver to capture events.

    event - tk touch event

    Disable xinput for the touch device to avoid double events.
    Start event processing thread.
    Disable multitouch detection. (After one touch we know whether there is an input that supports multitouch)
    """

    for device in glob("/dev/input/event*"):
        try:
            idev = InputDevice(device)
            idev_caps = idev.capabilities()
            # Look for the first device supporting multi-touch
            if ecodes.EV_ABS in idev_caps and ecodes.ABS_MT_SLOT in idev_caps[ecodes.EV_ABS]:
                self.max_x = idev_caps[ecodes.EV_ABS][ecodes.ABS_X][1].max
                self.max_y = idev_caps[ecodes.EV_ABS][ecodes.ABS_Y][1].max
                self._f_device = open(device, 'rb', self.EVENT_SIZE)
                for libinput in self.xinput("--list").split("\n"):
                    if idev.name in libinput and "slave  pointer" in libinput:
                        device_id = libinput.split("id=")[1].split()[0]
                        self.xinput("disable", device_id)
                self.device_name = idev.name
        except:
            pass
    self.detect = False
    if self._f_device:
        self.thread = Thread(target=self._run, name="Multitouch")
        self.thread.start()

def _run(self):
    """Event processing thread"""

    self._running = True
    logging.info(f"Starting multitouch on '{self.device_name}'")
    while self._running:
        try:
            r, w, x = select([self._f_device], [], [], 1)
            if r and r[0]:
                event = self._f_device.read(self.EVENT_SIZE)
                (tv_sec, tv_usec, type, code, value) = struct.unpack(
                    self.EVENT_FORMAT, event)
                self._evdev_event_queue.put(TouchEvent(
                    tv_sec + (tv_usec / 1000000), type, code, value))
                if type == ecodes.EV_SYN:
                    self._process_evdev_events()
        except OSError:
            # Touchscreen driver may have been unloaded so stop thread and enable detection of multitouch (on next xinpu>
            logging.warning("Táctil perdido... Reintentando en 2s"); import time; time.sleep(2); self.open_device()
    self.detect = True

With this patch my touch interface works as near native one.