ubuntu 22.04 very slow in entering suspend

Asked by Alan Bromborsky

I am running ubuntu 22.04 (CPU Ryzen 5 5600G) as a htpc using integrated graphics and wifi internet connection. When I put the computer in suspend mode it take 20-30 seconds to enter suspend (power light going off). It wakes from suspend promptly. I have the following script in "/lib/systemd/system-sleep/" to turn the tv and sound bar on and off. The script works but the off section does not execute until 20-30 second after I initial suspend which is why the delay is a problem for me since the tv does not like having no input which happens as soon as I initiate suspend. I turned off wifi and bluetooth but this did not change anything. I have two other htpc's with the same version of Ubuntu, CPU, and sleep wakeup script that do not have this problem (hardwire internet connection). Do you have any idea of what might be wrong.

#!/bin/sh

# "/lib/systemd/system-sleep/" template script

case "${1}" in
  pre)
     sleep 1
     ir-ctl -s /home/pip/bin/remote/Samsung_TV/onoff.dat
     sleep 2
     ir-ctl -s /home/pip/bin/remote/Yahmaha_Soundbar/onoff.dat
     sleep 1
      ;;

  post)
     sleep 1
     ir-ctl -s /home/pip/bin/remote/Samsung_TV/onoff.dat
     sleep 1
      ir-ctl -s /home/pip/bin/remote/Samsung_TV/enter.dat
     sleep 1
     ir-ctl -s /home/pip/bin/remote/Yahmaha_Soundbar/onoff.dat
     sleep 1
      ;;
esac

exit 0

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Alan Bromborsky
Solved:
Last query:
Last reply:
Revision history for this message
Alan Bromborsky (brombo) said :
#1

I found the problem. When I reset my screen privacy settings to:

Blank Screen Delay: Never
Automatic Screen Lock: Off
Lock Screen on Suspend: Off
Show Notifications on Screen Lock: Off

The problem went away. I don't know which setting was critical.