Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The battery drain in sleep mode is why Linux is relegated to a dual-boot option for use when necessary for me, rather than my daily driver. Battery drain when in use or idle seems perfectly acceptable, but I can't use a laptop which discharges itself overnight while the lid is closed. I'm sad that Asahi never implemented a proper sleep mode.


Why not just suspend to disk?

My Asus laptop with 32 GB of RAM is 4 years old, but resumes from the encrypted swap partition in under 5 seconds, which is fast enough for me.


If UEFI Secure Boot is enabled, Fedora kernels detect this and lockdown. And hibernation is then disabled. The reason is lack of an autheticated hibernation image. This work has had several proposals but still isn't implemented.

I'm not sure of the status on other distro kernels but allowing it would be a significant bypass of Secure Boot's purpose.


This exact thing is irrelevant to Asahi; the reason they don't support suspend-to-disk is that their drivers don't support full reconfiguration. This is a difficult task, as is "true suspend," because Macs have tons and tons of peripheral SoCs running firmware with their own SRAM, so resuming from suspend or hibernate creates a delta between the firmware state and the system state. (and, before the usual Apple trolls show up, this is true on x86 lately too, but on x86 the driver and platform interface is more standardized to support these kind of state changes without as much OS support).

Needing a way to securely verify the hibernate image is ALSO a problem, and one of the reasons Asahi haven't focused on suspend-to-disk, but it's not the first-order issue.


You can always set the system up to boot in insecure mode via shim, even if UEFI Secure Boot is active. It requires an explicit configuration step with physical presence, but it's doable.


Can secure boot be disabled on Macs?


Macs allow the device owner to install an OS that isn't signed at all, without having it degrade the security of the system when you do boot into MacOS.


Fine, but can it be disabled? If secure boot is interfering with another function of the computer, the owner might decide they prefer hibernation over secure boot.


I think what you're missing is that "secure boot" isn't a system-wide on/off thing on a Mac, it's a per-OS thing. And UEFI Secure Boot specifically is something that only exists on a Mac to the extent that Asahi shoehorns it into a system that doesn't natively do anything UEFI-related. It would be very surprising if Asahi Linux didn't still provide a way to skip their UEFI Secure Boot code paths and just plain boot.


Yes, but that's not a perfect excuse since OpenCore (and Clover) exists. macOS very well can boot without iBoot's opaque "man behind the curtain" blobs, Apple simply never entertained it as an option on their chips. Apparently important stuff is happening in that boot process and they can't have you emulating it for fun or profit.

That is worth discussing though, as it's a marked departure from old Macbooks that did support the UEFI method.


Yeah, the security freaks basically broke hibernation across Linux ecosystem.


I don't think suspend to disk is properly supported in Asahi. I remember looking into it a couple of years ago and found that it wasn't a solution, and a quick Google search now indicates that it's still not implemented.


https://web.archive.org/web/20241219125418/https://social.tr...

In a nutshell:

> Getting hibernate to work would mean a metric truckload of work on the drivers to support restoring firmware state. Not happening any time soon, it's basically forever the bottom of the priority list and we're unlikely to ever run out of other things to work on first.

> Fixing PM with no documentation is a game of trial and error. You do "more things" like macOS and hope that one of them reduces power consumption.

> It definitely isn't obvious what we're missing, and we don't know what the real answer is going to be. If we did, it would already be fixed.


Suspend-to-disk (or rather, suspend-then-hibernate) is notoriously unreliable on Linux. Hell, its occasionally unreliable on Windows and OEMs taper their firmware to Microsoft's spec and quirks.


I think buying a year old laptop helps give time for the quirks to get worked out in the kernel.

I was able to follow a fairly standard NixOS config with lvm and encrypted swap. I've never had any issues after hibernating a couple times a day for 3 years.


It's very reliable on normal desktop hardware.

I don't know what the fuck is going on with laptop hardware. That stuff seems to barely work, despite the chips and stuff being off the shelf. Most windows laptops cannot handle sleep correctly either.


All the Lenvo laptops I've bought for personal use and the HPs my work gets have fully functional sleep under windows. The Lenovos also sleeps just fine under Linux. Wonder if its really specific brands that don't put the effort into their HW or drivers support for sleep?


My Lenovo would just randomly kill its battery even when it was supposed to be full suspend-to-disk - under Windows.

Setting the BIOS option to "Linux-compatible sleep mode" fixed this, but it took me FOREVER to figure this out and I'm reasonably certain I first heard about this fix in a comment here.

Not a bit of a problem since.


The existence of a BIOS option called "Linux-compatible sleep mode" is a dead giveaway that the default behavior is enshittified sleep that wakes up your system periodically so it can check your email, phone home to Microsoft, and maybe fail to go back to sleep.

Having such an obvious name like that is a gift, because otherwise you have to start decoding Intel Marketing names for their features to figure out which are actually anti-features.


