Skip to content

Script fails if AC power is connected before boot, but works perfectly on manual run/post-boot hotplug #5688

Description

@LambroS205

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):

  1. Ensure the laptop is completely powered off.
  2. Plug in the AC power adapter.
  3. Power on the laptop and boot the system.
    Result: The script fails to run or apply its settings.

Scenario B (Works):

  1. Ensure the laptop is completely powered off.
  2. Disconnect the AC power adapter.
  3. Power on the laptop and boot the system.
  4. Plug in the AC power adapter once logged in.
    Result: The script triggers successfully and functions as intended.

Logs:

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions