Most active commenters
  • bayindirh(7)
  • latexr(4)

←back to thread

400 points dulvui | 30 comments | | HN request time: 0.001s | source | bottom
Show context
mgoetzke ◴[] No.41857244[source]
it also leaks the audio of tabs before logging in.

Even though I had disabled all 'restore' applications features, macos sometimes decides to 'start' browsers BEFORE logging in after a restart AND those start auto-playing audio from whatever was paused before the reboot (or many days before).

Since then I went rather deep disabling that feature, but I never trusted it.

replies(7): >>41857258 #>>41857358 #>>41857362 #>>41857411 #>>41857615 #>>41857667 #>>41857946 #
1. Affric ◴[] No.41857258[source]
I can’t think of anything I want less from a laptop than it playing sound when I open it… and yet apple bring it to me as though it’s a feature.
replies(4): >>41857320 #>>41857331 #>>41857349 #>>41862631 #
2. theshrike79 ◴[] No.41857320[source]
There are exactly zero situations where I would want my laptop be anything except fully muted when I open it.
replies(2): >>41857359 #>>41857508 #
3. latexr ◴[] No.41857331[source]
That’s an unfair characterisation. It’s just restoring windows, some of which happen to be browser windows, which then load a website with auto-playing video or audio that (unsurprisingly) starts playing. No one is selling it as a feature to “play sound when waking up from sleep”. I bet that if you configured the browser to never auto-play, this wouldn’t happen.

To clarify, because commenters seem to be misunderstanding my point: I’m not defending the functionality, I think it’s wrong. My sole quarrel is with the characterisation that Apple is selling it as a feature, when they’re not. Let’s not ascribe wrong (or at best unknown) motivations to behaviours, as that makes is less likely they will be fixed.

replies(6): >>41857352 #>>41857366 #>>41857419 #>>41857476 #>>41857546 #>>41857559 #
4. bayindirh ◴[] No.41857349[source]
macOS sends a "pause" signal to all players when it sleeps, and any application which can handle that won't be playing any audio when the system wakes up. So if your audio continues the moment you open the lid, please file a bug report for that application.
replies(1): >>41857378 #
5. chx ◴[] No.41857352[source]
I do not think the user particularly cares whether it was an intentional feature or an unfortunate byproduct of features and bugs when they open a laptop in a classroom or a meeting and it starts blaring the music they listened to before closing it.
replies(1): >>41857488 #
6. bayindirh ◴[] No.41857359[source]
Your applications should catch the signal and pause. Safari, Apple Music and Spotify handle this well. Firefox needs a bugfix.
replies(1): >>41858429 #
7. ◴[] No.41857366[source]
8. Kbelicius ◴[] No.41857378[source]
GP wrote nothing about sleep.
replies(1): >>41857392 #
9. bayindirh ◴[] No.41857392{3}[source]
macOS sleeps the moment you close the lid, and wakes the moment you raise it a little. It's instantaneous, esp. ARM powered ones.
replies(2): >>41857409 #>>41858179 #
10. Kbelicius ◴[] No.41857409{4}[source]
Sorry, mistook which post you were replying to.
replies(1): >>41857479 #
11. eptcyka ◴[] No.41857419[source]
Does it matter if the end result is that the browser plays audio before you've authenticated your user session?
replies(1): >>41857637 #
12. ◴[] No.41857476[source]
13. bayindirh ◴[] No.41857479{5}[source]
Nah, no problems. Things happen. Have a nice day :)
14. Jerrrrrrry ◴[] No.41857488{3}[source]
Some areas of expertise require so much work, it nearly prevents the student from learning to appreciate the intent, the craft, itself.

It's like being literally unable to dog

Opening a laptop, even if the last activity was blaring obnoxious carnival music, should _allow_, not _demand_ the user to resume their last function - which was explicitly to _pause_ the laptop, by closing the lid.

If I close the lid, I am done with the computer and video; it is obvious that I am done right now - the OS/browser would be alerted of LidDown, and I would expect the OS to tell the browser to Pause (via some new javascript media API that I am sure exists), pagefile ram if possible/needed, and dump all console.logs to a temp directory, in case restarting from hibernation goes awry.

If I open the lid, I am attempting to use the computer. The previous quest can be pertinent or moot; but it would be oddly assumptive (against the ethos of general computing) to _automagically_ resume (especially a paused) playback just from first button press - at least give me the option to explore, format, or rename the thing.

replies(1): >>41857686 #
15. andrepd ◴[] No.41857508[source]
Configurability is also out of fashion nowadays, so you'll get that behaviour and enjoy it.
16. mgoetzke ◴[] No.41857546[source]
To clarify it restores windows AFTER a reboot, BEFORE i login.

What RIGHT does it have to create processes with a user BEFORE I authenticate to the machine ?

replies(1): >>41857609 #
17. dspillett ◴[] No.41857559[source]
No one is selling it as a feature, no, but I would still consider it an OS level bug, and a security one at that. Focusing on the browser is a step away from the point: if I'm not signed in, I don't want sound playing from any app⁰.

I've had Windows do something similar, a media player deciding to unpause when coming up from hibernate (this was before Windows seemingly broke hibernate) and for some reason being at full volume, and it was a fair few seconds before I was able to login, get to that app, and hit pause again. It didn't leak anything sensitive (Hey everyone, this guy watches Stargate!) but it made me “that guy we all hate” on the train… Again it is the app that is responsible for making the sound, but I think at that point the OS shouldn't let it.

<glasses tint="rose">I miss the times when laptops had physical volume sliders…</galsses>

To me this has the feeling of making a mountain out of a molehill, but I don't think there is any denying that the molehill itself exists and to others it might be more than the very minor irritation it could be to me.

> I bet that if you configured the browser to never auto-play, this wouldn’t happen.

I bet that no matter how tightly you try to control that, some advertiser will find a way to override it to make sound play, and sods law says that will happen when you most want your waking laptop to be quiet. Blocking audio while not signed in at the OS level is a safer gate.

----

[0] Actually, there is an exception there: if the machine has locked due to input inactivity, I want audio I'm listening to continue and notification pips to come through. There is a distinction between OS restarting (from [re]boot, wake, etc.) and local console not logged in due to input timeout, in how I'd prefer things to behave.

replies(1): >>41857639 #
18. latexr ◴[] No.41857609{3}[source]
Yes, I understand, I have encountered that as well and I agree it shouldn’t happen.

My only quarrel is with the other user implying Apple is selling this as a feature. I have my fair share of criticism of Apple and other tech companies, but let’s please not let blind hate take over and dilute arguments.

19. latexr ◴[] No.41857637{3}[source]
The characterisation matters, yes. Because when you ascribe wrong motivations out of perceived spite, it makes it less likely the people who can fix it want to do so.

I’m not defending the bug, I’m replying to the post below it.

20. latexr ◴[] No.41857639{3}[source]
> No one is selling it as a feature, no

That’s all I’m saying.

> but I would still consider it an OS level bug

I agree.

21. AstralStorm ◴[] No.41857686{4}[source]
You're asking the OSes to actually implement proper session management and centralized leak controls?

It has never happened before...

replies(1): >>41857882 #
22. Jerrrrrrry ◴[] No.41857882{5}[source]
The thread shouldn't pause with AudioContext frozen in an "active" status. The thread unpauses, the AudioContext resumes before the next frame (whever thatll be) comes to remember to pause it.

Windows 7 with Youtube can figure out - even with hibernation breaking audio/bluetooth on windows - then surely the most expensive company and OS 15 years later has made an inkling of progress (if that was ever their intention)

23. ta1243 ◴[] No.41858179{4}[source]
I've seen many situations where macos laptops with a closed lid continue to perform network tasks
replies(1): >>41858192 #
24. bayindirh ◴[] No.41858192{5}[source]
That's PowerNap. Depending on your settings, your Mac wakes up briefly to check e-mails, updates and sleeps again. Normally it happens only during charging, but you can enable on battery power or disable it completely.

Bluetooth and wireless radios stay on for a longer while because to keep everything connected if you are moving from room to room at home or at work, also it's made possible because all radios are higher end models with their independent processors.

replies(1): >>41879012 #
25. Faaak ◴[] No.41858429{3}[source]
Yet they still make a sound when powered on or resuming sleep (and curiously, when plugged into my usb-c monitor, keeps going to sleep and turning back on (with a nice sound) forever. No other laptop win or Linux does that)
replies(1): >>41858488 #
26. bayindirh ◴[] No.41858488{4}[source]
I actually tested my laptop before writing that comment. My laptop(s) make no sound even if I close the lid with playing audio (sans Firefox, as I said).

I didn't test sleep/wake consciously while I docked my laptops, but I don't remember they start making sounds when they should be silent. Maybe you're seeing PowerNap cycles, but mine is not doing any noise in PowerNap, either.

Need to test with leaving Firefox playing something and see what it does.

...all in all, interesting sentiments. I'm using these things for ~15 years at this point, and while they did funny things in the past, this was not one of them.

replies(1): >>41859821 #
27. Faaak ◴[] No.41859821{5}[source]
you're lucky :-)
28. 30714 ◴[] No.41862631[source]
``` #/bin/sh osascript -e 'set volume 0' ```

and SleepWatcher by bernard-baehr.de

29. legacynl ◴[] No.41879012{6}[source]
so basically you're retracting your previous statement that the notebook sleeps as soon as you close the lid? Because doing all that shit isn't sleeping, even if their marketing calls it a 'nap'
replies(1): >>41879138 #
30. bayindirh ◴[] No.41879138{7}[source]
No, PowerNap doesn't work like that.

When you close the lid, macOS directly sleeps, shutting down fans in ~10 seconds if you have them, reaching S3 (Suspend to RAM) state. Radios stay alive a little longer to keep any BT/Wireless connections to speed things up if you're just moving places, then they go dark as well.

If you enabled PowerNap on charging, your laptop will wake up briefly after some time (Every hour or so) after you plug it in, check mails if Apple Mail is open, check for any system updates, and sleep if there's none after fetching the mails (It'll download the updates if there are any, IIRC). If you have setup Time Machine, and the drive is available (locally or via network), PowerNap will wake the system and take a backup every 24 hours, making sure that your backups are always up to date.

Per factory settings, PowerNap on battery is off, so it'll sleep without any disturbance up to a month or so, and will hibernate when the battery is low.

So, yes, the laptop sleeps as soon as you close the lid. But wakes up periodically to make sure that everything is fetched and ready (if it's connected to power, by default).

BTW, There's an actual method called Power Nap involving short naps to recharge. It's not an Apple naming gimmick [0].

[0]: https://en.wikipedia.org/wiki/Power_nap