36
submitted 11 months ago by garam@lemmy.my.id to c/linux@lemmy.ml

Hello. I just want to ask, I already tried search many resources, but I still can't find a way to reduce battery drain while sleep on Ubuntu on Dell laptop.

I seen that it use S0ix, the new standard that many manufacturer use but when sleep it drains a lot battery, in just 6 hours the battery gone 0.

Any help is appreciated. This is company laptop and it requires me use ubuntu (I don't like it but I don't have options to changes OS/distro).

Thanks

all 47 comments
sorted by: hot top controversial new old
[-] rotopenguin@infosec.pub 13 points 11 months ago* (last edited 11 months ago)

Do a "cat /sys/kernel/debug/pmc_core/package_cstate_show". You probably have figures for C2 and C3, and C6-C10 states are all zero. C10 is the golden S0ix state that you need for modern sleep.

I have a 13th gen intel Zenbook, and I spent a month fighting the same. My problem was that the bios setting for Intel VMD/Raid cockblocked sleep. If you have any bios options to disable that, or set storage to a more legacy mode, try it.

The Dell bug report that made my answer click

[-] garam@lemmy.my.id 2 points 11 months ago

I check that C2 the only one has value when on battery.

Others are zero. Hmmm...

[-] segfault@lemmy.world 1 points 11 months ago

Check with powertop that runtime power manage is enabled for devices (tunables are "Good").

It looks like it has a RTL8111H for Ethernet, which is known to be problematic with sleep. My machines don't go below C3 due runtime power management being disabled for Ethernet, but enabling it causes it to fail to come out of suspend correctly.

[-] garam@lemmy.my.id 1 points 11 months ago

All are good, still draining sadly :')

[-] rikonium@discuss.tchncs.de 6 points 11 months ago

I'm sure you tried but the definitive option would be a BIOS switch to change it. Sometimes is says S3, sometimes it says Linux sleep (like my personal ThinkPad)

But if you don't have that toggle at all, the firmware probably dumped S3 entirely - especially if it's a relatively new machine and you'll have to lean much more on Hibernate like my new work ThinkPad.

I would investigate whether an older BIOS version still has the S3 toggle since some BIOS updates have removed S3 I believe but a search of forums would probably turn up enough complaints to hit your radar.

[-] garam@lemmy.my.id 1 points 11 months ago

Thinkpad still has it? T14?

On dell I already check it, they don't have it sadly.

[-] rikonium@discuss.tchncs.de 2 points 11 months ago

You'd have to check, my personal X1 Extreme Gen 4 has the toggle but my new work T14 Gen 3 does not.

[-] d3Xt3r@lemmy.nz 3 points 11 months ago* (last edited 11 months ago)

Why not just set your laptop to automatically hibernate after it's been in a suspended state for x seconds? That way your system will fully power off after it's been suspended for a while, which would save even more battery compared to S3. With the speed of NVMe drives, resuming from hibernation only takes a couple of seconds on most modern systems.

[-] garam@lemmy.my.id 1 points 11 months ago

I'm not familiar with gnome, is there any option on gnome for it? I never seen it.

[-] ReversalHatchery@beehaw.org 1 points 11 months ago

How do you set that up? Please don't say it's a BIOS setting.

[-] d3Xt3r@lemmy.nz 5 points 11 months ago* (last edited 11 months ago)

Nah, it's a systemd setting. You need to edit /etc/systemd/logind.conf and change HandleLidSwitch= to HandleLidSwitch=suspend-then-hibernate, and the create or edit /etc/systemd/sleep.conf to change the timeout value:

[Sleep]
HibernateDelaySec=900

With the above, the system will automatically hibernate after 15 minutes of sleep.

Note that if you're using a full-fledged DE or a third-party power profile manager, you may need to disable any lid-close actions in there (if it doesn't have the suspend-then-hibernate option) so that systemd can handle it properly.

[-] FarLine99@lemm.ee 2 points 11 months ago

I remember that on new generations of Intel chips there is no support for S3 at the chipset level, which means that the operating system physically cannot enter the laptop into this mode. On Windows S0ix is ​​better optimized, that's all. Linux has problems with this.

[-] piexil@lemmy.world 9 points 11 months ago

Even on windows S0ix is garbage

[-] FarLine99@lemm.ee 0 points 11 months ago

It is better than on Linux but definetly not very good.

[-] mariom@lemmy.world 4 points 11 months ago

Have it on work laptop... It wakes laptop for random things, if I put it in backpack I can find empty battery in the morning... Nope, s0ix does not work at all on windows anyway.

[-] FarLine99@lemm.ee 0 points 11 months ago

It works quite well on Microsoft Surface Pro. I think a lot depends on the specific manufacturer/drivers. But overall, yes, S0ix is ​​much worse than S3.

[-] mariom@lemmy.world 1 points 11 months ago

And it could be that corporate bloatware is breaking it. I know, and I wasted some time looking if it's possible to use S3 state (nope, it's not on hardware I got -,-)

[-] FarLine99@lemm.ee 0 points 11 months ago
[-] rotopenguin@infosec.pub 2 points 11 months ago

Yeah. MS has stopped using S3 since Win8, so Bios vendors and OEMs have been letting it atrophy.

[-] yum13241@lemm.ee 0 points 11 months ago

MAYBE because they WANT your battery to be EMPTY in the morning so it HAS to go through MORE charge cycles, leading to your battery DYING earlier, so you have to buy a new battery, which means getting a new laptop. COINCIDENCE?

[-] rotopenguin@infosec.pub 2 points 11 months ago* (last edited 11 months ago)

The Nintendo 3DS, like most Nintendo systems, had the hardware for several generations of older systems in it. It had the full GBA hardware, and it could fully play almost all GBA titles. Nintendo gave away a few GBA titles as a "super secret squirrel fan club" promotion, but never sold any on the 3DS. They threw away a lot of possible game sales, but why?

They'll never say, but the most obvious failing is that the 3DS could not sleep while a GBA game was active. You can close your bivalve console, and instead of it going to sleep the game just keeps on going. That was an unacceptably inconsistent and bad experience for a kid-friendly console.

Nintendo, who controls the firmware, the OS, who validates every game, WHO DESIGNED OR SPEC'D EVERY SINGLE CHIP IN THEIR BOM, simply could not figure out sleep. And they lost a medium-sized fortune in BC game sales over that.

Maybe sleep is just a hard problem?

[-] yum13241@lemm.ee 1 points 11 months ago

They didn't care for GBA games enough.

[-] NightAuthor@lemmy.world 1 points 11 months ago* (last edited 11 months ago)

I like how just the caps words read. Very concise.

  1. Don’t buy a new laptop when you just need a battery
  2. This is real bad user experience, and one of the larger reasons I use a MacBook in spite of its (and apples) many many flaws
[-] yum13241@lemm.ee 1 points 11 months ago

For point one, that's not possible on today's anti-consumer laptops.

For point two, apple keeps reinventing the computer with their nonstandard sh!t like M1.

[-] Shrexios@mastodon.social 0 points 11 months ago

@yum13241 @NightAuthor I have to take exception with the idea that Apple makes shit because it is not standard. They are making Macs, so for their platform, that is the standard. If you mean they should have to document their architecture to the outside world, I might agree, but that’s not the world we live in.

Maybe we should have a standards based platform that can be used for opensource platforms like Linux, but that’s an issue Linux hardware developers have to do.

[-] NightAuthor@lemmy.world 1 points 11 months ago

Idk if this is by design, but I was not notified of this @mention

[-] yum13241@lemm.ee 1 points 11 months ago

Yeah, and now billions of programs have to be recompiled, if not rewritten. At least one person's workflow will break. There's a difference between making a Personal Computer and a locked down console that doesn't run games all that well. Apple is doing the latter, by pushing architectures that lock people into their OSes.

[-] Shrexios@mastodon.social 0 points 11 months ago

@yum13241 but don’t programs that run on Linux Arm also have to be recompiled?

Don’t misunderstand me, I think there may be cause for Apple to be forced to open their ecosystem more, but operating systems are always unique unto themselves.

[-] yum13241@lemm.ee 1 points 11 months ago

No one is forced to use ARM to have a good Linux system. You are forced to use ARM to have a good Mac.

[-] Shrexios@mastodon.social 0 points 11 months ago

@yum13241 no one forces you to buy a Mac. You get that most people who buy a Mac are likely to be okay with being in the ecosystem just like most people who use Linux know it is not going to run all the Windows apps. I agree that there should be a more open approach to these things, but in an economic system that prizes competition and profit above all things, closed systems tend to become the norm to distinguish them form their competitors.

[-] yum13241@lemm.ee 1 points 11 months ago

Workplaces might force you to use them.

[-] Shrexios@mastodon.social 0 points 11 months ago

@yum13241 in which case everything you would need to do that work is available. He’ll, many of the open source apps people will point to as essential will also run an a Mac.

[-] yum13241@lemm.ee 1 points 11 months ago

After you spend hours compiling it lol. Also, let's not forget that macOS is generally unfriendly to workflows that require more than one window active. Either you waste tons of space on the dock, menu bar, and title bar, or you maximize it and in the case of browsers, can't change tabs.

[-] Shrexios@mastodon.social 0 points 10 months ago

@yum13241 I don’t know what you’re talking about. I’ve used many open source programs on macOS, already compiled and already packaged to work on Mac’s. What version of macOS are you referring to, 7?

[-] yum13241@lemm.ee 1 points 10 months ago

I mean cross compiling the Intel version over to the M1 architecture.

[-] Shrexios@mastodon.social 0 points 10 months ago

@yum13241 but you don’t actually have to do that as x86 versions will run on a Mac.

[-] yum13241@lemm.ee 1 points 10 months ago
[-] Shrexios@mastodon.social 0 points 10 months ago

@yum13241 you have to recompile for Linux arm too, right? It seems you just want excuses to hate macOS.

[-] yum13241@lemm.ee 1 points 10 months ago

At least Linux ARM doesn't change every year, and is a reliable STANDARD.

[-] Shrexios@mastodon.social 0 points 10 months ago

@yum13241 again, just looking for excuses to hate.

[-] yum13241@lemm.ee 1 points 10 months ago

I'm not looking for a stupid reason to hate. I can't port my software to macOS even if I wanted to, because cross-compiling isn't an option for nonstandard architectures.

[-] rdschouw@lemmy.world 1 points 11 months ago
[-] garam@lemmy.my.id 2 points 11 months ago

It doesn't have any ability to change to S3. I already tried all on that page, include suspend freeze

[-] Jumuta@sh.itjust.works 1 points 11 months ago

what does

cat /sys/mem_sleep

give you?

[-] garam@lemmy.my.id 1 points 10 months ago

it's mem and other, I forgot, but it's normal I think.

this post was submitted on 11 Oct 2023
36 points (97.4% liked)

Linux

47334 readers
1216 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