Before the latest update to 15.5, I was able to fix this problem by running:
sudo rm /Library/Preferences/com.apple.windowserver.displays.plist
However, this doesn't work any more. With the help of ChatGPT I used the search described elsewhere in this thread :
sudo find / -name "*windowserver*" 2>/dev/null | tee ~/Desktop/windowserver_files.txt
The suggestion from the AI was to run:
sudo rm -f /Library/Preferences/com.apple.windowserver.displays.plist \
/System/Volumes/Data/Library/Preferences/com.apple.windowserver.displays.plist \
~/Library/Preferences/ByHost/com.apple.windowserver.displays*.plist \
~/Library/Containers/*/Data/Library/Preferences/ByHost/com.apple.windowserver.displays*.plist \
GPT: "Yes, it’s very likely macOS now references or prioritizes:
- /System/Volumes/Data/...
- User-scoped container directories (~/Library/Containers/...)
- Possibly multiple copies under specific ByHost UUIDs (try clearing all you find)."
Then shutdown:
sudo shutdown -r now
This worked for me. It looks like the displays.plist is now in a different location after the update, but I haven't bothered to work out exactly where yet. - This narrows it down a bit though. I hope this helps someone else, it's a really frustrating problem that has cost me a few days work over the last year.