-
Notifications
You must be signed in to change notification settings - Fork 11
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
soduto causes Mac to wake up every minute , draining a lot of battery overnight #13
Comments
If KDE Connect also has the same issue, I wonder if this is because they both are trying to actively check for devices and not lose a connection. Since, I don’t know much details about the connection side of KDE Connect and it's clients, I'd say you might get a pretty knowledgeable answer from @giedrius-stanevicius, considering that he's the original developer of Soduto. Also I'll take a look on this and try to replicate it and see if I can include a dropdown setting to reduce the number of times it checks for connections when the Mac is in Low Power Mode or when not charging or in low battery. I can’t confirm if this will be resolved as expected, but I'll certainly do what I can. |
I'll try to debug it further to confirm kde connect.app also presents this issue , but iirc it's the case Is giedrius still active ? He abandoned soduto didn't he ? Also should I contact him myself , or did you just tag him ?(i don't know how GitHub works sorry 😐) Tyvm for your job ! Speaking of which have u not noticed that issue on your own Mac? Do you not see the battery depleting during sleep ? |
Hi there. From looking at the code, I could not see the possible problem - a deeper investigation should be needed. However, I don't know when I'll have time to look into this. If someone would like to debug it, looking at broadcastAnnouncement function and the whole ConnectionProvider class could be a good start. |
thank you , unforunately i lack the knowledge for debugging... but dont you notice that behavior on your machine ? mac waking up every minute, and losing 8% of battery at night during sleep. that's something you can easily spot . Or am I the only one in that situation ? |
I observed the energy usage for a couple of days and Soduto uses very little energy on my mac. The |
hey! sorry I may not have been clear The issue is that soduto wakes up the mac , but the process may not be recognized as soduto Do I make sense ? soduto itself doesnt drain much energy according to activity monitor , but it is the cause of those very frequent wakeups Did you try running (wifi-bt pce and host 0 processes ) |
I did try running the command but it just keeps on loading and then terminates the process after 2 or 3 minutes. However I'll paste the power events on my mac, as listed according to
|
hmm that's probably because you haven't rebooted your mac in a long time (if I had to guess) unfortunately power events and scheduled don't provide much infos apart from apple's own events. It's not listed for me either how about battery drain during the night, with soduto on and off ? |
I did a battery drain during the night with Soduto on. The test was approximately of 5 hours. The initial charge was I did the test after closing all foreground as well as background apps as well, so only the default system processes and Soduto was running. There was no third-party app, except Soduto running in the background while I was doing the test and the mac was kept at sleep with just the lid closed. Now, there was no control involved in this experiment as of now but I plan on doing the same experiment later this night with no apps running except default system processes to act as a control. But even without a control in this setup, I'm pretty satisfied how the mac pulled off as it only lost about EDIT: Today I left my mac for about 6 hours and 20 minutes without any 3rd party processes in the background and only system processes. Initially the battery was holding So, here's the final test results: Assuming rate of battery drop to be uniform, for per hour, we have a Overall Soduto takes negligible resources on your mac, even when at sleep. |
thank you . That's intersting, it must be an issue on my end, perhaps phone related, are u using kde connect on your phone, or something else ? so i've left my mac with several background processes but WITHOUT soduto running, from 3AM to 7PM (basically right now) , and lost 1% , from 76 to 75 . which is amazing Now , I'll test it tonight with soduto ON, and will report the results tomorrow . exact same configuration, except i'll leave soduto ON . if it drains 8% again, i suppose it is obvious that soduto is the issue, at least on my device I'm really puzzled as to how the same process could drain so much more battery on 2 different macs |
forgot to tag you @sannidhyaroy |
This might sound silly but are you by chance reporting the battery percentage drop shown in the menu bar? Apple's battery indicator might not be the best way to measure battery drop as they're known to manipulate the actual percentage. Like if you notice, Apple devices will stay at 100% for a very long time before dropping to 99%. |
Yes you're right ,if anything I'm silly for using that But idk how else to check battery, what command do you use ? I'll retest it with your command and report both results , with and without soduto ! Still don't u think that it's reliable enough for a difference that big ? I mean 1% vs 8%...even if not fully reliable .sounds too big of a difference doesn't it |
You're right that even if it's not nearly accurate, the difference is still big enough. As for how you can check the battery charge, there are several apps out there but I personally just use an extension called "Battery Health" within Raycast. It's not exactly accurate but it does the job. You can then convert the charge into percentage. |
I'll try to find and report the results Besides the wake ups are way less present without soduto so there's that Tonight I'll have soduto on and see how much battery is drained Good night :) |
@sannidhyaroy hello ! so a quick sum up : -without soduto, battery drained is 1% (from 76 to 75) , for a total of 16 hours of sleep -with soduto, battery drained is 5% (75 to 70) , for a total of 17 hours of sleep not as bad as before i'd say, since it often would drop 8%+ , but still concerning. I am yet to try with battery charge utilities to get more precise results, but still, the difference is too big to be considered within margin of error . since we both have the same mac, I assume it must be caused by the combination of soduto+ something else. basically soduto acts as a catalyzer/enhancer. So soduto is only part of the problem, which must be combined with something else, that makes it wake the mac so often may I ask, does it happen that even with your lid closed, your phone still shows "sannidhyaroy's-mac-connected" , from time to time ? Do you have find my ON ?I personally have it on, but find my network off . Do you keep your phone ON at night ? PS: I'll try to test with my phone off tonight ,and see if it changes anything PPS:thank you so much for bearing with me, I know I can be annoying sometimes , but this battery drain is really concerning.. |
My phone would be connected for a while after my MacBook's lid is closed and after sometime, it'd disconnect. When the lid is opened and the mac wakes up from sleep, Soduto will immediately check for nearby devices and connect to available paired devices, if possible.
Yes, I have Find My turned on and I keep my phone on at night. NOTE: Only the forked version of Soduto in this repository checks for nearby devices immediately when your mac wakes up from sleep. The official version doesn't. I had to click on the Soduto menu bar icon in the official version after the mac woke up and then Soduto would check for devices to re-connect. I felt this was not seamless but I'm not sure it was intended or it was because Soduto wasn't in development for a long time, so the functionality was broken. |
Thanks ! yeah i noticed that difference in behavior between the official version and the forked, and I much prefer your implementation :) I'll also try to run soduto in safe boot next night and see if it makes any changes Do you have any other ideas as to what else may be causing such a weird difference between your setup and mine |
I'm not sure about this one but at this point, I've seen people with very different issues that I've not been able to replicate, even though we might be using the same version of Soduto. As you said in your previous comment that other apps might affect the functionality of Soduto and this can be true as well, as I have found apps who behave differently because a user had another particular app installed vs another user didn't. As an example, I found CleanMyMac X messes up the functionalities of some apps like TG Pro or some app that I don't quite remember. Another possible reason could be because I'm running my own build of Soduto with my own developer certificate. But for other users, their mac is running a build of Soduto which isn't notarized and is signed with the certificate of an unknown developer (since I don't pay Apple $99/year). So, there can be a minor difference in functionalities due to that. These are just possibilities and there can be more but since I'm new to macOS development, I can't say with certainty what's the real reason. And I think it's not new that there have been instances when developers have not been able to reproduce a bug or issue that a user was facing. We all don't know exactly what's behind haha. |
fair enough ! guess I'll just live with it. if you ever manage to get the results for btw i've just tested in safe boot, with soduto running, and lost about 118mah, or roughly 3% of battery, for a total of 16h it seems the mac doesn't wake up as often in safe boot, even with soduto running (every 15/20 minutes) Shall I close the issue ?
|
Hi again. I've looked into the code (in my own repository) a little bit more. And I think there might be several cases worth investigating:
|
Thank you ! Unfortunately I'm having issues with fiber , but when wifi gets fixed I'll make sure to test all of that -Could you tell me more about "kde connect related data" ? What could possibly send anything related to kde connect ? May this be a router/DNS issue ? -could you possibly report how often your Mac gets woken up (whether it's # every 15mns, or every 30s) , using |
May this be a router/DNS issue ?
I don't use Soduto myself anymore as I don't have an Android phone anymore. So the only way I could test is with Soduto client alone and with no other devices on the network. That might have different outcome, but I could try when I find the time. |
MBA M1, monterey and ventura
After i noticed i was losing over 8% of battery overnight, while if booting in safe mode wouldn't drop more than 1%, I started debugging all the processes and wake-ups
Using "log show --style syslog | fgrep "Wake reason" command, it appeared there were 2 main processes running roughly every minute ;
1)kernel: (corecapture) 098020.154583 wlan0.A[25258] [ik] systemWokenByWiFi@42641:WoW Wake reason = wifi, kern.wakereason: 'SMC.OutboxNotEmpty smc.70070000 wifibt bluetooth-pcie' .
wifi/bt/lan wakeup basically
2)Default 0x0 0 0 kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
both of which would occur every 45s approximately
Tried disabling background processes one by one, and SODUTO appeared to be the issue, -although tbf it's present with kde connect as well i'm afraid-
with soduto OFF, those two processes would still wake up the mac , but only every 20-30mns.
TLDR: soduto and kde connect keep waking up the mac (and possibly the phone as well) by trying to maintain a connection
screnshots : with soduto and without it
The text was updated successfully, but these errors were encountered: