this post was submitted on 18 Aug 2024
46 points (100.0% liked)

Linux

48069 readers
1341 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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:

  1. Display turns off, peripherals turn off (keyboard lights off etc), fans spin up before sleep as usual
  2. Fans go back to idle speed, computer stays on
  3. 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 !

top 36 comments
sorted by: hot top controversial new old
[–] nmtake@lemm.ee 4 points 2 months ago (2 children)

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.

[–] EveryMuffinIsNowEncrypted@lemmy.blahaj.zone 2 points 2 months ago (3 children)

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. :_

[–] deafboy@lemmy.world 3 points 2 months ago (1 children)

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.

[–] nmtake@lemm.ee 2 points 2 months ago (1 children)

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?

[–] EveryMuffinIsNowEncrypted@lemmy.blahaj.zone 1 points 2 months ago* (last edited 2 months ago) (1 children)

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. :)

[–] nmtake@lemm.ee 2 points 2 months ago (1 children)

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!

[–] EveryMuffinIsNowEncrypted@lemmy.blahaj.zone 1 points 2 months ago* (last edited 2 months ago) (1 children)

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...

[–] nmtake@lemm.ee 2 points 2 months ago (1 children)

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.

[–] Cornelius@lemmy.ml 2 points 2 months ago (1 children)

Honestly use a program like fastfetch, it's a CLI app.

Otherwise, from memory, Mission Center might show it

[–] independantiste@sh.itjust.works 1 points 2 months ago

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

[–] AndrewZabar@lemmy.world 4 points 2 months ago (2 children)

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.

[–] independantiste@sh.itjust.works 6 points 2 months ago (1 children)

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

[–] AndrewZabar@lemmy.world 1 points 2 months ago

Yeah not really in the same boat.

[–] deafboy@lemmy.world 1 points 2 months ago

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.

[–] therealjcdenton@lemmy.zip 3 points 2 months ago (1 children)

Do you have steam running in the background? Or do you have gamemoded enabled?

[–] independantiste@sh.itjust.works 1 points 2 months ago

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...

[–] dueuwuje@aussie.zone 3 points 2 months ago (1 children)

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.

[–] independantiste@sh.itjust.works 2 points 2 months ago (1 children)

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

[–] transientpunk@sh.itjust.works 2 points 2 months ago* (last edited 2 months ago) (1 children)

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 worth about it until your next major OS update.

[–] independantiste@sh.itjust.works 1 points 2 months ago

Good point, fedora is usually a bit slower on updates than arch/manjaro, maybe an update will fix it. Thx!

[–] rotopenguin@infosec.pub 3 points 2 months ago* (last edited 2 months ago) (1 children)

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.

[–] independantiste@sh.itjust.works 1 points 2 months ago

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

[–] ikidd@lemmy.world 3 points 2 months ago

Step 1: give up

[–] jaxxed@lemmy.world 2 points 2 months ago (2 children)

Perhaps not useful, but my linux machine doesn't sleep unless I disconnect my ploopy trackball first, exhibiting the same symptoms.

[–] independantiste@sh.itjust.works 1 points 2 months ago

I had this theory since I got some new usb periphs relatuvelu recently, but that was not the issue

[–] zelifcam@lemmy.world 2 points 2 months ago (1 children)

I’d start with looking at what the logs say when the computer fails to sleep.

https://linuxhandbook.com/journalctl-command/

[–] independantiste@sh.itjust.works 2 points 2 months ago* (last edited 2 months ago)

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