Back to community
In progress

Tangrid get confused after wakeup from sleep (update 1)

BleisteinOP

It looks like changing the display resolution to "default" on the MBP reduces/cover the problem. This will reduce macOS cycling through different resolutions on wake from sleep. But the problem might be still visible in multi-monitor scenarios.

In general Tangrid might execute some weird screen refreshes, rearranging windows in short time intervals, but at the end the display should look like before the sleep. Specially the order of tabs in tabbed layouts should stay stable.

Maybe implementing a configurable latency time - during which screen resolution/display layout changes would not trigger Tangrid's algorithms - would help. Specially with external monitors the EDID negotiations are taking a monitor/cable defined time...

Replies35

WrapperDeveloper

Did you only notice the issue after 1.4.0 beta, or was it also present in earlier versions? Since 1.4.0 beta changed the restore logic, I’d like to confirm.

BleisteinOP

I am not too sure as I was not traveling when using 1.3 in evaluationn mode. At home I always use the MBP in clamshell mode with an external monitor and the device does not go to deeper sleep modes. But I think TAB sequence was not restored - that was annoying me.

BleisteinOP

Now the app seems to lose the ability to handle already running aps properly. Identified in my setup so far: WhatsApp, Devonthink and Apple Mail! After wake from "Lid Close" Tangrid creates new app instances of these apps (shown in the dock). WhatsApp detects this and flags the error I descibed. So it is not possible to use "Workspace Restore" to rectify the situation of out of sequence/missing TAB. The only way out is restarting Tangrid. I am not sure if the 3 problems 1) Out of sequence tabs 2) missing tabs and 3) duplicated app instances all after restore from deeper power states have the same origin...

WrapperDeveloper

I'm working on the strategy of creating new window instead of new processe in workspace.

BleisteinOP

What I do now (no restart of tangrid needed): Activate the problematic apps with Keyboard Maestro so all the apps are in the tab bar again. This activation works error free. Then I issue the refresh workspace command. I am not too sure what Keyboard Maestros underlying mechanics are for “activation”…

BleisteinOP

I have to correct my last message. It looks that Apple Silicon is more restrictive and does not allow to tweak the power settings very much. So a closed lid will write very fast the content of ram to the disk. When a wakeup happens it needs collaboration from apps to restore previous state. That might be the reason why "normal" sleeps with lid open usually work with tangrid but having the deep hibernation fails (not all tabs visible).

WrapperDeveloper

Please check whether this issue has been fixed in the v1.4.1 beta.

BleisteinOP

Sorry to say. No. Now the app asks for permission to control various apps, but the symptoms are the same as before. Noe iTerm, Reminders and Devonthink are duplicated in the dock.

WrapperDeveloper

Could you provide a log so I can troubleshoot the issue? You can export it from Settings > About.

BleisteinOP

This is the beautifully working tangris screen:

BleisteinOP
3040A9AC-F170-47A2-AF33-0A9C525D02C2.jpg
BleisteinOP

After a deep sleep (lid close) this is how the display looked:

BleisteinOP
25606B5D-1070-4136-89E5-4EC38CD4AA2C.jpg
BleisteinOP

Now refreshing with a workspace (this is where the duplicated app instances are happening}:

BleisteinOP

You see the duplicated entries on the right side of the dock.

BA22E0D0-F01F-40FA-82C3-23A58C2DAF1E.jpg
BleisteinOP

Sorry the first image was wrong. Replace with this one:

BleisteinOP
AB57D33D-780F-48CA-8149-D06552A45EEC.jpg
BleisteinOP

The logs:

BleisteinOP
Tangrid-logs-20260715-043118.zipView only
WrapperDeveloper

Yes, I saw that the email app started a new process. Thanks for the detailed feedback.

BleisteinOP

An additional note: I was using the new feature to provide custom launchers. Big problem everytime I update windows in the workspace thei are overwritten. It would be nice if in case of identical window names they would persist.

BleisteinOP

Also the sequence of tabs is not preserved by a lot of operations - thats like Your browser would reanrange tabs from time to time...

WrapperDeveloper

Are you referring to settings like the custom URL or shell commands in the workspace profile? That's actually something I didn't think through completely.

BleisteinOP

I used the open shell command in my experiments...

BleisteinOP

Its not only mail, but also some others, starting new processes. Also I would expect that after the wake from sleep the system is doing all my workarounds like applying the workspace behind the scenes. In a perfect world the state of the system would be exactly like before the sleep, specially tab ordering.

WrapperDeveloper

You're right. I'm on it.

BleisteinOP

Just a suggestion as it may involve the same data structures: It would be nice if the system would survive a restart the same way (maybe with a config flag) or have a default workspace(es?) that is initialized when starting tangrid.

WrapperDeveloper
· Edited Jul 16, 2026, 03:32 PM UTC

I've rewritten the wake resume logic in v1.4.2. Please give it a try.

BleisteinOP

Looks very good!

BrawlerX

After updating to v1.4.2, when waking up from sleep, tangrid changes my tabbed layout to split view layout. I need to keep running “apply tabbed layout to this workspace” every time after wake now.