Unable to suspend Thinkpad T440p via systemd (22.04)

I have a bit of an odd issue with Ubuntu 22.04.x/Linux Mint 21.x on a Lenovo Thinkpad T440p.
Triggering suspend via the GUI or sudo systemctl suspend only briefly disconnects the network, locks the screen if configured, but does not actually suspend the system.

However, running sudo /lib/systemd/systemd-sleep suspend does suspend the system.
That's the command that systemd's suspend service uses underneath, but something keeps it from getting executed.
Any ideas?

  Host: thinkpad Kernel: 5.19.0-35-generic x86_64 bits: 64
    Desktop: Cinnamon 5.6.8 Distro: Linux Mint 21.1 Vera
  Type: Laptop System: LENOVO product: 20AWS3M100 v: ThinkPad T440p
    serial: <superuser required>
  Mobo: LENOVO model: 20AWS3M100 v: SDK0E50510 WIN
    serial: <superuser required> UEFI-[Legacy]: LENOVO v: GLETA2WW (2.56 )
    date: 07/16/2021
  ID-1: BAT0 charge: 33.8 Wh (39.5%) condition: 85.5/99.5 Wh (86.0%)
  Info: dual core model: Intel Core i7-4600M bits: 64 type: MT MCP cache:
    L2: 512 KiB
  Speed (MHz): avg: 2893 min/max: 800/3600 cores: 1: 2895 2: 2893 3: 2893
    4: 2893
  Device-1: Intel 4th Gen Core Processor Integrated Graphics driver: i915
    v: kernel
  Device-2: NVIDIA GK208M [GeForce GT 730M] driver: nouveau v: kernel
  Display: x11 server: X.Org v: driver: X: loaded: modesetting
    unloaded: fbdev,vesa gpu: i915 resolution: 1366x768~60Hz
  OpenGL: renderer: Mesa Intel HD Graphics 4600 (HSW GT2)
    v: 4.6 Mesa 22.2.5
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio
    driver: snd_hda_intel
  Device-2: Intel 8 Series/C220 Series High Definition Audio
    driver: snd_hda_intel
  Sound Server-1: ALSA v: k5.19.0-35-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
  Device-1: Intel Ethernet I217-LM driver: e1000e
  IF: enp0s25 state: down mac: <removed>
  Device-2: Intel Wireless 7260 driver: iwlwifi
  IF: wlp4s0 state: up mac: <removed>
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb
  Report: hciconfig ID: hci0 state: up address: <removed> bt-v: 2.1
  Local Storage: total: 465.76 GiB used: 242.46 GiB (52.1%)
  ID-1: /dev/sda vendor: Seagate model: ST500LM021-1KJ152 size: 465.76 GiB
  ID-1: / size: 37.25 GiB used: 17.94 GiB (48.2%) fs: ext4 dev: /dev/sda1
  ID-2: /home size: 419.83 GiB used: 224.52 GiB (53.5%) fs: ext4
    dev: /dev/sda5
  Alert: No swap data was found.
  System Temperatures: cpu: 56.0 C mobo: N/A gpu: nouveau temp: 49.0 C
  Fan Speeds (RPM): fan-1: 0
  Processes: 232 Uptime: 24m Memory: 7.48 GiB used: 2.12 GiB (28.3%)
  Shell: Bash inxi: 3.3.13

Hello maximusmuscore

Each to their own, I have never used "suspend" or "hibernate" on a computer. Does your use-case really require that this works? :thinking:

Well, this device being a notebook, I'd really ike to be able to suspend by closing the lid when not in use.

At least I found a workaround:

  1. disable suspend functionality in systemd:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

(can be reverted by using unmask instead of mask)

  1. create /etc/sudoers.d/customSuspend with this contents

ALL ALL = NOPASSWD:/usr/local/bin/customSuspend.sh

  1. create /usr/local/bin/customSuspend.sh with this contents and make executable
[ "root" != "$USER" ] && exec sudo $0 "$@"
echo "mem" > /sys/power/state
  1. create /etc/acpi/lid.sh with this contents and make executable
grep -q closed /proc/acpi/button/lid/LID/state
if [ $? = 0 ]
  1. create /etc/acpi/events/lm_lid with this contents and reboot
  1. optionally create a menu item for /usr/local/bin/customSuspend.sh
1 Like

I reinstalled the OS in UEFI mode - now it suspends just fine out of the box.