15

Since upgrading to OS X Catalina, I started getting disk full notifications. After some looking, I discovered the cause is ~400 MB files in /private/var/tmp like this:

WiFiDiagnostics_2019-10-23_12.58.55.713_Mac OS X_MacBookPro15,4_19A602.tgz

Option-clicking on the wifi icon in the menu bar shows "Enable Wi-Fi Logging" (indicating it's disabled; if it's enabled, it shows "Disable…").

My findings so far:

  • It seems to happen more frequently on certain wifi networks than others.
  • It seems to happen more when Wireguard is running, and more when Wireguard is in use for a VPN. (It still happens with Wireguard quit, but not as much, it seems.)
  • At one point, it was creating a new file (~400mb) every 5 minutes.
  • I've tried enabling and disabling wifi logging, without luck.

I haven't been able to find anything on google. How do I stop the auto-generation of diagnostic logs?

Update: I've updated to 10.15.1, and also did an OS reinstall (not full disk wipe), and am still getting the log files appearing.

Update 2, Resolution? Short version: Somehow the command+option+control+shift+w key combo is triggering this.

Longer version: I did a full disk wipe and reinstall, then kept an eye on when this issue reappeared and installed my normal apps slowly. This file reappeared once I installed Karabiner to make my caps-lock key map to command+control+option+shift, which I use with Alfred App to make application keyboard shortcuts.

One of the shortcuts I made was command+control+option+shift+w to open iTerm. I'd noticed before that hitting this key combination made the screen flash white, but I couldn't find any information (at all, anywhere) nor any existing keyboard shortcuts indicating what that key combination would do. But sure enough, 5 minutes later, I had the log file show up.

My belief at this point is that that particular keyboard shortcut, command+option+control+shift+w, triggers something in OS X (possibly Catalina only; I don't have an older OS to test against) that starts the wifi logging.

I'm super interested to know how/why/where shift+control+option+command+w is actually being mapped. I've tried figuring out the com.apple.symbolichotkeys.plist file but without luck. I also tried that key combo on another Catalina install and it doesn't seem to do the same thing, so perhaps there's another app I have installed that configured that keyboard shortcut. But at this point I don't have the time to re-wipe the computer and set it up again to track it down.

9
  • 1
    It may look disabled in the UI, but if it isn't really disabled, as you have found, try Enabling it, wait a minute, then Disable it. I've found, sometimes, that by forcing a setting, I call it 'retoggling', macOS sometimes re-writes a settings .plist file that may have gone wonky.
    – IconDaemon
    Oct 23, 2019 at 22:31
  • @IconDaemon No luck, unfortunately. VPN seems to exacerbate it, but it might just be because I'm on the VPN most of the time.
    – brett_f
    Oct 24, 2019 at 20:21
  • I've removed the VPN and profile configs, turned wifi off and on, rebooted, and I'm still getting logs ever ~5 minutes. Fills up my drive in about a day. Nothing I do seems to have any impact.
    – brett_f
    Oct 29, 2019 at 17:31
  • Command-Option-Shift-Control-Period (.) is indicated by this question apple.stackexchange.com/questions/59917/…
    – anki
    Nov 25, 2019 at 19:47
  • 1
    @sunapi386 I added a rule in Karabiner to make hyper+w (and hyper+>) map to "escape", because I kept hitting it out of habit or accidentally. Worth tweaking Karabiner just to make sure, if you're using the hyper key.
    – brett_f
    May 18, 2020 at 6:13

3 Answers 3

8

(Answering my own question, since others seem to be having this issue as well.)

The "hyper+w" (command+option+control+shift+w) key combo is triggering the the wifi logging. Note that "hyper+>" also seems to trigger this. I haven't been able to figure out why it's happening, but that's the culprit.

I've used Karabiner Elements to disable those keyboard shortcuts entirely, to prevent accidentally triggering this wifi logging. Here's the relevant section from the karabiner.json file to make those key combos trigger an escape instead of the wifi logging. To add these rules, go to the "Misc" tab, and do the export/import "Open config folder", then edit the karabiner.json to include the following two rules.

"rules": [
    {
        "description": "Disabling command+control+option+shift+w. This triggers wifi logging.",
        "manipulators": [
            {
                "from": {
                    "key_code": "w",
                    "modifiers": {
                        "mandatory": [
                            "command",
                            "control",
                            "option",
                            "shift"
                        ]
                    }
                },
                "to": [
                    {
                        "key_code": "escape"
                    }
                ],
                "type": "basic"
            }
        ]
    },
    {
        "description": "Disabling command+control+option+shift+>. This triggers wifi logging also.",
        "manipulators": [
            {
                "from": {
                    "key_code": ">",
                    "modifiers": {
                        "mandatory": [
                            "command",
                            "control",
                            "option",
                            "shift"
                        ]
                    }
                },
                "to": [
                    {
                        "key_code": "escape"
                    }
                ],
                "type": "basic"
            }
        ]
    },
    {
        "description": "Change caps_lock key to command+control+option+shift. (Post escape key when pressed alone)",
        "manipulators": [
            {
                "from": {
                    "key_code": "caps_lock",
                    "modifiers": {
                        "optional": [
                            "any"
                        ]
                    }
                },
                "to": [
                    {
                        "key_code": "left_shift",
                        "modifiers": [
                            "left_command",
                            "left_control",
                            "left_option"
                        ]
                    }
                ],
                "to_if_alone": [
                    {
                        "key_code": "escape"
                    }
                ],
                "type": "basic"
            }
        ]
    }
]
4
  • 2
    Beautiful, that did it. No more screen flash + wifi logging when accidentally hitting hyper+w. Thanks a million!
    – Freewalker
    Jun 12, 2020 at 12:48
  • 1
    Thanks, though this is a rather unfortunate workaround of just not using these keys. I've had hyper+w a shortcut for WhatsApp for years. I'm reluctant to give up 1/26th of the letters available, so have opted for a cronjob to clear the diagnostics files every 5 minutes. Also suboptimal.
    – kyranjamie
    Aug 24, 2020 at 12:14
  • 1
    Thank you, been searching for this for a long time!
    – Selrond
    Nov 25, 2020 at 15:33
  • I know that "Me Too!" comments/answers are discouraged, but dang. I feel VERY grateful right now for the time you spent figuring this out. Thank you! Dec 21, 2020 at 15:36
1

If you don't want to lose the hyper+w shortcut, you can use Karabiner Elements to remap it to an unused key. In this example I map it to F13 in karabiner.json:

{
  "manipulators": [
    {
      "description": "Change hyper+w to F13 (to avoid system binding of hyper-w which creates 500mb wifi diagnostics file in /var/tmp)",
      "from": {
        "key_code": "w",
        "modifiers": {
          "mandatory": [
            "left_shift",
            "left_option",
            "left_control",
            "left_command"
          ]
        }
      },
      "to": [
        {
          "key_code": "f13"
        }
      ],
      "type": "basic"
    }
  ]
},

I intercept F13 in Hammerspoon (~/.hammerspoon/init.lua) to open my web browser:

hs.hotkey.bind({}, "f13", function()
  window = hs.window.find("Vivaldi")
  if window then
    window:raise()
    window:focus()
  end
end)

(Many thanks to brett_f for figuring this out - this was driving me mad! I couldn't figure out how those Wifi diagnostic files were being created!

I don't have enough reputation to comment on his answer, so I'm posting my answer as a slight variation)

1

This Karabiner-Elements complex modification will enable brett_f's solution for both Meta-W and Meta->.

Edit: I've now published a fix for this to the official repository of KarabinerElements complex_modification rules. It's called Disable WifiDiagnostics shortcuts (Free up Hyper-W) and it uses Michael Graham's solution to remap the keyboard shortcut command+control+option+shift+, to f13 so it can still be used by other applications (I detect it in Alfred).

You must log in to answer this question.

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