• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Making the web work for you

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty
Affordable VAST/VPAID for Wordpress has arrived. Serve ads with your videos starting today!

How to efficiently track down mystery audio notifications in macOS/OS X

30 June 2022 / Alec Kinnear / Leave a Comment

Apple builds a nightmare notification castle by default. Everything wants to notify the user/visitor about everything. Very soon one becomes notification blind or just wants to toss a €2800 MacBook Pro out the window.

Apple recognised this issue fairly early and has been building lots and lots of tools to allow users to restrict notifications. There’s the notification centre where one can make about six decisions per application about what kind of notification is allowed.

Granular but way-overcomplicated.1

Then in Focus screen one can further customise what kind of notifications are allowed. I’ve set Focus to only allow notifications from Signal and RocketChat.

But don’t worry – there’s another set of hidden overrides which allow time-sensitive notifications, calls from Favourites (I turn off Messages so I’m safe) and Allow repeated calls. I don’t know if “Allow repeated calls” only applies to Messages or also to Signal and other messaging applications. Knowing Apple it applies to just its own Messages.

In principle, there’s a lot of ways to control and slow down notifications. Way too much busywork in my opinion. Steve Jobs would not have put up with it. This is anything but Zen and very Microsofty.2

Despite having most notifications locked down, I am occasionally confronted with an audio beep or gong which I can’t figure out. There’s all kinds of bad advice out there, including the incredibly shallow suggestion to “restart your computer”. The gong/beep/bing will come back again, just later.

Poring over the Notifications preference pane probably won’t help either. If we’re lucky something might show up in Notifications centre to clue us in. Often not.

Are we doomed to spend our life in notification hell? Not anymore.

lsof to the Rescue – Isolate Recently Played Sounds

There’s a quick way to track down to errant audio beeps/bings/gongs via terminal. These bings/beeps/gongs are all generated by files which are run by applications. The lsof command “List of Open Files” will let you find which sounds have opened lately which will point out which program is generating the annoying noises. Here’s what it looks like:

lsof | grep -E ".aif|.wav|.aiff"

What this means is look for all open files, filter for files with .aif, .wav and .aiff extensions. There’s no real need to treat .aif and .aiff separately as the former will find the latter but as both filetypes exist it’s cleaner in terms of housekeeping to include them explicitly. You can easily add additional filetypes to the search with a vertical pipe in the same pattern.

The capital E stands for Extended grep which is easier for mere mortals to write and read as advanced characters need not be escaped. I struggle with normal grep but grep -E makes sense to me.

lsof also helps to eject busy disks

This lsof command is also very useful to track down applications which are keeping files open and preventing safe disk ejection. In this case, you’ll be facing an error message like: “The volume can’t be ejected because it’s currently in use.” or “The disk “YourDisk” wasn’t ejected because one or more programs may be using it.”

Here’s the command for that.

sudo lsof /Volumes/MacintoshHD

MacintoshHD is for the name of your volume which you can’t eject. Running lsof on your boot drive is useless as your boot drive will potentially yield over 16355 open files (in my case right now). But for external disks it works fine.3

You should run lsof with sudo as otherwise you will miss files opened by root. The grep form of the command is sometimes recommended:

lsof | grep /Volumes/[name_of_drive]

While it works, the grep form is to be avoided as it takes about 20 to 30 seconds to run. lsof filters its own files just fine and does so instantly.

Once you have the name of the application keeping a file open, then you can:

  1. quit the application
  2. force quit the application in Activity Monitor
  3. use kill -pid where pid is the process ID from the lsof command above

There’s also the venerable What’s Openapp originally created in 2008 by Franklin Marmon of Ham Engineering and now resurrected by Thomas Templemann. What’s Open will show all the open files for a specific volume and allow the user to kill the program directly. This is one case where it’s probably worth knowing the command line versions as they are short and sweet and open a new world of power to an expert user.

Additional lsof security functionality

lsof can do additional magic in tracking down open ports including potential security risks from applications holding ports open but that’s beyond the scope of this article.


  1. I suspect the absurd over-notification migrated over to macOS from iOS. Phone junkies seem to like endless notifications. The end of concentration. How is it possible to write 2000+ word articles with notifications popping off in the background non-stop? This article was largely written to help me keep track of all the steps to get rid of audio notifications. It was only supposed to take half an hour, but once one starts to put a procedure in writing, getting the details right can take hours. That’s the difference between worthwhile and throwaway content, the mistakes in which often causes more harm than good. ↩

  2. Sorry Steve, Tim “Pocket Pencil Holder” Cook has taken Apple in a very Microsoft direction, acceding to enterprise granularity requests. Cook has met your economic goals for Apple but lost its essence. ↩

  3. If you are having difficulty with the named disk, you can get the mount ID of the disk instead. First get the disk ID for the locked volume with df which will be a string like /dev/disk1s3. Then run: sudo lsof /dev/disk1s3. ↩

Alec Kinnear

Alec Kinnear

Alec has been helping businesses succeed online since 2000. Alec is an SEM expert with a background in advertising, as a former Head of Television for Grey Moscow and Senior Television Producer for Bates, Saatchi and Saatchi Russia.

Categories: IT Tags: apple, ios, macos, notifications

Related Posts

  1. macOS support for HEIC

  2. Working Efficiently in Windows: 5 Basic Shortcuts Most People Don’t Know

  3. How to solve the comment notifications spam issues

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You can click here to Subscribe without commenting

Primary Sidebar

My Account

  • My Licenses
  • My Profile
  • Invoices
  • Affiliate Area
  • Log Out

Categories

  • Business
  • Camera Reviews
  • Case Studies
  • Design
  • Flowplayer
  • Internet Marketing
  • IT
  • Life
  • SEO
  • Slovak
  • Video of the Week
  • WordPress
Foliovision logo
All materials © 2023 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
  • This Site Uses Cookies
  • Privacy Policy
  • Terms of Service
  • Site Map
  • Contact
  • Tel. ‭+421 2/5292 0086‬

We are using cookies to give you the best experience on our website.

You can find out more about which cookies we are using or switch them off in settings.

Powered by  GDPR Cookie Compliance
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Necessary Cookies

Strictly Necessary Cookie allow you to log in and download your software or post to forums.

We use the WordPress login cookie and the session cookie.

If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

Support Cookies

Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.

We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.

Please enable Strictly Necessary Cookies first so that we can save your preferences!

3rd Party Cookies

This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.

Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.

Please enable Strictly Necessary Cookies first so that we can save your preferences!