Skip to content(if available)orjump to list(if available)

The MacBook has a sensor that knows the exact angle of the screen hinge

Doohickey-d

The lid angle sensor is also serialized to the motherboard: you cannot replace it, or the motherboard, without performing calibration, which can be performed by an apple authorized service provider, or alternatively, in Europe (and elsewhere where Apple offers parts for self-service repair), you can purchase the sensor from Apple, connect the machine to the internet after replacing it, to then perform the calibration, only if the sensor was purchased from Apple.

So the hardware is capable of performing the calibration, Apple just does not graciously grant you the right to install a recycled or third party sensor in your machine.

https://www.ifixit.com/Answers/View/759262/Torn+Lid+angle+se...

Cthulhu_

Negative take: Vendor lock-in

Positive take: discourage theft; not only is the device locked down / encrypted and you can't just wipe / reinstall it, you can't even break it down for parts.

When the iphones etc first came out, they were a very attractive target for theft. Come to think of it, that's one reason why I was hesitant to get an iphone back then.

dwood_dev

I used to have an extremely negative view on all this serial number pairing that Apple does, then I found out why.

Within mainland China, Apple was facing fraud of having their devices purchased, stripped for genuine parts, and then rebuilt with knockoffs and sold as new to unsuspecting victims within China or returned. This whole thing that we hate in the west was in response to that fraud.

I don't like it at all, but it's not all Apple being assholes.

arcane23

>discourage theft

Does it though? Are there statistics that clearly show devices aren't being stolen anymore because they cannot monetize them anymore?

The way I see it the only thing this does is make you feel better the thief cannot monetize it, or use it, but it does nothing to prevent the theft which is really a moot point in the grand scheme of things. We end up paying in this way, of not having the freedom to easily and cheaply replace parts, while being comforted that even though they still are getting stolen from us, whoever steals them cannot use/monetize them. Which is quite primitive in a sense, and I do not think it's worth it. But that's just me.

phoronixrly

Yeah, imagine a world where people who are forced to steal are competent enough not only to know which phones they can sell, but to be able to guess the make and model in the middle of a mugging

deepsun

Theft of what, sorry not clear. Thieves keep stealing macbooks no prob.

debesyla

As the saying goes, is it even theft if you don't own the device? (If you can't do whatever you wish.)

BoorishBears

Yes, Apple rents me some very powerful hardware that allows me to make a living.

Someone depriving me of it is theft.

postalcoder

To those wondering why the MacBook would have a sensor for this, it’s likely there to support Desk View[0]. It shows the items on your desk in a geometrically correct, top-down view. Knowing the angle of the display is very helpful when applying keystone correction.

0: https://support.apple.com/en-us/121541

Reason077

It can’t be exclusively for Desk View. Desk View only works on Macs with wide-angle cameras, which were introduced in 2024 and 2025 models.

But this sensor has been in MacBooks since the 2019 models.

appellations

Apple has a history of adding sensors, security chips, etc. a few revisions before the feature they support launches. It’s a really good idea because it helps them sort out the supply chain, reliability, drivers, etc. without any customer impact. It decouples the risks of the hardware project from the risks of the software project.

If things go particularly well you get to launch the feature on multiple hardware revisions at once because the first deployment of the component worked great, which is a neat trick.

wklauss

At Apple Stores, laptops screens have to be opened exactly at 76 degrees. I wonder if they use this sensor and specific software for adjustment (I'm not implying this is the only reason it's there)

DSingularity

Shows you how good they are at planning and decomposing features into well scoped hardware and software features which can ship earlier, provide some value, while enabling richer future features. You have to respect them for this because this is how they have always operated.

null

[deleted]

OJFord

Simpler than that I think - when do you turn off the screen or sleep? Because it isn't fully closed, but you want to be able to 'privacy-duck' the screen a bit before that, and having a sensor rather than just a fixed angle switch makes it software defined and something they can update.

hamandcheese

I'm pretty sure the sensor for that is a simple reed switch.

OJFord

A reed switch (plus magnet and choice of location) would be an implementation of a 'fixed angle switch' per my comment above.

tesseract

More likely a hall effect sensor, which is solid state and a lot smaller. And yes, older MacBooks had something like that, as evidenced by the fact you could put them to sleep by holding a magnet in the right place (just to the left of the trackpad IIRC in the models I'm familiar with)

rzzzt

When I ran a MacBook Pro in closed clamshell mode and put another laptop on top of it, it went to sleep. Must be a weight sensor in there as well. (/s)

kelnos

Why though? That seems unnecessarily complex? It seems fine to me to just use a reed switch and sleep when it's closed or very close to closed.

missinglugnut

It's one sensor in both cases, and in the latter case you can do so much more: change the thresholds in an update, detect when the lid is in the process of closing, apply hysteresis (on a simple switch, there's an angle where vibration could cause it to bounce between reading open and closed, but with an angle sensor you can use different thresholds for detecting and open and closing state change).

But most of all...you don't have to commit to a behavior early in the design process by molding the switch in exactly the right spot. If the threshold you initially pick isn't perfect, it's much easier to change a line of code than the tooling at the manufacturing plant.

