Xubuntu freeze after suspend/resume

Ubuntu Version:
Xubuntu 22.04 LTS

Desktop Environment (if applicable):
XFCE

Problem Description:
After waking from suspend (or after closing/opening laptop lid), the system freezes: mouse cursor moves but clicks don’t work. All windows and applications are unresponsive. Only hard reboot worked before the fix.

Relevant System Information:
Laptop: Clevo N650DU (Why! brand), 7+ years old
Graphics: Intel integrated

Screenshots or Error Messages:
System just freezes on resume

What I’ve Tried:
Manual fix from TTY worked: Ctrl+Alt+F2 then sudo systemctl restart lightdm

Solution:

Create an auto-restart script for lightdm:

sudo nano /lib/systemd/system-sleep/fix-lightdm-resume

Paste this:

#!/bin/bash
case "$1" in
  post)
    sleep 4
    if ! systemctl is-active --quiet lightdm; then
      systemctl restart lightdm
    fi
    ;;
esac

Make it executable:

sudo chmod +x /lib/systemd/system-sleep/fix-lightdm-resume

Welcome to Ubuntu Discourse :slight_smile:

We prefer that users not use Solved in titles but instead use the Solution box at the bottom of the post.

Thanks for sharing with the community.

Thanks! Will do next time.

1 Like

With the solution being in the OP, is it possible to use the Solution box? In case not I re-categorized this to Tips & Tricks

2 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.