Macro to Wake Up Dell External Monitor After Sleep?

I use 2 external displays on my work computer. My MacBook Pro (15-inch, 2018) connected with two USB-C devices connected:

  1. a Dell docking station: Dell WD15 Monitor Dock 4K with 130W Adapter, USB-C, (450-AFGM) that connects my Samsung external monitor, and it powers my Mac.
  2. Cable Matters USB-C Multiport Adapter with Ethernet that connects to my Dell external monitor, my Ethernet connection.

When my Mac wakes from sleep (while both hubs are connected), quite often my Dell monitor 2408WFP does NOT reconnect. Clicking the "Detect Displays" in System Preferences > Displays does not detect the Dell display, even though it is plugged in and turned on.

My frustrating workaround is to physically unplug the "Cable Matters USB-C Multiport Adapter with Ethernet" from the Mac. Wait about 5 seconds. Then I physically plug the "Cable Matters USB-C Multiport Adapter with Ethernet" back in to the Mac. At that point the Mac notices that the Dell display is available and it connects, as expected.

Does anyone know a good KM solution to wake the Dell display and automatically reconnect after waking from sleep?

As a possible solution, is there a macro that can:

  1. simulate "unplug" "Cable Matters USB-C Multiport Adapter with Ethernet" from the Mac,
  2. pause 10 seconds,
  3. simulate "plug-back-in" "Cable Matters USB-C Multiport Adapter with Ethernet" into the Mac

Here are some of the details of my 3 displays that could help in script triggering...
3 Displays:

  1. Mac's INTERNAL - Color LCD:
    Display Type: Built-In Retina LCD
    Resolution: 2880 x 1800 Retina
    Framebuffer Depth: 24-Bit Color (ARGB8888)
    Mirror: Off
    Online: Yes
    Rotation: Supported
    Automatically Adjust Brightness: No
  2. SAMSUNG - S32D850:
    Resolution: 2560 x 1440 (QHD/WQHD - Wide Quad High Definition)
    UI Looks like: 2560 x 1440 @ 60 Hz
    Framebuffer Depth: 30-Bit Color (ARGB2101010)
    Display Serial Number: HTHG900767
    Main Display: Yes
    Mirror: Off
    Online: Yes
    Rotation: Supported
    Automatically Adjust Brightness: No
    Connection Type: DVI or HDMI
    Adapter Firmware Version: 3.0a
  3. DELL 2408WFP:
    Resolution: 1920 x 1200 (WUXGA - Widescreen Ultra eXtended Graphics Array)
    UI Looks like: 1920 x 1200 @ 60 Hz
    Framebuffer Depth: 30-Bit Color (ARGB2101010)
    Display Serial Number: G283H94E114S
    Mirror: Off
    Online: Yes
    Rotation: Supported
    Adapter Type: Apple USB-C Digital AV Adapter
    Automatically Adjust Brightness: No
    Adapter Firmware Version: 2.34

Hi howardcrut,

I notice that you have this wake up issue with Dell monitor, I had a similar issue before.
On my Dell S2716DG monitor, there is feature called deep sleep which prevent my mac wake the monitor up. I turned it off in the setting menu then the monitor worked perfectly. Hope it helps.