# Disable Lid script during Shutdown Sequence

**URL:** https://community.muos.dev/t/disable-lid-script-during-shutdown-sequence/213
**Category:** General
**Created:** [April 19, 2025, 6:37am UTC](https://community.muos.dev/t/disable-lid-script-during-shutdown-sequence/213 "2025-04-19T06:37:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cyreld](https://community.muos.dev/user_avatar/community.muos.dev/cyreld/32/475_2.png) [@cyreld](https://community.muos.dev/u/cyreld)
#### Post date: [April 19, 2025, 6:37am UTC](https://community.muos.dev/t/disable-lid-script-during-shutdown-sequence/213/1 "2025-04-19T06:37:30Z")

</div>

Hi again, with another question I’ve run across during my tinkering.

I’ve set a manual shutdown hotkey on my 35xxSp, so I can force shut off, but still boot back into my current content. Which works great.

Only issue, is if I close the lid after starting the shutdown process, but before the shutdown completes, it leaves the device in a weird state that won’t wake, but is still on (noticed some pretty severe battery drain). My hunch is that the lid script interrupts the shutdown script.

My instinct was to find/make a global variable to track if the device was shutting down, and have the lid script short circuit if true. If I have to make a new variable, I was thinking I could just clear it in a boot script.

I’ve been looking at a bunch of the scripts to try and figure out how I should go about this, but I figured it might be a better idea to ask for some advice first.

Anyways thanks for any help or ideas as always.

---

<div class="post-metadata">

### Author: ![xonglebongle](https://community.muos.dev/user_avatar/community.muos.dev/xonglebongle/32/57_2.png) [@xonglebongle](https://community.muos.dev/u/xonglebongle)
#### Post date: [April 19, 2025, 6:54am UTC](https://community.muos.dev/t/disable-lid-script-during-shutdown-sequence/213/2 "2025-04-19T06:54:50Z")

</div>

This is a known issue and will be fixed in an upcoming patch release! 🙂

---

<div class="post-metadata">

### Author: ![eggdogggo](https://community.muos.dev/user_avatar/community.muos.dev/eggdogggo/32/124_2.png) [@eggdogggo](https://community.muos.dev/u/eggdogggo)
#### Post date: [April 19, 2025, 10:10am UTC](https://community.muos.dev/t/disable-lid-script-during-shutdown-sequence/213/3 "2025-04-19T10:10:07Z")

</div>

Hurray for Xongle  
#XongleForPm

---

<div class="post-metadata">

### Author: ![xonglebongle](https://community.muos.dev/user_avatar/community.muos.dev/xonglebongle/32/57_2.png) [@xonglebongle](https://community.muos.dev/u/xonglebongle)
#### Post date: [April 19, 2025, 10:17am UTC](https://community.muos.dev/t/disable-lid-script-during-shutdown-sequence/213/5 "2025-04-19T10:17:46Z")

</div>

Please see current resolved issue here, [Sleep mode overrides Shutdown process on rg35xxsp - #3 by xonglebongle](https://community.muos.dev/t/sleep-mode-overrides-shutdown-process-on-rg35xxsp/53/3)