Much as I might wish this were really the case, the truth is that it wasn't Windows' fault - IIRC from the explanation, Windows supports sleep modes that Linux doesn't, but it doesn't support them very well, and it's apparently not a rare issue. Something to do with S3 sleep mode IIRC.


The blame is shared between Microsoft and Intel. It's not really that Windows supports sleep modes that Linux doesn't, but that Microsoft and Intel conspired to get rid of S3 sleep mode entirely.

The intention was to replace S3 with fine-grained per-device sleep modes that would in aggregate lead to idle power that is almost as good as S3 while allowing for the "wake up and check email" kind of features. But to the surprise of approximately nobody, this complex multi-vendor strategy relying on high-quality drivers for every single peripheral in the machine did not work out as well as planned. The plan also did not in any way require that S3 sleep be eliminated from newer hardware platforms; that was just malicious behavior from the Wintel conspiracy.


Tbf forcing though a very complex buggy feature no one wanted did _require_ that you couldn't just use the better working existing solution.


Honest question: why would you care about battery in your daily driver? aren't you sitting or standing at a desk?


When I'm at my desk at my office I use my Linux desktop. My use case for my laptop is to use when I'm out and about, commuting on the train or bus, visiting people, or just relaxing on the couch.


I do that too. But it's like 5% of my computer usage time. And maybe 10% of that fracrion I don't have access to power outlet. My point is that it's just a tiny fraction - for me anyway.


which begs the question why even get a laptop as a daily driver

people do it all the time for gaming laptops etc when probably 99% of their usage is at the same desk


I have a desktop, but I could imagine a life with only a laptop. Sure, maybe 99% of my usage would be at one desk, but if I need that other 1%, I need a laptop. It's the desktop that's an optional nice-to-have. And not everyone can afford or wants to have two computers which are powerful enough to do what they need.

In reality, far more than 1% of my computer use happens away from the desk where my desktop is located. I'm guessing I'm not alone in that.


You still only need 1 powerful computer. Networks are so fast these days and we have stuff like Tailscale it’s pretty easy to use the laptop as a dumb terminal and do all your work still on the fast computer.


Completely depends on what you're doing. If you're working on GUI software for example, you need to run that on your local machine. This is much easier if you're compiling and running the software on the same machine.

Then there are non-development tasks, like 3D modelling or video editing.

Remote desktop is a kind of solution, but it's extremely sub par. Latency is not good unless you're on the same LAN in my experience.


Ever try Parsec or Moonlight/Sunshine? They're very low latency because they're made for gaming


There’s a latency cost to encode and decode, and there’s a definite PQ change going from uncompressed video to h.265.


There's always some latency, but Moonlight has ~5ms latency on my LAN. I average 18ms total latency when I stream to my phone over 5G cell internet, that's with 6ms of decode latency in the phone's (fairly slow) hardware decoder and about 2.5ms encode latency in my AMD RX 6700XT's h.265 encoder.


Powerful desktop at home + Tailscale + super light old Thinkpad with amazing battery life has been working really well for me whenever I need to be out and about. As long as remote development works for you I think this is the way.


Yes a MacBook Air as remote terminal back to the beefy PC at the mothership is ideal usually even for for GUI remote desktop unless internet is already unbearable and/or pay-per-GB.

It's not going to support WiFi promiscuous mode but maybe pick up a Pi Zero 2W or similar if that's a requirement.


I would go nuts if I was confined to working from one spot. Versatility and mobility are too important to give up. And there’s no tradeoff with apple silicon.


> And there’s no tradeoff with apple silicon.

I would imagine there would be more thermal throttling and throttling to reduce power usage on a Macbook versus a machine that wasn't designed to be mobile.


For the same reason people tend to buy much larger cars than they really need.

They could own a much more economical car, and have enough money left in the pocket to rent a van when they go on big trips, get delivered or rent a trailer the few times a year they need to carry large stuff.

Personally I like having a laptop because I use my computers in different rooms depending on the use case and occasionally on travel.


For my case, and probably the case of many such people, that's closer to 90%. The 10%, however, is a big deal. When you need to take it somewhere, you need to take it somewhere, and a device you can use in that 10% of the time is better than a device you can't use in that 10% of the time, regardless of how superior the latter is in the happy path cases.


I made this determination myself recently, and switched back to a Mac Mini after about a decade of docked laptop use. I use my 13" iPad w/keyboard and 5G when I want to be mobile.


I bought a m4 mac mini but even if 95% of my usage would have only been at my desk, that 5% actually makes me regret not going at least paying about $400 more for a macbook air so I can take it to the bedroom or to a coffee shop.

Thankfully my worklaptop is an m4 mb pro, so I have flexibility with that.

And indeed with virtual backgrounds in I do probably 3 meetings a week in my car so I can do quick errands without skipping a meeting here or there.


Not being attached to a single desk is nice, it's also nice to be present and sociable in whatever space I want to be in even if I have to be in front of a screen for work.




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

Search: