Score:1

Ubuntu doesn't go to sleep

ua flag

I am trying to address this issue for a while, but been unable to resolve it. When I put the laptop (ThinkPad P15s Gen1) to sleep mode manually, it will not go to sleep mode, it will try to go to sleep, but wake up in a few seconds (lock screen). I have no idea how to resolve it, other than maybe reformat, which I would prefer not to do. I used to have 20.04, but ended up upgrading to 24.04 hoping it would fix, but it didn't. I also tried using a live CD to see if a fresh ubuntu 20.04 would go to sleep mode, and it did, so perhaps that means bios settings are correct?

Any help would be hugely appreciated. Thanks!

enter image description here

Edit: I used to have cuda installed, but I removed it to eliminate if it was causing an issue.

enter image description here

codlord avatar
ru flag
It's not clear if it's suspending and then waking after a few seconds or not suspending at all. Take a look at `/var/log/syslog` at the time of a suspend/wake to see if there are any clues as to exactly what it's doing and if it's suspending what is causing the wake. Do you have any devices connected to the laptop? Sometimes external devices can cause a wake (e.g. mouse, keyboard, other devices connected to a connected USB dock etc).
user2661372 avatar
ua flag
thank you so much for the assistance. I don't have any dock attached. I have M325 mouse, but the behavior is the same without it too. I added log in the original post. I don't understand it. :p Any thoughts from the logs?
codlord avatar
ru flag
It's always better to cut/paste log output and properly format it on your question rather than post a terminal screenshot. But anyway, I can see the last line says `wake requested` from `NetworkManager`. I don't know why but it could be wired network, Wi-Fi or something else like Bluetooth causing the wake. So I suggest a flight mode before a sleep, then disabling bluetooth and trying a sleep, then the same with WiFi etc. That way you may be able to identify exactly the cause. It could be a bug, or there maybe a workaround by changing a BIOS setting but first you need to narrow down the cause.
user2661372 avatar
ua flag
So I tried that. I set airplane mode and then put laptop to sleep, but it wakes up right away. :/ FYI, I tested sleep function by loading live usb, and it works without any issue (didnd't need to change airplane mode or anything.) I think I might have messed up something in bios, but that should also impact live usb ubuntu too, but it didn't. Any thoughts? I can attach a log with airplane mode. Thank you so much.
user2661372 avatar
ua flag
here's the screenshot of my terminal after setting network to airplane mode. Does it help in root cause? https://imgur.com/a/Qnk2F0m
user2661372 avatar
ua flag
Any insights from the log above, @codlord?
user2661372 avatar
ua flag
any thoughts, my friend?
codlord avatar
ru flag
I don't know why your NetworkManager is causing the wake. You could try a stop of the service before a sleep as a workaround: `sudo systemctl stop network-manager` and see the last section of this article here which details disabling the ability of devices to wake the system which may or may not help you: https://gist.github.com/george-hawkins/a897a6fe116093a4c1f29ad19df088de
Tyreal avatar
es flag
Having the same issue. Might be related to installing Python 3.10 or nvidia driver 5.30 but not sure. I have tried stopping the network manager, hasn't helped.
Score:0
es flag

It could be related to another question which has this answer: https://askubuntu.com/a/1393726/1029625

This answer has solved the problem for me. I originally installed a newer version of nvidia driver (5.30), it seems to miss tidying up left over systemd hibernate and suspend requirements.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.