The system becomes unresponsive after closing and opening laptop lid

I am using the latest installation with bspwm. When I close the lid of my laptop and open it again, the entire system feezes, the touchpad and the keyboard doesn’t work at all. any help in this regard will be helpful.

Journal entries for the affected boot around the time it happened?

sudo journalctl -b -1

Apr 12 17:41:10 machine systemd-logind[485]: Lid closed.
Apr 12 17:41:10 machine systemd-logind[485]: Suspending…
Apr 12 17:41:10 machine NetworkManager[523]: [1649765470.7833] manager: sleep: sleep requested (sleeping: no enabled: yes)
Apr 12 17:41:10 machine NetworkManager[523]: [1649765470.7834] device (enp2s0f0): state change: unavailable → unmanaged (reason ‘sleeping’, sys-iface-state: ‘managed’)
Apr 12 17:41:10 machine systemd[1]: Stopping User Manager for UID 971…
Apr 12 17:41:10 machine systemd[675]: Activating special unit Exit the Session…
Apr 12 17:41:10 machine systemd[675]: Stopped target Main User Target.
Apr 12 17:41:10 machine systemd[675]: Stopping Accessibility services bus…
Apr 12 17:41:10 machine gvfsd[723]: A connection to the bus can’t be made
Apr 12 17:41:10 machine systemd[675]: Stopping D-Bus User Message Bus…
Apr 12 17:41:10 machine systemd[675]: Stopping User preferences database…
Apr 12 17:41:10 machine systemd[675]: Stopping Virtual filesystem service…
Apr 12 17:41:10 machine systemd[675]: Stopped D-Bus User Message Bus.
Apr 12 17:41:10 machine systemd[675]: Stopped User preferences database.
Apr 12 17:41:10 machine systemd[1]: run-user-971-gvfs.mount: Deactivated successfully.
Apr 12 17:41:10 machine systemd[675]: Stopped Accessibility services bus.
Apr 12 17:41:10 machine systemd[675]: Stopped Virtual filesystem service.
Apr 12 17:41:10 machine systemd[675]: Removed slice User Core Session Slice.
Apr 12 17:41:10 machine systemd[675]: Stopped target Basic System.
Apr 12 17:41:10 machine systemd[675]: Stopped target Paths.
Apr 12 17:41:10 machine systemd[675]: Stopped target Sockets.
Apr 12 17:41:10 machine systemd[675]: Stopped target Timers.
Apr 12 17:41:10 machine systemd[675]: Closed D-Bus User Message Bus Socket.
Apr 12 17:41:10 machine systemd[675]: Closed GnuPG network certificate management daemon.
Apr 12 17:41:10 machine systemd[675]: Closed GCR ssh-agent wrapper.
Apr 12 17:41:10 machine systemd[675]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
Apr 12 17:41:10 machine systemd[675]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Apr 12 17:41:10 machine systemd[675]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Apr 12 17:41:10 machine systemd[675]: Closed GnuPG cryptographic agent and passphrase cache.
Apr 12 17:41:10 machine systemd[675]: Closed p11-kit server.
Apr 12 17:41:10 machine systemd[675]: Closed PipeWire PulseAudio.
Apr 12 17:41:10 machine systemd[675]: Closed PipeWire Multimedia System Socket.
Apr 12 17:41:10 machine systemd[675]: Removed slice User Application Slice.
Apr 12 17:41:10 machine systemd[675]: Reached target Shutdown.
Apr 12 17:41:10 machine systemd[675]: Finished Exit the Session.
Apr 12 17:41:10 machine systemd[675]: Reached target Exit the Session.
Apr 12 17:41:10 machine NetworkManager[523]: [1649765470.7927] device (wlan0): state change: disconnected → unmanaged (reason ‘sleeping’, sys-iface-state: ‘managed’)
Apr 12 17:41:10 machine systemd[676]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8004 service=[systemd-user] terminal=[] user=[lightdm] ruser=[] rhost=[]
Apr 12 17:41:10 machine systemd[1]: user@971.service: Deactivated successfully.
Apr 12 17:41:10 machine systemd[1]: Stopped User Manager for UID 971.
Apr 12 17:41:10 machine audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg=‘unit=user@971 comm=“systemd” exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success’
Apr 12 17:41:10 machine systemd[1]: Stopping User Runtime Directory /run/user/971…
Apr 12 17:41:10 machine kernel: audit: type=1131 audit(1649765470.788:100): pid=1 uid=0 auid=4294967295 ses=4294967295 msg=‘unit=user@971 comm=“systemd” exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success’
Apr 12 17:41:10 machine systemd[1]: run-user-971.mount: Deactivated successfully.
Apr 12 17:41:10 machine systemd[1]: user-runtime-dir@971.service: Deactivated successfully.
Apr 12 17:41:10 machine systemd[1]: Stopped User Runtime Directory /run/user/971.
Apr 12 17:41:10 machine audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg=‘unit=user-runtime-dir@971 comm=“systemd” exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success’
Apr 12 17:41:10 machine systemd[1]: Removed slice User Slice of UID 971.
Apr 12 17:41:10 machine kernel: audit: type=1131 audit(1649765470.792:101): pid=1 uid=0 auid=4294967295 ses=4294967295 msg=‘unit=user-runtime-dir@971 comm=“systemd” exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success’

This means it’s suspending correctly, but not coming back up from sleep.

I’d first try some different kernels, then look through https://wiki.archlinux.org/title/Power_management#Power_management_with_systemd

I see, Thanks for the response. I will try to figure this out.