BetterDisplay
BetterDisplay copied to clipboard
Dummy mirroring method for HiDPI scaling (native smooth scaling not affected) - Switching spaces do not work on some configurations.
APPLE FEEDBACK CAMPAIGN: Follow these instructions to report this issue to Apple!
Issue description
Swiping (two or three finger gestures using the Magic Mouse or Trackpad) or keyboard shortcuts to switch spaces do not work on extended (secondary) mirror sets.
Root cause
Due to a bug present in the current macOS versions, swiping or keyboard shortcuts to switch spaces do not work on extended (secondary) mirror sets. The issue does not affect main mirror sets.
Resolution
This is a general macOS issue which can be reproduced with other mirroring configurations. The issue has been reported to Apple, we hope for a fix. You can speed up the process by reporting the issue yourself as well to Apple via the Feedback Assistant so the fix gets a higher priority.
Until a fix, you should set the mirror set as "main" for the display you most likely to use spaces.
Any template for reporting this bug to Apple via Feedback Assistant? This issue is very frustrating.
Hi @nidr0x - Great idea! I was planning to launch a coordinated FBA error reporting campaign both for this and the sleep issue - wanted to include a reference to it in the next BetterDummy update changelog as many users will probably read that. But indeed I should provide a bug report template and some instructions until then. I am not sure how the AI behind the Assistant works - is it more beneficial to recommend keywords/key phrases and let everybody write his/her own report or just create a fixed template (won't the system classify it as a spam?). We did something like this with MonitorControl (to complain about the then lack of DDC control for M1 Macs) and Apple wasn't moved by that at all. :)
Thanks, @waydabber! I will write my own issue. I hope Apple will fix this soon.
Hey all,
here are some instruction on how to report this to Apple so the bug's priority gets bumped. You can use the macOS app Feedback Assistant
(may not be installed) or the following form:
https://www.apple.com/feedback/macos.html
You can choose whatever bug category or feedback type makes sense to you both in the Feedback Assistant
or the feedback website. Apple's system seems to correlate similar issues based on keywords - making the reports a bit varying may actually help get the required visibility and bump in priority. It is advisable to slightly alter the text so Apple's reporting AI do not consider it a spam.
Here is a sample text for reporting the issue. Important keywords are marked with bold., you should not alter those. Please, do not mention BetterDummy in the bug report (that might automatically categorize the issue as a 3rd party problem which will not be fixed) - appeal to the fact that the bug is reproducible solely using Apple hardware and software only (when using Sidecar and AirPlay mirroring).
Mouse and trackpad swipe gestures do not work when switching spaces on an AirPlay or Sidecar external mirror.
Steps to reproduce:
- Have a MacBook with a built-in and an external display connected.
- Connect Sidecar (or AirPlay) as a third display.
- Mirror the Sidecar to the external display.
- Built-in display should be "Main display" (with the menu bar).
- In "Display Settings" the mirror's "Optimize for:" setting must be set to Sidecar.
- Create a new space on the Sidecar display.
- While the mouse pointer is on the AirPlay or Sidecar display, attempt to switch spaces via swipe or the keyboard shortcuts.
Result: spaces do not switch on the AirPlay or Sidecar display (if the built-in display has spaces, it will switch instead).
The problem is a rather convoluted one so Apple might not bother fixing it but if enough of us report it, things might change. :)
Here is a sample screenshot - this is how your feedback might look like if you use Feedback Assistant:

