Skip to content

WiFi powersave udev rule fails: script in user home inaccessible to udev worker #4802

@peterberkenbosch

Description

@peterberkenbosch

Summary

The 99-wifi-powersave.rules udev rule introduced in 3.4.0 (migration 1770811646) references $HOME/.local/share/omarchy/bin/omarchy-wifi-powersave, but udev workers run as root with PrivateMounts sandboxing and cannot access user home directories. The script never executes, WiFi power-save stays enabled on AC power, and on affected MediaTek chips this leads to firmware crashes.

System Specs

  • Device: Framework 13
  • WiFi: MediaTek MT7922 (mt7921e driver)
  • Kernel: 6.18.9-arch1-2
  • Omarchy: 3.4.0

Symptoms

  1. omarchy-wifi-powersave never runs — udev can't find it
  2. WiFi power-save stays on even when plugged into AC power
  3. MT7922 firmware eventually crashes with Failed to get patch semaphore / chip reset failed
  4. WiFi interface goes DOWN and cannot recover without module reload or reboot

Root Cause

The migration 1770811646.sh sources install/config/wifi-powersave-rules.sh, which writes:

SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="1", RUN+="/home/<user>/.local/share/omarchy/bin/omarchy-wifi-powersave off"

Since systemd 256+, udev workers use PrivateMounts sandboxing. The path inside the user's home directory is inaccessible to the root-run udev worker, producing:

(udev-worker)[1460]: ACAD: Failed to find and pin callout binary "/home/peter/.local/share/omarchy/bin/omarchy-wifi-powersave": No such file or directory

Suggested Fix

Copy or symlink the script to a system-accessible path, and update the udev rule to reference it:

# In the migration / install script:
sudo cp "$HOME/.local/share/omarchy/bin/omarchy-wifi-powersave" /usr/local/bin/omarchy-wifi-powersave
sudo chmod 755 /usr/local/bin/omarchy-wifi-powersave

Then in the udev rule:

SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="0", RUN+="/usr/local/bin/omarchy-wifi-powersave on"
SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="1", RUN+="/usr/local/bin/omarchy-wifi-powersave off"

Reproduction

  1. Update to Omarchy 3.4.0 on a laptop with a MediaTek WiFi chip
  2. Observe journalctl -b | grep wifi-powersave — shows the "Failed to find and pin callout binary" error
  3. WiFi power-save remains active on AC; over time the firmware may crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions