News for hackers. Stuff that matters.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by falcolas on Thursday February 16, 2023 @12:57PM (#34822518)
Probably see more and more of this as cables continue the trend of becoming computers that abstract the communication between the two plugs.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by powersnail on Thursday February 16, 2023 @01:40PM (#34823478)
Given the trend, I've really come to see all electric cables as not-yet-evolved computers, the same way every light bulb is a low resolution display.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by danpalmer on Thursday February 16, 2023 @01:03PM (#34822648)
A worrying trend given that most people buy the cheapest cables they can from companies who may have questionable motives or state backing.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by closewith on Thursday February 16, 2023 @01:36PM (#34823397)
I wonder if there's a viable business model in "free" cables that inject ads into video streams.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by Tostino on Thursday February 16, 2023 @02:15PM (#34824163)
Please, just stop with that thought.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by closewith on Thursday February 16, 2023 @02:17PM (#34824211)
Maybe we could integrate an IOT M2M eSIM so there's no way to block the ad server.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by Tostino on Thursday February 16, 2023 @02:28PM (#34824405)
You monster...
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by hooverd on Thursday February 16, 2023 @02:38PM (#34824566)
Don't give them ideas.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by closewith on Thursday February 16, 2023 @02:49PM (#34824740)
Maybe the "free" ad-supported cables could have limited charging or data transfer speeds, but those features could be unlocked by paying a subscription or watching more ads.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by doubled112 on Thursday February 16, 2023 @07:40PM (#34829029)
I hope the firmware in my eye tracking glasses is compatible with my ad serving cable. Wouldn't want to watch all those ads for nothing.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by Arrath on Thursday February 16, 2023 @06:10PM (#34828024)
If HDCP protects against such malarkey it will finally be worthy.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by hooverd on Thursday February 16, 2023 @01:18PM (#34822989)
I'm more worried about companies forbidding third party cables or bricking cables you own. "Sorry, this cable was only licensed for 100 charging cycles. Please buy a new one, for your safety of course."
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by traceroute66 on Thursday February 16, 2023 @01:22PM (#34823091)
> I'm more worried about companies forbidding third party cables or bricking cables you own

Oh do shut up with your unsubstantiated Apple bashing.

MacBooks can be charged with BOTH MagSafe AND normal USB-C cable. NEITHER the USB-C cable OR the charger connected to it needs to be Apple branded.

Same with iPads...

And very soon to be the same with iPhones...

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by pc86 on Thursday February 16, 2023 @01:28PM (#34823225)
Where in the comment above do they even mention Apple?
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by boramalper on Thursday February 16, 2023 @01:32PM (#34823315)
I don’t like their tone but they have a point. Historically Apple has been fussier than many other companies.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by hooverd on Thursday February 16, 2023 @03:00PM (#34824964)
If anything, consumer hardware is amazingly fungible, compared to the things B2B manufacturers do.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by hooverd on Thursday February 16, 2023 @01:40PM (#34823500)
I didn't say anything about Apple. I just don't trust hardware companies to not DRM everything if they know they can get away with it.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by tpxl on Thursday February 16, 2023 @01:58PM (#34823845)
I have been given a 'you need an official USB-C - 3.5mm jack adapter' warning by a non-apple brand. So yeah, this is happening.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by pathartl on Thursday February 16, 2023 @04:16PM (#34826343)
No reason to forbid cables when you can just remove physical ports.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by ericboehs on Thursday February 16, 2023 @01:02PM (#34822633)
Can you brick your cable if you unplug it during the upgrade?
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by mecsred on Thursday February 16, 2023 @01:40PM (#34823499)
Any reasonable manufacturer will rotate firmware images and have the bootloader fall back to the most recent validated image. Though I imagine this could happen if this practice becomes common enough that you get it on some 5$ gas station charging cable kinda thing.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by avian on Thursday February 16, 2023 @02:06PM (#34823994)
A reasonable manufacturer looks at its bottom line and doesn't waste his engineering hours and BOM costs (double the flash memory!) on silly features like that. Either that or there are many unreasonable manufacturers out there.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by tesseract on Thursday February 16, 2023 @03:01PM (#34825004)
Cost (reputational as well as CSR hours and the actual replacement units) of a bunch of warranty claims for bricked units is a factor too.

In practice pretty much every embedded device I've worked on that has supported in-field firmware updates has had either double buffering and/or a recovery mode to limit the possibility of bricking.

For the products where every last penny really needs to get squeezed out of the BOM (toys, low-end appliances, ...) the ability to do in-field firmware upgrades itself is IME often one of the first things to go.

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by 15155 on Thursday February 16, 2023 @03:24PM (#34825433)
"Double the flash memory" !!

- How much do you think the NOR flash costs inside this cable?

- How big do you think the firmware actually is?

- 16MB Winbond NOR flash is like $0.70 with no price breaks (for me, I am not Apple making 1 million units) - there's no way they need 1MB for two slots, much less 16MB.

- These cables retail for $49.

Two firmware boot slots is standard practice because it is essentially free to provide in any higher-end consumer electronic device: especially one that is explicitly designed to be unplugged easily.

How many support claims are saved on this $49 cable because mid-update bricking does not occur?

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by tzs on Thursday February 16, 2023 @06:28PM (#34828265)
A reasonable manufacturer who is releasing something that updates automatically with no warning to the user nor any indication an update is happening to alert the user that they should not disturb it to avoid bricking looks at the potential cost of a class action suit from people whose devices get accidentally bricked, the potential cost of regulators order the devices recalled as defective, and the potential damage to the reputation. This will almost certainly be more than what they'd save by not providing some way to automatically recover from an interrupted update.

BTW, they don't have to double the flash memory. They just have to provide enough extra memory for a fallback updater that the boot code can load if the main firmware is corrupt. All the fallback updater has to handle is telling the computer it needs firmware and then installing the firmware the computer provides.

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by simlevesque on Thursday February 16, 2023 @01:28PM (#34823224)
That's what I was about to ask. It says that the cable should update itself transparently, but there can always be a chance of corruption. Maybe the cable keeps the old FW and only boots the new one if it is signed.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by prewett on Thursday February 16, 2023 @01:38PM (#34823435)
Presumably there is space for two copies of the firmware, and once the new one decompresses and checksums correctly you update the firmware-start pointer.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by readams on Thursday February 16, 2023 @01:58PM (#34823827)
Sounds like the firmware is actually stored in RAM and loaded when you plug in the cable.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by tenebrisalietum on Thursday February 16, 2023 @02:12PM (#34824099)
Really that shouldn't be called firmware (the actual firmware would be the fixed code that receives second-stage code from the host), but "software" doesn't fit that either. Maybe "controllerware" or something like that.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by nagisa on Thursday February 16, 2023 @02:16PM (#34824180)
This is how CPU/GPU microcode is loaded too, though… Is that not firmware?
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by tenebrisalietum on Thursday February 16, 2023 @02:39PM (#34824572)
What I always understood firmware to be is: a ROM that gives a CPU something to do when power is applied, as RAM is blank on power on.

Depending on the scope of the device (from multipurpose PC down to single-purpose things like microwaves, gas pumps, hard drives, LCD controllers) the firmware may just allow an operating system to be loaded or actually be all the code the appliance needs for its CPU.

If the CPU is embedded in a peripheral, then:

- it has to have some small ROM that does nothing but wait for an image to come in from a bus (USB, etc.) and then execute. The sound chip in Nintendo's Super NES is an example, on power on/reset it has a 64 byte boot ROM that does nothing but wait for data to come in from the main 65816 CPU and then runs that code when received.

- the host has to have some way of externally programming the peripheral's RAM directly and resetting the peripheral's CPU but not the peripheral's RAM. I suppose JTAG could be used for this.

My opinion: CPU microcode isn't firmware - CPU microcode sets the configuration of internal connections/parameters in the CPU. It's kind of like a settings file. But: I think recent microcodes do actually include code (see Xucode) but that code is meant to be the behavior of advanced instructions and not designed to be something that tells the CPU what to do from the moment it's powered on.

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by reportingsjr on Thursday February 16, 2023 @03:51PM (#34825881)
There are plenty of things that have firmware, but run it out of RAM. FPGAs do this, and some microcontrollers. Dialog, now Renasas, has microcontrollers that run their firmware out of RAM.

Commonly there is a hardware peripheral that pulls the firmware from a couple of places (could be an onboard ROM, could be jtag, or other) and loads it in to RAM.

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by dbtc on Thursday February 16, 2023 @08:44PM (#34829573)
Driver?
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by crazygringo on Thursday February 16, 2023 @01:05PM (#34822700)
Between this and "Help, Bing Won’t Stop Declaring Its Love for Me", man... HN headlines are making me laugh today.

Keep it up, technological progress! :)

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by noodlesUK on Thursday February 16, 2023 @01:08PM (#34822786)
I’m really surprised that these cables have updatable firmware. Surely that makes the attack surface that much larger?
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by Arrath on Thursday February 16, 2023 @01:35PM (#34823371)
Just waiting for an 'illegal peripheral' exception when I try to use a cable condom, if those exist for anything other than USB yet.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by peterkelly on Thursday February 16, 2023 @01:24PM (#34823135)
Apple's lightning-to-HDMI cable contains an embedded ARM SoC with 256MB of memory running the XNU kernel and a daemon that performs video decoding.

https://panic.com/blog/the-lightning-digital-av-adapter-surp...

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by baq on Thursday February 16, 2023 @01:39PM (#34823462)
I would like to post something substantial or whatever but how can you add anything to that...?

Mind blown.

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by adolph on Thursday February 16, 2023 @01:40PM (#34823496)
That post is a classic and the first thing I thought of when I saw the headline.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by b212 on Thursday February 16, 2023 @09:23PM (#34829874)
Let’s add an accelerometer and gyroscope and then we can install Quake there and play by simply moving or tapping the cable.

The future is now, old man.

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by rollulus on Thursday February 16, 2023 @01:26PM (#34823169)
What could possibly be the use for any sort of logic in such cable be, given that on both ends of it there’s already a computer as well?
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by traceroute66 on Thursday February 16, 2023 @01:32PM (#34823297)
> What could possibly be the use for any sort of logic in such cable be, given that on both ends of it there’s already a computer as well?

Maybe because MacBooks can be charged via both USB-C and MagSafe connector it forms part of the safety mechanism against frying your motherboard and/or against arcing during connection/disconnection. Especially on the higher-end of the spectrum (e.g. 16-inch MacBooks with 140W MagSafe).

Sort of like the same way electric car chargers handshake before throwing amps down the cable.

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by tesseract on Thursday February 16, 2023 @01:31PM (#34823291)
* Translation between USB PD and whatever communication protocol runs on the center Magsafe pin (in Magsafe 1 and 2 it was Dallas 1-wire)

* Disabling power output when the cable is not connected to a computer, so that a metal object touching the spring pins can't create a dangerous short circuit

* Driving the LED

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by cal85 on Thursday February 16, 2023 @01:49PM (#34823663)
Just been scratching my head about this. Then I thought, is it just so they can detect authentic Apple cables and scold you for using an inauthentic one? Because iOS definitely does that. Some kind of challenge/response thing that requires a full Turing machine maybe.

Another thought was something to do with monitoring current or degradation but I cant see why they couldn’t do the same things from either the computer in the power adaptor or the computer in the actual computer.

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by duskwuff on Thursday February 16, 2023 @01:55PM (#34823779)
USB PD negotiation.

The MagSafe connector only has three distinct contacts (there are five pins, but it's mirrored), so there has to be some protocol translation between USB PD and the single control signal used in MagSafe.

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by Fauntleroy on Thursday February 16, 2023 @01:26PM (#34823180)
In a few more years, security will simply cease to exist entirely.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by adolph on Thursday February 16, 2023 @01:39PM (#34823465)
There’s no way to directly update the cable, but it should update automatically when plugged into your Mac. While you can check the firmware of your power adapter by attaching it to your Mac and clicking on the Apple logo in the top left corner of the menu bar, then About This Mac, System Report, and Power, it’s not clear how to check the specific firmware version of the cable.

So presumably there is some UART to the cable, and the cable to the power adapter. Is it all stuffed in the cable treated as a USB device or is there some proprietary control on the laptop side to communicate with the cable?

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by FateOfNations on Thursday February 16, 2023 @03:42PM (#34825738)
The only interface the computer normally has to the cable is the single control pin on in the middle of the MagSafe connector, so they are likely having to do something more sophisticated than UART.

(Apple could have had you plug the other end that has the USB-C connector into the computer to do the firmware update, but that isn't particularly intuitive or user friendly).

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by Maxious on Thursday February 16, 2023 @10:11PM (#34830230)
> The chip uses the 1-Wire protocol, which is a clever system for connecting low-speed devices through a single wire (plus ground). The 1-Wire system is convenient here since the Mac can communicate with the Magsafe through the single adapter sense pin.

http://www.righto.com/2013/06/teardown-and-exploration-of-ma...

Magsafe 3 with USBC makes this even easier https://www.reddit.com/r/UsbCHardware/comments/11309f3/comme...

The Lightning comms protocol is interesting too https://hackaday.com/2015/02/14/reverse-engineering-apples-l...

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by exabrial on Thursday February 16, 2023 @01:44PM (#34823566)
When you have so much money and you don't know how to spend it... this is what you get.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by conductr on Thursday February 16, 2023 @02:09PM (#34824041)
> It’s not clear what the firmware fixes or patches

I'm on M2 MB Air, and it seems odd to me that it (seems to) runs off battery even when plugged in and fully charged. Mine has been plugged in at desk for over a week, every day when I get on it says it's "Power Source: Power Adapter" yet it battery charging goes "On Hold" and dwindles as if it's running off battery all day. For example, it's mid-day for me and I'm at 79% but it's never been unplugged.

My last was a MB Air 2013 so maybe this is new behavior that I'm just not used to, but it seems strange. If I had to unplug and leave, I'd expect to be leaving with 100% charge.

Edit: "Optimized Battery Charging" was turned on as commenter mentioned, thanks for the tech support HN!

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by count on Thursday February 16, 2023 @02:12PM (#34824118)
80% is the 'ideal storage' condition for the battery. If it's always charging to 100%, the battery life is pretty dramatically shortened. Apple enabled this new charging manager that tries to learn your patterns (if you always unplug in the AM and leave with it, it'll learn to charge to 100% before you leave, for example). You can also click the battery icon in the tray (if you have that turned on) and tell it to charge to 100% 'right now', which only takes a minute or two with a full size charger.

This is a positive thing for the life of your battery, but if you do want to disable it, there's a setting in System Settings - click the 'i' in the circle next to Battery Health, and turn off 'Optimize Battery Charging' there.

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by EricE on Thursday February 16, 2023 @02:32PM (#34824477)
One of the many utilities I love that comes with my Set App subscription is AlDente Pro. As others have pointed out, it allows me to set 80% as the max for my battery and it also will change the color of the LED on the magsafe connector to green once it gets to 80% and charging stops.

I had optimized battery charging enabled but my Mac seemed to always charge to 100% - with Al Dente I can force it to do what I want.

And recently I found Al Dente pausing charging because the battery temp got too warm. So then I went down a rabbit hole and found out I could tweak the fans up slightly higher with iStat Menus (also part of my Set app sub). There are other utilities that will do similar things - those just happen to be two I use, especially since I tend to use my MBP plugged in the majority of the time.

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by davidbarker on Thursday February 16, 2023 @02:12PM (#34824097)
It sounds like Optimized Battery Charging may be turned on.

https://support.apple.com/en-us/HT212049

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by conductr on Thursday February 16, 2023 @02:13PM (#34824125)
Yep, solved! Did not know about this setting (kind of buried in the Settings UI) - thanks for the tech support!
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by robostac on Thursday February 16, 2023 @02:17PM (#34824215)
If it thinks it's going to be plugged in for a long time (based on previous usage) it'll pause the charging around 80% to preserve the battery health.

https://support.apple.com/en-us/HT

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by crummy on Thursday February 16, 2023 @02:11PM (#34824091)
Are you using the stock charger? I would see similar behaviour on my 2018 MBP when I used a USB-C charger without enough power.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by ripvanwinkle on Thursday February 16, 2023 @03:46PM (#34825808)
"Everything that can physically accommodate a processor and be powered, will eventually have a processor"

  - Anonymous
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by adolph on Thursday February 16, 2023 @04:55PM (#34827012)
Goes like peanut butter with the jelly of Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript

https://blog.codinghorror.com/the-principle-of-least-power/

Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by brenouchoa on Thursday February 16, 2023 @05:14PM (#34827258)
I was having problems charging with my magsafe cable and for the last month was using the usb-c port to charge. Today i took if of the drawer and it is magically working again. I am using the beta mac os 13.2 so it may have solved my problem.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by brenouchoa on Thursday February 16, 2023 @05:30PM (#34827444)
I spoke too soon. My cable is still blinking orange after i plug it in. I will try to reboot.
Re:If you own an M2 MacBook Air or MacBook Pro there’s an up... by fourmajor on Thursday February 16, 2023 @06:08PM (#34827986)
I've had a new MacBook Air M2 for a few weeks now. I've been charging exclusively with a USB-C charger. Is there any advantage to charging via magsafe?