Remix.run Logo
gruez 7 days ago

>but I've yet to see another brand that has a working closed lid detection

???

I don't think I've seen a laptop that doesn't have closed lid detection. At the very least it's common enough that windows has a setting specifically for it: https://www.tenforums.com/tutorials/69762-how-change-default...

Analemma_ 7 days ago | parent [-]

With both Windows and Linux, it's always a luck-of-the-draw thing. Sometimes closing the lid works perfectly, sometimes you get a doofus manufacturer with lousy drivers, so 1 in 20 times you pull your laptop out of your bag and it's red hot with a drained battery.

It's maddening that only Apple gets this right 100% of the time, and it's among the things keeping me on Apple's platform for the moment. I can't fathom why this isn't a bigger priority for everyone else: much like "trackpads that don't suck", it's a huge quality-of-life thing which keeps tons of people on Macs because they want it to Just Work without ever thinking about it.

gruez 7 days ago | parent | next [-]

>sometimes you get a doofus manufacturer with lousy drivers, so 1 in 20 times you pull your laptop out of your bag and it's red hot with a drained battery.

That's due to "connected standby"[1], which is to have laptops behave more like a phone when in sleep. This is in contrast to S3 sleep, which basically halts all activity. Sounds all good in theory, but as soon as you allow code to be run while in sleep, it's easy for some runaway app (OS or third party) to eat through your battery even while your laptop is "sleeping". Worse is that there's no way to force sleep, so your only choice is hibernate, which is even worse than S3 sleep before.

[1] https://learn.microsoft.com/en-us/windows-hardware/design/de...

cosmic_cheese 7 days ago | parent | next [-]

“Modern standby” is indeed the culprit in many cases, maybe even the primary one these days, but to my understanding it can still be a crapshoot on laptops that support S3 sleep since it’s up to the OS to detect that the lid has been closed and put the machine to sleep. This has been a problem for a very long time, since well before it became cool to pretend to be a smartphone and not actually sleep the machine.

There’s also wake on LAN which if enabled can rouse the machine from sleep after it’s successfully entered a sleep state.

dontlaugh 7 days ago | parent | prev [-]

That feature also works just fine on macs, though.

adrianmonk 7 days ago | parent | next [-]

Macs have a completely different operating system managing what happens when the laptop is doing its standby stuff, though.

ufmace 7 days ago | parent | prev | next [-]

It works fine, except for when it doesn't.

Source: My macbook has drained its battery flat while closed in my bag dozens of times. Then it just stopped doing that on an OS update. I still have no idea why.

AuthAuth 6 days ago | parent | prev [-]

On mac it works slightly more reliably than windows. I've had both devices drain in standby.

com2kid 7 days ago | parent | prev | next [-]

For a long time (years) there was a bug in Firefox that'd prevent a Windows machine from going to sleep if webgl content was loaded in any FF tab.

So anyway that killed one of my laptop's batteries. So much for supporting Internet freedoms...

Windows comes with a utility that'll tell you what process denied a sleep request, super useful.

I've actually ran into MacBooks not sleeping a few times, but it is much rarer.

It is unfortunate because back on the mid 2000s windows had the best functioning sleep code, but then they tried to catch up with iPad's # instant on and chasing perfection led to the current mess.

toxik 7 days ago | parent [-]

Macs these days wake up regularly as I understand it. My MacBook's battery discharges decently fast even when the lid is shut

monsieurbanana 7 days ago | parent | prev | next [-]

Ah, I wish. You're just lucky if you never had a MacBook burning your hand when pulling it out of a backpack.

cosmic_cheese 7 days ago | parent [-]

The old Intel models were hit or miss, but with the M-series models I’ve never had problems with MacBooks not going to sleep when the lid is shut and staying that way so long as wake on LAN is disabled (or disabled on battery). That setting does need to be off though, with it on I did observe occasional misbehavior.

throwaway290 7 days ago | parent [-]

https://news.ycombinator.com/item?id=44745897

bigyabai 7 days ago | parent | prev | next [-]

Ironically, I had this issue with my Macbook more than my Windows and Linux machines combined.

modeless 7 days ago | parent | prev | next [-]

This is not a sensor problem, it's a Windows problem.

bakje 7 days ago | parent | prev | next [-]

To be fair, I’ve had this issue with MacBooks as well in the past, although not yet with my M3 pro

mort96 7 days ago | parent | prev | next [-]

What makes you think that these issues you describe (which I've experienced too, FWIW) are problems related to the sensor rather than the OS or drivers?

CamouflagedKiwi 7 days ago | parent | prev [-]

I don't think this is about the hardware driver detection of the lid closing. Lid events are a first-class thing in ACPI and I've never seen a laptop that didn't have one, or any real evidence that one didn't do the thing.

Much more likely is that the OS was prevented from going to sleep by some badly behaved process, or got woken up by another thing like allowing USB to wake it from sleep, where even touching the mouse can wake it - with some laptop equivalent like a ghost touchpad touch or whatever.