Why does Linux have such a terrible sleep?

6 days ago by onlinepersona to c/linux

In 8 hours it uses 20% of the battery. When Windows or Mac are put to sleep, the damn things can sleep for a week! This is the case with Linux on multiple laptops.

Is there some kind of manipulation going by ring -1 that detects Linux is running? Is Linux not respecting some procedure and kissing a step?

BigTrout75 120 points 6 days ago

If only going to sleep was simple. There's a bunch of different sleep states. S3 is ram and S4 is hibernate.

Check your supported sleep states. At the command line type cat /sys/power/state

https://www.kernel.org/...

path: 0 26186782, hotness: undefined, score: 120, children: 15
Jesus_666 74 points 6 days ago

It also doesn't help that ACPI is a badly-designed mess of a standard. I remember that in the 2010s one of Apple's selling points was that their laptops had sleep and hibernation that worked every time. Heck, MacOS X could even decide intelligently when to do which. This mostly worked because they fully controlled the hardware, firmware, and software. Other laptop manufacturers could just take their best stab at implementing ACPI power states and hope their implementation matched Microsoft's.

Microsoft tried to solve the mess by introducing the S0ix ACPI state (aka "Modern Standby"), which was defined in a way that could actually be implemented without too much guesswork. Unfortunately, this was during the Windows 8 era when Microsoft decided that laptops should be more like smartphones so S0ix is much closer to turning your screen off on a phone than to actual standby.

The system randomly waking up and deciding to do work is an explicitly intended feature because what if you get a Teams message while your laptop is in your bag? Sure, you might say that you'd either have Teams on your phone or wouldn't immediately care but that kind of thinking won't get you anywhere within Microsoft. Also, Windows actually has very little restraint about what it does when it wakes up so it might decide to install a heavy update or an application might decide it's important enough to do work right now. While the laptop is in your bag. Cue you wondering if the laptop turned off because the battery's empty or because it overheated.

And to make things worse Microsoft specified that in order to be allowed to use Modern Standby, the device must not offer S3 (sleep/suspend-to-ram). Some manufacturers still allow you to enable S3 but it's a legacy feature that's even less well supported than before.

path: 0 26186782 26187796, hotness: undefined, score: 74, children: 6
Ghoelian 21 points 6 days ago

The system randomly waking up and deciding to do work

My work macbook did this by default as well, among other dumb things like leaving bluetooth enabled on sleep so my headphones would constantly connect to the laptop when on the train trying to listen to music.

Thankfully the waking up thing is just a setting, but by default, imho, mac os's sleep is also garbage.

path: 0 26186782 26187796 26189797, hotness: undefined, score: 21, children: 5
prole 6 points 6 days ago

I've got Sony Bluetooth earbuds a few years back and I guess they have something called "multipoint" where they can connect to multiple devices at once. I had to Google why anyone would want that, but I guess it's to make switching between devices faster.

Sometimes I'll be walking down the sidewalk with my earbuds in, connected to the phone in my pocket, and they'll just randomly make the sound it makes when connecting or disconnecting. Like I'm connecting to the BT of a random house or business I walked past that I never explicitly paired with.

I can't exactly put my finger on why, but I find it very unsettling every single time and wish I could turn that feature off.

path: 0 26186782 26187796 26189797 26191247, hotness: undefined, score: 6, children: 4
deffard 5 points 5 days ago

I could not work out why my Sony headphones were giving me a ding sound and then my listening was interrupted with ambient noises. I assumed Bluetooth connection requests at first, but for me it was the "speak to chat" feature that can be disabled.

path: 0 26186782 26187796 26189797 26191247 26205423, hotness: undefined, score: 5, children: 3
psycotica0 6 points 6 days ago

This is the one I was going to link.

I have my laptop in s2idle mem_sleep most of the time because this boots quick and allows me to wake the computer by pressing a key on my USB keyboard plugged into a hub plugged into my dock into my laptop.

And it gets from my office and back just fine on that. But if I'm traveling or something I'll switch it to deep mode before I leave so it actually actually goes to sleep in my bag.

It takes extra time and jank to boot, and I have to wake it up by opening the lid, but if I'm traveling that's normal since I don't travel with my dock or USB keyboard anyway.

This is one of those cases where it would be nice if the tech always did what I wanted, but I do actually want different things at different times, and so I do actually benefit from the control of being able to choose.

My hardware doesn't support "shallow" sleep, for whatever reason.

path: 0 26186782 26189532, hotness: undefined, score: 6, children: 2
dustyData 10 points 6 days ago

The reason is, as usual, that Microsoft lobbied hard to make their way the standard way of doing sleep modes. Then, when implementing it, they strong armed all the OEM to make hardware fit their nonstandard, slightly off center, way.

So, now windows kind of work with all hardware, but open source is fucked because to make the hardware actually work requires reverse engineering whatever custom crap windows does.

path: 0 26186782 26189532 26190115, hotness: undefined, score: 10, children: 1
The_Decryptor 7 points 6 days ago

The sleep stuff is part of the ACPI standard, it's all documented.

It's up to the motherboard/SoC to support it properly, and Microsoft has an "entire system view" of how Windows works and can integrate it deeply. Compare that to Linux, the companies involved mostly care about servers, and the distros are assembled by disparate groups that don't have the hardware testing capability that MS or OEMs have.

path: 0 26186782 26189532 26190115 26190781, hotness: undefined, score: 7, children: 0
halfapage 3 points 6 days ago
path: 0 26186782 26187607, hotness: undefined, score: 3, children: 0
asdfasdfasdf 2 points 6 days ago

Is that true for Mac and Windows too? Why do I need to differentiate the two on Linux but not the others? Why isn't the default the better one?

path: 0 26186782 26190345, hotness: undefined, score: 2, children: 3
MouldyCat 9 points 6 days ago

suspend to RAM (aka sleep) means the computer stays powered on in a very low-power state. Everything in memory is kept as-is, and it consequently draws a little power to keep the RAM active. This makes it very quick to enter this state and to wake up from it.

suspend to disk (aka hibernate) dumps the RAM to disk, and then powers down fully. It takes a little while to dump all RAM to disk and also to restore it.

So "the better one" depends on what works best for your particular circumstances. If you don't know and want a big corporate entity to make those decisions for you, stick with Microsoft and Apple products. If you would rather take the time to find out what's best for you, then go FOSS.

path: 0 26186782 26190345 26191501, hotness: undefined, score: 9, children: 1
Viceversa 4 points 6 days ago

"big corporate entity's decision" sounds very valid for laptop hibernation.

It would be nice for Linux to have the same as the default

path: 0 26186782 26190345 26191501 26191916, hotness: undefined, score: 4, children: 0
WolfLink 2 points 6 days ago

It’s something to hassle with on Windows too. Less so on macOS because it’s easier for them to optimize everything when they control the whole software and hardware stack.

path: 0 26186782 26190345 26190826, hotness: undefined, score: 2, children: 0
LeTak 104 points 6 days ago

Your system goes to sleep and wakes up? My system goes to sleep and then crashes. We are not the same

path: 0 26186536, hotness: undefined, score: 104, children: 6
LeFrog 21 points 6 days ago

Your system and me have a lot in common (⌐■_■)

path: 0 26186536 26187749, hotness: undefined, score: 21, children: 0
Technotica 6 points 6 days ago

Mine too! Well one of mine, and I still don't know why just this one. But hey, it's not like Linux cares if it is crashing, it always comes back.

path: 0 26186536 26186986, hotness: undefined, score: 6, children: 1
LeTak 4 points 6 days ago

And so it got called, the Terminaltor.

path: 0 26186536 26186986 26194561, hotness: undefined, score: 4, children: 0
DrPop 2 points 6 days ago

My system goes to sleep and won't wake up. Can't figure out why. I just turned off the ability to sleep and turn my computer off when not in use.

path: 0 26186536 26200753, hotness: undefined, score: 2, children: 2
LeTak 1 point 5 days ago

This is the magic of modernACPI Power States. Normally you would write everything to swap or keep the RAM powered. Nowadays we need always on (W)LAN and event management for updates , notifications and whatever. And if I don’t want that? Where is my Setting for Hibernstion Lenovo!!!

path: 0 26186536 26200753 26204937, hotness: undefined, score: 1, children: 1
the_riviera_kid 2 points 5 days ago

Assuming you have windows, run this in admin powershell It should give you power options you didn't even know existed.

Apparently the formatting gets all screwed up with the default UI and I am too stupid to figure out how to fix it.

Its appears properly if you use old.lemmy.world though.

Copy and paste everything below this line .-------------------------.

$sting77 = "HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings" $querylist = reg query $sting77 foreach ($regfolder in $querylist){ $querylist2 = reg query $regfolder

foreach($2ndfolder in $querylist2){

$active2 = $2ndfolder -replace "HKEY_LOCAL_MACHINE" , "HKLM:"
Get-ItemProperty -Path $active2
Set-ItemProperty -Path "$active2" -Name "Attributes" -Value '2'
}

$active = $regfolder -replace "HKEY_LOCAL_MACHINE" , "HKLM:"
Get-ItemProperty -Path $active
Set-ItemProperty -Path "$active" -Name "Attributes" -Value '2'

}

path: 0 26186536 26200753 26204937 26213496, hotness: undefined, score: 2, children: 0
ViatorOmnium 54 points 6 days ago

It's mostly a mix of newer laptops not supporting suspend to RAM (only suspend to idle), and faulty hardware requiring proprietary hacks to actually go idle.

path: 0 26186585, hotness: undefined, score: 54, children: 0
Maestro 50 points 6 days ago

Windows doesn't sleep. Ever. Sleep is now just a nickname for Modern Standby, which is just running in low power mode doing a whole bunch of shit. The amount of times I come back to my laptop and it has gotten stuck at a reboot is just embarrassing. I dual-boot and have Grub, so whenever Windows tries to reboot itself it gets stuck.

People have gotten their laptops damaged because they thought they were sleeping and put them in a bag, when Windows decides to try to update itself while the fans are blocked inside the bad. Bam, heat damage.

path: 0 26187225, hotness: undefined, score: 50, children: 6
hendrik 13 points 6 days ago

Shouldn't modern laptops have temperature sensors and just deal with it in some way? I had this happen to me a few times with my old Thinkpad from 12 years ago. Threw it into the backpack in a rush and an hour later I'd pull it out, hot and doing something I didn't want it to do... But it never suffered any kind of damage from that. Was just very annoying.

path: 0 26187225 26187804, hotness: undefined, score: 13, children: 5
Maestro 19 points 6 days ago

You can't interrupt Windows Update either. So, rock meets hard place?

path: 0 26187225 26187804 26188264, hotness: undefined, score: 19, children: 3
hendrik 10 points 6 days ago

Sure 😆 In the meantime I found a solution for all the Windows Update debacle. Bought a newer laptop, went home and just wiped the entire SSD before installing Linux. Now I don't get any dual-boot or Windows update. Also goes to standby 100% of the time. ¯_(ツ)_/¯

path: 0 26187225 26187804 26188264 26188468, hotness: undefined, score: 10, children: 0
dbdr 4 points 6 days ago

I would expect overheating protection to occur at the hardware level: first downclock the CPU and forcibly just halt if heat gets critical for too long.

path: 0 26187225 26187804 26188264 26188971, hotness: undefined, score: 4, children: 1
Ghoelian 7 points 6 days ago

Sure but the update can already have done some stuff, leaving your machine in a half-updated and maybe corrupted state. If downclocking doesn't work there really isn't a good solution here.

Edit: oh wait there is, DON'T UPDATE WHEN SLEEPING. And on top of that, just don't update without my explicit approval at all. Thankfully I run linux where, if it's not the default already, it's a config value away.

path: 0 26187225 26187804 26188264 26188971 26189813, hotness: undefined, score: 7, children: 0
selokichtli 0 points 6 days ago

Also, the failure gets registered forever, for example, in RAID disks you'll never get a 100% healthy disk with such situation.

path: 0 26187225 26187804 26190510, hotness: undefined, score: 0, children: 0
devaly 31 points 6 days ago

Always wondered this. My steam deck dies in a day if put to sleep or hibernate.

path: 0 26186413, hotness: undefined, score: 31, children: 7
PotatoesFall 19 points 6 days ago

if the battery dies during hibernate, it's not hibernating

incidentally I have been using linux for years and have never had a working hibernation setup. I'm convinced it's a hoax at this point

path: 0 26186413 26187045, hotness: undefined, score: 19, children: 4
rumschlumpel 3 points 6 days ago

I've been using it pretty consistently for years, I achieve uptimes upwards of 60 days like this. The downside is that it takes kinda long to enter that state and there's a chance that it fails to enter it (though it doesn't crash, just goes to the screenlock), especially on my laptop - it refuses to go into hibernation unless I kill most webbrowser windows, especially stuff like YouTube.

And you do need a pretty large swap space; with those super long uptimes, even swap size = ram size isn't always enough, because sometimes the swap space is actually used as swap and not just as hibernation image storage.

path: 0 26186413 26187045 26187384, hotness: undefined, score: 3, children: 2
FishFace 5 points 6 days ago

Using swap for hibernate was always insane to me...

path: 0 26186413 26187045 26187384 26188198, hotness: undefined, score: 5, children: 0
tomenzgg 1 point 6 days ago

Twice your RAM is the old adage.

path: 0 26186413 26187045 26187384 26192861, hotness: undefined, score: 1, children: 0
tomenzgg 2 points 6 days ago

Works great with HP Elitebooks G3–G4; honestly, worked great on any HP I've used. Might've worked on the Dells I'd used but they had other problems and didn't last very long so I don't remember.

But I've largely used older laptops so I'm not sure if the hardware, specifically, may have anything to do with it.

path: 0 26186413 26187045 26192810, hotness: undefined, score: 2, children: 0
rumschlumpel 17 points 6 days ago

Really, hibernate as well? On my linux desktop and laptops, hibernate completely cuts the power. It's definitely possible that this works differently for a handheld device, though, and I don't think I even tried using hibernate on an ARM device.

path: 0 26186413 26186515, hotness: undefined, score: 17, children: 0
fdnomad 5 points 6 days ago

I kept losing tons of battery on my steam deck even when turned fully off. I had to disable quick boot (in the bios) and its been better but of course takes longer to boot

path: 0 26186413 26187383, hotness: undefined, score: 5, children: 0
LeTak 26 points 6 days ago

I just want the option to put my Linux laptop into S3 ACPI power State. Daim you modern W11 hardware and S0!!!

path: 0 26186568, hotness: undefined, score: 26, children: 1
onlinepersona 1 point 6 days ago

Power state? Is that what's going on?

path: 0 26186568 26186763, hotness: undefined, score: 1, children: 0
MangoPenguin 25 points 6 days ago

No idea if this applies to a lot of laptops, but on my HP with an i5-8350U every Linux distro I've tried seems to come configured using s2idle instead of deep sleep, and battery will drain very quickly even in 'sleep' mode.

If running cat /sys/power/mem_sleep returns "[s2idle] deep" then you can add mem_sleep_default=deep to your kernel args and it will actually go to sleep properly.

On Fedora this was sudo grubby --update-kernel=ALL --args="mem_sleep_default=deep" but it varies by distro.

Why it seems like every distro I've used has this set incorrectly I do not know, it's baffling.

path: 0 26191563, hotness: undefined, score: 25, children: 3
onlinepersona 6 points 6 days ago

Interesting. "s2Idle" sounds like it's idling and wasting cycles when it's supposed to be sleeping. I'll try those commands.

Also perplexing to me that idle is chosen as a default.

path: 0 26191563 26193973, hotness: undefined, score: 6, children: 2
Dultas 4 points 5 days ago

Some modern laptops only have s2idle which is garbage. I had to re-enabling hibernate on mine and just use that instead of sleep now.

path: 0 26191563 26193973 26205405, hotness: undefined, score: 4, children: 0
MangoPenguin 1 point 6 days ago

I did some searching and it sounds like it just wakes up slightly faster, but even in deep sleep it's still very fast.

path: 0 26191563 26193973 26201823, hotness: undefined, score: 1, children: 0
teawrecks 25 points 6 days ago

Worth noting that this is also an ongoing issue with windows. Only apple has actually solved this, and they do so by owning the whole stack. Each apple product has a specific OS, CPU, and motherboard that were all specifically designed with the end-product user-experience in mind.

But for PCs, the OS, CPU, and motherboard are all designed and built by different companies, each only designed to be generically compatible with the other components. None of them are designed for a specific end-product, so features that require all of the components to play perfectly together for a specific end-user experience (like sleep state) often end up not quite aligning.

None of this helps you, but I think it's worth understanding why the problem exists and why it may just always exist. The best bet is that companies like System76 or Valve solve sleep states for specific linux-based products, and then the rest of us maybe hopefully see some benefit from that.

But IMO this is just a trade-off. It's like a pick 2 situation between Customization, Stability, and Privacy (where a reliabile sleep state is Stability). You can have stability and customization, but you'll probably pay a lot, and the company who sold it will want telemetry data to improve the experience for others. You can have stability and privacy, but the product will be very locked down to a specific use case to ensure a stable experience.

path: 0 26196275, hotness: undefined, score: 25, children: 4
green_link 6 points 5 days ago

It's not that apple solved it, it's that Microsoft purposely fucked it up.

It's called "modern standby" and if you put your laptop to sleep while it is plugged into power, some windows services and wifi aren't actually put to sleep, and instead will ping windows update servers to download and install some updates while the machine is "asleep".

Even if and when you put the laptop to sleep while plugged into power and then remove power to say out the laptop in your bag. Those services that aren't put to sleep never check to see if you are still on wall power or battery and keep doing what they do draining the battery

Linus tech tips on YouTube did a whole deep dive into it. Some laptops you can disable modern standby through the command prompt but newer hardware doesn't allow for it. The only real workaround is unplug your laptop for a few seconds before putting it to sleep.

path: 0 26196275 26211560, hotness: undefined, score: 6, children: 2
teawrecks 2 points 5 days ago

As I understand it, apple products support the same update from sleep feature, except it works for all the reasons stated above.

path: 0 26196275 26211560 26212952, hotness: undefined, score: 2, children: 1
green_link 2 points 4 days ago

I'm pretty sure all Microsoft needed to do was put in a check to see if it was running on battery or not. And I remember seeing that they finally fixed it months ago.

Modern windows is bogged down by decades old compatibility architecture. Shit programed in the 80s will still run on modern windows for the most part. All because corporations and businesses still run those programs or severs today and refuse to update or replace them. Look at the fucking US aviation industry. Billions of dollars in revenue and still run windows 95 level shit programs.

Microsoft needs to pull an apple and rebuild windows from the ground up without any compatibility layers. Enough is enough.

path: 0 26196275 26211560 26212952 26223485, hotness: undefined, score: 2, children: 0
zqps 2 points 5 days ago

Components like CPUs and mainboards are absolutely purpose-built for laptops. And precisely this has caused a host of issues from locked-down BIOS/UEFI to broken sleep to incompatibility with real-time audio processing via ASIO, and that's just the ones I have personally experienced.

The real issue here is an outdated x86 architecture that was never designed for efficiency, which is severely struggling to compete with Apple's ARM-based M architecture, but which they can't get rid of for compatibility reasons.

path: 0 26196275 26210447, hotness: undefined, score: 2, children: 0
Baggie 24 points 6 days ago

I once did a deep dive on sleep mode for some problem a friend was having. I'm now convinced it might be the worst thing I've ever seen in modern computing. It's globally horrendous, poorly implemented, and causes random problems in unfathomable places. It's amazing it ever works at all.

path: 0 26187487, hotness: undefined, score: 24, children: 8
prole 4 points 6 days ago

It makes what Valve was able to do with the Steam Deck even more impressive imo. You can suspend mid game, like a Nintendo Switch, and it just works.

path: 0 26187487 26191376, hotness: undefined, score: 4, children: 7
klankin 1 point 6 days ago

That's just cause its an AMD APU, and nvidia hates linux.

Which is nice and impressive, but its cause nvidia's shit, not anything valve specific

path: 0 26187487 26191376 26192841, hotness: undefined, score: 1, children: 1
prole 2 points 5 days ago path: 0 26187487 26191376 26192841 26209093, hotness: undefined, score: 2, children: 0
zqps 1 point 5 days ago

I love that. Though I'm less impressed by my Steam Deck draining the battery on idle sleep (no game running) within like two days, and even in shutdown within about a week.

path: 0 26187487 26191376 26210990, hotness: undefined, score: 1, children: 4
prole 1 point 5 days ago

two days

I think that's just how sleep works. Turn the thing off or put it in hibernation if i you're mid game and think it'll be days

path: 0 26187487 26191376 26210990 26222146, hotness: undefined, score: 1, children: 3
zqps 1 point 4 days ago

That's not how sleep works for other devices. With a game running it's about a day, which I don't have an issue with. But in idle standby or especially shutdown it shouldn't consume that much power.

path: 0 26187487 26191376 26210990 26222146 26224904, hotness: undefined, score: 1, children: 2
Lehmuusa 22 points 6 days ago

On my Linux computer I just close the laptop's lid and it goes to sleep, consuming almost no battery power. I can open it hours later and have basically the same amount of battery left as before.

But some laptop manufacturers have proprietary systems in place for the sleep mode that are not supported in Linux because it would be a gargantuan effort when the laptop manufacturer refuses to coöperate.

path: 0 26197950, hotness: undefined, score: 22, children: 2
GalacticGrapefruit 13 points 6 days ago

This is the answer.

Proprietary firmware. Fuck Intel.

path: 0 26197950 26198635, hotness: undefined, score: 13, children: 1
stormeuh 3 points 5 days ago

Laptops with AMD chips are not necessarily better in this regard.

From my anecdotal experience with an HP laptop (from work), with an AMD 7840HS, the blame is often also with the system integrator. That one has a bug in the power management system, where if you plug the charger in during sleep, the power state gets locked to some very low power sleep mode, until you either reboot, or plug the charger in while it's not asleep.

HP doesn't want to look at this because they don't support Linux, meanwhile AMD kernel devs claim that this is probably a BMC bug so they can't fix it. Whatever the real culprit is in my case, the BMC can do so much these days that it wouldn't surprise me if a lot of sleep issues are due to bad firmware.

Either way, system integrators like HP refusing to support Linux is in part what allows Intel and AMD to ignore a lot of Linux-specific bugs. SIs have a lot of manpower to help diagnose and fix them, and they have leverage when reporting bugs to CPU manufacturers.

path: 0 26197950 26198635 26206181, hotness: undefined, score: 3, children: 0
moth 21 points 6 days ago

moth doesn't know what CPU you use, but newer AMD chips don't support S3. AMD removed that because they think modern suspend is better, an opinion that doesn't seem to be shared by the consumers.

path: 0 26194440, hotness: undefined, score: 21, children: 6
BillyNaCl 0 points 6 days ago
path: 0 26194440 26195161, hotness: undefined, score: 0, children: 0
BillyNaCl 0 points 6 days ago
path: 0 26194440 26195160, hotness: undefined, score: 0, children: 3
moth 14 points 6 days ago

moths thinks you might be experiencing an emotional breakdown. since you are in the US, you can dial 9-8-8 to reach the Suicide and Crisis Hotline. moth hopes you get well in the future.

path: 0 26194440 26195160 26195270, hotness: undefined, score: 14, children: 2
far_university1990 11 points 6 days ago

I like moth. Moth is nice. Thank for being moth.

path: 0 26194440 26195160 26195270 26197971, hotness: undefined, score: 11, children: 1
SCmSTR 6 points 5 days ago

.. what... What happened here?

path: 0 26194440 26195160 26195270 26197971 26205859, hotness: undefined, score: 6, children: 0
BillyNaCl -1 points 6 days ago
path: 0 26194440 26195148, hotness: undefined, score: -1, children: 0
JasonDJ 18 points 6 days ago

I've only used windows at work in the past 10 years or so but my windows experience with sleep was far far worse.

My laptop would always wake up in my bag on my hour+ commute. The laptop would be scorching hot and the battery dead by the time I got to the office. Every time.

Never experienced that in Linux.

Recently I switched to a Linux computer at work and it's much better in every regard.

My personal desktop (runs arch (btw)), did have some trouble with sleep recently tho...I replaced my 5700G with a 5600X3D and it would refuse to wake from sleep, necessitating a hard shutdown (by PSU switch!)...but I think that was a bios bug. My bios was already very close to latest but I think upgrading that was what ultimately fixed it. Now it works fine.

path: 0 26190145, hotness: undefined, score: 18, children: 6
Zacpod 9 points 6 days ago

Every piece of shit windows laptop since they flipped from S3 sleep to "modem standby." garbage. Thing wakes up in the bag at the slightest whiff of wifi. "Oh! Network! Want me to connect so I can install updates, delete all your pinned tabs, break a few apps, and infect notepad with AI slop vulnerabilities? No answer? That must mean you want that - doing it now, boss!"

Dell, Lenovo, and Surface laptops all do the same shit. I fucking hate windows.

Dell support even told me, with a straight face, that if I didn't fully shut down my laptop before putting in my bag that I'd void the warranty.

path: 0 26190145 26193855, hotness: undefined, score: 9, children: 2
onlinepersona 6 points 6 days ago

Dell support even told me, with a straight face, that if I didn't fully shut down my laptop before putting in my bag that I'd void the warranty.

That's insane, what the fuck? BTW, the owner of Dell is a right-wing dude who supports DHH. I'm not surprised they they have such shitty customer service.

path: 0 26190145 26193855 26194062, hotness: undefined, score: 6, children: 1
Zacpod 1 point 6 days ago

Yup. That was the last XPS I owned. Not that Lenovo is much better, morally, but their Linux support is WAY better. Should have got a framework. Next cycle.

path: 0 26190145 26193855 26194062 26198233, hotness: undefined, score: 1, children: 0
whatstatersprecious 1 point 6 days ago

I’ve always had this Windows issue you described with ThinkPads. Never had a problem with Dells though. Drives me absolutely crazy

path: 0 26190145 26192203, hotness: undefined, score: 1, children: 2
onlinepersona 2 points 6 days ago

Aren't Dell and Lenovo one company now?

Was the only solution to the sleeping problem on Windows to switch laptops?

path: 0 26190145 26192203 26194093, hotness: undefined, score: 2, children: 1
whatstatersprecious 1 point 6 days ago

I don’t think so. Haven’t seen anything about that.

path: 0 26190145 26192203 26194093 26198541, hotness: undefined, score: 1, children: 0
HelloRoot 15 points 6 days ago

I rarely put my linux to sleep because I had this experience in the past, but yesterday I've had my minisforum v3 laptop in sleep for 3 hours and it stayed fully charged at 100% battery. It made me think the battery percentage readout was broken, but no, it strarted draining after using it for a while.

No clue if it's something I did back then during install (arch linux btw) or whether it was like this out of the box, but it really surprised me. And I'm gonna try using it more in the future.

path: 0 26186546, hotness: undefined, score: 15, children: 4
RogueBanana 9 points 6 days ago

Please preach us the forbidden knowledge you hold

path: 0 26186546 26187461, hotness: undefined, score: 9, children: 0
Hamartiogonic 3 points 6 days ago

In my experience, it’s probably a hardware/driver thing. Lenovo laptops are generally really good, but the sleep still drains the battery at the usual rate that forces you to keep an eye on it every day. However, Framework seems to have a pretty amazing battery life during sleep. My guess is, Framework has done something right, and the kernel is able to handle power states way better than any laptop I’ve ever owned.

It’s clearly not about the custom tweaks either. I’m running just plain Debian KDE, and I haven’t tinkered with the power settings at all.

path: 0 26186546 26188263, hotness: undefined, score: 3, children: 2
Sylence 2 points 6 days ago

That's interesting because my Framework 15 dies very quickly while in sleep mode running Fedora KDE spin.

path: 0 26186546 26188263 26200795, hotness: undefined, score: 2, children: 1
Hamartiogonic 2 points 6 days ago

That's really odd, because I thought Fedora would have better drivers.

Apparently, the settings would be the next place to look for answers. My settings are really boring and conservative.
When laptop lid is closed: sleep
Nothing special there, so I really don't know what makes this hardware+software+settings combination unique. I have another computer I use for tinkering, and this one is specifically meant to be the boring one, hence Debian. Turns out, that somehow resulted in amazing stand by time, and I don't even know how.

path: 0 26186546 26188263 26200795 26203950, hotness: undefined, score: 2, children: 0
parsimon 14 points 6 days ago

I recommend using hibernate (suspend to disk): your computer will "sleep" for 10 years without draining. The only cost is about 7 seconds to boot on modern hardware. For short interruptions with instant wakeup, you can still use light sleep states.

It combines perfectly with LUKS-encrypted root and swap partitions: your data is safe even if someone steals your computer and swakes it up.

path: 0 26188204, hotness: undefined, score: 14, children: 9
Quailman 5 points 6 days ago

Hibernate doesn't work with secure boot/kernel lockdown for $REASONS, a lot of folks can't even use it. Supposedly if Linux can determine you're resuming from an encrypted partition it will work, but I was never able to get it to work with a swap file on BTRFS on LUKS

path: 0 26188204 26190107, hotness: undefined, score: 5, children: 2
parsimon 2 points 6 days ago

True, kernel developers should resolve the Secure Boot issue with hibernation, but the development focus is on servers, not laptop computers. Also, hibernation should probably use a dedicated hibernate image file instead of requiring a huge swap partition. That being said, it works regardless of hardware capabilities if you turn off secure boot and just configure a LUKS-encrypted SWAP partition. You should figure this out before you install the OS.

path: 0 26188204 26190107 26191217, hotness: undefined, score: 2, children: 0
deffard 1 point 5 days ago

There's only so much that can be done on the hardware/ firmware side, but his for me is the real gap that Linux can improve upon. Hibernate, disk encryption and secure boot/tpm unlock together have just worked for a long time on Mac and Windows.

The kernel decisions seem hostile and hard code a big assumption that it's always unsecure to restore from hibernate automatically. What's more insecure is having to disable disk encryption entirely. Secure boot is often misunderstood, but for all its flaws it is better than nothing, and your average user does not want to manually enter a decryption key on top of their user login all the time.

Because of this I feel a lot of software is not written and tested with hibernate in mind, so you also roll the dice on what works and what doesn't when restoring today.

Sleep for 1 hour and then auto hibernate after, in a working setup, meant this problem was solved - always enough battery to resume doing work, no user decision required, quick wake up if resuming a recent session.

I'd love to see multi-user switch selectively suspending user processes and writing them to disk, so you can quickly restore state between users, and if one user left a browser or game running it's not draining the battery on what are now known background tasks. No OS does this one well today.

path: 0 26188204 26190107 26205720, hotness: undefined, score: 1, children: 0
Ephera 3 points 6 days ago

Unfortunately, hibernate does not work on all devices. I believe, it depends on the motherboard and BIOS...

path: 0 26188204 26188314, hotness: undefined, score: 3, children: 0
rockerface 3 points 6 days ago

I've found full shutdown and subsequent boot up on my current Bazzite setup takes less time then hibernate used to in Windows 10 on the same PC. Haven't even felt the need to look into setting up swap (Bazzite uses zram by default).

path: 0 26188204 26189104, hotness: undefined, score: 3, children: 2
MouldyCat 7 points 6 days ago

full shutdown and subsequent boot up on my current Bazzite setup takes less time than hibernate

maybe, but a full shutdown and reboot does not restore all your apps, open documents, terminals etc exactly as they were.

path: 0 26188204 26189104 26191576, hotness: undefined, score: 7, children: 0
prole 2 points 6 days ago

And Bazzite is considered "slow" in terms of Linux distro boot times

path: 0 26188204 26189104 26191340, hotness: undefined, score: 2, children: 0
onlinepersona 1 point 6 days ago

Hibernate with an encrypted swap and systemd boot takes forever for me. How do you manage in 7 seconds? How much RAM do you have?

path: 0 26188204 26194172, hotness: undefined, score: 1, children: 1
parsimon 1 point 6 days ago

32 GiB. I decided against a 96 GiB model with hibernation in mind.

path: 0 26188204 26194172 26194304, hotness: undefined, score: 1, children: 0
Kind_to_Everyone 14 points 5 days ago

Sleep on Windows 11 is horrendous. It appears to be little more than locking the session and turning off the screen.

path: 0 26206456, hotness: undefined, score: 14, children: 0
borokov 12 points 6 days ago

When I put windows to sleep it just wake up in middle of the night to install whatever update, restart and slowly empty it battery until it die.

path: 0 26194142, hotness: undefined, score: 12, children: 1
lemming741 2 points 5 days ago

I've found on my corpo dell-
Disable wifi
Sleep from start menu
Wait until fan stops spinning
Close lid

I find my laptop suffocating itself in my bag every single time i don't. This way, it only does that 1 in 10 times.

path: 0 26194142 26213212, hotness: undefined, score: 2, children: 0
hexagonwin 8 points 6 days ago

i use a kaby lake (7th gen intel i5) laptop, and sleep works well on all linux, freebsd, windows. i'm using s3 sleep, are you on a newer machine that only supports s0ix?

path: 0 26200743, hotness: undefined, score: 8, children: 2
LeTak 3 points 5 days ago

I have the 13th Intel mobile gen and it sucks when it comes to power states

path: 0 26200743 26204944, hotness: undefined, score: 3, children: 1
hexagonwin 4 points 5 days ago

yeah, i think they started getting rid of s3 in favor of s0ix since 11th? 12th? gen. heard it's shitty. :(

path: 0 26200743 26204944 26205351, hotness: undefined, score: 4, children: 0
son_of_darkness 7 points 5 days ago

I mean, it is more than thirty years and has lots of responsibility.. That or lack of melatonin

path: 0 26216036, hotness: undefined, score: 7, children: 0
daychilde 6 points 6 days ago

No rest for the wicked?

path: 0 26194101, hotness: undefined, score: 6, children: 0
majster 6 points 6 days ago

Windows has same problems. Its hot bag syndrome. Issue lies at hardware and firmware level. FYI my T480 configured for deep sleep looses only 1% per day sleeping.

I didn't configure hybernation though.

path: 0 26187763, hotness: undefined, score: 6, children: 2
exdor 1 point 6 days ago

And that T480 could be corebooted ;)

path: 0 26187763 26188962, hotness: undefined, score: 1, children: 0
onlinepersona 1 point 6 days ago

It must also be OS in some cases (like mine), but now I have so debugging to do.

path: 0 26187763 26194236, hotness: undefined, score: 1, children: 0
Janx 5 points 6 days ago

Too much screentime before bed?

path: 0 26192282, hotness: undefined, score: 5, children: 0
the_riviera_kid 5 points 5 days ago

From what I heard, the sleep mode on the steam deck is just the default linux sleep mode. It works almost flawlessly.

I don't think it's quite true though because I can leave it in sleep mode for days and it just fires back up where it left off with almost no noticeable battery drain. If I put my desktop pc to sleep (bazzite) it acts like a stroke victim. IF it manages to wake up. Usually it just has to be restarted so I don't waste my time and just shut it down now.

path: 0 26213300, hotness: undefined, score: 5, children: 0
artyom 5 points 6 days ago

Windows definitely has lot of sleep issues. But yes Linux seems to be as bad or maybe a bit worse. I once shut down my Linux laptop and left it connected to power on my vehicle. When I returned, my vehicle was completely dead 😮‍💨

path: 0 26199540, hotness: undefined, score: 5, children: 0
ITGuyLevi 5 points 6 days ago

Debian has worked fine on my old laptop, probably only a few days for me but the battery is a decade old or so.

path: 0 26192001, hotness: undefined, score: 5, children: 0
FishFace 4 points 6 days ago

My previous laptop was fine - it lost a few percent per day. Now with s0ix, it's more like 10 or 20% per day. Is just turn it off if it weren't fit the fact that it also takes ages to boot for some reason. Sigh. And hibernate doesn't work with an encrypted disk.

path: 0 26188226, hotness: undefined, score: 4, children: 4
exdor 4 points 6 days ago

Hibernate can work with an encrypted disk afaik

path: 0 26188226 26188833, hotness: undefined, score: 4, children: 1
FishFace 3 points 6 days ago

There's some combination of circumstances which prevents it. I think specifically it's encrypted swap, a kernel setting and maybe something else... I can't remember, except that when I looked at it I couldn't be fucked trying to get it sorted.

path: 0 26188226 26188833 26189424, hotness: undefined, score: 3, children: 0
onlinepersona 1 point 6 days ago

Is sOix this modern "sleep" people are talking about? Idle?

path: 0 26188226 26194145, hotness: undefined, score: 1, children: 1
FishFace 2 points 6 days ago

Yeah... I don't exactly the relationship between S0ix, s2idle, and "modern sleep" - I'm sure there's some overlap but to me it's all the same: it's not old-fashioned S3 sleep, and it just doesn't work properly. I remember reading that with my laptop specifically, S3 was replaced with S0ix so I'm pretty sure that's the right term in this case ;)

path: 0 26188226 26194145 26194217, hotness: undefined, score: 2, children: 0
ventilcheck 4 points 6 days ago

its annoying. i cope with the sleep then hibernate after 30min setting

path: 0 26186764, hotness: undefined, score: 4, children: 0
MehBlah 3 points 5 days ago

Does it? I have a really old sony vaio that last more than a week suspended.

path: 0 26215891, hotness: undefined, score: 3, children: 1
onlinepersona 1 point 4 days ago

It might be before the time of s2idle sleep ;)

path: 0 26215891 26232606, hotness: undefined, score: 1, children: 0
hendrik 2 points 6 days ago

I think my current Dell laptop is fine. It'll lose some amount of percent each day. But most of it is still there after two or three days.

path: 0 26187847, hotness: undefined, score: 2, children: 0
Die4Ever 2 points 6 days ago

Kubuntu on my laptop sleeps really well, I can leave it in my backpack for days and it will lose less than 10%, better than when it was running Windows

path: 0 26187144, hotness: undefined, score: 2, children: 0
stembolts 0 points 6 days ago

SWAP avenger here. And they said SWAP partitions were old hat.. Pah!

I have an Acer Swift 3:2 running Manjaro with a swap partition encrypted with LUKS2. I recently got a new laptop so poor old Swifty been languishing in a messenger bag.

The important distinction here being that my lid is tied to hibernate, not sleep, because fuck sleep mode.. why do I want my laptop in "low power mode"? So I can charge it as soon as I open it? No thanks!

Three months pass. Crap can't seem to connect to my VNC over SSH, hmm, what to do.. I wonder if my Acer can connect?

Pull old Swifty out of the bag, open it up, enter decryption key, it's on in moments, 95% battery.

Skill issue? (I'm joking, or am I?) 🐸

path: 0 26192035, hotness: undefined, score: 0, children: 2
frongt 11 points 6 days ago

Hibernate is suspend to disk, power off. There is almost zero power consumption. You'll lose more just to thermodynamics.

path: 0 26192035 26192541, hotness: undefined, score: 11, children: 1
stembolts 1 point 6 days ago

Exactly, that's why I choose it on all of my mobile systems. It also survives power outages which is important in storm-prone geographies.

path: 0 26192035 26192541 26192776, hotness: undefined, score: 1, children: 0
makeshift0546 -3 points 6 days ago

This, Bluetooth, WiFi, screen scaling. 2026 and Linux nuts still tell people it’ll just work 🤣

path: 0 26189105, hotness: undefined, score: -3, children: 12
dust_accelerator 6 points 6 days ago

For common hardware, yeah it does. With my new lenovo work laptop it was just that - worked fine out of the box. Even dock and multiple displays...

Exotic hardware always needs tinkering, Windows is no different there in my experience.

path: 0 26189105 26189477, hotness: undefined, score: 6, children: 1
JasonDJ 3 points 6 days ago

Only issue I've had with Bluetooth in Linux is that Microsoft made me upgrade the firmware in my Xbox controllers to use it...

path: 0 26189105 26189477 26190159, hotness: undefined, score: 3, children: 0
antianarchist 1 point 6 days ago

I am impressed how you seem to be worse at using Linux than my 80yo parents. There is a term for this: PEBKAC.

path: 0 26189105 26199515, hotness: undefined, score: 1, children: 9
makeshift0546 0 points 5 days ago path: 0 26189105 26199515 26206944, hotness: undefined, score: 0, children: 8
antianarchist 1 point 5 days ago

Wow, you pulled up a user having an issue with Linux. Should I now do the same with Windows? Or OSX?

How many times did Windows Update break a working installation in the past? Just a rhetoric question, because the answer is given.

path: 0 26189105 26199515 26206944 26207034, hotness: undefined, score: 1, children: 7
makeshift0546 -2 points 5 days ago

I’ve never once actually had windows break on an update. Nix otoh is why immutable nix exist 🤣

You can just run everything in containers so you’ll never ever have to break your machine running Pacman 🤣

Super easy, super reliable.

path: 0 26189105 26199515 26206944 26207034 26207498, hotness: undefined, score: -2, children: 6
linux
linux

@programming.dev

login for more options
15180
5324
3681

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

go to feed...