System details
XiaoXinPro 14 AHP9, Ryzen 7 8745H, Radeon 780m, Omarchy 3.7.1
What's wrong?
Description
When the AC power is connected before the laptop is powered on, the associated script fails to execute properly during the boot process.
However, if I start the laptop on battery power and then plug or unplug the AC adapter, the script detects the state change and works beautifully. Running the script manually after the system has fully booted also works without any issues.
Steps to Reproduce
Scenario A (Fails):
- Ensure the laptop is completely powered off.
- Plug in the AC power adapter.
- Power on the laptop and boot the system.
Result: The script fails to run or apply its settings.
Scenario B (Works):
- Ensure the laptop is completely powered off.
- Disconnect the AC power adapter.
- Power on the laptop and boot the system.
- Plug in the AC power adapter once logged in.
Result: The script triggers successfully and functions as intended.
Logs:

System details
XiaoXinPro 14 AHP9, Ryzen 7 8745H, Radeon 780m, Omarchy 3.7.1
What's wrong?
Description
When the AC power is connected before the laptop is powered on, the associated script fails to execute properly during the boot process.
However, if I start the laptop on battery power and then plug or unplug the AC adapter, the script detects the state change and works beautifully. Running the script manually after the system has fully booted also works without any issues.
Steps to Reproduce
Scenario A (Fails):
Result: The script fails to run or apply its settings.
Scenario B (Works):
Result: The script triggers successfully and functions as intended.
Logs: