juan.ca
← All projects

usbblock

Live

Hide chosen USB devices from macOS so no driver ever sees them

sudo usbblock 043e:9a4b
Private source
Kind
Command-line tool
Platforms
macOS
Stack
  • Swift
  • IOKit
Active
Oct 2026

Highlights

  • Drops the speakers and mic in LG UltraFine displays, keeping the camera and brightness controls
  • Audio-only mode for devices like the Elgato Cam Link 4K
  • Captures devices again after a replug, sleep or reboot
  • Runs as a launchd daemon

usbblock hides chosen USB devices from macOS, so they never reach CoreAudio or any other driver. I wrote it to drop the speakers and mic built into LG UltraFine displays while keeping the display, camera and brightness controls.

It captures each matching device the way VM apps do for USB passthrough, which detaches every macOS driver from that one device. Devices are matched by vendor and product ID and captured again whenever they reappear.

When audio shares a device with something worth keeping, like the mic in an Elgato Cam Link 4K, adding :audio to the ID claims only the USB Audio interfaces and the video keeps working. It runs as a launchd daemon; stop it and macOS gets the devices back.