Please give a 👍 to this post if you did post a report so we may know how many reports we have. Thank you! :)
Too much symbols. They have a 800 symbols restriction in feedback form.
Too much symbols. They have a 800 symbols restriction in feedback form.
I've sent the report just now and have no issues with comment length. Be sure that you sending report with text between the lines.
Hi, I shortened the text so it is now less than 800 characters now.
Can we get a shortcut key to turn BetterDummy ON or OFF, turn it off to switch space then turn it on.
Yes, I plan to add keyboard shortcut support #11. However, turning BetterDummy off will remove the virtual screen as well and cause desktops/spaces to be rearranged among displays, so I don't think it's a good solution. BetterDummy is not doing actively doing anything that prevents switching spaces on extended mirror sets, it is just a general macOS bug.
A solution might be to add custom keyboard shortcuts to switch spaces on extended mirror sets when the mouse is located on such a screen (I am not aware of an official API that can help us work with spaces, but there might be some private APIs or workarounds to do this).
It seems
-
If I first set the dummy as the main display and then mirror my external display to dummy, switching spaces works on both displays. (Is this what you mean by "main mirror sets"?)
-
If I mirror first and then move the bar, this exact issue shows up.
I am finding that following @tautomer 's suggestion I can indeed get spaces switching to work, BUT at the cost of some weird sleep issues (related to #143 I think?). Every time my computer wakes from sleep all of my windows get rearranged, usually putting all spaces onto the external monitor. This completely breaks my workflow, to the extent that I prefer to use my old Intel Macbook.
Hope apple will fix this soon...
I am finding that following @tautomer 's suggestion I can indeed get spaces switching to work, BUT at the cost of some weird sleep issues (related to #143 I think?). Every time my computer wakes from sleep all of my windows get rearranged, usually putting all spaces onto the external monitor. This completely breaks my workflow, to the extent that I prefer to use my old Intel Macbook.
Hope apple will fix this soon...
That's really weird. For me, the arrangement not only survives sleep/week cycles, also works for multiple dummies (I connect/disconnect different dummies at home and work).
Could it be that I completely started from scratch (create new dummy, arrange displays, and organize my spaces)?
If you have this issue and are using the app only to mirror a dummy screen to a real display on Apple Silicon in order to have flexible HiDPI resolutions, please check out the latest beta which includes a new smooth scaling feature for native displays (no dummy required).
The feature requires macOS Monterey 12.4, 12.5 beta or Ventura and requires a Pro license.
Thank you!
I may be on to a solution with using ~/Library/Preferences/com.apple.spaces.plist
I have some partially functioning code. I will post my workaround code here when it is ready. Maybe it could be implemented into BetterDisplay as an override to the Ctrl+Right and Ctrl+Left key combination.
I got it working by using:
- yabai my tiling window manager. But can be used without tiling at all
- better touchtool which helps to bind / customize various entries (keyboard, trackpad, touchbar...)
Yabai commands to swap spaces:
/opt/homebrew/bin/yabai -m space --focus next
/opt/homebrew/bin/yabai -m space --focus prev
Note that I have a M1 mac and absolute path may be different for x86 arch (/usr/local/bin).
Bettertouchtool configuration:
Note that you can also use a 3 finger gesture if you prefer
An upgrade of my previous answer to allow cyclic changes inside the same display:
CURRENT_SPACE=$(/opt/homebrew/bin/yabai -m query --spaces --space | /opt/homebrew/bin/jq .index)
echo "CURRENT_SPACE: $CURRENT_SPACE"
CURRENT_SPACE_INDEX=$(/opt/homebrew/bin/yabai -m query --displays --display | /opt/homebrew/bin/jq ".spaces | to_entries | map(select(.value==$CURRENT_SPACE)) | first | .key")
echo "CURRENT_SPACE_INDEX: $CURRENT_SPACE_INDEX"
TOTAL_SPACES=$(/opt/homebrew/bin/yabai -m query --displays --display |/opt/homebrew/bin/jq '.spaces | length' )
echo "TOTAL_SPACES: $TOTAL_SPACES"
PREVIOUS_SPACE=$(/opt/homebrew/bin/yabai -m query --displays --display | /opt/homebrew/bin/jq ".spaces[$(($CURRENT_SPACE_INDEX - 1))]")
echo "PREVIOUS_SPACE: $PREVIOUS_SPACE"
NEXT_SPACE=$(/opt/homebrew/bin/yabai -m query --displays --display | /opt/homebrew/bin/jq ".spaces[$(($(($CURRENT_SPACE_INDEX + 1)) % $TOTAL_SPACES))]")
echo "NEXT_SPACE: $NEXT_SPACE"