Skip to content

U1 touchscreen permanently blanks until reboot: /usr/bin/gui toggles /sys/class/drm/card0-DPI-1/status instead of backlight bl_power, wedging Rockchip VOP2/IOMMU (-EBUSY) #29

Open

Description

@Simon-CR

Summary

On the Snapmaker U1, when the touchscreen sleep timer (timeout_close_screen) blanks and unblanks the display, /usr/bin/gui calls system_module_force_screen_on_off(int is_on), which writes "off" and "on" to /sys/class/drm/card0-DPI-1/status instead of calling /usr/bin/gui's already-implemented system_module_set_screen_backlight_on_off(int is_on) (/sys/class/backlight/backlight/bl_power).

Forcing /sys/class/drm/card0-DPI-1/status to "off" triggers a full DRM atomic CRTC teardown (vop2_crtc_atomic_disable) and Rockchip IOMMU DMA detach (rk_iommu ff407e00.iommu). On the U1's Rockchip SoC (5.10.226), vop2_crtc_atomic_disable repeatedly times out (*ERROR* wait win close timeout / wait for vp0 dsp_hold timeout). When rk_iommu ff407e00.iommu times out waiting for the DMA stall (Enable stall request timed out, status: 0x00008b) and fails to detach (iommu driver failed to attach the default/blocking domain), every subsequent wake ("on") fails in vop2_crtc_atomic_enable with:

rockchip-drm display-subsystem: [drm:vop2_crtc_atomic_enable] *ERROR* vp0 failed to attach dma mapping, -16

Once vp0 fails to attach its DMA mapping (-EBUSY), the physical touchscreen remains permanently black until the printer is power-cycled/rebooted, even while prints continue normally and /usr/bin/gui continues rendering to /dev/fb0 in RAM.

(Reporting here for the U1 firmware/touchscreen engineering team, as /usr/bin/gui does not have a separate public repository.)


Firmware version

Snapmaker U1 2.1.0 (also reproducible on 2.0.0); Linux kernel 5.10.226 #1 SMP PREEMPT aarch64.


Root Cause & 1-Line Fix in /usr/bin/gui (snapmaker/module/system_module.c)

Inspection of /usr/bin/gui shows two adjacent functions in snapmaker/module/system_module.c:

  1. system_module_force_screen_on_off(int is_on) (0x188d40) — currently called by timer_1s_proc (timeout_close_screen), wake handlers, system_module_set_screen_wake_lock, and the Reset LCD !!! gesture in snapmaker/controller/system_controller.c:
    FILE *fp = fopen("/sys/class/drm/card0-DPI-1/status", "w");
    if (fp) {
        if (is_on == 0)
            fwrite("off", 1, 3, fp);
        else
            fwrite("on", 1, 2, fp);
        fclose(fp);
    }
  2. system_module_set_screen_backlight_on_off(int is_on) (0x188eb0) — already compiled into /usr/bin/gui right below system_module_force_screen_on_off, but never called:
    FILE *fp = fopen("/sys/class/backlight/backlight/bl_power", "w");
    if (fp) {
        if (is_on == 0)
            fwrite("1", 1, 1, fp);
        else
            fwrite("0", 1, 1, fp);
        fclose(fp);
    }

Why system_module_force_screen_on_off wedges the display:

  • Writing "off" to /sys/class/drm/card0-DPI-1/status forces DRM connector card0-DPI-1 into disconnected state (output_poll_execute -> rockchip_drm_output_poll_changed -> drm_fb_helper_hotplug_event -> drm_fb_helper_set_par -> vop2_crtc_atomic_disable).
  • Every disable logs VOP2 plane/DSP timeouts and detaches the IOMMU domain on ff407e00.iommu.
  • Furthermore, in snapmaker/controller/system_controller.c (event_handler_indev at 0x14b548, "Reset LCD !!!"), /usr/bin/gui calls system_module_force_screen_on_off(0) followed immediately by system_module_force_screen_on_off(1) with no delay, racing back-to-back VOP2 CRTC disable/enable commits.
  • When ff407e00.iommu times out during detach (status: 0x00008b), vop2_crtc_atomic_enable permanently fails with -16 (-EBUSY) on all subsequent wakes.

Recommended Fix in /usr/bin/gui:

  • In system_module_force_screen_on_off(int is_on) (or its callers), toggle /sys/class/backlight/backlight/bl_power ("1" for sleep, "0" for wake — as already implemented in system_module_set_screen_backlight_on_off) instead of writing "off"/"on" to /sys/class/drm/card0-DPI-1/status.
  • Optionally disable drm_kms_helper polling (echo N > /sys/module/drm_kms_helper/parameters/poll) since card0-DPI-1 is a fixed internal panel without hotplug.

How can the issue be reproduced?

  1. Enable screen sleep timeout (timeout_close_screen) on the Snapmaker U1.
  2. Allow the screen to sleep and wake across multiple sleep/wake cycles during normal operation/printing.
  3. Once rk_iommu ff407e00.iommu hits a stall timeout during vop2_crtc_atomic_disable, waking the screen turns on the backlight (bl_power = 0) while vp0 fails to attach its DMA mapping (-16), leaving the LCD completely black.

What was the actual result?

The physical LCD screen stays completely dark and cannot recover until a full system reboot.


What was the expected result?

Sleeping and waking the screen should only toggle the LCD backlight (/sys/class/backlight/backlight/bl_power) without tearing down the VOP2 CRTC (vp0) or wedging the Rockchip IOMMU DMA domain.


Log files

dmesg (selected lines showing the exact VOP2 + rk_iommu failure trace)

[373514.614331] rockchip-vop2 ff400000.vop: [drm:vop2_crtc_atomic_disable] Crtc atomic disable vp0
[373514.666037] rockchip-vop2 ff400000.vop: [drm:vop2_disable_all_planes_for_crtc] *ERROR* wait win close timeout
[373514.716058] rockchip-vop2 ff400000.vop: [drm:vop2_crtc_atomic_disable] wait for vp0 dsp_hold timeout
[373514.742646] rk_iommu ff407e00.iommu: Enable stall request timed out, status: 0x00008b
[373514.745687] rk_iommu ff407e00.iommu: Disable paging request timed out, status: 0x00008b
[373514.746982] ------------[ cut here ]------------
[373514.747037] WARNING: CPU: 3 PID: 17037 at drivers/iommu/iommu.c:2169 iommu_detach_device+0x74/0xac
[373514.747047] Call trace:
[373514.747052]  iommu_detach_device+0x74/0xac
[373514.747061]  rockchip_drm_dma_detach_device+0x28/0x50
[373514.747067]  vop2_crtc_atomic_disable+0x5f4/0x63c
[373514.747074]  drm_atomic_helper_commit_modeset_disables+0x1b0/0x390
[373514.747080]  drm_atomic_helper_commit_tail_rpm+0x24/0x6c
[373514.747086]  rockchip_drm_atomic_helper_commit_tail_rpm+0x88/0x9c
[373514.747091]  commit_tail+0x9c/0x138
[373514.747096]  drm_atomic_helper_commit+0x130/0x154
[373514.747104]  drm_atomic_commit+0x4c/0x5c
[373514.747111]  drm_client_modeset_commit_atomic+0x178/0x1fc
[373514.747117]  drm_client_modeset_commit_locked+0x5c/0x188
[373514.747122]  drm_client_modeset_commit+0x30/0x58
[373514.747129]  __drm_fb_helper_restore_fbdev_mode_unlocked+0xa0/0xc8
[373514.747133]  drm_fb_helper_set_par+0x3c/0x68
[373514.747138]  drm_fb_helper_hotplug_event.part.0+0xa0/0xc0
[373514.747144]  drm_kms_helper_hotplug_event+0x34/0x48
[373514.747149]  rockchip_drm_output_poll_changed+0x18/0x24
[373514.747154]  drm_kms_helper_poll_enable+0xec/0xf4
[373514.747159]  output_poll_execute+0x194/0x1c8
[373514.747209] rk_iommu ff407e00.iommu: iommu driver failed to attach the default/blocking domain
[388672.186259] rockchip-vop2 ff400000.vop: [drm:vop2_crtc_atomic_enable] Crtc atomic enable vp0[480x320p45, type: 17]
[388672.186368] rockchip-drm display-subsystem: [drm:vop2_crtc_atomic_enable] *ERROR* vp0 failed to attach dma mapping, -16

gui.log (selected lines)

2026-11-15 02:13:55.120 (: 798) <Controller System> {timer_1s_proc} ------- timeout_close_screen:0 ---------
2026-11-15 02:13:55.120 (: 814) <Controller System> {timer_1s_proc} close screen !!!
2026-11-15 02:13:55.121 (: 594) <Module System> {system_module_force_screen_on_off} is_on:0
2026-11-15 02:27:49.556 (: 594) <Module System> {system_module_force_screen_on_off} is_on:1

Activity

  1. Simon-CR commented on Nov 18, 2026

    @Simon-CR
    Author

    Firmware 2.1.2.159 Audit: Root Cause in /usr/bin/gui Remains Unpatched

    We saw the new 2.1.2.159 (U1_2.1.2.159_20261110113009_upgrade.bin) release notes published today, which state:

    "Fixed an issue in rare cases where the device occasionally failed to wake after auto screen-off, showing a black screen and becoming unresponsive."

    To verify whether the DRM connector status blanking bug reported in this issue was actually resolved, we unpacked U1_2.1.2.159_20261110113009_upgrade.bin and diffed its rootfs.img and boot.img against U1_2.1.0.157_20261028045538_upgrade.bin.

    1. What Changed in 2.1.2.159 (2.1.0.157 -> 2.1.2.159)

    1. Build Date Predates This Issue Report:
      • /etc/BUILDINFO shows 2.1.2.159 was compiled on November 10, 2026 (BUILD_TIME=20261110113009), five days before this issue was opened on November 15, 2026.
    2. Only unisrv and buildroot Changed in /info/manifest.xml:
      • snapmaker/unisrv: 93697c223d84ee36c04ec5d3cc2f361c34344969 -> 6e4d38b4202b6ee9addc7c3fee14b1529f48efa9
      • rockchip/rk3562_linux_sdk/linux/buildroot: aec87931ef89ae88ddeb63e04cb95a5c756693d1 -> 9d6861ff19fc05bad57898e9f7faea1a7107c8bd
      • Comparing the 2.1.0.157 and 2.1.2.159 firmware descriptor JSONs alongside /usr/bin/unisrv shows that 2.1.2.159 removed the 2.1.0.157 release note bullet "Optimized photo capture speed and memory usage on the device" and reverted /usr/bin/unisrv from Rockchip's librockit.so (RK_MPI_VI_* / RK_MPI_VENC_*) back to libv4l2.so.0.

    2. Why 2.1.2.159 Does Not Fix the Root Cause

    1. /usr/bin/gui Is 100% Unchanged:
      • In /info/manifest.xml, snapmaker/lava/gui is pinned to the exact same commit in both 2.1.0.157 and 2.1.2.159: ba16c20cd7c566c31d00ae0728604fe3e79d5bab.
      • Disassembling and comparing the .text section (0x00e800..0x1b9f70, 1,750,896 bytes) of /usr/bin/gui between 2.1.0.157 and 2.1.2.159 confirms zero instruction changes (only +0x1c0 .rodata pointer offsets shifted because the build directory name changed from U1_release_jenkins_20261027201800_b403fc32 to U1_release_huohuansong_20261110025222_d7278e58).
      • Specifically, system_module_force_screen_on_off() in 2.1.2.159 still opens /sys/class/drm/card0-DPI-1/status and writes "off" / "on" on every screen timeout and wake event instead of toggling /sys/class/backlight/backlight/bl_power.
    2. Kernel (boot.img), Device Tree, libdrm.so.2.4.0, and Touchscreen Driver (chsc6540.ko) Are 100% Unchanged:
      • kernel-6.1 remains at 9945bae4911459f3623e1405cacd17a52adabaa8, and the entire kernel .text section and Device Tree Blob in boot.img are byte-for-byte identical.

    3. Why Reverting unisrv Only Reduces Frequency Without Fixing the Bug

    When 2.1.0.157 switched unisrv to librockit.so (RK_MPI_VI_* / RK_MPI_VENC_*), continuous Rockit hardware media DMA increased contention on the shared RK3562 media/IOMMU/CMA bus. That bus contention made the Rockchip VOP2/IOMMU page-flip race ([drm:vop2_plane_atomic_check] *ERROR* Invalid fb: ..., dwhdmi-rockchip: [drm] *ERROR* failed to get edid, and rk_iommu ff118f00.iommu: IOVAD is not empty / -EBUSY) trigger much more frequently whenever /usr/bin/gui forced a full DRM connector disconnect/reconnect via /sys/class/drm/card0-DPI-1/status.

    Reverting unisrv back to libv4l2.so.0 in 2.1.2.159 lowers the IOMMU contention back to the pre-2.1.0 baseline, but does not fix the underlying bug: /usr/bin/gui is still tearing down and modesetting the hardwired DPI panel connector (/sys/class/drm/card0-DPI-1/status) on every screen sleep/wake while LVGL's render thread is actively submitting DRM page flips.

    Required Fix in snapmaker/lava/gui

    As detailed in the issue description above, /usr/bin/gui already contains system_module_set_screen_backlight_on_off() right next to system_module_force_screen_on_off(), which properly blanks and unblanks the display via /sys/class/backlight/backlight/bl_power ("4" = FB_BLANK_POWERDOWN / off, "0" = FB_BLANK_UNBLANK / on) while keeping the VOP2 CRTC and DRM connector pipeline alive.

    Changing system_module_force_screen_on_off() in snapmaker/lava/gui to toggle /sys/class/backlight/backlight/bl_power (and never writing "off" / "on" to /sys/class/drm/card0-DPI-1/status) completely eliminates the VOP2/IOMMU -EBUSY permanent black-screen lockup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions