2

I followed this answer and (after disabling SIP) ran

sudo defaults write /System/Library/LaunchAgents/com.apple.OSDUIHelper\
  Disabled -bool YES

But it doesn't seem to have done anything, I still get the brightness pop up when I use the brightness keys to change screen brightness.

I am in macOS Mojave 10.14.4.

1
  • Well - the defaults should be reflected when you read, so if it does nothing, that’s the issue. If the preference is set, and you restart the mac and you can read the preference, then we have an entirely different question to answer.
    – bmike
    Commented Apr 19, 2019 at 21:34

1 Answer 1

2

Two things could prevent the writing of the preference. If SIP isn’t verified to be disabled, that’s a blocker. Also, if you don’t see the preference set after a restart, there’s an issue with the defaults write command.

Is SIP disabled?

To be able to run that command you must first disable System Integrity Protection. That answer links to it here: Configuring System Integrity Protection.

If it's enabled you won't be able successfully run the defaults write ... command.

Example

$ csrutil status
System Integrity Protection status: enabled.

You'll get a failure message like this:

$ sudo defaults write /System/Library/LaunchAgents/com.apple.OSDUIHelper \
     Disabled -bool YES
2019-04-19 16:53:21.310 defaults[92957:2162882] Could not write domain /System/Library/LaunchAgents/com.apple.OSDUIHelper; exiting

To disable/enable SIP:

To enable or disable System Integrity Protection, you must boot to Recovery OS and run the csrutil(1) command from the Terminal.

  1. Boot to Recovery OS by restarting your machine and holding down the Command and R keys at startup.
  2. Launch Terminal from the Utilities menu.
  3. Enter the following command:

    $ csrutil enable
    

But I have SIP disabled

If you've confirmed that SIP is disabled then you could use opensnoop to debug what's going on to gain additional insight as to why your write command is failing.

For example, in one terminal run this command to snoop:

$ sudo opensnoop -ve |& less

And in another window try running your defaults write ... command:

$ sudo defaults write /System/Library/LaunchAgents/com.apple.OSDUIHelper  Disabled -bool YES
2019-04-19 17:23:53.712 defaults[94310:2174907] Could not write domain /System/Library/LaunchAgents/com.apple.OSDUIHelper; exiting
8
  • I did disable it
    – user150109
    Commented Apr 19, 2019 at 21:12
  • @theonlygusti - can you update your Q to reflect that? Also was there any associated error message or output when you ran it?
    – slm
    Commented Apr 19, 2019 at 21:14
  • no output when I run it
    – user150109
    Commented Apr 19, 2019 at 21:16
  • @theonlygusti see update, try debugging what's happening w/ opensnoop.
    – slm
    Commented Apr 19, 2019 at 21:28
  • 1
    It’s very educational and will help lots of people / get upvotes over time. Even if it’s wrong or doesn’t help OP, it’s helpful in the larger picture.
    – bmike
    Commented Apr 19, 2019 at 21:33

You must log in to answer this question.