Reason077

Why use two sensors when one will do? If you already have an angle sensor, it makes sense to get rid of the reed switch and reduce your production costs.

null

[deleted]

null

[deleted]

anal_reactor

You could calculate the angle from the camera view as long as at least some piece of the MacBook is in view.

antennafirepla

You could, for orders of magnitude more compute than reading a magnetic encoder (my assumption at how they estimate it)

Cthulhu_

But compute is cheaper for the manufacturer than adding a sensor (parts & labor, and it adds up over millions). Someone must've done the math.

null

[deleted]

estimator7292

Sure, but not more than what you're already spending on transforming the image. And it's not like these devices are exactly lacking in horsepower.

null

[deleted]

sannysanoff

shameless plug: https://sannysanoff.github.io/whiteboard/

not only for mac users.

ivanjermakov

Relevant XKCD: https://xkcd.com/1425/

junon

This was correct a number of years ago. Feels a little strange we can just do an API call for bird recognition now.

vaenaes

[dead]

lazide

Ho boy, good luck convincing people it wasn't watching them wank!

Biganon

Wow, anal_reactor figured it out when the designers at Apple couldn't ! Truly impressive.

matsemann

A fun entry to the trend "stupid volume controller" a while back I guess would be to use this to control the volume, heh.

cluckindan

Even better as a phone number input

Razengan

Or as an accordion

Terr_

Or some kind of... not-so-cheap theremin knockoff.

Is 802.11 signal strength consistent/detailed enough that it could be used as another kind of input, as someone cradles the laptop in different ways?

GLdRH

Made me chuckle

seagram

https://x.com/nevmed/status/1640004745250078723

I wonder if Apple uses this internally at Apple stores to set the screen angle at 76 degrees.

mitchellh

This must be new, if true.

I worked at an Apple retail store during college. We were taught to put the screens at a certain angle but it was a gut feeling angle learned through practice, and not measured. More senior people would correct you if you were off.

They did mandate putting the bezel, mouse, keyboard, etc. at specific grains in the wood that were consistent across the desks though to ensure they were lined up without having to bust out a level-like device.

Overall everything was made so that retail employees would continuously clean up the displays as they walked around the store (even while helping customers without them realizing it) so that the store always felt perfect. They had a phrase for it but I forgot now, it's been almost 15 years now...

TiredOfLife

I like how the picture clearly shows that the screen angle is 70 degrees or rather 110 from the users point of view

jolmg

> In Apple Stores all screens are tilted at exactly 76° degrees, this is so you move the screen with your hand…interacting with the product more and making you feel more attached to it.

From the description, I would've thought it meant 76 degrees from the user's PoV, i.e. slightly closed so the user would feel compelled to open it more / tilt it into their view (with their hand). The pictures show ~70 degrees from the back of the devices though, so IDK what they mean about the hand moving the screen. There's no need for interacting then, since the displays can be seen from afar.

0xCMP

I believe the initial tweets/demos have some calculation errors which were later corrected.

layer8

The photo shows 70 degrees.

busymom0

I am just imagining the manager get an angry email from Tim Cook every time some MacBook in the store is not at 76 degrees.

harrall

I wonder if the specific degree is important or rather it’s because screens tilted at different angles in a store looks ugly asf.

jayknight

My first job was at a video rental store. My boss was very strict about the videos being spaced evenly and all at the same angle. Every hour one of us had to walk the entire store straightening everything out. It did look very nice in there.

jarmitage

amelius

So doesn't seem specific to Apple hardware.

The only thing "Apple" here is that it's not exposed as a public API.

unglaublich

> Motion is tracked using the laptop camera via optical flow and mapped to continuous control over dynamics, while the sound is generated in real-time.

No, it's a different method.

1ceaham

Author here. We checked for APIs like this at the time, but since approximately every laptop has a webcam, the cv approach is much more accessible. It would be a fun rewrite though; I’m sure polling this would be a few orders of magnitude more efficient. There was definitely lag if you ran the app on a very underpowered machine which did impact the “playability” of the velocity parameter.

dlcarrier

Apple goes much further than not offering an API: https://www.forbes.com/sites/jaymcgregor/2023/10/11/genius-n...

hk1337

Apple is going to see an increase in MacBook Pro hinges breaking from people trying to play the Star Trek theme in theremin mode or other songs with other instrument sounds.

Apple: How did the hinge break?

Customer: I don’t know, I just opened it one day and it came off.

jerlam

Probably not as bad as the Smackbook, which used the HDD impact sensors to change apps: https://www.youtube.com/watch?v=6uvQTTPr9Rw

"I was just hitting the side of my laptop in order to go to Safari"

No longer supported because we don't use HDDs anymore.

rootbear

I always wanted to rig up a laptop that has an IMU to detect when it was in free fall and play the Wilhelm scream.

JKCalhoun

Ha ha, too bad Apple is likely logging screen angle for just such a repair dispute.

null

[deleted]

bmcahren

Missed a huge opportunity to play the sound of a monstrous wooden door sound when the lid closes. Looking forward to the update!

gerdesj

I seem to recall the BBC have released quite a few sound effects ... ahh yes:

https://sound-effects.bbcrewind.co.uk/

There must be a door or two in there.

HPsquared

Venjent has some amazing door-based tracks.

https://youtube.com/shorts/sgqTEjN5_vQ

https://youtu.be/Uivp-hvk-nk

Edit: not forgetting the classic Miles Davis door: https://youtu.be/wwOipTXvNNo

JKCalhoun

Venjet is new to me.

("It’s such a fine line between stupid and clever.")

bapak

The audio stops abruptly when the lid clicks

crazygringo

I wonder why? Presumably this information doesn't come for free, and Apple spends money to put this sensor in.

Is it a backup if the magnet for closed lid detection fails? Is it some kind of input for the brightness sensor or True Tone? Is it for warranty investigation, that if the hinge breaks they can figure out if it was physically pushed too far, or was repeatedly slammed open and shut like a toy?

avianlyric

The info probably does come for free. The laptops don’t use the magnets along the top edge of the screen for detecting if the screen is closed, those magnets are just there to provide the latching effect when the screen is closed, so it doesn’t open accidentally.

The sensor used for detecting if the lid is closed is an “angle” sensor, although really it’s an Hall effect sensor and a magnet in the hinge. If you have a Hall effect sensor, getting angle data from it is pretty much free, because the Hall effect produces a continuously varying signal, you need thresholding logic to turn it into a binary output.

Given Hall effect ICs are so cheap and plentiful there no reason to use anything else. Also given they mass-produced ICs it’s probably cheaper to buy a fully featured Hall Effect IC, because the manufacturing cost between a basic IC and an advanced IC is almost certainly zero these days.

In short, modern IC manufacturing has just made magnetic angle sensors as cheap, if not cheaper, than dump non-angle sensing Hall sensors. After all you can always use an angle sensing Hall sensor as binary switch if you want, but the reverse isn’t true, so if the ICs basically cost the same, you can expect the less capable ICs to be completely outcompeted by the more capable ICs.

ChocolateGod

So basically as free as the glowing Apple logo that used to be on the back of Macbooks.

macNchz

Once upon a time Mac laptops used reed switches to detect closed lids, and they were a common point of failure, presumably since they contained moving parts.

cosmic_cheese

They can be erroneously triggered or prevented from working as expected by nearby magnetic objects too, which can be annoying. No such issue with a hinge angle sensor.

estimator7292

We've been using Hall effect sensors for lid close detection for a long, long time. My thinkpad from 2013 has it halfway down one edge.

If you simply move the sensor (that is already a requirement) closer to the hinge, you can infer angle based on the Hall sensor for free. You can even get special sensors that specifically measure the magnetic field orientation for the same price as the simple type.

Yes, it's completely free with just a very minimal amount of thought put into the design.

postalcoder

It’s likely there to support Desk View[0]. Desk View presents the items on your desk in a geometrically correct, top-down view. Knowing the angle of the display is very helpful when applying keystone correction.

0: https://support.apple.com/en-us/121541

rossant

Wild idea: if the goal is to wake from sleep as quickly as possible when opening the lid, could receiving a signal as soon as the user starts lifting the screen save a few hundred milliseconds? I might be way off though.

anentropic

Pretty sure that exact feature was announced when the current generation of Macbooks were launched

seanalltogether

My best guess is it's related to thermal control. The vents on macbooks are right under the hinge, and the vents are blocked and opened to different degrees based on the angle of the lid.

userbinator

Classic Apple overengineering. Every other laptop I know of just uses a single lid switch. It reminds me of their mouse that has capacitive buttons and a speaker to produce clicking sounds.

methyl

I wish more laptop producers overengineered their products the way Apple does.

cush

Looks like something is off with the value. That “exact angle” makes zero sense

ghoulishly

Hey, developer of this experiment here. I screwed up the calculation on the demo video, but it’s patched in the latest version on the repo.

I thought it was centidegrees but it turns out the sensor was reporting the raw degrees.

socalgal2

Yes, the video shoes the screen moving about 120 degrees but the number goes from ~335 to 0 (~3x too much)

ritcgab

And this little thingy makes a lot of M2 MacBook Airs fail.

emmelaich

I was wondering this myself. I've had three mac air/books that simply failed to turn the display on. I've heard (from a third party repairer) that it is not uncommon.

katmannthree

I'd like to hear more, do you have an article or something you could link?

ritcgab

There is no official statement about this issue but you can search for user reports like "M2 MacBook Air black screen" or something similar. It is not uncommon.

In older versions of macOS you can simply try two things:

* Press Esc in locking screen, or * Press "Sleep" from the menu bar icon and then press Esc immediately

If the machine crashes/reboots, the sensor is bad and it needs to be replaced. Apple Store replaces the whole display assembly.

15 inch and M3/M4 models are not affected, AFAIK.

djtriptych

I clicked around and the README links to this python lib: https://github.com/tcsenpai/pybooklid

Probably a nicer interface for anyone who wants to play with this :)

pimlottc

That’s a downstream project, the author’s original project is here [0], with much more information on the actual sensor.

0: https://github.com/samhenrigold/LidAngleSensor