Weston and Chromium crashes on iMX8MP after HDMI connector little movements (vibrations on touch)

I think that this issue is similar to this one.
I saw it on Torizon 7.1.0+build.4 (I cannot use 7.2.0+build.13 for this regression).
I use HDMI native connection and I connect an external display with USB touch screen.

When the user presses on the touch screen, the display has little vibrations.
Under these conditions, the HDMI connector can have quick false contacts (plug and cable).
Sometime, when this happens, chromium and weston crashes with the following log:

weston-imx8-1      | [11:50:47.874] DRM: head 'HDMI-A-1' updated, connector 35 is disconnected.
weston-imx8-1      | [11:50:47.875] Output 'HDMI-A-1' no heads left, disabling.
weston-imx8-1      | [11:50:47.875] Disabling output HDMI-A-1
weston-imx8-1      | [11:50:47.900] output for input device event0 removed
weston-imx8-1      | [11:50:47.900] output for input device event3 removed
weston-imx8-1      | [11:50:47.900] output for input device event4 removed
weston-imx8-1      | [11:50:48.588] DRM: head 'HDMI-A-1' updated, connector 35 is connected, EDID make 'ROW', model 'AAA', serial 'unknown'
weston-imx8-1      |                Supported EOTF modes: SDR
weston-imx8-1      | [11:50:48.606] Module '/usr/lib/aarch64-linux-gnu/libgbm.so' already loaded
weston-imx8-1      | [11:50:48.607] Output 'HDMI-A-1' attempts EOTF mode: SDR
weston-imx8-1      | [11:50:48.607] Output 'HDMI-A-1' using color profile: built-in default sRGB SDR profile
weston-imx8-1      | [11:50:48.615] Output HDMI-A-1 (crtc 33) video modes:
weston-imx8-1      |                1920x1080@60.0, preferred, 148.5 MHz
weston-imx8-1      |                1920x1080@60.0, 148.5 MHz
weston-imx8-1      |                1920x1080@60.0 16:9, current, 148.5 MHz
weston-imx8-1      |                1920x1080@59.9 16:9, 148.4 MHz
weston-imx8-1      |                1920x1080@50.0 16:9, 148.5 MHz
weston-imx8-1      |                1680x1050@59.9, 119.0 MHz
weston-imx8-1      |                1280x1024@60.0, 108.0 MHz
weston-imx8-1      |                1280x960@60.0, 108.0 MHz
weston-imx8-1      |                1366x768@60.0, 85.8 MHz
weston-imx8-1      |                1280x800@59.9, 71.0 MHz
weston-imx8-1      |                1280x720@60.0, 74.2 MHz
weston-imx8-1      |                1280x720@60.0 16:9, 74.2 MHz
weston-imx8-1      |                1280x720@59.9 16:9, 74.2 MHz
weston-imx8-1      |                1280x720@50.0 16:9, 74.2 MHz
weston-imx8-1      |                1024x768@75.0, 78.8 MHz
weston-imx8-1      |                1024x768@70.1, 75.0 MHz
weston-imx8-1      |                1024x768@60.0, 65.0 MHz
weston-imx8-1      |                800x600@75.0, 49.5 MHz
weston-imx8-1      |                800x600@72.2, 50.0 MHz
weston-imx8-1      |                800x600@60.3, 40.0 MHz
weston-imx8-1      |                800x600@56.2, 36.0 MHz
weston-imx8-1      |                720x576@50.0 16:9, 27.0 MHz
weston-imx8-1      |                720x576@50.0 4:3, 27.0 MHz
weston-imx8-1      |                720x480@60.0 4:3, 27.0 MHz
weston-imx8-1      |                720x480@60.0 16:9, 27.0 MHz
weston-imx8-1      |                720x480@59.9, 27.0 MHz
weston-imx8-1      |                720x480@59.9 16:9, 27.0 MHz
weston-imx8-1      |                720x480@59.9 4:3, 27.0 MHz
weston-imx8-1      |                640x480@75.0, 31.5 MHz
weston-imx8-1      |                640x480@72.8, 31.5 MHz
weston-imx8-1      |                640x480@60.0 4:3, 25.2 MHz
weston-imx8-1      |                640x480@59.9, 25.2 MHz
weston-imx8-1      |                640x480@59.9 4:3, 25.2 MHz
weston-imx8-1      |                720x400@70.1, 28.3 MHz
weston-imx8-1      | [11:50:48.616] associating input device event0 with output HDMI-A-1 (none by udev)
weston-imx8-1      | [11:50:48.616] associating input device event3 with output HDMI-A-1 (none by udev)
weston-imx8-1      | [11:50:48.617] associating input device event4 with output HDMI-A-1 (none by udev)
weston-imx8-1      | [11:50:48.618] Output 'HDMI-A-1' enabled with head(s) HDMI-A-1
weston-imx8-1      | g2d_blitEx: Invalid src rect, left 0, top 0, right 0, bottom 0, width 0, height 0, stride 0!
weston-imx8-1      | [11:50:48.620] SRC: physicAddr = 0 left = 0 right = 0 top=0 bottom=0 stride= 0 tiling = 0, format=0
weston-imx8-1      | [11:50:48.620] DST: physicAddr = afd00000 left = 0 right = 1920 top=0 bottom=1080 stride= 1920 tiling = 1, format=4
weston-imx8-1      | g2d_blitEx: Invalid src rect, left 0, top 0, right 0, bottom 0, width 0, height 0, stride 0!
weston-imx8-1      | [11:50:48.684] SRC: physicAddr = 0 left = 0 right = 0 top=0 bottom=0 stride= 0 tiling = 0, format=0
weston-imx8-1      | [11:50:48.684] DST: physicAddr = b0500000 left = 0 right = 1920 top=0 bottom=1080 stride= 1920 tiling = 1, format=4
weston-imx8-1      | g2d_blitEx: Invalid src rect, left 0, top 0, right 0, bottom 0, width 0, height 0, stride 0!
weston-imx8-1      | [11:50:48.812] SRC: physicAddr = 0 left = 0 right = 0 top=0 bottom=0 stride= 0 tiling = 0, format=0
weston-imx8-1      | [11:50:48.812] DST: physicAddr = 9f400000 left = 0 right = 1920 top=0 bottom=1080 stride= 1920 tiling = 1, format=4
weston-imx8-1      | [11:50:53.048] DRM: head 'HDMI-A-1' updated, connector 35 is disconnected.
weston-imx8-1      | [11:50:53.048] Output 'HDMI-A-1' no heads left, disabling.
weston-imx8-1      | [11:50:53.048] Disabling output HDMI-A-1
weston-imx8-1      | [11:50:53.077] output for input device event0 removed
weston-imx8-1      | [11:50:53.077] output for input device event3 removed
weston-imx8-1      | [11:50:53.077] output for input device event4 removed
weston-imx8-1      | [11:50:53.752] DRM: head 'HDMI-A-1' updated, connector 35 is connected, EDID make 'ROW', model 'AAA', serial 'unknown'
weston-imx8-1      |                Supported EOTF modes: SDR
weston-imx8-1      | [11:50:53.771] Module '/usr/lib/aarch64-linux-gnu/libgbm.so' already loaded
weston-imx8-1      | [11:50:53.771] Output 'HDMI-A-1' attempts EOTF mode: SDR
weston-imx8-1      | [11:50:53.771] Output 'HDMI-A-1' using color profile: built-in default sRGB SDR profile
weston-imx8-1      | [11:50:53.780] Output HDMI-A-1 (crtc 33) video modes:
weston-imx8-1      |                1920x1080@60.0, preferred, 148.5 MHz
weston-imx8-1      |                1920x1080@60.0, 148.5 MHz
weston-imx8-1      |                1920x1080@60.0 16:9, current, 148.5 MHz
weston-imx8-1      |                1920x1080@59.9 16:9, 148.4 MHz
weston-imx8-1      |                1920x1080@50.0 16:9, 148.5 MHz
weston-imx8-1      |                1680x1050@59.9, 119.0 MHz
weston-imx8-1      |                1280x1024@60.0, 108.0 MHz
weston-imx8-1      |                1280x960@60.0, 108.0 MHz
weston-imx8-1      |                1366x768@60.0, 85.8 MHz
weston-imx8-1      |                1280x800@59.9, 71.0 MHz
weston-imx8-1      |                1280x720@60.0, 74.2 MHz
weston-imx8-1      |                1280x720@60.0 16:9, 74.2 MHz
weston-imx8-1      |                1280x720@59.9 16:9, 74.2 MHz
weston-imx8-1      |                1280x720@50.0 16:9, 74.2 MHz
weston-imx8-1      |                1024x768@75.0, 78.8 MHz
weston-imx8-1      |                1024x768@70.1, 75.0 MHz
weston-imx8-1      |                1024x768@60.0, 65.0 MHz
weston-imx8-1      |                800x600@75.0, 49.5 MHz
weston-imx8-1      |                800x600@72.2, 50.0 MHz
weston-imx8-1      |                800x600@60.3, 40.0 MHz
weston-imx8-1      |                800x600@56.2, 36.0 MHz
weston-imx8-1      |                720x576@50.0 16:9, 27.0 MHz
weston-imx8-1      |                720x576@50.0 4:3, 27.0 MHz
weston-imx8-1      |                720x480@60.0 4:3, 27.0 MHz
weston-imx8-1      |                720x480@60.0 16:9, 27.0 MHz
weston-imx8-1      |                720x480@59.9, 27.0 MHz
weston-imx8-1      |                720x480@59.9 16:9, 27.0 MHz
weston-imx8-1      |                720x480@59.9 4:3, 27.0 MHz
weston-imx8-1      |                640x480@75.0, 31.5 MHz
weston-imx8-1      |                640x480@72.8, 31.5 MHz
weston-imx8-1      |                640x480@60.0 4:3, 25.2 MHz
weston-imx8-1      |                640x480@59.9, 25.2 MHz
weston-imx8-1      |                640x480@59.9 4:3, 25.2 MHz
weston-imx8-1      |                720x400@70.1, 28.3 MHz
weston-imx8-1      | [11:50:53.781] associating input device event0 with output HDMI-A-1 (none by udev)
weston-imx8-1      | [11:50:53.781] associating input device event3 with output HDMI-A-1 (none by udev)
weston-imx8-1      | [11:50:53.782] associating input device event4 with output HDMI-A-1 (none by udev)
weston-imx8-1      | [11:50:53.783] Output 'HDMI-A-1' enabled with head(s) HDMI-A-1
weston-imx8-1      | g2d_blitEx: Invalid src rect, left 0, top 0, right 0, bottom 0, width 0, height 0, stride 0!
weston-imx8-1      | [11:50:53.785] SRC: physicAddr = 0 left = 0 right = 0 top=0 bottom=0 stride= 0 tiling = 0, format=0
weston-imx8-1      | [11:50:53.785] DST: physicAddr = afd00000 left = 0 right = 1920 top=0 bottom=1080 stride= 1920 tiling = 1, format=4
weston-imx8-1      | g2d_blitEx: Invalid src rect, left 0, top 0, right 0, bottom 0, width 0, height 0, stride 0!
weston-imx8-1      | [11:50:53.851] SRC: physicAddr = 0 left = 0 right = 0 top=0 bottom=0 stride= 0 tiling = 0, format=0
weston-imx8-1      | [11:50:53.851] DST: physicAddr = b0500000 left = 0 right = 1920 top=0 bottom=1080 stride= 1920 tiling = 1, format=4
weston-imx8-1      | g2d_blitEx: Invalid src rect, left 0, top 0, right 0, bottom 0, width 0, height 0, stride 0!
weston-imx8-1      | [11:50:53.944] SRC: physicAddr = 0 left = 0 right = 0 top=0 bottom=0 stride= 0 tiling = 0, format=0
weston-imx8-1      | [11:50:53.944] DST: physicAddr = 9f400000 left = 0 right = 1920 top=0 bottom=1080 stride= 1920 tiling = 1, format=4
chromium-imx8-1    | [10:10:0520/115102.395008:ERROR:wayland_event_watcher.cc(64)] Fatal Wayland communication error: Broken pipe.
weston-imx8-1      | 00:32:21.987 [INFO] [seatd/client.c:471] Client disconnected
weston-imx8-1      | Switching back to vt 1
weston-imx8-1      | 00:32:22.469 [INFO] [seatd/seat.c:418] No clients on seat0 to activate
weston-imx8-1      | 00:32:22.469 [INFO] [seatd/seat.c:524] Closed client 7 on seat0
weston-imx8-1      | 00:32:22.469 [INFO] [seatd/seat.c:192] Removed client 7 from seat0
weston-imx8-1      | 00:32:22.469 [ERROR] [common/terminal.c:228] Could not ack VT release: Invalid argument
weston-imx8-1      | 00:32:22.469 [INFO] [seatd/seatd.c:218] seatd stopped
chromium-imx8-1 exited with code 0
weston-imx8-1 exited with code 139

