Network bridge created by orbstack cause battery drain when macbook is asleep
jscheel opened this issue · comments
Describe the bug
I want to preface this by saying that this might be docker and not orbstack. However, I've been tracking a problem with battery drain when my macbook performs a darkwake and orbstack is running. I've grabbed some logs, and it appears that the bridge networks created by orbstack/docker cause macOS to get into a loop of mDNSResponder checking those bridge networks for a WOMP packet over and over. This gets into a never-ending loop until it drains my battery entirely. Here are the relevant logs from macOS:
2024-04-03 00:01:41.339627-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: returning false for ap1
2024-04-03 00:01:41.346725-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge100 <mask.hash: 'aOlPuQtFEgjlcjhiS6Vu7g=='> no WOMP
2024-04-03 00:01:41.347255-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge100 <mask.hash: '/WhnBMavq406QBQbOaGLgQ=='> no WOMP
2024-04-03 00:01:41.347757-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge100 <mask.hash: 'J3eDgq/96BKIUbBYI0DX8g=='> no WOMP
2024-04-03 00:01:41.348338-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge101 <mask.hash: 'ixOsvVkjYm2s7leg7KcaKw=='> no WOMP
2024-04-03 00:01:41.348850-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge101 <mask.hash: 'AZbzPLxi2MO9xSheDB5YJw=='> no WOMP
2024-04-03 00:01:41.349354-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge101 <mask.hash: 'kS1ell8jbVxlLXNm0EcnXg=='> no WOMP
2024-04-03 00:01:41.496623-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: returning false for ap1
2024-04-03 00:01:41.505444-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge100 <mask.hash: 'aOlPuQtFEgjlcjhiS6Vu7g=='> no WOMP
2024-04-03 00:01:41.506154-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge100 <mask.hash: '/WhnBMavq406QBQbOaGLgQ=='> no WOMP
2024-04-03 00:01:41.506765-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge100 <mask.hash: 'J3eDgq/96BKIUbBYI0DX8g=='> no WOMP
2024-04-03 00:01:41.507454-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge101 <mask.hash: 'ixOsvVkjYm2s7leg7KcaKw=='> no WOMP
2024-04-03 00:01:41.508087-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge101 <mask.hash: 'AZbzPLxi2MO9xSheDB5YJw=='> no WOMP
2024-04-03 00:01:41.508733-0500 localhost mDNSResponder[343]: [com.apple.mDNSResponder:SPS] NetWakeInterface: bridge101 <mask.hash: 'kS1ell8jbVxlLXNm0EcnXg=='> no WOMP
bridge100
and bridge101
are the network bridges
Here are the relevant details from ifconfig
vmenet0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=60<TSO4,TSO6>
ether 46:ca:2b:3e:11:62
media: autoselect
status: active
bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether fa:ff:c2:74:27:64
inet 198.19.249.3 netmask 0xffffff00 broadcast 198.19.249.255
inet6 fe80::f8ff:c2ff:fe74:2764%bridge100 prefixlen 64 scopeid 0x14
inet6 fd07:b51a:cc66:0:a617:db5e:ab7:e9f1 prefixlen 64
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: vmenet0 flags=10003<LEARNING,DISCOVER,CSUM>
ifmaxaddr 0 port 19 priority 0 path cost 0
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
vmenet1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=60<TSO4,TSO6>
ether 26:41:16:23:38:b3
media: autoselect
status: active
bridge101: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether fa:ff:c2:74:27:65
inet 192.168.194.0 netmask 0xffffff00 broadcast 192.168.194.255
inet6 fe80::f8ff:c2ff:fe74:2765%bridge101 prefixlen 64 scopeid 0x16
inet6 fd07:b51a:cc66:a:ffff:ffff:ffff:fffe prefixlen 64
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: vmenet1 flags=10003<LEARNING,DISCOVER,CSUM>
ifmaxaddr 0 port 21 priority 0 path cost 0
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
These bridges are removed when I close orbstack.
To Reproduce
Start orbstack and let macbook go to sleep
Expected behavior
The macbook should process the messages on the bridges once, then go back to sleep
Diagnostic report (REQUIRED)
OrbStack info:
Version: 1.4.3
Commit: 75d38a2c2d9a2b42d64378a8f50f31d4d566df10 (v1.4.3)
System info:
macOS: 14.3.1 (23D60)
CPU: amd64, 16 cores
CPU model: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Model: MacBookPro16,1
Memory: 64 GiB
Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2024-04-03T22-46-26.026773Z.zip
Screenshots and additional context (optional)
No response
I am running k8s on orbstack. Is it possible that the k8s service discovery is causing this?
What do you mean by "my macbook performs a darkwake"?
@kdrag0n darkwake is a power state that is used internally by macos. It is the state used when your macbook wakes partially, without turning on the screen, to run various checks. It's the state your macbook will transition to when partially waking to determine if it's time to hibernate, or if it needs to update it's position for find my mac, or if it needs to check the battery percentage, or if it need to run power nap tasks, etc. It's a core part of MacOS that can't be turned off though.
It is also possible that the darkwake is happening when the computer goes into full hibernate (three hours after lid is closed by default, iirc)