Hacker News new | past | comments | ask | show | jobs | submit login

>> the laptop doesn't sleep when closed

Linux is amazing but doing the right thing when you close the lid is a seemingly intractable problem for it. Maybe we need a hardware spec and a paid distro to finally solve these kinds of problems.




Well not even Windows can manage to sleep a 'modern standby' laptop reliably these days.

I had to set hibernate on lid-close because Windows kept waking it up all the time even while closed.


I have always been curious why I have been seeing people with MacBooks close their lids and walk away at a moment’s notice for nearly 20 years, but I still do not expect to be able to do that from any non Macbook.

Such a killer feature that one would think Microsoft would prioritize.


Microsoft has traditionally believed in abstractions (i.e. interfaces) while Apple believe in concrete implementations. Abstractions are flexible but always leak and therein lies the problems.

I think the interface approach made sense I earlier days of computing. These days it is better to make a zillion, exactly the same computer like Apple does.


So it is technically impossible with Microsoft’s software?

Surely Microsoft has the resources to coordinate hardware and software with Dell/HP/Lenovo on making at least 1 reliable line of laptops where you can close the lid and reliably expect it to instantly sleep and not randomly wake up.


I bet Microsoft would like that - they tried and then after it didn't work out for 2 decades of laptops they started making their own hardware. The 3rd party vendors don't care too much to change the ways they work - they juggle the hardware they put into the laptops all the time, one model-year can have over 100 variants (some Lenovo models go into thousands). Apple has few standard components shared across all products and that's it.


It used to work, S3 suspend is a problem-free experience on both Linux and Windows . But some genius thought that laptop hardware needed power management more like a phone without all the software being built for it, with no fallback.


In my Windows experience since 2000, closing the lid to sleep did not work on Toshiba Satellite, HP NW8000 series business machines, HP Elitebook, Dell Precision, and still does not work on Dell Latitudes. And I believe those were all business grade laptops, except the Toshiba Satellite.


At least on Linux, machines that have proper suspend states integrated into their CPU should get picked up by the kernel and managed properly. My T460s with an i7 6600u sleeps and hibernates just fine, but my 12700k desktop still doesn't know what to do in suspend/hibernation states. Hopefully AMD is doing better with this these days(?)


You don't get instant on with most hardware (some laptops have achieved it through CoreBoot, System76 sells some like that), but with anything that supports S3 and NVMe you can definitely get a reliable system where your laptop can sleep for weeks at a time. Just set up suspend-then-hibernate in systemd on a laptop with a fast SSD.


it seems like more often than not my macbook completely drains its battery or comes out of my backpack hot when I just close the lid.


My windows laptop is basically 24/7 on sleep and it’s still #1 in DNS requests on pihole.


Modern standby is an absolute disaster. It is shameful that the industry adopted and pushes this now.


I've had no issues with his on ubuntu on my previous lenovo x1 carbon or on my recent dell xps 15. (Nor on my desktop)


They know what to do, it just requires work and coordination with the upstream linux kernel (extending the PSCI api); still it's not done.

But don't get mistaken, I like this machine very much. When it works, it works fast and very well.


Dell XPS is the only laptop where I have seen this working reliably. Worst part is that thanks to zram, many distros removed hibernate functionality. So its not possible now to either sleep or hibernate on many laptop/distro combinations. This makes Linux unusable in most cases due to battery drain (and some times even dangerous as laptop gets super hot inside bag etc).


I can't speak for S4/suspend to disk level hibernation, but regular S3/sleep when I close the lid has worked perfectly for me since 2008.

That isn't to say that it's worked out of the box. When I install Linux on a laptop, I'll put some effort into making sure everything works as wanted and this might involve adding kernel flags or mucking with dbus, and it certainly involves some research. If you expect any open source OS to behave like a proprietary OS you bought a license for, you're likely to be disappointed. If you come in with the expectation of learning to solve problems for yourself you'll fare much better.


Unfortunately s3 has been removed from everything after tiger lake in intel chips, replaced with s0ix, which has caused a bunch of problems. For example, https://old.reddit.com/r/System76/comments/k7xrtz/ill_have_w...

Sleep works fine in my alder lake(12th gen) Framework on Fedora, as in it actually sleeps when you close the lid, but it won't last a week like a mac.


By any chance do you know if AMD Ryzen CPUs retain the s3 sleep/resume facilities? As in can I get a Mac like suspend/resume behaviour with Ryzen and Linux?


> As in can I get a Mac like suspend/resume behaviour with Ryzen and Linux?

What do you mean?

Reliably suspending on lid close? That will depend on the system. My 12th gen Framework with Fedora is very reliable in that way.

Battery lasting a week+ when sleeping? Don't count on it but sleep time will depend on the system. Even s3 sleep varied a lot. Some systems wouldn't suspend ssd during s3, for example.

Arguably s2idle/s0ix is more mac-like, in that it is faster to sleep/wakeup than s3, which can take 6-10 seconds.

It's just not as well supported and is much more flexible, in the sense that the os has more control over what is running during sleep. Windows is supposedly takes a strategy of incrementally powering down devices as sleep duration increases to preserve battery.


> s3, which can take 6-10 seconds.

What? S3 should be well under 5 seconds. 10 seconds is like a whole clean boot, or resuming from hibernation on NVMe.


> My 12th gen Framework with Fedora is very reliable in that way.

How long does it take for your Intel Framework machine to sleep properly upon shutting the lid, and how long until it is ready to use after you open the lid?


"Dell XPS" is too generic a term to be useful.

I've got an old XPS 13 which works perfectly; I also got a newer XPS 15 (top of the line, 4500€) which never managed to sleep correctly (thanks to Intel s0ix hybrid-suspend) and often overheated in the bag. I got rid of the latter after 1 year, it was a mess to use.


The one I have is 2021 XPS 13. May be the 15 model is wired different somehow.


My newer XPS laptop doesn't even have an S3 sleep state. At least it can hibernate under OpenBSD, I guess.


My xps never hibernated properly and the battery started to swell, which messed up my touchpad




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: