Zorin OS 17.2 Lite Freezes after kept idle (laptop lid closed)

I am facing a problem where the Zorin OS 17.2 Lite edition freezes after my laptop is kept idle for long time say like 10 mins. This usually happens when I close the lid of my laptop. This is state however the mouse cursor works fine but clicks doesn't work, no buttons work and the computer is completely unresponsive.
The only to get back from this situation is to force shut down the laptop using power button.

Please someone tell me what's going wrong with my laptop. I can provide all kind of logs for investigation.

My pc specs:

Name: ASUS VIVOBOOK 15 (X515M)
HDD Capacity: 256GB SSD
Processor: Intel Celeron N4020 Intel UHD 600
Clock speed: 1.1 GHz
RAM Capacity: 4GB
RAM Type: DDR4
RAM Speed: 2400 Mhz

Edit: Laptop is not old it's even under warranty, using it for maybe 6 months now, it came with windows 11 home edition pre-installed.

You might launch terminal and run

sudo apt update && sudo apt full-upgrade

sudo apt install intel-microcode

Is suspending is the issue, you might mask the services to prevent them falling into a loop:

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

It didn't fix the issue. The laptop is still freezing i closed the lid waited for 10 mins and checked if everything is working fine or not. But the issue still persists.
Also a new msg is showing up at the top right corner as in the image.

Yes, the power manager had its processes masked to see if that resolves the issue.
Since it did not we can unmask them

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

You must reboot for this to take effect.

Can you check your logs?

journalctl -b -1 -e

What graphics are you using?

sudo lshw -C video

Here are the outputs of the commands you reffered:

ayus@AYUS-LAPTOP:~$ sudo lshw -C video
  *-display                 
       description: VGA compatible controller
       product: GeminiLake [UHD Graphics 600]
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 06
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=1366,768
       resources: irq:134 memory:a0000000-a0ffffff memory:90000000-9fffffff ioport:f000(size=64) memory:c0000-dffff
ayus@AYUS-LAPTOP:~$ journalctl -b -1 -e
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: swapfile.swap: Deactivated successfully.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Deactivated swap /swapfile.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: systemd-update-utmp.service: Deactivated successfully.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Stopped Record System Boot/Shutdown in UTMP.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: systemd-tmpfiles-setup.service: Deactivated successfully.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Stopped Create Volatile Files and Directories.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Stopped target Local File Systems.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Stopped target Mounted snaps.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Stopped target Mounting snaps.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Unmounting /boot/efi...
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Unmounting /run/credentials/systemd-sysusers.service...
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: boot-efi.mount: Deactivated successfully.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Unmounted /boot/efi.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: run-credentials-systemd\x2dsysusers.service.mount: Deactivated successfully.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Unmounted /run/credentials/systemd-sysusers.service.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Reached target Unmount All Filesystems.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: systemd-fsck@dev-disk-by\x2duuid-E024\x2d372E.service: Deactivated successfully.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Stopped File System Check on /dev/disk/by-uuid/E024-372E.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Removed slice Slice /system/systemd-fsck.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Stopped target Preparation for Local File Systems.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: systemd-tmpfiles-setup-dev.service: Deactivated successfully.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Stopped Create Static Device Nodes in /dev.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: systemd-sysusers.service: Deactivated successfully.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Stopped Create System Users.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: systemd-remount-fs.service: Deactivated successfully.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Stopped Remount Root and Kernel File Systems.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Reached target System Shutdown.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Reached target Late Shutdown Services.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: systemd-poweroff.service: Deactivated successfully.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Finished System Power Off.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Reached target System Power Off.
Mar 18 09:45:48 AYUS-LAPTOP systemd[1]: Shutting down.
Mar 18 09:45:48 AYUS-LAPTOP systemd-shutdown[1]: Syncing filesystems and block devices.
Mar 18 09:45:48 AYUS-LAPTOP systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Mar 18 09:45:48 AYUS-LAPTOP systemd-journald[232]: Journal stopped

This shows a system shutdown, not a suspend. Can you repeat this exercise after performing a system suspend, instead? (If you do a force shutdown due to freeze, the logs can still show the previous suspend state)

Okay, as you said I rebooted my pc and again wait for the same thing to happen (closed the lid and waited for the pc to hang) and force shut down and now I am giving you the log after a reboot below:

ayus@AYUS-LAPTOP:~$ journalctl -b -1 -e
Mar 18 10:39:30 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274570.4537] device (wlo1): Activation: (wifi) connection 'AYUS' has security, and secrets exist.  No new secrets needed.
Mar 18 10:39:30 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274570.4537] Config: added 'ssid' value 'AYUS'
Mar 18 10:39:30 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274570.4537] Config: added 'scan_ssid' value '1'
Mar 18 10:39:30 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274570.4538] Config: added 'bgscan' value 'simple:30:-70:86400'
Mar 18 10:39:30 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274570.4538] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK SAE FT-SAE'
Mar 18 10:39:30 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274570.4538] Config: added 'auth_alg' value 'OPEN'
Mar 18 10:39:30 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274570.4538] Config: added 'psk' value '<hidden>'
Mar 18 10:39:30 AYUS-LAPTOP wpa_supplicant[439]: wlo1: SME: Trying to authenticate with 36:39:5a:7b:11:66 (SSID='AYUS' freq=2467 MHz)
Mar 18 10:39:30 AYUS-LAPTOP kernel: wlo1: authenticate with 36:39:5a:7b:11:66 (local address=f8:54:f6:57:dd:af)
Mar 18 10:39:31 AYUS-LAPTOP kernel: wlo1: send auth to 36:39:5a:7b:11:66 (try 1/3)
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.0521] device (wlo1): supplicant interface state: disconnected -> authenticating
Mar 18 10:39:31 AYUS-LAPTOP wpa_supplicant[439]: wlo1: SME: Trying to authenticate with 36:39:5a:7b:11:66 (SSID='AYUS' freq=2467 MHz)
Mar 18 10:39:31 AYUS-LAPTOP kernel: wlo1: authenticate with 36:39:5a:7b:11:66 (local address=f8:54:f6:57:dd:af)
Mar 18 10:39:31 AYUS-LAPTOP kernel: wlo1: send auth to 36:39:5a:7b:11:66 (try 1/3)
Mar 18 10:39:31 AYUS-LAPTOP kernel: wlo1: authenticated
Mar 18 10:39:31 AYUS-LAPTOP wpa_supplicant[439]: wlo1: PMKSA-CACHE-ADDED 36:39:5a:7b:11:66 0
Mar 18 10:39:31 AYUS-LAPTOP wpa_supplicant[439]: wlo1: Trying to associate with 36:39:5a:7b:11:66 (SSID='AYUS' freq=2467 MHz)
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.1360] device (wlo1): supplicant interface state: authenticating -> associating
Mar 18 10:39:31 AYUS-LAPTOP kernel: wlo1: associate with 36:39:5a:7b:11:66 (try 1/3)
Mar 18 10:39:31 AYUS-LAPTOP kernel: wlo1: RX AssocResp from 36:39:5a:7b:11:66 (capab=0x411 status=0 aid=1)
Mar 18 10:39:31 AYUS-LAPTOP kernel: wlo1: associated
Mar 18 10:39:31 AYUS-LAPTOP wpa_supplicant[439]: wlo1: Associated with 36:39:5a:7b:11:66
Mar 18 10:39:31 AYUS-LAPTOP wpa_supplicant[439]: wlo1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.1520] device (wlo1): supplicant interface state: associating -> associated
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.1677] device (wlo1): supplicant interface state: associated -> 4way_handshake
Mar 18 10:39:31 AYUS-LAPTOP wpa_supplicant[439]: wlo1: WPA: Key negotiation completed with 36:39:5a:7b:11:66 [PTK=CCMP GTK=CCMP]
Mar 18 10:39:31 AYUS-LAPTOP wpa_supplicant[439]: wlo1: CTRL-EVENT-CONNECTED - Connection to 36:39:5a:7b:11:66 completed [id=0 id_str=]
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.1821] device (wlo1): supplicant interface state: 4way_handshake -> completed
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.1821] device (wlo1): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "AYUS"
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.1822] device (wlo1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.1826] dhcp4 (wlo1): activation: beginning transaction (timeout in 45 seconds)
Mar 18 10:39:31 AYUS-LAPTOP avahi-daemon[383]: Joining mDNS multicast group on interface wlo1.IPv6 with address fe80::cd17:79c1:6b2d:3e6f.
Mar 18 10:39:31 AYUS-LAPTOP avahi-daemon[383]: New relevant interface wlo1.IPv6 for mDNS.
Mar 18 10:39:31 AYUS-LAPTOP avahi-daemon[383]: Registering new address record for fe80::cd17:79c1:6b2d:3e6f on wlo1.*.
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.2061] dhcp4 (wlo1): state changed new lease, address=192.168.222.37
Mar 18 10:39:31 AYUS-LAPTOP avahi-daemon[383]: Joining mDNS multicast group on interface wlo1.IPv4 with address 192.168.222.37.
Mar 18 10:39:31 AYUS-LAPTOP avahi-daemon[383]: New relevant interface wlo1.IPv4 for mDNS.
Mar 18 10:39:31 AYUS-LAPTOP avahi-daemon[383]: Registering new address record for 192.168.222.37 on wlo1.IPv4.
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.2109] device (wlo1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.2187] device (wlo1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.2193] device (wlo1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.2197] manager: NetworkManager state is now CONNECTED_LOCAL
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.2203] manager: NetworkManager state is now CONNECTED_SITE
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.2203] policy: set 'AYUS' (wlo1) as default for IPv4 routing and DNS
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.2210] device (wlo1): Activation: successful, device activated.
Mar 18 10:39:31 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274571.2249] manager: NetworkManager state is now CONNECTED_GLOBAL
Mar 18 10:39:31 AYUS-LAPTOP systemd-resolved[360]: wlo1: Bus client set default route setting: yes
Mar 18 10:39:31 AYUS-LAPTOP systemd-resolved[360]: wlo1: Bus client set DNS server list to: 192.168.222.177
Mar 18 10:39:31 AYUS-LAPTOP wpa_supplicant[439]: wlo1: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-28 noise=9999 txrate=65000
Mar 18 10:39:32 AYUS-LAPTOP NetworkManager[392]: <info>  [1742274572.9195] policy: set 'AYUS' (wlo1) as default for IPv6 routing and DNS
Mar 18 10:39:32 AYUS-LAPTOP avahi-daemon[383]: Leaving mDNS multicast group on interface wlo1.IPv6 with address fe80::cd17:79c1:6b2d:3e6f.
Mar 18 10:39:32 AYUS-LAPTOP avahi-daemon[383]: Joining mDNS multicast group on interface wlo1.IPv6 with address 2409:40e0:1009:bd53:9dff:eb6e:2715:6100.
Mar 18 10:39:32 AYUS-LAPTOP avahi-daemon[383]: Registering new address record for 2409:40e0:1009:bd53:9dff:eb6e:2715:6100 on wlo1.*.
Mar 18 10:39:32 AYUS-LAPTOP avahi-daemon[383]: Withdrawing address record for fe80::cd17:79c1:6b2d:3e6f on wlo1.
Mar 18 10:39:32 AYUS-LAPTOP systemd-resolved[360]: wlo1: Bus client set DNS server list to: 192.168.222.177, 2409:40e0:1009:bd53::81
Mar 18 10:39:33 AYUS-LAPTOP wpa_supplicant[439]: wlo1: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-20 noise=9999 txrate=72200
Mar 18 10:39:34 AYUS-LAPTOP avahi-daemon[383]: Registering new address record for 2409:40e0:1009:bd53:b835:928:4dd3:cbe4 on wlo1.*.
Mar 18 10:39:40 AYUS-LAPTOP systemd-resolved[360]: Using degraded feature set UDP instead of UDP+EDNS0 for DNS server 192.168.222.177.
Mar 18 10:39:41 AYUS-LAPTOP systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.

Well, that told us nothing.

You might try the kernel parameter i915.enable_psr=0

You can follow the instructions here:

But do not use nomodeset

Instead, use i915.enable_psr=0

Be sure to save the grub file and run

sudo update-grub

after editing the file. Reboot fully once before testing.

Did it and tested still the issue persists.

Remember when you try some configuration and it does not work, to undo that change.
Let's edit grub to remove that parameter and restore it to just "quiet splash" for now, then run

sudo update-grub

I admit, I am a bit stumped at this point. While in Gnome, this is a pretty common issue, I very rarely come across this in XFCE. I need to research this a bit.

Okay, I will reset the grub parameters back to default.
This is a serious issue and needs to be fixed the pc becomes completely unresponsive after opening the lid, after some 5mins or so. However i tested by keeping the pc idle for 5 minutes without closing the lid the screen just goes off and the user logs out after some time but it doesn't freeze and everything works fine.

That is in the screensaver settings, which is different from Suspend.

Oh okay. That's why. Maybe we can change the way the pc handles the lid close instead of suspending the pc hould do nothing. Is there any settings for that ?
That would be a temporary solution.

In windows there is a option for this, however i am not sure for linux.

There is:

sudo nano /etc/systemd/logind.conf

Arrow key to #HandleLidSwitch=suspend and remove the hashtag (#) so it looks like
HandleLidSwitch=suspend

Now change the value from suspend to ignore

HandleLidSwitch=ignore

Tap ctl+o to overwrite, enter to save current configuration, ctl+x to exit the editor.
Reboot a full cycle.

Even it doesn't fix the issue what worked for me is to remove xfce4-screensaver which is the culprit.

I used the solution given here: