Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chucker23n1

macrumors G3
Original poster
Dec 7, 2014
9,228
12,301
I have a two-display setup, where one is connected directly and another via USB, using DisplayLink. This is on Big Sur 11.1.

DisplayLink (nowadays) works using the 'Screen Recording' permission. That's a bit of a hack, but fine in practice, except for one little thing: when unlocking the computer, two things happen, due to the Screen Recording permission:

  • Apple Watch Unlock gets disabled.
  • There's a "Your screen is being observed." message in the unlock screen.
The thing is, I don't really need this: I'm fine with simply having the DisplayLink-attached screen disabled while the computer is locked. Just unlock the other display only. That way, Apple Watch Unlock would work again, and I'd also save on some needlessly wasted CPU cycles.

So, any hack to make that happen? Perhaps I can run an AppleScript just before locking the screen that quits DisplayLink, and relaunches it again just after unlocking?
 
I tried solving this with sleepwatcher, but I can't get it to work, apparently for permission reasons. I installed it via HomeBrew (`brew install sleepwatcher`), and created a set of `.sleep` and `.wakeup` scripts. When I start the service like `launchctl load -w /usr/local/Cellar/sleepwatcher/2.2.1/de.bernhard-baehr.sleepwatcher-20compatibility-localuser.plist`, the OS prompts me to allow "Input Monitoring" for sleepwatcher. Indeed, this shows up in the Privacy tab.

Despite that, whenever locking or unlocking, I get this in Console:

IOHIDLibUserClient:0x10000091c sleepwatcher is not entitled for IOHIDLibUserClient keyboard access

Which looks suspiciously like 1) sleepwatcher is trying to run the scripts, but 2) the Input Monitoring permission doesn't work. (I wish sleepwatcher had more useful logging here?)

Has anyone gotten sleepwatcher to work on Big Sur?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.