Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: changing brightness via BetterDisplay causes Hammerspoon to get stuck #2615

Closed
schlomo opened this issue Feb 5, 2024 · 1 comment
Closed

Comments

@schlomo
Copy link

schlomo commented Feb 5, 2024

Hi, I'm using

  • BetterDisplay Pro (paid) Version 2.2.1 Build 26344 to change the brightness on my Macbook display and to manage external displays.
  • Hammerspoon Version 0.9.100 (6815) with this config.

Since switching to a new M3 Mac on Sonoma 14.3 I noticed that Hammerspoon gets stuck (rotating colour ball) when I use BetterDisplay to change the screen settings or brightness. On my old Mac with essentially the same Hammerspoon configuration I didn't have this problem, ever.

I'm writing here because the problem disappears when I quit BetterDisplay and use the native Mac tools to configure my displays. This makes me think that maybe BetterDisplay is somehow triggering the problem, even if it is not causing it.

It seems like BetterDisplay makes Hammerspoon see a large amount of screen changes. I'm using hs.screen.allScreens() to watch for screen changes and dump that in my Hammerspoon console and see there hundreds (or thousands) of screen change notifications, even though only the brightness changes:

2024-02-05 09:49:24: allScreens = {
   [1] = "hs.screen: Built-in Retina Display (0x600003c297f8)";
   [2] = "hs.screen: LG Ultra HD (0x600003c2ab38)";
};

2024-02-05 09:49:24: allScreens = {
   [1] = "hs.screen: Built-in Retina Display (0x600003cd55b8)";
   [2] = "hs.screen: LG Ultra HD (0x600003cd55f8)";
};

2024-02-05 09:49:24: allScreens = {
   [1] = "hs.screen: Built-in Retina Display (0x600003cd5678)";
   [2] = "hs.screen: LG Ultra HD (0x600003cd56b8)";
};

2024-02-05 09:49:24: allScreens = {
   [1] = "hs.screen: Built-in Retina Display (0x600003c05a78)";
   [2] = "hs.screen: LG Ultra HD (0x600003c06578)";
};

The hex code behind the screen name is changing.

Any idea what could be the cause here? Any idea how to debug this problem? Any help would be much appreciated!

Hammerspoon/hammerspoon#3597 cross-posting at Hammerspoon

@waydabber
Copy link
Owner

Interesting. Did you try reporting this to Hammerspoon? I am using Hammerspoon as well (I am using a script to control the volume of my external AV with native keys:

https://gist.github.com/waydabber/3241fc146cef65131a42ce30e4b6eab7

I am experiencing no problem - using this script with BD on two different setup (an M1 mini and an M2 Studio, both with different Yamaha receivers). But I don't watch for screen changes.

Not sure what screen changes are being captured by hs.screen.allScreens() but if it's color table changes for example, then for sure, BetterDisplay will generate huge amounts of changes when changing brightness especially due to smoothing.

Are you using brightness upscaling?

Repository owner locked and limited conversation to collaborators Feb 5, 2024
@waydabber waydabber converted this issue into discussion #2616 Feb 5, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants