Suspend / Sleep mode really happening?

Is there a way I can tell if my computer is really going into Suspend or Sleep mode?
I have a new computer and installed Ubuntu Mate 22.04.3.

When I boot in Windows and put the computer to Sleep, the screen goes off, the keyboard back-light goes off, and I noticed that a little light on the side of the computer changes from a steady on to fading in and out (like it's sleeping).

When I boot in Ubuntu Mate and I put it into Suspend mode, the screen goes off, but the keyboard back-light stays on until it times out per normal rather than going off right away. And that little light on the side just stays on (no fading in and out).

If I play a video on YouTube and put it into Suspend mode, it will tell me there is video and audio playing and I have the option to wait or suspend anyway. clicking suspend anyway stops the video and audio, shuts off the screen, and the keyboard back-light stays on until it times out and that power light on the side stays on.

I just can't tell if it's truly going into Suspend mode.

If anybody has any thoughts or ideas, I would appreciate hearing them.

Thanks!

--neal

I think about the only way to be sure is to measure the power consumption using a watt metre for both sleep modes and see if they are significantly different. You would probably need a sensitive metre as the levels would be very low to begin with.

2 Likes

Welcome @bikermikem to the community!

1 Like

Hi, @nmboutin (neal) :slight_smile:

You've asked:

Well, I think that one possibility is to check the /var/log/syslog file after suspending and resuming. For instance, in my laptop computer that's also running Ubuntu MATE 22.04.3 ("Jammy Jellyfish"), if I click on the Power icon on the upper right corner of the Ubuntu MATE screen, to bring the "Power icon menu" (at least, that's what I call that menu) and then click on the "Suspend" option, the screen goes dark / black (as you also say) and the red physical LED that is on the physical power button of the laptop starts slowly blinking.

After a few minutes, if I click on the physical Power button again, the screen "wakes up", Ubuntu MATE also "wakes up" and the red physical power button stops blinking and stays on.

If I then go analyze the /var/log/syslog file, I find the following lines related to the period when the laptop computer was in sleep (among many other lines):

Feb  9 20:46:30 mypc kernel: [ 2908.573061] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Feb  9 20:46:30 mypc ModemManager[1183]: <info>  [sleep-monitor-systemd] system is about to suspend
Feb  9 20:46:30 mypc NetworkManager[1080]: <info>  [1707511590.1821] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Feb  9 20:46:30 mypc NetworkManager[1080]: <info>  [1707511590.1824] device (wlo1): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Feb  9 20:46:30 mypc NetworkManager[1080]: <info>  [1707511590.1838] manager: NetworkManager state is now ASLEEP
Feb  9 20:46:30 mypc NetworkManager[1080]: <info>  [1707511590.1840] device (eno2): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed')
(...)
Feb  9 20:46:30 mypc systemd[1]: Reached target Sleep.
Feb  9 20:46:30 mypc systemd[1]: Starting Record successful boot for GRUB...
Feb  9 20:46:30 mypc systemd[1]: Starting System Suspend...
Feb  9 20:46:30 mypc systemd[1]: grub-common.service: Deactivated successfully.
Feb  9 20:46:30 mypc systemd[1]: Finished Record successful boot for GRUB.
Feb  9 20:46:30 mypc systemd[1]: Starting GRUB failed boot detection...
Feb  9 20:46:30 mypc systemd[1]: grub-initrd-fallback.service: Deactivated successfully.
Feb  9 20:46:30 mypc systemd[1]: Finished GRUB failed boot detection.
Feb  9 20:46:30 mypc systemd-sleep[5184]: Entering sleep state 'suspend'...
Feb  9 20:46:30 mypc kernel: [ 2908.694953] PM: suspend entry (deep)
Feb  9 20:46:30 mypc kernel: [ 2908.717672] Filesystems sync: 0.022 seconds
Feb  9 20:46:44 mypc kernel: [ 2908.721299] Freezing user space processes ... (elapsed 0.001 seconds) done.
Feb  9 20:46:44 mypc kernel: [ 2908.722842] OOM killer disabled.
Feb  9 20:46:44 mypc kernel: [ 2908.722843] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Feb  9 20:46:44 mypc kernel: [ 2908.723975] printk: Suspending console(s) (use no_console_suspend to debug)
Feb  9 20:46:44 mypc kernel: [ 2910.996324] ACPI: EC: interrupt blocked
Feb  9 20:46:44 mypc kernel: [ 2911.094954] ACPI: PM: Preparing to enter system sleep state S3
Feb  9 20:46:44 mypc kernel: [ 2911.105756] ACPI: EC: event blocked
Feb  9 20:46:44 mypc kernel: [ 2911.105759] ACPI: EC: EC stopped
Feb  9 20:46:44 mypc kernel: [ 2911.105760] ACPI: PM: Saving platform NVS memory
Feb  9 20:46:44 mypc kernel: [ 2911.105777] Disabling non-boot CPUs ...
Feb  9 20:46:44 mypc kernel: [ 2911.108400] smpboot: CPU 1 is now offline
Feb  9 20:46:44 mypc kernel: [ 2911.112185] smpboot: CPU 2 is now offline
Feb  9 20:46:44 mypc kernel: [ 2911.115832] smpboot: CPU 3 is now offline
Feb  9 20:46:44 mypc kernel: [ 2911.119407] smpboot: CPU 4 is now offline
(...)

And here are the lines apparently from when the computer resumed from suspension:

Feb  9 20:46:44 mypc kernel: [ 2911.146498] ACPI: EC: EC started
Feb  9 20:46:44 mypc kernel: [ 2911.146498] ACPI: PM: Restoring platform NVS memory
Feb  9 20:46:44 mypc kernel: [ 2911.147395] Enabling non-boot CPUs ...
Feb  9 20:46:44 mypc kernel: [ 2911.147434] x86: Booting SMP configuration:
Feb  9 20:46:44 mypc kernel: [ 2911.147435] smpboot: Booting Node 0 Processor 1 APIC 0x2
Feb  9 20:46:44 mypc kernel: [ 2911.150173] CPU1 is up
Feb  9 20:46:44 mypc kernel: [ 2911.150194] smpboot: Booting Node 0 Processor 2 APIC 0x4
Feb  9 20:46:44 mypc kernel: [ 2911.152012] CPU2 is up
Feb  9 20:46:44 mypc kernel: [ 2911.152030] smpboot: Booting Node 0 Processor 3 APIC 0x6
Feb  9 20:46:44 mypc kernel: [ 2911.153824] CPU3 is up
Feb  9 20:46:44 mypc kernel: [ 2911.153842] smpboot: Booting Node 0 Processor 4 APIC 0x8
Feb  9 20:46:44 mypc kernel: [ 2911.155677] CPU4 is up
(...)
Feb  9 20:46:44 mypc kernel: [ 2911.167085] ACPI: PM: Waking up from system sleep state S3
Feb  9 20:46:44 mypc kernel: [ 2911.174147] ACPI: EC: interrupt unblocked
Feb  9 20:46:44 mypc kernel: [ 2912.303221] ACPI: EC: event unblocked
(...)
Feb  9 20:46:44 mypc kernel: [ 2912.791539] OOM killer enabled.
Feb  9 20:46:44 mypc kernel: [ 2912.791543] Restarting tasks ...
(...)
Feb  9 20:46:44 mypc systemd-resolved[882]: Clock change detected. Flushing caches.
Feb  9 20:46:44 mypc rtkit-daemon[1686]: The canary thread is apparently starving. Taking action.
Feb  9 20:46:44 mypc rtkit-daemon[1686]: Demoting known real-time threads.
(...)
Feb  9 20:46:44 mypc kernel: [ 2912.804072] PM: suspend exit
Feb  9 20:46:44 mypc systemd-sleep[5184]: System returned from sleep state.
Feb  9 20:46:44 mypc dbus-daemon[2029]: [session uid=1000 pid=2029] Successfully activated service 'org.freedesktop.Notifications'
Feb  9 20:46:44 mypc systemd[1]: systemd-suspend.service: Deactivated successfully.
Feb  9 20:46:44 mypc systemd[1]: Finished System Suspend.
Feb  9 20:46:44 mypc systemd[1]: Stopped target Sleep.
Feb  9 20:46:44 mypc systemd[1]: Reached target Suspend.
Feb  9 20:46:44 mypc systemd[1]: Stopped target Suspend.
Feb  9 20:46:44 mypc ModemManager[1183]: <info>  [sleep-monitor-systemd] system is resuming
Feb  9 20:46:44 mypc NetworkManager[1080]: <info>  [1707511604.7732] manager: sleep: wake requested (sleeping: yes  enabled: yes)

I hope this helps :slight_smile:

4 Likes

Thank you sir. That's not something I'll be able to test. But it sounds like it may be good enough, even if it's not fully into its sleep mode.

Thanks!

--neal

Hmmm... Let me see if I can figure out how to do this and give it a shot. I'll report back on what I'm seeing, if I can make sense of it. :grin:

Thanks!

--neal

2 Likes