Laptop wakes up. goes back to sleep after 20s, wakes up again

Hello,

After a painful experience of updating my laptop (on F42 running Gnome) from 42 to 43 I have regained control of the machine.
But there is some sort of issue that has cropped up that wasnt here on F42.

Behaviour: Laptop is in sleep mode (automatic sleep mode after inactivity).
→ Wake up laptop: Works fine (by touching mouse or hitting a key)
→ Screen wakes up and system becomes active
→ 20ish seconds later the laptop goes back into sleep mode very abruptly all on its own.
→ Wake up laptop again by hitting a key etc
→ Laptop stays awake.

This behaviour was not present in F42 and only started happening after the upgrade.
Here is the journalctl entry from when this happened, and you can see it flip flopping from one to the other.

timlaptop@timlaptop:~$ uname -r
6.18.4-200.fc43.x86_64
timlaptop@timlaptop:~$ cat /etc/fedora-release
Fedora release 43 (Forty Three)

jan 12 15:36:35 fedora kernel: printk: Suspending console(s) (use no_console_suspend to debug)
jan 12 15:36:35 fedora kernel: PM: suspend devices took 1.784 seconds
jan 12 15:36:35 fedora kernel: PM: resume devices took 0.196 seconds
jan 12 15:36:36 fedora systemd-sleep[75970]: System returned from sleep operation ‘suspend’.
jan 12 15:36:36 fedora kernel: PM: suspend exit
jan 12 15:36:36 fedora systemd-sleep[75970]: Successfully thawed unit ‘user.slice’.
jan 12 15:36:36 fedora systemd[1]: systemd-suspend.service: Deactivated successfully.
jan 12 15:36:36 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=systemd-suspend comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’
jan 12 15:36:36 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=systemd-suspend comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’
jan 12 15:36:36 fedora systemd[1]: Finished systemd-suspend.service - System Suspend.
jan 12 15:36:36 fedora systemd[1]: Stopped target sleep.target - Sleep.
jan 12 15:36:36 fedora systemd[1]: Reached target suspend.target - Suspend.
jan 12 15:36:36 fedora systemd-logind[928]: Operation ‘suspend’ finished.
jan 12 15:36:36 fedora systemd[1]: Starting nvidia-resume.service - NVIDIA system resume actions…
jan 12 15:36:36 fedora systemd[1]: Stopped target suspend.target - Suspend.
jan 12 15:36:36 fedora ModemManager[1048]: [sleep-monitor-systemd] system is resuming
jan 12 15:36:36 fedora NetworkManager[1306]: [1768228596.6932] manager: sleep: wake requested (sleeping: yes enabled: yes)
jan 12 15:36:36 fedora suspend[76054]: nvidia-resume.service
jan 12 15:36:36 fedora logger[76054]: <13>Jan 12 15:36:36 suspend: nvidia-resume.service
jan 12 15:36:36 fedora systemd[1]: nvidia-resume.service: Deactivated successfully.
jan 12 15:36:36 fedora systemd[1]: Finished nvidia-resume.service - NVIDIA system resume actions.
jan 12 15:36:36 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=nvidia-resume comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’
jan 12 15:36:36 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=nvidia-resume comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’
jan 12 15:36:36 fedora discord.desktop[15466]: 15:36:36.731 › [GatewaySocket] Connection has reset backoff for reason: power monitor resumed
jan 12 15:36:36 fedora discord.desktop[15466]: 15:36:36.753 › [GatewaySocket] [WS CLOSED] (true, 0, power monitor resumed) retrying immediately.
jan 12 15:36:36 fedora discord.desktop[15466]: 15:36:36.763 › [GatewaySocket] Connection has reset backoff for reason: power monitor resumed
jan 12 15:36:36 fedora discord.desktop[15466]: 15:36:36.764 › [GatewaySocket] [WS CLOSED] (true, 0, power monitor resumed) retrying immediately.
jan 12 15:36:42 timlaptop discord.desktop[15466]: 15:36:42.115 › [GatewaySocket] Updating resume url to wss://gateway-us-east1-d.discord.gg
jan 12 15:36:57 timlaptop systemd-logind[928]: The system will suspend now!
jan 12 15:36:57 timlaptop ModemManager[1048]: [sleep-monitor-systemd] system is about to suspend
jan 12 15:36:57 timlaptop ModemManager[1048]: [sleep-monitor-systemd] ready to sleep; dropping inhibitor
jan 12 15:36:57 timlaptop NetworkManager[1306]: [1768228617.7211] manager: sleep: sleep requested (sleeping: no enabled: yes)
jan 12 15:36:57 timlaptop NetworkManager[1306]: [1768228617.7222] manager: NetworkManager state is now DISABLED (ASLEEP)
jan 12 15:36:57 timlaptop NetworkManager[1306]: [1768228617.7226] device (wlp59s0): state change: activated → deactivating (reason ‘sleeping’, managed-type: ‘full’)
jan 12 15:36:57 timlaptop NetworkManager[1306]: [1768228617.8335] device (wlp59s0): state change: deactivating → disconnected (reason ‘sleeping’, managed-type: ‘full’)
jan 12 15:37:02 fedora systemd[1]: Reached target sleep.target - Sleep.
jan 12 15:37:02 fedora systemd[1]: Starting nvidia-suspend.service - NVIDIA system suspend actions…
jan 12 15:37:02 fedora suspend[76429]: nvidia-suspend.service
jan 12 15:37:02 fedora logger[76429]: <13>Jan 12 15:37:02 suspend: nvidia-suspend.service
jan 12 15:37:03 fedora systemd[1]: nvidia-suspend.service: Deactivated successfully.
jan 12 15:37:03 fedora systemd[1]: Finished nvidia-suspend.service - NVIDIA system suspend actions.
jan 12 15:37:03 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=nvidia-suspend comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’
jan 12 15:37:03 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=nvidia-suspend comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’
jan 12 15:37:03 fedora systemd[1]: Starting systemd-suspend.service - System Suspend…
jan 12 15:37:03 fedora systemd-sleep[76496]: Successfully froze unit ‘user.slice’.
jan 12 15:37:03 fedora systemd-sleep[76496]: Performing sleep operation ‘suspend’…
jan 12 15:37:03 fedora kernel: PM: suspend entry (s2idle)
jan 12 15:37:11 fedora kernel: printk: Suspending console(s) (use no_console_suspend to debug)
jan 12 15:37:11 fedora kernel: PM: suspend devices took 1.791 seconds
jan 12 15:37:11 fedora kernel: PM: resume devices took 0.388 seconds
jan 12 15:37:11 fedora systemd-sleep[76496]: System returned from sleep operation ‘suspend’.
jan 12 15:37:11 fedora kernel: PM: suspend exit
jan 12 15:37:11 fedora systemd-sleep[76496]: Successfully thawed unit ‘user.slice’.
jan 12 15:37:11 fedora systemd[1]: systemd-suspend.service: Deactivated successfully.
jan 12 15:37:11 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=systemd-suspend comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’
jan 12 15:37:11 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=systemd-suspend comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’
jan 12 15:37:11 fedora systemd[1]: Finished systemd-suspend.service - System Suspend.
jan 12 15:37:11 fedora systemd[1]: Stopped target sleep.target - Sleep.
jan 12 15:37:11 fedora systemd[1]: Reached target suspend.target - Suspend.
jan 12 15:37:11 fedora systemd-logind[928]: Operation ‘suspend’ finished.
jan 12 15:37:11 fedora systemd[1]: Starting nvidia-resume.service - NVIDIA system resume actions…
jan 12 15:37:11 fedora systemd[1]: Stopped target suspend.target - Suspend.
jan 12 15:37:11 fedora ModemManager[1048]: [sleep-monitor-systemd] system is resuming
jan 12 15:37:11 fedora NetworkManager[1306]: [1768228631.9486] manager: sleep: wake requested (sleeping: yes enabled: yes)
jan 12 15:37:11 fedora discord.desktop[15466]: 15:37:11.954 › [GatewaySocket] Connection has reset backoff for reason: power monitor resumed
jan 12 15:37:11 fedora discord.desktop[15466]: 15:37:11.955 › [GatewaySocket] [WS CLOSED] (true, 0, power monitor resumed) retrying immediately.
jan 12 15:37:11 fedora logger[76536]: <13>Jan 12 15:37:11 suspend: nvidia-resume.service
jan 12 15:37:11 fedora suspend[76536]: nvidia-resume.service
jan 12 15:37:11 fedora discord.desktop[15466]: 15:37:11.961 › [GatewaySocket] Connection has reset backoff for reason: power monitor resumed
jan 12 15:37:11 fedora discord.desktop[15466]: 15:37:11.961 › [GatewaySocket] [WS CLOSED] (true, 0, power monitor resumed) retrying immediately.
jan 12 15:37:11 fedora systemd[1]: nvidia-resume.service: Deactivated successfully.
jan 12 15:37:11 fedora systemd[1]: Finished nvidia-resume.service - NVIDIA system resume actions.
jan 12 15:37:11 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=nvidia-resume comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’
jan 12 15:37:11 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=nvidia-resume comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’
jan 12 15:37:14 timlaptop discord.desktop[15466]: 15:37:14.624 › [GatewaySocket] [RESUME] resuming session 707ec68cdc18e2f59b418a539491fb3d, seq: 9
jan 12 15:37:14 timlaptop discord.desktop[15466]: 15:37:14.813 › [Flux] Dispatching CONNECTION_RESUMED
jan 12 15:37:14 timlaptop discord.desktop[15466]: 15:37:14.847 › [GatewaySocket] [RESUMED] took 447ms, replayed 0 events, new seq: 12

Could it be this issue?

That topic gives some possible workarounds.

Thank you for the tip, I will check it out in the meantime :slight_smile:

wow!

In very simple terms.. it appears to be an interesting race condition.. there is a script nvidia drivers include that run as part of suspend/resume operations that races with some other things.

Fascinating.