OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
power-suspend low rare DISPUTE

Make the laptop's Fn sleep key work when logind ignores the keyboard

archomarchyendeavouroscachyosmanjarolaptopsystemd
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Checked on this Omarchy 4.0.2-1 workstation with systemd 261.2-1, and against the Arch wiki and systemd source. The record faithfully reproduces the Arch wiki section "Suspend from corresponding laptop Fn key not working", which is why it passed the source audit, but three claims do not hold today. First, the cause is stale: /usr/lib/udev/rules.d/70-power-switch.rules from systemd 261.2-1 contains SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_KEY}=="1", TAG+="power-switch", so every key device is tagged. I confirmed the line is present in the systemd tags v251 through v255 and in main, and confirmed live that both USB keyboards on this machine carry CURRENT_TAGS=:power-switch: and appear in journalctl --grep="Watching system buttons". The wiki's untagged-keyboard case is now rare, so the fix is rewritten diagnosis-first and the frequency is dropped from occasional to rare. Second, the symptom's "the power button works fine" is false on Omarchy 4: busctl get-property ... HandlePowerKey returns ignore, set by /etc/systemd/logind.conf.d/10-ignore-power-button.conf owned by omarchy-settings 4.0.2-1, and /usr/share/omarchy/default/hypr/bindings/utilities.lua binds XF86PowerOff to omarchy-menu toggle system. HandleSuspendKey returns suspend, the systemd default, and no Omarchy file binds XF86Sleep. Since logind.conf(5) states drop-ins override the main configuration file, a user editing /etc/systemd/logind.conf cannot beat Omarchy's drop-in, so the fix now writes a 90- drop-in instead. Third, the record restarts systemd-logind.service: /usr/share/omarchy/migrations/1784970000.sh says in a comment "Reload rather than restart: restarting systemd-logind tears down the session", and systemctl show systemd-logind -p CanReload reports yes, so reload replaces restart and the danger field was rewritten around it. For the udev path no logind action is needed at all, because src/login/logind.c in systemd main calls sd_device_monitor_filter_add_match_tag(m->device_button_monitor, "power-switch") alongside an input subsystem filter, so a change event on a newly tagged device is picked up live. I did NOT exercise anything: no rule was installed, no unit was reloaded or restarted, no suspend was attempted, and this machine is a desktop, so no laptop Fn key was pressed. /etc/systemd/logind.conf here is package-stock and unmodified per pacman -Qkk systemd.

The cause above was rewritten on 2026-09-12 to match this note; the fix was corrected by the audit itself.
RISK

Do not restart systemd-logind.service. On Omarchy 4 that tears down the graphical session and loses unsaved work, which is why Omarchy's own migration reloads instead. systemctl reload systemd-logind applies a configuration change with the session intact, and a udev tag change needs no logind action at all. Setting HandlePowerKey to anything other than ignore on Omarchy 4 overrides the shipped drop-in and takes the power key away from the Omarchy system menu.

Symptom

The laptop's Fn sleep key (Fn+F4 or similar) does nothing at all, not even a log line, whatever is set in logind.conf. On Omarchy 4 the power button does not suspend either, but that part is deliberate: Omarchy ships HandlePowerKey=ignore and binds the power key to its own system menu.

Cause

systemd-logind only watches input devices that udev tagged power-switch. Since systemd v251 the shipped /usr/lib/udev/rules.d/70-power-switch.rules tags every device with ID_INPUT_KEY=1, so on a current Arch or Omarchy 4 system the keyboard is normally tagged already and an untagged keyboard is the rare case rather than the usual one. Two other things stop the key on Omarchy 4 and neither is a udev problem. omarchy-settings ships /etc/systemd/logind.conf.d/10-ignore-power-button.conf setting HandlePowerKey=ignore, and drop-ins override /etc/systemd/logind.conf, so an edit to the main file is silently beaten by the drop-in. Some keyboards also never emit KEY_SLEEP for the Fn combination, in which case logind has nothing to act on no matter how it is configured.

Fix

On Omarchy 4, check what is actually true before adding a udev rule. Since systemd v251 the shipped rule tags every key device, so the untagged keyboard the old advice describes is now rare:


# /usr/lib/udev/rules.d/70-power-switch.rules   (owned by systemd, do not edit)
ACTION=="remove", GOTO="power_switch_end"
SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_SWITCH}=="1", TAG+="power-switch"
SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_KEY}=="1", TAG+="power-switch"
LABEL="power_switch_end"

**Step 1. Is logind watching the keyboard?** Neither command needs root:


for d in /dev/input/by-id/*-kbd; do
  echo "== $d"
  udevadm info --query=property "$d" | grep -E '^(TAGS|CURRENT_TAGS|ID_INPUT_KEY)='
done
journalctl -b --grep="Watching system buttons"

If CURRENT_TAGS already contains power-switch and the device shows up in the journal line, the tag is not your problem. Go to step 2.

**Step 2. What is logind configured to do with the key?** Read the value logind is enforcing, not the file:


busctl get-property org.freedesktop.login1 /org/freedesktop/login1 \
  org.freedesktop.login1.Manager HandleSuspendKey HandlePowerKey HandleLidSwitch

On Omarchy 4 this returns HandlePowerKey = ignore, set by /etc/systemd/logind.conf.d/10-ignore-power-button.conf from the omarchy-settings package, because the power key is bound to the Omarchy system menu in /usr/share/omarchy/default/hypr/bindings/utilities.lua. HandleSuspendKey is left at the systemd default of suspend.

Drop-ins override the main file, so editing /etc/systemd/logind.conf cannot beat Omarchy's drop-in. Put a local override in a drop-in that sorts after it, in the 60 to 90 range logind.conf(5) reserves for the administrator:


sudo install -Dm644 /dev/stdin /etc/systemd/logind.conf.d/90-local-keys.conf <<'EOF'
[Login]
HandleSuspendKey=suspend
EOF
sudo systemctl reload systemd-logind

Reload, do not restart. On Omarchy 4, restarting systemd-logind.service tears down the graphical session, which Omarchy's own migration script /usr/share/omarchy/migrations/1784970000.sh states in a comment.

**Step 3. Only if step 1 showed the device is genuinely untagged**, tag it yourself. Get the exact parent name, substituting your own event number:


stat -c%N /dev/input/by-id/*-kbd
sudo udevadm info -a /dev/input/event6 | grep 'ATTRS{name}' | head -1

# /etc/udev/rules.d/70-power-switch-my.rules
ACTION=="remove", GOTO="power_switch_my_end"
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="SIGMACHIP USB Keyboard", TAG+="power-switch"
LABEL="power_switch_my_end"

sudo udevadm control --reload-rules
sudo udevadm trigger --subsystem-match=input --action=change

No logind restart is needed here either. systemd-logind runs a udev monitor filtered on the power-switch tag and the input subsystem, so it picks up a freshly tagged device from the change event on its own.

Verify


udevadm info --query=property /dev/input/event6 | grep CURRENT_TAGS
journalctl -b --grep="Watching system buttons"
busctl get-property org.freedesktop.login1 /org/freedesktop/login1 \
  org.freedesktop.login1.Manager HandleSuspendKey

CURRENT_TAGS contains power-switch, the keyboard's event device now appears in the journal line, HandleSuspendKey reads suspend, and pressing the sleep key suspends the machine.

Sources

suspend-fn-key-does-nothing