OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
apps-services high occasional DISPUTE

Stop systemd-oomd killing a terminal and everything launched from it

omarchysystemdzramhyprland
AUDITED Audited against its sources and confirmed accurate. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Confirmed on this workstation (omarchy-settings 4.0.4-1, systemd 261.2-1): /usr/lib/systemd/user/app.slice.d/10-oomd.conf is owned by omarchy-settings and sets ManagedOOMMemoryPressure=kill and ManagedOOMSwap=kill, /etc/systemd/oomd.conf.d/10-omarchy.conf sets only DefaultMemoryPressureLimit=50% and DefaultMemoryPressureDurationSec=20s so SwapUsedLimit stays at the 90% default, install/config/enable-services.sh enables systemd-oomd.service, and the same file is on the quattro branch at default/systemd/user/app.slice.d/10-oomd.conf. oomctl dump here lists app.slice under both Swap Monitored and Memory Pressure Monitored CGroups, and no ancestor (user.slice, user-1000.slice, user@1000.service) carries kill, so setting app.slice to auto does stop swap monitoring as the verify step says. oomd.conf(5) confirms the swap kill fires only when memory AND swap usage are both above SwapUsedLimit and picks the descendant with the most swap, and systemd.resource-control(5) confirms auto means not monitored. Issue #9799 (open) supports the journal lines, the 2104-process kill, zram as ordinary operation, and its comment supports the Chromium scope split and the SIGTRAP reported by omarchy-crash-watch. uwsm-app is the uwsm app client and takes -- before the command. Not exercised: the drop-in or the oomd restart.

RISK

With the swap kill off, a slow leak that fills RAM and zram without raising memory pressure much can freeze the desktop until the pressure kill (50% for 20s on Omarchy) fires. Unsaved work in the killed scope is lost either way.

Symptom

The terminal, the browser I opened from it, my editor and every agent running in it all vanish at the same moment. There is no crash dialog, or there is an omarchy-crash-watch notification saying Process crashed: vivaldi-bin. The machine was not freezing. The journal shows:


systemd-oomd[885]: Marked /user.slice/.../app-Hyprland-xdg\x2dterminal\x2dexec-0ae8dde6.scope for killing
systemd[1075]: app-Hyprland-xdg\x2dterminal\x2dexec-0ae8dde6.scope: systemd-oomd killed 2104 process(es) in this unit.
systemd[1075]: app-Hyprland-xdg\x2dterminal\x2dexec-0ae8dde6.scope: Failed with result 'oom-kill'.

Cause

omarchy-settings ships /usr/lib/systemd/user/app.slice.d/10-oomd.conf with ManagedOOMMemoryPressure=kill and ManagedOOMSwap=kill, and enables systemd-oomd. The swap kill uses the global SwapUsedLimit, which Omarchy leaves at the 90% default. Swap on Omarchy 4 is zram sized equal to RAM (/usr/lib/systemd/zram-generator.conf.d/90-omarchy.conf), so zram above 90% is ordinary operation, and once RAM is also above 90% oomd kills the descendant of app.slice with the most swap. Everything started from inside a terminal stays in that terminal's single app-*.scope, so the kill removes the terminal and every program ever launched from it. Chromium browsers move only their browser process into their own scope, so the GPU and renderer helpers die with the terminal and the orphaned browser aborts with SIGTRAP, which crash-watch then reports as a crash. Reported on 4.0.2-1 as omacom/omarchy#9799 and still shipped unchanged in omarchy-settings 4.0.4-1 and on the quattro branch.

Fix

Confirm it was oomd and which path fired:


journalctl -b -u systemd-oomd --no-pager | grep -E 'Marked|Considered|Swap Usage'
journalctl --user -b --no-pager | grep -i 'oom-kill'
oomctl dump | head -20
systemctl --user show app.slice -p ManagedOOMSwap -p ManagedOOMMemoryPressure

**Omarchy 4: turn off the swap-based kill for app.slice and keep the memory-pressure kill.** A user drop-in sorts after Omarchy's 10-oomd.conf and overrides only that key:


mkdir -p ~/.config/systemd/user/app.slice.d
printf '[Slice]\nManagedOOMSwap=auto\n' > ~/.config/systemd/user/app.slice.d/50-no-swap-kill.conf
systemctl --user daemon-reload

If you would rather keep the swap kill but stop it firing on a full zram device, raise the global limit instead (this affects every monitored cgroup):


printf '[OOM]\nSwapUsedLimit=98%%\n' | sudo tee /etc/systemd/oomd.conf.d/50-local.conf
sudo systemctl restart systemd-oomd

Shrink the blast radius either way: start GUI apps from a terminal through uwsm so each gets its own scope instead of joining the terminal's:


uwsm-app -- vivaldi

**Plain Arch:** this only applies if you enabled systemd-oomd and set ManagedOOMSwap=kill on a slice yourself. The same drop-in reverses it.

Verify

systemctl --user show app.slice -p ManagedOOMSwap prints ManagedOOMSwap=auto, and oomctl dump no longer lists app.slice under Swap Monitored CGroups while it still appears under Memory Pressure Monitored CGroups.

Sources

omarchy-oomd-swap-kill-takes-whole-terminal-scope