My Macbook Air 13" (macOS 10.13.6) has a USB problem which triggers a warning notification every five minutes:

USB Accessories Disabled

Looking in the Console, I see lots of "overcurrent detected" warnings; testing the two USB ports shows that the left one seems dead while the right one works. Visually, the left port is fine; no schmutz that might be causing problems.

Clearly I'm going to have to replace the left USB port (actually the I/O board), but in the meantime is there any way to disable this specific notification? (I really don't need both USB ports; if I could stop the messages I would probably skip fixing the hardware.)

Edit: I wasn't clear: these messages appear even when nothing is plugged into either USB port.

  • 2
    A message like that is considered important by apple and I don't think you can disable system messages like that without disabling the hardware that triggers the message. Jul 21 '19 at 19:39
  • 1
    Hey Daniel! Was there no device connected to either of the USB ports? Also can you check in activity monitor for usbd ?
    – anki
    Jul 22 '19 at 7:45
  • @ankiiiiiii Nope: nothing plugged in. And, I'll check for usbd. Jul 22 '19 at 11:10
  • Hey @DanielGriscom, I think that your question is a possible duplicate of How do I disable this message: "the disk was not ejected properly"? If the answer below(which comes from the same question) answers your query, then it is confirmed. If it doesn't, you might need to differentiate between the two.
    – anki
    Jul 23 '19 at 15:43
  • @ankiiiiiii Unfortunately, the solution proposed disables all notifications, which is a bit heavy-handed. I need to try the proposed answer... Jul 23 '19 at 16:50

Have you tried...

This applescript will close them for you. Paste it into Script Editor and then Save as an application. Then grant access to that application in (System Preferences > Security & Privacy > Accessibility) Then you can use an application like ControlPlane https://www.controlplaneapp.com/ to run the application on wake thus closing them all automatically! ** Note: You will need to grant Accessibility access to ControlPlane as well.

tell application "System Events"
tell process "NotificationCenter"
    set numwins to (count windows)
    repeat with i from numwins to 1 by -1
        tell window i
            set temp to value of static text 1
        end tell
        if temp contains "USB Accessories Disabled" then
            click button "Close" of window i
        end if
    end repeat
end tell
end tell

From How do I disable this message: "the disk was not ejected properly"?

This will need some tweaking to close the window you are looking for maybe a cron job or something similar but it might be a step in the right direction.

  • 1
    Obviously the OP will need to amend the code to change the string it's looking for to determine whether or not to close the window. Perhaps replacing Disk Not Ejected Properly with USB Accessories Disabled.
    – Monomeeth
    Jul 22 '19 at 6:39
  • Thanks for the answer; I'll check whether it works soon. (And boy! do I hate AppleScript... it's right down there with Perl, although for very different reasons...) Jul 22 '19 at 12:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .