M1 mac mini display keeps losing scaling

I just got an M1 Mac mini, and it's great! Except for one annoying problem so far: whenever my Mac comes back from sleep, my display scaling is messed up.


I have two monitors connected to it, a 4K HDR by LG and a 1080p by HP. The 4K monitor is set to be scaled to be "like 2560x1440," and that one will occasionally reset to be "like 1920x1080." When this happens, if I go back to the Displays system preference page, it'll be set back to "default for display." If I set it to "scaled" again, it won't actually update the scaling unless I set it to a different size (like 3840x2160) and go back to 2560x1440.


Has anyone else experienced this issue, and is there any way to fix it so that my display settings stop getting messed up every time my machine wakes from sleep?


Mac mini, macOS 11.1

Posted on Jan 7, 2021 12:44 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 4, 2021 7:19 PM

Figured out a workaround to restore display scaling for my Mac mini M1 and LG HDR 4K display, using Hammerspoon (watch for display wake) and displayplacer (set resolution). Works for Big Sur 11.2 - hopefully won't need it in future updates.


The quirky thing is that for it to work properly, I have displayplacer set to a smaller resolution first, and then the desired resolution immediately after. It switches so fast you don't even see the smaller res. Here's sample code for Hammerspoon.


function displayWatch(eventType)
	if (eventType == hs.caffeinate.watcher.screensDidWake) then
		hs.execute("/opt/homebrew/bin/displayplacer 'id:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX res:2560x1440 hz:60 color_depth:8 scaling:on origin:(0,0) degree:0'")
		hs.execute("/opt/homebrew/bin/displayplacer 'id:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX res:3008x1692 hz:60 color_depth:8 scaling:on origin:(0,0) degree:0'")
	end
end

displayWatcher = hs.caffeinate.watcher.new(displayWatch)
displayWatcher:start()

Similar questions

46 replies
Question marked as Top-ranking reply

Feb 4, 2021 7:19 PM in response to fluffy

Figured out a workaround to restore display scaling for my Mac mini M1 and LG HDR 4K display, using Hammerspoon (watch for display wake) and displayplacer (set resolution). Works for Big Sur 11.2 - hopefully won't need it in future updates.


The quirky thing is that for it to work properly, I have displayplacer set to a smaller resolution first, and then the desired resolution immediately after. It switches so fast you don't even see the smaller res. Here's sample code for Hammerspoon.


function displayWatch(eventType)
	if (eventType == hs.caffeinate.watcher.screensDidWake) then
		hs.execute("/opt/homebrew/bin/displayplacer 'id:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX res:2560x1440 hz:60 color_depth:8 scaling:on origin:(0,0) degree:0'")
		hs.execute("/opt/homebrew/bin/displayplacer 'id:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX res:3008x1692 hz:60 color_depth:8 scaling:on origin:(0,0) degree:0'")
	end
end

displayWatcher = hs.caffeinate.watcher.new(displayWatch)
displayWatcher:start()

Feb 18, 2021 10:54 AM in response to fluffy

I have this issue if i use my caldigit dock with my M1 mac Mini.


I have 2 Benq Monitors, 1 4k connected via display port via the caldigit dock, the other a 1080p connected via hdmi.

when coming back from sleep the content of both monitors would show on the 4k screen with a black bar at the bottom and the 1080p screen would also display as expected while it's displayed on the 4k monitor if that makes sense.

To fix it i either, power off the 4k monitor or change the scaling down to 1080p and back again.


i've since located the usb3 cable for the monitor and connected that directly to the thunderbolt port on the mac and i've not had the issue since.

So if you can connect that way give it a go.


Stu

Mar 24, 2021 5:08 PM in response to nb1204

After starting up Hammerspoon you shoul dget a little hammer icon in your menu. Click on that and select "open config," then copy-paste the code into it. Then you'll need to open up Terminal and type "displayplacer list" and that'll give you the ID to put into the Hammerspoon configuration. For example, when I type "displayplacer list" it tells me (on the very last line)


displayplacer "id:98AD201D-167F-2937-3D19-FC1626C9B248 res:2560x1440 hz:60 color_depth:7 scaling:on origin:(0,0) degree:0" "id:1D8AB08D-7B12-48C9-0857-D6964E3302DB res:1920x1080 hz:60 color_depth:8 scaling:off origin:(2560,-60) degree:0"


so my screen ID is id:98AD201D-167F-2937-3D19-FC1626C9B248, so my resulting Hammerspoon config says:


displayWatcher = hs.caffeinate.watcher.new(function (eventType)
    for k,v in pairs(hs.caffeinate.watcher) do
        if eventType == v then
            print("Got display event: " .. k)
            break
        end
    end

    -- https://discussions.apple.com/thread/252282046?answerId=254547027022#254547027022
    if (eventType == hs.caffeinate.watcher.screensDidWake) then
        print("Refreshing screen resolution")
        hs.execute("/opt/homebrew/bin/displayplacer 'id:98AD201D-167F-2937-3D19-FC1626C9B248 res:3840x2160'")
        hs.execute("/opt/homebrew/bin/displayplacer 'id:98AD201D-167F-2937-3D19-FC1626C9B248 res:2560x1440'")
    end
end)
displayWatcher:start()

You can also make sure that displayplacer is working by selecting "console" from the hammerspoon menu and watch the log entries happen.

Feb 3, 2021 8:02 PM in response to fluffy

I use a Mac mini M1 with LG HDR 4K via USB-C, and lose scaling whenever the display goes to sleep. I use displayplacer (see link below) to restore the correct scaling quickly. In my case, I made an Automator application that runs the shell script. Can also run the shell script or terminal command directly from BetterTouchTool assigned to a keyboard shortcut. Works fine with Big Sur macOS 11.2 so far.


https://github.com/jakehilborn/displayplacer

Jan 30, 2021 4:37 AM in response to fluffy

Apple are aware of the issue and that it is a current inherent issue in the os, (not he hardware thank god (not ye anyway lol) )


I have two dell 4k displays... one in USB c and one in HDMI... the HDMI turns off every so often briefly, the resolutions are not similar between the two different outputs (same monitors though) and also does not automatically turn on from sleep.


Watching this space for fix.

Feb 4, 2021 1:06 AM in response to fluffy

Actually, the problem beneath is that Big Sur and M1 handles the display like an iPad, as the gfx subsystem is the same. The EDID parameter of the display should be read properly to be able to adjust itself, but seems like, it does not. The System report page shows that my display is a 5k UHD display, but It's only a 4k display, so there is an issue gathering that. My display is a hardware-calibrated type, so the Benq software is able to communicate with it and store the LUT profile inside the monitor itself. Since the upgrade the software is unable to do so, as it does not recognize it as of the changes in the gfx architecture in Big Sur and M1. A recent upgrade made it available, with some bugs and restrictions. Some developers complaining, that the way they used to operate with displays has been changed a lot and there is very little documentation about how to extract and work with EDID parameters, etc. Seems like this aspect of the OS has not been thought out well, so there is a different approach is needed.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

M1 mac mini display keeps losing scaling

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.