Hello all, for a few weeks/months now, my computer has stopped going into suspend mode. Here is what happens when putting it to sleep (using GNOME’s power menu) or using systemctl suspend:
- Display turns off, peripherals turn off (keyboard lights off etc), fans spin up before sleep as usual
- Fans go back to idle speed, computer stays on
- Have to press the keyboard, wake the display up and go in the power menu again to suspend it (from the lock screen), and it works every time like this.
I have no idea what could be preventing suspend and what I could find online did not really help a lot. I don’t think it is a USB device because I tried unplugging most of them except my mouse or my keyboard and it still did not work, and the second time on the lock screen it always suspends like intended
- Distro: Fedora 40
- DE: Gnome 46
- GPU: NVIDIA GTX 1080Ti (Wayland)
- CPU: Intel 10850K
- MB: Gigabyte Z590 Gaming X (everything is up to date)
thx !
New kernel may introduce regressions. See this similar issue on kernel 6.10.3, or try another version of kernel on startup if it’s possible.
How does one check what kernal one has? Does the kernal vary by distro? How does one update it?
Not OP, just a Linux newb trying to learn, if you don’t mind explaining that is. :_
uname -a
Updates depend on the specific distro. Some, like debian, keep the major version the same throughout the entire lifetime, just backporting the security fixes, others, like arch, follows the official major releases more closely.
Thank you!
Kernels are usually intalled in ‘/boot’, and we usually install new kernels via a package manager (gnome-software, pacman, dnf, etc.). What distro and package manager are you using?
None. Currently I’m still on Windows, but I’m planning on switching to either PopOS or Mint when Win10 EOL comes around, at the latest.
And I figure it’s never too soon to learn things. The way I see it is, whether I switch six months from now or six hours, the more I learn now, the easier I’ll have it when I end up actually switching. :)
I see. Before the switching, you may want to try Linux on Windows using WSL2 or VirtualBox, etc. Also, Mint and other distros provide bootable image, so you can try it without installing Mint on your machine. Good luck!
Before the switching, you may want to try Linux on Windows using WSL2 or VirtualBox, etc.
Thanks for the tip! I think I’ll try VirtualBox!
Also, Mint and other distros provide bootable image, so you can try it without installing Mint on your machine.
You’re talking about booting from a disk or USB drive, right? See, I’ve tried those (well, the USB drive anyway), but AFAICT there didn’t seem to be a way to have it remember stuff between boots? Maybe I missed something…
Yes. In a typical live USB session, all changes are written to the RAM, so they are lost on the shutdown. Some live USB supports persistent storage, but I think it’s not so common.
That is…disappointing.
Honestly use a program like fastfetch, it’s a CLI app.
Otherwise, from memory, Mission Center might show it
Thanks!
Thanks for the link, I am on kernel 6.10.4, but I do not have any error messages in journalctl, so I am not sure it is that. It could definitely be related though
Step 1: give up
I simply stopped even trying to use sleep mode because I had some issues and many people responded to my inquiries telling me that it’s always been spotty in Linux. I have one laptop that goes into sleep mode perfectly fine when I close the lid, and wakes perfectly when I open it. That’s an Asus x202e with Pop!OS. Then I have an older HP Elitebook with Elementary OS that goes into sleep mode when I close the lid, but in order to resume, I have to open the lid and then press the power button to wake. And finally my new ASUS zenbook with Kubuntu would go into sleep and never be able to wake no matter what, and required a hardware forced shutdown. So that’s my main system and I simply disabled sleep. When I close the lid it just shuts off the display. It’s actually not bad because I can leave something running and close it, and it continues the tasks.
These days the computers use such less power than they used to, so it’s not really the biggest necessity to use sleep mode.
I mean i could probably leave it on, but it’s a desktop, and with the Nvidia GPU using a reported 50W at idle, it would be kind of stupid to leave it on during the night when also using power to run the AC. Also the fans are loud
Yeah not really in the same boat.
TIL: Some people actually like their laptop to wake up after openning the lid!
I’ve used Elitebooks with elementary for years and found the wakup after pressing a button logical.
What pissed me off about probooks/elitebooks was that they woke up to inform me about the low battery, then went back to sleep due to low battery, then wake up, sleep, wake up, sleep, wake up… and the agony went on until the sweet death. I’ve never felt so sorry for a non living object before or after.
Oh, and also elementary can’t go to sleep from the lockscreen, on any hardware. One of those those bugs that I’m always sure will be taken care of in the next release, but it never is.
Do you have steam running in the background? Or do you have gamemoded enabled?
Good question, I will check after work if steam starts in the background or something, I’ve had some issues with steam in the past so what you’re saying could make sense…
Hello, I’m far from an expert but I had a similar issue on my desktop, running mint and an Nvidia GPU. After looking at a lot of places for an answer one that did work for me was below
Ust/bin/Nvidia_sleep.sh. (off the top of my head it is something like this, can confirm later if you can’t find it.)
At the top put in “exit 0”
See if it works for you. But it seems when I get an update it does at times get overwritten.
Hmm, it’s definitely doing something, so it could be worth investigating, but instead of going to sleep mode it simply turns off the monitor and on its own 1s later turns back on
I’m running Manjaro and I was having this exact problem for several weeks, up until about two weeks ago when a new update fixed everything. I would just not worry about it until your next major OS update.
Good point, fedora is usually a bit slower on updates than arch/manjaro, maybe an update will fix it. Thx!
I’ve had some suspend adventures too, but my experience is just on Intel laptops.
About a month ago, Debian Trixie had a regression that made my laptop wake up right after a suspend attempt. Afaict, it was not directly a kernel change, something in userland changed and triggered problems. This pm_async thing fixed it. Frankly, I don’t know why “async” power management is a thing anybody would want. Taking a whole extra millisecond to suspend in a more reliable way seems like a no-brainer.
echo 1 > /sys/power/pm_debug_messages # why would you ever want to not syslog it??
echo 0 > /sys/power/pm_async
Cat /sys/power/pm_wakeup_irq may tell you something about whomst is responsible for sleep failure. Anyways, suspend is the worst thing to diagnose good luck.
Thanks I tried the edited values but it does not seem to solve the issue, /sys/power/pm_wakeup_irq returned nothing when I checked. Idk if my system is broken or if it’s fedora using diff configs though
I’d start with looking at what the logs say when the computer fails to sleep.
Running journalctl -r -u systemd-suspend.service does not suggest anything is wrong, just normal status messages. I will try to see if I need a BIOS update, maybe it’s really out of date.
edit yeah current bios is F7c (apr 2022), most recent is F10 (dec 2023). will do that
Edit 2 that didn’t solve it
Perhaps not useful, but my linux machine doesn’t sleep unless I disconnect my ploopy trackball first, exhibiting the same symptoms.
Ploopy?
I use a poopy nano https://ploopy.co/nano-trackball/
I had this theory since I got some new usb periphs relatuvelu recently, but that was not the issue
Try switching to X11 first of all.
Considering I can put my GTX 960M laptop into Sleep Mode while on a Wayland session, that’s not really a solution.
I mean Wayland issues are pretty random and may affect only specific systems.
I think you’re right on this, but i am thinking it’s more of an Nvidia issue rather than a Wayland one… Going to sleep under X11 works the first try, however resuming from sleep showed the following screen (kernel panic? with mentions of Nvidia)
It’s either that or just a black screen. I think this warrants a driver reinstall, I also installed some CUDA stuff so will have to check this out…