Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-10-2023, 01:01 PM   #1
charlesrg
Junior Member
charlesrg began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2023
Device: pw1
PW5 Proper Poweroff / Shutdown

I'm using Online Screensaver extension.
I made some quick modifications that if the power is bellow 10% it shows a LOW BATTERY image and I wanted it to shutdown.
Just trying to avoid wearing the battery too much so I plug to charge at 10%.

I've tried: poweroff, halt, shutdown -h now.

They appear that they do shutdown as it's a pain to turn the device back on however I get the boy under tree image with a "Please wait a moment while your Kindle starts up..." on the screen and my image does not persist.

I wanted to shutdown but keep the LOW BATTERY image on the screen.

Any recommendation ?
charlesrg is offline   Reply With Quote
Old 02-10-2023, 03:39 PM   #2
katadelos
rm -rf /
katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.katadelos ought to be getting tired of karma fortunes by now.
 
Posts: 219
Karma: 3333683
Join Date: Nov 2019
Location: United Kingdom
Device: K5, KT, KT2, KT3, KT4, KV, PW2, PW3, PW4, PW5
This script is probably a good starting point, I use it to cleanly shutdown devices if I need to store them - it's ripped off/adapted from the script used to put a device into shipping mode:

Code:
#!/bin/sh

# shutdown.sh
# Simple shutdown script based on /etc/upstart/shutdown_special


source /etc/upstart/functions
source /etc/upstart/upstart_functions

set_background() {
  fbink -c -f
  if [ -f /tmp/bg_shipping.png ]; then
    bg_img=/tmp/bg_shipping.png
  else
    bg_img=/usr/share/blanket/shutdown/bg_shipping.png
  fi
  fbink -g file=$bg_img
}

shutdown_device() {
  echo "shutdown" > /tmp/shutdown_in_progress

  f_log I shutdown "closing password dialog"
  killall -q -s KILL passwdlg || true

  f_upstart_job_stop_timeout 60 "x wifid wifis lab126 framework sshd usbnetd testd" || \
                                          f_log W shutdown "stop_failed" "type=services" "continuing"

  # Shutdown the filesystems
  f_upstart_job_stop_timeout 30 "filesystems" || f_log W shutdown "stop_failed" "type=filesystems" "continuing"

  #
  # Logging went down with filesystems, the following only prints to console
  #
  # Make sure rootfs is readonly (it should be already)
  f_log I shutdown "mounting root filesystem read-only"
  sync || true
  mntroot ro || true

  # Sync the filesystems
  f_log I shutdown "syncing disks"
  sync || true
  echo 3 > /proc/sys/vm/drop_caches || true

  f_log I shutdown "wait for additional 5 seconds to ensure all files have been written to disks"
  sleep 5
  poweroff -f 
}

main() {
  set_background
  shutdown_device
}

main
katadelos is offline   Reply With Quote
Advert
Reply

Tags
shutdown, shutdown image


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Set system poweroff screensaver on PocketBook ereaders datanoise KOReader 5 01-14-2024 08:52 AM
KOReader doesn't show poweroff cover on Libra 2 AnimalOfArt KOReader 16 05-18-2022 05:41 PM
Is it possible to specify poweroff image folder in KOReader? sockscap KOReader 4 03-10-2019 07:49 AM
Aura How to show random images on poweroff? babloyi Kobo Developer's Corner 1 09-10-2018 01:37 PM
Poweroff screens valris Kobo Developer's Corner 11 01-17-2015 07:20 AM


All times are GMT -4. The time now is 12:53 AM.


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