[5.2.0.22][Jolla Phone 2026] Screen goes black for good: DSI brightness command times out, CMDQ sync token 644 is never released, ESD recovery stalls

REPRODUCIBILITY: Once so far. I do not know how to trigger it on purpose. The same boot had already logged 14 earlier CMDQ errors (see below), and Jolla Phone (2026): Shutdown / crashes in pocket shows the same CMDQ thread 6 lines (events 997 and 644) on 5.2.0.17, so it may be the same problem.
OS VERSION: 5.2.0.22, kernel 6.12.38-4k
HARDWARE: Jolla Phone 2026 (jp2601), MediaTek MT6858. Panel driver in use: xl,vtdr6126,dphy,vdo,120hz (dmesg of the next boot).
UI LANGUAGE: Finnish
REGRESSION: Unknown.

DESCRIPTION:

While a full-screen Android app was in the foreground, the screen went black and did not come back. Pressing the power key did not help, so I held it until the phone reset. The next boot reports androidboot.bootreason = "reboot_longkey".

The kernel console log of the hung boot (pstore console-ramoops-0) shows this chain in the display driver:

  1. A GCE packet on CMDQ thread 6 (MM_DISP) sends a DCS 0x51 (Write Display Brightness) long packet to DSI0 and then polls 0x1401a00c & 0x20. With the register names of upstream mtk_dsi.c, that is DSI_INTSTA bit 5 (VM_CMD_DONE). The bit never comes, and the packet times out after 1000 ms.
  2. The packet takes sync token (event) 644 before the DSI write, and its last instructions would set it back to 1. They never run. Every later packet on the thread starts by waiting for event 644, so the thread stays blocked: one timeout per second until the log ends 78 s later.
  3. The periodic ESD check’s read packet is queued behind them on the same thread. After about 25 s in the queue it times out too, the driver reports esd check fail and starts recovery. The recovery logs lcm_disable +++ / --- and then nothing more: there is no lcm_enable, and the ESD checks, which had run every 2 seconds, stop.
  4. The compositor’s Mali GPU queue then waits on a display fence (mtk_sync) for 52 s, until the log ends. There is no panic, oops or watchdog message.

PRECONDITIONS:

  • Automatic brightness on.
  • The phone connected to a USB-C charger.
  • Display on, with a full-screen Android app (a simple 2D card game) in the foreground for about 20 seconds.

STEPS TO REPRODUCE:

I cannot reproduce it on demand. This is what happened under the conditions above:

  1. A burst of backlight changes: at least 76 DCS 0x51 packets within 1.8 seconds, with levels going 1300 → 1372 → 1134 (leds_mtk reports max_hw 2047). I do not know what requested them (see ADDITIONAL INFORMATION).
  2. About 25 seconds later the screen went black.
  3. The power key did not wake the display, and only a long press (reset) helped.

EXPECTED RESULT:

A backlight command that times out is dropped or retried, and the display keeps working. The ESD check reports a panel failure only when the panel was actually read. If ESD recovery runs, it brings the panel back.

ACTUAL RESULT:

Timeline, relative to T0 = submission of the first brightness packet (kernel time 258422.338):

  • T0 + 0.8 s: the periodic ESD check starts. Its read packet is submitted to thread 6, behind the brightness packets.
  • T0 + 1.3 s: the first brightness packet times out inside the VM_CMD_DONE poll loop (error 15).
  • T0 + 1.8 s: the last brightness packet is submitted.
  • T0 + 2.3 s to the end of the log: each queued packet times out at “wait for event 644”, about once per second (errors 16 to 91).
  • T0 + 25.9 s: the ESD read packet times out (error 39), followed by esd check fail and lcm_disable. The screen went black at about this point.
  • T0 + 26 s to T0 + 78 s: the Mali KCPU queue of GPU context 3684 waits on one display fence.
  • T0 + 79.5 s: the log ends in the middle of a CMDQ dump, about 8 seconds after the last power-key press.

First timeout (error 15). The packet dump is trimmed; [...] marks omitted lines:

[258423.648308][T23150] [CMDQ]<0>(6)[cmdq][err] hwid:0 Begin of Error 15
[258423.648467][T23150] [CMDQ]<0>(6)[cmdq] thd:6 timeout:0x3e8 pc:0x00000003fc9f1110(00000000eab3dbca) inst:0x200003e580008001 end:0x00000003fff03150 cnt:0x5b token:0x000103e5
[258423.648517][T23150] [CMDQ]<0>(6)[cmdq] thrd:6 spr:0x8793e223 0xfffffec8 0x0 0x12b75 dbg:0x0 0x0
[258423.648720][T23150] [CMDQ]<0>(6)[cmdq]   0xfc9f1000 0x200000a200008001 [Sync ] wait for event 162 become 1
[258423.648739][T23150] [CMDQ]<0>(6)[cmdq]   0xfc9f1008 0x2000028380000000 [Sync ] clear event 643 to 0
[258423.648756][T23150] [CMDQ]<0>(6)[cmdq]   0xfc9f1010 0x2000028480008001 [Sync ] wait for event 644 become 1 and clear to 0
[258423.648794][T23150] [CMDQ]<0>(6)[cmdq]   0xfc9f1020 0x9000a20a00140551 [Write] addr 0x1401a208 = 0x00140551
[258423.648812][T23150] [CMDQ]<0>(6)[cmdq]   0xfc9f1028 0x9000a20200033927 [Write] addr 0x1401a200 = 0x00033927
[...]
[258423.648987][T23150] [CMDQ]<0>(6)[cmdq]   0xfc9f1078 0x80800002a00e0000 [Read ] Reg Index 0x00000002 = addr(low) 0xa00c
[258423.649005][T23150] [CMDQ]<0>(6)[cmdq]   0xfc9f1080 0xa080000000000020 [Logic] Reg Index 0x0000 = 0x00000020
[258423.649055][T23150] [CMDQ]<0>(6)[cmdq]   0xfc9f1088 0xa0eb000200020000 [Logic] Reg Index 0x00000002 = Reg Index 0x00000002 & Reg Index 0x00000000
[...]
[258423.649438][T23150] [CMDQ]<0>(6)[cmdq] >>0xfc9f1110 0x200003e580008001 [Sync ] wait for event 997 become 1 and clear to 0
[...]
[258423.649494][T23150] [CMDQ]<0>(6)[cmdq]   0xfc9f1120 0x100000018793e20d [Jump ] jump absolute addr 0x3fc9f1068
[258423.649512][T23150] [CMDQ]<0>(6)[cmdq]   0xfc9f1128 0x2000028480010000 [Sync ] set event 644 to 1
[258423.649529][T23150] [CMDQ]<0>(6)[cmdq]   0xfc9f1130 0x2000028380010000 [Sync ] set event 643 to 1
[...]
[258423.649662][T23150] [cmdq][aee] DISPATCH:MM_DISP(GCE-D) inst:0x200003e580008001 OP:WAIT EVENT:997 thread:6
[258423.649938][T23150] [cmdq] reset backup pc:0x00000003fc905000 end:0x00000003fff03150 cookie:0x0000005b spr:0x8793e223 0xfffffec8 0x0 0x12b75

How I read it: 0x00140551 written to 0x1401a208 is the payload 51 05 14 (DCS 0x51, level 0x0514 = 1300), and 0x00033927 written to 0x1401a200 is the header (data type 0x39, 3 bytes). The loop reads 0x1401a00c, masks it with 0x20, and leaves only when the bit is set. Event 997 appears to be the timer used for the sleep between polls. At the timeout, SPR2 = 0x0 (the bit was not set) and SPR3 = 0x12b75, the loop counter, at 76,661 rounds. The set event 644 to 1 at 0xfc9f1128 comes after the loop, and the thread is reset to the next packet without running it.

Every following packet waits for token 644:

[258424.677549][T18036] [CMDQ]<0>(6)[cmdq][err] hwid:0 Begin of Error 16
[258424.677985][T18036] [CMDQ]<0>(6)[cmdq] curr inst: 0x5010 0x2000028480008001 [Sync ] wait for event 644 become 1 and clear to 0 value:0
[258424.678414][T18036] [CMDQ]<0>(6)[cmdq]   0xfc905020 0x9000a20a00170551 [Write] addr 0x1401a208 = 0x00170551
[258424.680285][T18036] [cmdq][aee] DISPATCH:MM_DISP(GCE-D) inst:0x2000028480008001 OP:WAIT EVENT:644 thread:6
[...]
[258501.470000][T23095] [CMDQ]<0>(6)[cmdq][err] hwid:0 Begin of Error 91

The line OP:WAIT EVENT:644 thread:6 appears 76 times, about once per second.

ESD check and recovery:

[258423.104359][  T397] [DISP]before esd check 0xc=0x80080300 0xc4=0xf073a
[...]
[258448.223437][T23164] [CMDQ]<0>(6)[cmdq][err] hwid:0 Begin of Error 39
[258448.223704][T23164] [CMDQ]<0>(6)[cmdq] curr inst: 0x0008 0x2000028480008001 [Sync ] wait for event 644 become 1 and clear to 0 value:0
[258448.223732][T23164] [DISP][E][error]esd_cmdq_timeout_cb cmdq timeout out
[258448.223750][T23164] [DISP][E]read flush fail
[...]
[258448.231536][T21554] [DISP]after esd check 0xc=0x80080300 0xc4=0xf073a
[258448.231571][T21554] [DISP][E][ESD0]esd check fail, will do esd recovery. try=1
[258448.231597][T21554] [LCM] lcm_disable +++
[258448.363423][T21554] [LCM] lcm_disable ---

The ESD packet (size 1408) was submitted at 258423.104 (submit:258423104489207 in its dump) and was still at its first wait for event 644 when it timed out, so the panel was never read. After lcm_disable --- there are no more ESD, DISP-recovery or LCM lines.

GPU side:

[258450.305259][    C0] mali 13000000.mali: ctx:3684_0 kcpu queue:3 Command - FENCE_WAIT timeout(2000 ms) on fence[0000000000000000] context#seqno:24#338566 (driver=mtk_sync, timeline=-P_0_16-)
[258450.305359][    C0] KCPU Queue is blocked by display fence timeout
[...]
[258500.701594][    C2] mali 13000000.mali: ctx:3684_0 kcpu queue:3 Command - FENCE_WAIT timeout(52000 ms) on fence[0000000000000000] context#seqno:24#338566 (driver=mtk_sync, timeline=-P_0_16-)

The last watchdog kick is at 258498.42, and the log ends at 258501.83.

MODIFICATIONS:

  • I have installed some add-ons and apps of my own. As far as I know, none of them changes the display or backlight settings, and the app in the foreground does not set the screen brightness.

ADDITIONAL INFORMATION:

  • Earlier errors in the same boot: the CMDQ error counter starts at 15 here, so 14 CMDQ errors happened earlier in that boot. They are no longer in the pstore buffer, which only covers the last 223 seconds. A deferred Mali dump in the same log also lists an older episode, at kernel time 127709 to 127711, where the same GPU context 3684 waited at least 4 s on an mtk_sync display fence and then recovered by itself.
  • In t/33079 the screen did not come back after the phone had been in a pocket. Blanking and unblanking the display also change the backlight, so the same command path may be involved there, but I have not seen the full logs of that case.
  • What the log does not show:
    • What requested the brightness changes. Automatic brightness was on, so it could be mce (automatic brightness or a fade, through the backlight sysfs node), but it could also be MediaTek’s own AAL/CABC path. The journal is volatile and was lost with the reset.
    • Which process GPU context 3684 belongs to. The Mali dump only names the thread binder:3684_2. It was a long-lived process (its context existed already at kernel time 127709), so I assume it is the compositor, but I cannot confirm it.
    • Why the panel did not signal VM_CMD_DONE in the first place.
  • Possible fixes (I have not seen the driver source):
    • release or reset sync token 644 when a packet that holds it times out or is aborted
    • do not treat a CMDQ queue timeout of the ESD read packet as a panel failure, since the panel was never read
    • make sure that ESD recovery cannot stall after lcm_disable, for example with a timeout and a retry
  • On request, I can provide a trimmed excerpt of the kernel log (display, CMDQ and Mali lines only, 340 lines) or the full console-ramoops-0 (2 MB).

If it helps, I can test a fix on this device or collect more logs the next time it happens. Thank you for looking into this.

Same here — adding a third data point.

Setup: Jolla Phone 2026, SailfishOS 5.2.0.22.

Symptoms (3 hard freezes within one month):

  • Screen goes black for good while a fullscreen Android app is in the foreground
    (2nd freeze: Android e-book reader fullscreen, native F-Droid updating in the
    background; 1st freeze: regular Android app use). No recovery possible, only
    hardware reset (long power press).
  • Software reboot from SSH does NOT help — the phone shuts down cleanly
    (DSME runlevel: Shutdown, poweroff exit 0) but the screen stays black after
    the warm reboot; only a hardware reset restores the display.

Logs: identical kernel signature to the OP in every freeze:

kernel: [cmdq][aee] DISPATCH:MM_DISP(GCE-D) inst:0x2000028480008001 OP:WAIT EVENT:644 thread:6
kernel: [CMDQ]<0>(6)[cmdq][err] hwid:0 End of Error ...
... repeated "SW timeout Pre-dump" entries until the device dies

In the last crashed boot: 575 occurrences of DISPATCH:MM_DISP (grep -c),
so the display pipeline was already timing out long before the final hang.
Thermal/activities unrelated; not reproducible with Android apps closed (so far).

Mitigations I’m applying now: automatic brightness off, Android apps avoided
while charging, aliendalvik kept disabled for a controlled test week.

Happy to provide full journalctl dumps (2 crashed boots, Nov 28 and Nov 29) if useful.