I have a Lenovo Helix 2, which has busted suspend-to-RAM (S3) support. "Light sleep" mode (S0ix), however, works fine, as tested with
echo freeze > /sys/power/state.
I can bind the power button to use
freeze instead of
acpid event handlers, but what I really want to do is get the desktop environment to handle this, since it can do things like "suspend after N minutes of user inactivity" that
Unfortunately, the only options the KDE power manager gives me are "Do Nothing", "Lock Screen", "Suspend", "Hibernate", and "Power Off". It has a "run script" option, but that only applies when transitioning between power states -- e.g. I could have it run a script when going from AC to battery, or from battery to low battery, but not when on battery power and idle for 30 minutes.
So, is there some way -- either as part of KDE configuration, or as a systemd or sysfs or kernel option -- to override things so that it will try to
freeze instead of, or as an alternative to,