this post was submitted on 29 Aug 2023
140 points (99.3% liked)

Linux

48329 readers
639 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
 

Most very recent laptops no longer support S3 sleep which used to be the default for a long time. On my old laptop it allowed me to just close the lid in the evening and open it again in the morning, and it would only loose a negligible amount of charge during that time.

My new laptop (Dell Inspiron 14 Plus, Alder Lake) uses s2idle by default on Linux (Fedora in my case), which depletes the battery very quickly. I tend to shut down my computer every evening now, but even when I just put my laptop in my bag for 2 hours it will have lost 10-15% when I get it out. It's not terrible and I have gotten used to using my laptop like that but there's got to be a better way right?

I know hibernation / suspend-to-disk is an option in theory, but I use secure boot (and also disk encryption), and that makes it a lot more complicated, involving compiling your own patched kernel, so no thanks.

The way sleep on modern laptops is supposed to work is apparently called S0iX but it is not used by default and I don't know if or how I could make use of it on my laptop, and a guide that is linked everywhere on 01.org now just redirects to some generic intel site.

If you have a recent laptop without S3 sleep support, how are you dealing with this? Do you just live with the poor battery life, or is there some secret to getting more power saving sleep on modern machines?

Edit for mare clarification:

  • The laptop does enter s2idle correctly, it just doesn't get down to a very low power state at all and consumes ~5% an hour
  • cat /sys/power/mem_sleep only returns [s2idle], no deep sleep is supported. echo deep | sudo tee /sys/power/mem_sleep doesn't work (tee: /sys/power/mem_sleep: Invalid argument)
  • There's no option in the BIOS to enable other sleep modes
  • I've even tried patching the ACPI table myself to enable S3 sleep and it didn't work. I have no idea if I did it correctly although according to dmesg it did seem to load my patch

Thank you all for your input but it looks like on this Dell laptop I'm stuck with horrible s2idle sleep :/

you are viewing a single comment's thread
view the rest of the comments
[–] dingdongitsabear@lemmy.ml 8 points 1 year ago* (last edited 1 year ago) (2 children)

my laptop is comparatively old (t480s, 8th gen) but had the same issues with battery drain on F38. I've switched to debian ~~and the situation is way better~~, overnight drain percentage-wise is in the single digits range. still nowhere close to my old macbook, but workable.

edit: no it isn't, tested F38 and D12 on separate partitions, both lose same amount; ~1 %/hr of standby (regardless of deep or s2idle setting), so 7-8% overnight.

edit 2: looking into making suspend-then-hibernate work, that should fix everything; sleep for 30 mins and hibernate afterwards.

[–] A_s_h_k_a_n@persiansmastodon.com 3 points 1 year ago (2 children)

@dingdongitsabear

@Sh1nyM3t4l4ss

I believe Macbooks have higher battery capacity. Don't they?

[–] dingdongitsabear@lemmy.ml 7 points 1 year ago

not important for this use case. I'm referring to the fact that I can close it shut and leave it for a week. I open it and it's ready to go and the battery has barely lost a percentage point. that's 2010 tech and something completely unattainable to me 13 years later. I've moved on from macOS but can't help being envious.

[–] cre0@kbin.social 0 points 1 year ago

They are on the higher-end of capacity but (especially Apple silicon) are much more power-efficient.

[–] owatnext@lemmy.world 2 points 1 year ago (1 children)

T480s here as well, running Void Linux. I just close the lid and whatever it does barely uses any battery. Something like 2-4% every 24 hours.

[–] dingdongitsabear@lemmy.ml 1 points 1 year ago (1 children)

I can't come close to that number, 7-8% overnight. do you have suspend to disk enabled?

[–] owatnext@lemmy.world 1 points 1 year ago

I just checked my settings, seems that when I close the lid, it is set to sleep. Running cat /sys/power/mem_sleep returns s2idle [deep], whatever that means. I just leave it at the default settings. Perhaps I am just lucky?