Can someone investigate this issue, please?

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello, and thank you for your detailed description and logs.

The crash you’re describing is similar to the known issue where rapid HDMI plug/unplug (or false contacts, often caused by vibrations or loose cables) can cause Weston and any running Wayland applications (such as Chromium) to exit or crash on i.MX 8M Plus platforms. Your logs indicate that, during these disconnect/reconnect sequences, Weston loses and regains the display head, which seems to confuse some components, ultimately causing segmentation faults.

Key Points from Your Logs:

  • Frequent “HDMI-A-1 disconnected/connected” transitions.
  • Errors like g2d_blitEx: Invalid src rect....
  • Wayland client “Broken pipe”.
  • Weston crash with exited with code 139 (segmentation fault).

Relevant Information and Considerations:

  • This is typically a software robustness issue in display hotplug handling, particularly when HDMI events occur in rapid succession.
  • It is more likely to occur on platform/SoC combinations (like i.MX8MP) during unstable connector scenarios.
  • Similar bug reports have been seen in related environments(1), and the underlying challenge is typically within the DRM/KMS stack, Weston, or an interaction with graphics libraries (such as g2d).

Possible Workarounds and Mitigating Actions:

  1. Cable/Connector Stability:
    While hardware modification is out of scope, if possible, ensure the HDMI and USB connectors are securely inserted to minimize false contacts, as this is a trigger for the bug.

  2. Weston and Touch Input Settings:
    Double-check your touch device and display configuration in Weston. For input calibration with touch screens, refer to the TorizonCore documentation:
    Working with Weston on TorizonCore.

  3. Chromium Container Launch:
    When launching Chromium in your environment, make sure you’re using the recommended run options for i.MX8 to ensure correct permissions and interactions:
    Web Browser Kiosk Mode with TorizonCore.

    Example command:

    docker run -d --rm --name=chromium \
       -v /tmp:/tmp -v /var/run/dbus:/var/run/dbus \
       -v /dev/galcore:/dev/galcore --device-cgroup-rule='c 199:* rmw' \
       --security-opt seccomp=unconfined --shm-size 256mb \
       torizon/chromium-imx8:$CT_TAG_CHROMIUM
    
  4. System Robustness and Weston Restart:
    In production, consider supervising Weston and key GUI applications so they auto-restart if they crash. Systemd can monitor these processes and help ensure service continuity.

  5. Update Monitoring:
    Monitor TorizonCore and component (Weston, Linux kernel) updates for fixes; issues like these are typically addressed in later releases. While you are blocked by a regression in 7.2.0, keep an eye on newer releases where both issues may be resolved.

Summary:

  • This is a known issue occurring from rapid HDMI state changes.
  • Improving connector stability and ensuring correct configuration helps, but main resolution depends on software robustness improvements.
  • Watch for upcoming updates to TorizonCore and graphics stacks.

If you need further guidance on configuring Weston, container setup, or system service supervision, please let me know.

Best regards,
Toradex AI Assistant.

[1] Verdin iMX8M Plus | Toradex Developer Center
[2] Working with Weston on Torizon OS | Toradex Developer Center
[3] Web Browser / Kiosk Mode with Torizon OS | Toradex Developer Center

Hello @vix,

While investigating the linked issue, we saw a memory leak associated with the rapid plugging/unplugging of the HDMI port.
Can you check if you also see this in your system?

Regardless, it is important to better secure the HDMI cable on your device to reduce the likelihood of this problem happening.
Setting up the application and to restart would also be a measure to have in place, even for other possible crash causes.

Best Regards,
Bruno