Skip to content

[H700] Fix reboot and poweroff from EmulationStation menu#33

Open
fedekrum wants to merge 1 commit into
knulli-cfw:knulli-mainfrom
fedekrum:h700-reboot-fix
Open

[H700] Fix reboot and poweroff from EmulationStation menu#33
fedekrum wants to merge 1 commit into
knulli-cfw:knulli-mainfrom
fedekrum:h700-reboot-fix

Conversation

@fedekrum

Copy link
Copy Markdown

Summary

This PR fixes the issue where rebooting or powering off from the EmulationStation menu on Allwinner H700 devices (RG40XX, RG35XX) would result in the system getting stuck at the charging/splash screen instead of completing the reboot or shutting down cleanly.

Problem

In the H700 architecture, EmulationStation is patched to call reboot.sh and poweroff.sh instead of the standard shutdown commands. However, these scripts were missing in the filesystem overlay for the H700 board. Without these scripts, the system fails to create the /boot/restart.flag file, which is necessary for the boot process (rcS) to skip the charging binary (/usr/bin/charger) during a reboot.

Solution

Add reboot.sh and poweroff.sh to the H700 filesystem overlay. These scripts now correctly call knulli-shutdown -r and knulli-shutdown -s, ensuring that:

  1. The /boot/restart.flag is created before rebooting.
  2. The filesystem is synced.
  3. The system reboots directly into the OS without requiring a manual power button press at the splash screen.

Testing

Tested on RG40XX-H with Knulli alpha 20260209.

  • ✅ Reboot from ES menu now restarts completely into the game list.
  • ✅ Shutdown from ES menu works as expected.

@MrMustardTBC

Copy link
Copy Markdown
Contributor

krulli-shutdown?

@fedekrum
fedekrum force-pushed the h700-reboot-fix branch 2 times, most recently from 31d56cf to f6d467e Compare February 15, 2026 13:55
@fedekrum

Copy link
Copy Markdown
Author

krulli-shutdown?
It was to late at night !!!

EmulationStation on H700 is patched to call reboot.sh and poweroff.sh
instead of standard shutdown commands. These scripts were missing from
the H700 filesystem overlay, causing the system to get stuck at the
charging/splash screen instead of completing the reboot or shutdown.

Add both scripts calling knulli-shutdown, which creates the required
/boot/restart.flag (so rcS skips the charger binary), syncs the
filesystem and triggers the appropriate power action.

Tested on RG40XX-H with Knulli alpha 20260209.
@thidlay

thidlay commented Jul 4, 2026

Copy link
Copy Markdown

@fedekrum , you are the GOAT! This fixed an issue I was having with my RG40XXH... I thought I was going crazy, I would shut it off at night to save power, then go to turn it on in the morning only to find it completely dead. This fixed it so a power-off actually shuts it down now and the battery doesn't drain.

Is there any way this PR can get priority to be merged? It looks like other people are running into the same issue I did without any answers: https://www.reddit.com/r/ANBERNIC/comments/1sur5il/rg40xxh_knulli_battery_drain/

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants