Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 08:17 AM   #1
Zonkil9
Junior Member
Zonkil9 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jun 2026
Device: Kindle Touch 8th gen
kernel freeze / WATCHDOG_RST after every few days of continuous fbink use

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:
  1. Is there a known way to force a deeper reset of the mxc_epdc driver from userspace on a long-running Kindle?
  2. Has anyone successfully run a continuous fbink dashboard on a Kindle for weeks without watchdog resets? What was your approach?
  3. 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
Zonkil9 is offline   Reply With Quote
Old Today, 02:21 PM   #2
kaspar
Member
kaspar began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Dec 2024
Device: Kindle Scribe
Have you considered scripting your own reboot every 24 hours during the night as a workaround? Or does it require manual setup each time?
kaspar is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fbink x y axis acting weird thetinkerer Kindle Developer's Corner 1 05-27-2026 05:16 PM
Clara HD (Pre-FBInk) rmkit on my Clara HD elinkser Kobo Developer's Corner 67 02-28-2024 08:00 PM
fbink image scaling question handyguy Kindle Developer's Corner 6 12-17-2020 07:01 PM
Latest fbink install? handyguy Kindle Developer's Corner 3 12-11-2020 09:13 PM
PRS-T1 How-to: Compiling the kernel and kernel modules altruizine Sony Reader Dev Corner 9 09-03-2012 09:12 PM


All times are GMT -4. The time now is 07:07 PM.


MobileRead.com is a privately owned, operated and funded community.