Files
arthur-os/bin
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
..
npm
2026-05-17 09:42:02 +02:00
2026-05-01 17:40:22 +02:00
2026-05-14 12:02:53 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-10 14:28:18 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-06 12:58:55 +02:00
2026-05-06 12:58:55 +02:00
2026-05-11 15:28:33 -04:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-15 16:24:21 +02:00
2026-05-14 11:21:45 +02:00
2026-05-08 12:40:37 +02:00
2026-05-14 11:32:13 +02:00
2026-05-08 12:40:37 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-14 12:02:53 +02:00
2026-05-10 16:44:09 +02:00
2026-05-14 12:02:53 +02:00
2026-05-14 12:02:53 +02:00
2026-05-06 13:05:20 +02:00
2026-05-01 17:40:22 +02:00
2026-05-04 08:54:12 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-06 13:09:33 +02:00
2026-05-01 17:40:22 +02:00
2026-05-17 09:41:25 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-04 11:18:25 +02:00
2026-05-17 09:41:25 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-05 14:22:03 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-11 15:29:31 -04:00
2026-05-11 15:29:31 -04:00
2026-05-11 15:29:31 -04:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-11 15:29:31 -04:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-11 15:29:31 -04:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-08 20:48:36 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-07 09:34:04 +02:00
2026-05-01 17:40:22 +02:00
2026-05-15 17:58:31 +02:00
2026-05-01 17:40:22 +02:00
2026-05-14 12:02:53 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00