mirror of
https://github.com/omacom/omarchy.git
synced 2026-09-28 14:23:08 +08:00
Drop fixed unit name from power-profile udev rule to prevent wakeup failures
On USB-C-only laptops, multiple power_supply udev events fire at once on resume, and each tries to create the same --unit=omarchy-power-profile transient unit, so all but the first fail with "unit already loaded" and log an error on every wakeup. Drop the fixed unit name so each event gets an auto-generated one; powerprofilesctl set is idempotent, so concurrent runs are harmless, and --collect still garbage-collects each unit on exit. Closes #6091. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
David Heinemeier Hansson
co-authored by
Claude Opus 4.8
parent
e891e5c22f
commit
749a8c0466
@@ -1,7 +1,7 @@
|
||||
if omarchy-battery-present; then
|
||||
cat <<EOF | sudo tee "/etc/udev/rules.d/99-power-profile.rules"
|
||||
SUBSYSTEM=="power_supply", ATTR{type}=="Mains", RUN+="/usr/bin/systemd-run --no-block --collect --unit=omarchy-power-profile --property=After=power-profiles-daemon.service $HOME/.local/share/omarchy/bin/omarchy-powerprofiles-set"
|
||||
SUBSYSTEM=="power_supply", ATTR{type}=="USB", RUN+="/usr/bin/systemd-run --no-block --collect --unit=omarchy-power-profile --property=After=power-profiles-daemon.service $HOME/.local/share/omarchy/bin/omarchy-powerprofiles-set"
|
||||
SUBSYSTEM=="power_supply", ATTR{type}=="Mains", RUN+="/usr/bin/systemd-run --no-block --collect --property=After=power-profiles-daemon.service $HOME/.local/share/omarchy/bin/omarchy-powerprofiles-set"
|
||||
SUBSYSTEM=="power_supply", ATTR{type}=="USB", RUN+="/usr/bin/systemd-run --no-block --collect --property=After=power-profiles-daemon.service $HOME/.local/share/omarchy/bin/omarchy-powerprofiles-set"
|
||||
EOF
|
||||
|
||||
sudo systemctl enable power-profiles-daemon
|
||||
|
||||
Reference in New Issue
Block a user