Skip to content
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

Sleep/pause/freeze containers when laptop is sleeping #1822

Open
SalvatoreT opened this issue Mar 6, 2025 · 6 comments
Open

Sleep/pause/freeze containers when laptop is sleeping #1822

SalvatoreT opened this issue Mar 6, 2025 · 6 comments
Labels
t/feature New feature

Comments

@SalvatoreT
Copy link

Is your feature request related to a problem? Please describe.
At the end of the work day, I close my laptop, and when I open it again the following morning, the battery is usually at 1% or totally dead.

It appears that my Docker Containers continue running through the night even though my laptop is closed and should be asleep. Here's a screenshot from the morning:

Image

Describe the solution you'd like
When the laptop is closed, I'd like for the containers to suspend/freeze/pause or basically stop computing.

Describe alternatives you've considered
Obviously, I could docker compose down at the end of the work day. I like the experience of being able to open my laptop and start development without having to remember setup incantations.

@SalvatoreT SalvatoreT added the t/feature New feature label Mar 6, 2025
@vivster7
Copy link

A number of engineers on our team have also reported similar experiences of waking up to a dead battery and Activity Monitor pointing the finger at Orbstack.

Here's an orb report from an engineer reporting the problem internally:

OrbStack info:
  Version: 1.9.5
  Commit: 8276a76896800e4a12df9d35065c7458488ac010 (v1.9.5)

System info:
  macOS: 15.1.1 (24B91)
  CPU: arm64, 12 cores
  CPU model: Apple M2 Pro
  Model: Mac14,10
  Memory: 32 GiB

Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2025-02-06T17-32-42.814015Z.zip

Some attempted fixes that have been unsuccessful :

  • Setting "Wake for network access" to "Only on Power Adapter"
  • sudo pmset -b tcpkeepalive 0
  • sudo pmset -b powernap 0

We have reports of this happening on Orbstack versions as early as 1.8.2, but primarily engineers are on 1.9.x branches.

@kdrag0n
Copy link
Member

kdrag0n commented Mar 13, 2025

This is odd as apps aren't normally allowed to run much during sleep on Apple Silicon Macs. Have you seen OrbStack using 100% CPU during the day?

@SalvatoreT
Copy link
Author

I have seen the OrbStack Helper hit 100% CPU occasionally, but it doesn't normally hangout there.

Image

@SalvatoreT
Copy link
Author

Here's my orb report.

OrbStack info:
  Version: 1.10.2
  Commit: c8153766c4b9696ce21aa984ec7f4106c9d2460e (v1.10.2)

System info:
  macOS: 15.3.2 (24D81)
  CPU: arm64, 10 cores
  CPU model: Apple M1 Pro
  Model: MacBookPro18,1
  Memory: 32 GiB

Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2025-03-13T17-34-03.059436Z.zip

@kdrag0n
Copy link
Member

kdrag0n commented Mar 21, 2025

As an experiment, here's a build that pauses containers during sleep: https://cdn-updates.orbstack.dev/exp/OrbStack_v1.10.3-15-g85ec3ac17_19098_arm64.dmg

There are a few issues preventing this from being production-ready, but let me know if it helps.

@SalvatoreT
Copy link
Author

I just got back today and I'll test it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/feature New feature
Projects
None yet
Development

No branches or pull requests

3 participants