ed93a047ee Fix power profile race on plug/unplug events (#5898)
The udev power_supply rule fires before sysfs `online` is updated on
some laptops (notably Lenovo Yoga Pro 7 14IAH10 with USB-C charging).
The autodetect branch reads the stale value and sets the wrong profile,
so the system stays on `performance` after unplug (or vice versa).

A single plug/unplug typically fires 3-4 udev events within ~1s (ACAD +
each USB-C port). With `systemd-run --unit=omarchy-power-profile
--collect`, duplicate invocations against the same unit name can be
dropped while the first is still running, so the surviving event isn't
guaranteed to be the latest one.

This adds a 0.3s settle delay at the top of the autodetect branch only.
Explicit `ac` and `battery` invocations remain instant.

Tested on Lenovo Yoga Pro 7 14IAH10 (Intel Core Ultra 9 285H, Omarchy
3.8.1).

Co-authored-by: Iqbal Attila <iqbal@kcmon.id>
2026-05-19 09:42:13 +02:00
2025-11-03 10:50:54 +01:00
2026-05-15 18:03:21 +02:00
2026-05-08 16:36:46 +02:00
2025-10-07 18:17:47 +02:00
2026-05-11 10:39:22 -04:00
2025-09-13 18:02:07 +02:00
2025-06-30 16:42:09 -07:00
2025-07-28 09:32:44 +02:00
2025-07-26 10:02:29 -07:00
2025-10-23 07:34:11 -07:00
2026-05-14 11:34:55 +02:00

Omarchy

Omarchy is a beautiful, modern & opinionated Linux distribution by DHH.

Read more at omarchy.org.

License

Omarchy is released under the MIT License.

S
Description
Beautiful, Modern & Opinionated Linux
Readme MIT
189 MiB
Languages
Shell 87.8%
CSS 4.6%
Go Template 3.8%
Lua 2.1%
Python 0.9%
Other 0.8%