Hi!
I'm running my jailbroken Kindle Touch 8th gen as an always-on dashboard. A simple shell script (started manually via SSH with nohup) runs in a loop: it fetches a PNG file from a local server every 30 seconds and displays it using fbink. The relevant services are stopped at startup:
Code:
stop framework
stop lab126_gui
stop phd
lipc-set-prop com.lab126.powerd preventScreenSaver 1
and then the shell script is executed (provided at the end of this post).
My problem: the device reboots every few days.
The reset reason recorded in the kernel log is always:
Code:
[RESET REASONS]: WATCHDOG_RST: Watchdog Triggered Reset
I've analyzed several crash logs. The pattern is consistent across all crashes: around 60-70 seconds before the reboot, every single userspace process stops writing to syslog simultaneously. Not just powerd but everything. The last entries from all processes cut off at the same moment, then silence until the watchdog fires. There are no kernel oops, no BUG(), no panic messages before the reset.
RAM is healthy at crash time. With framework stopped, the system has 230 MB free. No OOM killer activity anywhere in the logs. powerd is healthy right up to the freeze. It logs battinfo entries (battery 100%, temp 69°F) normally until everything stops. The device never suspends. With preventScreenSaver 1 set and the script running, there are zero suspend/resume events. The system stays in ACTIVE or SCREEN SAVER state only. No kernel messages before freeze. The freeze is completely silent at the printk level, which rules out an oops or BUG(). It's a genuine deadlock (spinlock or mutex held indefinitely).
My working hypothesis is a deadlock in the mxc_epdc_eink framebuffer driver accumulating over time with continuous fbink use (around 2800 writes/day). The driver is proprietary and closed-source on this kernel, so I can't confirm this directly.
Questions:
- Is there a known way to force a deeper reset of the mxc_epdc driver from userspace on a long-running Kindle?
- Has anyone successfully run a continuous fbink dashboard on a Kindle for weeks without watchdog resets? What was your approach?
- Is there any way to trigger a controlled suspend/resume cycle through powerd's lipc interface on firmware 5.16.2.1.1, so the epdc driver goes through its proper sleep/wake reinit path?
Any help appreciated. I can share the full syslogs if useful.
The shell script executed:
Code:
IMAGE_URL="http://192.168.1.18/kindle.png"
IMAGE_PATH="/tmp/kindle.png"
INTERVAL=30
FULL_REFRESH_EVERY=240
EPDC_REINIT_EVERY=720
FBDEPTH=/var/local/kmc/armel/bin/fbdepth
PID_FILE="/tmp/abc.pid"
echo $$ > "$PID_FILE"
cleanup_and_exit() {
rm -f "$PID_FILE" "$IMAGE_PATH" "${IMAGE_PATH}.tmp"
lipc-set-prop com.lab126.powerd preventScreenSaver 0 2>/dev/null
start framework 2>/dev/null
start lab126_gui 2>/dev/null
exit 0
}
trap cleanup_and_exit INT TERM
ensure_wifi() {
if ! curl -s --max-time 5 -o /dev/null "$IMAGE_URL" 2>/dev/null; then
lipc-set-prop com.lab126.wifid enable 1 2>/dev/null
lipc-set-prop com.lab126.cmd ensureConnection wifi 2>/dev/null
sleep 10
fi
}
reinit_epdc() {
"$FBDEPTH" -d 8 2>/dev/null
sleep 1
"$FBDEPTH" -d 8 2>/dev/null
sleep 1
fbink -fc 2>/dev/null
}
stop framework 2>/dev/null
stop lab126_gui 2>/dev/null
stop phd 2>/dev/null
lipc-set-prop com.lab126.powerd preventScreenSaver 1 2>/dev/null
lipc-set-prop com.lab126.wifid enable 1 2>/dev/null
ensure_wifi
fbink -c 2>/dev/null
COUNTER=0
WIFI_CHECK=0
EPDC_COUNTER=0
while true; do
WIFI_CHECK=$((WIFI_CHECK + 1))
if [ "$WIFI_CHECK" -ge 10 ]; then
ensure_wifi
WIFI_CHECK=0
fi
EPDC_COUNTER=$((EPDC_COUNTER + 1))
if [ "$EPDC_COUNTER" -ge "$EPDC_REINIT_EVERY" ]; then
reinit_epdc
EPDC_COUNTER=0
COUNTER=0
fi
if curl -s --max-time 10 -f -o "${IMAGE_PATH}.tmp" "$IMAGE_URL" \
&& [ -s "${IMAGE_PATH}.tmp" ]; then
mv -f "${IMAGE_PATH}.tmp" "$IMAGE_PATH"
else
rm -f "${IMAGE_PATH}.tmp"
fi
if [ -f "$IMAGE_PATH" ]; then
if [ "$COUNTER" -ge "$FULL_REFRESH_EVERY" ]; then
fbink -fc 2>/dev/null
COUNTER=0
fi
fbink -g file="$IMAGE_PATH" 2>/dev/null
COUNTER=$((COUNTER + 1))
fi
sleep "$INTERVAL"
done