Skip to content

Instantly share code, notes, and snippets.

@everyplace
Last active February 6, 2026 20:27
Show Gist options
  • Select an option

  • Save everyplace/70e215933453d56926763c89c174080e to your computer and use it in GitHub Desktop.

Select an option

Save everyplace/70e215933453d56926763c89c174080e to your computer and use it in GitHub Desktop.
A method for programmatically restarting a wacom tablet each time a computer is unlocked
<!-- Copyright 2026 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.wacomwatcher</string>
<key>ProgramArguments</key>
<array>
<string>~/bin/wacom_watcher.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>~/Library/Logs/wacom_watcher.log</string>
<key>StandardErrorPath</key>
<string>~/Library/Logs/wacom_watcher_err.log</string>
</dict>
</plist>
# Copyright 2026 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash
# restart_wacom.sh - Restarts Wacom driver services on macOS
echo "Restarting Wacom services..."
# Get current user ID
UID_VAR=$(id -u)
# Kickstart services (terminates and restarts them)
launchctl kickstart -k gui/"$UID_VAR"/com.wacom.wacomtablet 2>/dev/null
launchctl kickstart -k gui/"$UID_VAR"/com.wacom.DataStoreMgr 2>/dev/null
launchctl kickstart -k gui/"$UID_VAR"/Wacom_IOManager 2>/dev/null
echo "Services signaled. Checking status..."
sleep 2
ps aux | grep -i Wacom | grep -v grep
echo "Wacom drivers should now be restarted."
Copyright 2026 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. 

Wacom Auto-Restarter for macOS

This toolset automatically restarts Wacom tablet drivers whenever your macOS system is unlocked. It solves the common "waiting for synchronization" hang-up by refreshing the services in the background.

Components

  • restart_wacom.sh: The core script that kills and restarts the Wacom tablet and data services.
  • wacom_watcher.sh: A background listener that monitors system logs for unlock events.
  • com.wacomwatcher.plist: A macOS LaunchAgent configuration to keep the watcher running.

Installation

  1. Set absolute paths: Open wacom_watcher.sh and com.wacomwatcher.plist and ensure the file paths point to your actual home directory (currently set to /Users/...).

  2. Install the LaunchAgent:

    cp com.wacomwatcher.plist ~/Library/LaunchAgents/
    launchctl load ~/Library/LaunchAgents/com.wacomwatcher.plist
  3. Manual Restart: You can still run the driver restart manually at any time:

    ./restart_wacom.sh
# Copyright 2026 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash
# wacom_watcher.sh - Watches for system unlock events and restarts Wacom drivers
RESTART_SCRIPT="$HOME/bin/restart_wacom.sh"
echo "Wacom watcher started. Waiting for unlock events..."
# Stream the system log and look for the screen unlocked notification
log stream --predicate 'subsystem == "com.apple.loginwindow.logging" AND eventMessage CONTAINS "com.apple.screenIsUnlocked"' | while read line
do
echo "Unlock detected: $line"
# Run the restart script in the background
bash "$RESTART_SCRIPT" &
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment