Skip to content

jaykobo/logi-wake-fix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note

Tested on: M1 MacBook Pro, macOS Tahoe (26.x), Logi Options+ 2.3.879545

logi-wake-fix

Automatically restarts the Logi Options+ background agent after macOS sleep/wake — silently, with no app window popping up.

Note: I created this script to solve a specific annoyance on my own machine. It is provided as-is, and I do not actively maintain it or provide support.

Problem

On Apple Silicon Macs, logioptionsplus_agent loses its device connection after sleep. Device settings (button mappings, DPI, etc.) stop working until you manually open Logi Options+.

Solution

Uses sleepwatcher to detect wake events and restart the agent via pkill. Since the agent is registered with launchd (com.logi.cp-dev-mgr, KeepAlive=true), launchd respawns it automatically and silently.

The agent is event-driven (IOKit HID notifications), so it doesn't need devices to be enumerated at startup — it picks them up as they announce themselves. This means we can kill and restart it immediately on wake with no fixed delay.

Files

File Purpose
logi-wake-restart.sh The wake script — kills the stale agent and polls until launchd restarts it
install.sh One-time setup (installs sleepwatcher, deploys script)
uninstall.sh Cleanly removes the fix

Requirements

  • macOS (Apple Silicon)
  • Homebrew
  • Logi Options+ installed

Install

chmod +x install.sh && ./install.sh

That's it. The fix survives reboots automatically.

Verify

After waking your Mac from sleep, check the log:

cat ~/Library/Logs/logi-wake-restart.log

Expected output:

[2026-05-26 01:07:01] (+0s) System woke — restarting logioptionsplus_agent...
[2026-05-26 01:07:01] (+0s) logioptionsplus_agent killed — waiting for launchd to restart it...
[2026-05-26 01:07:01] (+0s) logioptionsplus_agent is running again (polled for 0.4s). ✓
[2026-05-26 01:07:01] (+0s) Done.

The full restart typically completes in under 1 second.

Uninstall

chmod +x uninstall.sh && ./uninstall.sh

How it works

Sleep/Wake event
      │
      ▼
 sleepwatcher (~/.wakeup)
      │
      ▼
 logi-wake-restart.sh
      │  pkill logioptionsplus_agent  (immediate, no pre-wait)
      │  poll every 200ms until agent is confirmed running
      │  timeout with warning after 10s
      ▼
 launchd (com.logi.cp-dev-mgr)
      │  KeepAlive = true → auto-respawn
      ▼
 logioptionsplus_agent (running fresh, settings applied ✓)

About

Automatically restarts the Logi Options+ background agent after macOS sleep/wake

Resources

License

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages