Environment:
- CachyOS (latest)
- KDE Plasma
- systemd 260
- Kernel: CONFIG_CGROUP_DMEM=y
Package Version:
plasma-foreground-booster 0.0.dmemcg.experimental-3
Issue Description:
The plasma-foreground-booster service fails to start and logs errors when attempting to use the dmem cgroup controller:
Can't open dmem
Writing dmem limit
Steps to Reproduce:
- Install
plasma-foreground-boosterfrom CachyOS repositories - Reboot or start the service manually:
systemctl start plasma-foreground-booster - Check status:
systemctl status plasma-foreground-booster— shows failed state - Check logs:
journalctl -u plasma-foreground-booster— shows “Can’t open dmem” errors
Root Cause Analysis:
- The dmem controller exists at the root cgroup level (
/sys/fs/cgroup/cgroup.controllersshowsdmem) - However, it is not propagated to user slices —
user@1000.serviceonly has:cpuset cpu io memory pids - Even though the kernel has
CONFIG_CGROUP_DMEM=yand systemd 260 has partial dmem support, the dmem controller is not automatically enabled for user session cgroups - The foreground_booster tries to use dmem without checking availability, causing it to fail
Relevant Context:
- systemd PR #37079 (draft) adds native dmem support to systemd with
DeviceMemoryLow/DeviceMemoryMaxsettings, but is not yet merged - The CachyOS package appears to be ahead of upstream infrastructure
- The KDE Plasma kcgroups library (libKF5CGroups.so) contains dmem error strings but doesn’t gracefully handle missing dmem
Expected Behavior:
The service should either:
- Start successfully with dmem protection enabled, OR
- Handle missing dmem gracefully (degrade to no-op instead of failing)
Proposed Fix:
Check for dmem controller availability before attempting to use it — either skip dmem configuration with a warning, or fail gracefully with a clear message indicating dmem is not available in the current cgroup hierarchy.