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

[BUG]: Significant Battery Drain on MacOS #158

Closed
moutonf opened this issue Apr 20, 2024 · 15 comments
Closed

[BUG]: Significant Battery Drain on MacOS #158

moutonf opened this issue Apr 20, 2024 · 15 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@moutonf
Copy link

moutonf commented Apr 20, 2024

Description

I have been playing on both 3.23.2 and 3.24.0 and I have had really severe battery drain on both versions. I cannot comment on older versions, as I have not been playing on earlier versions. The battery drain might be due the application locking up the webcamera. I have specifically disabled the webcamera, in the hopes that it improves the situation, which it did not.

I had similar battery drain on the web application as well, and was hoping that the battery drain would be better in the app (which is the same). Battery drain is basically that I can only play 2 games, on a full battery charge. This is quite abnormal though for a MacBook Pro M1 Max.

Suggestion would be to fully disable the camera (which I have done in the app settings). But perhaps, just do a full not allow?

Steps to reproduce

No real steps here, as it is subjective battery drain.

Browser

Standalone app

Operating System

Mac

Date and Time

April 20

Game Session

No response

Relevant console log output

No response

@moutonf moutonf added bug Something isn't working triage This issue still needs to be evaluated labels Apr 20, 2024
@bra1n
Copy link
Member

bra1n commented Apr 22, 2024

Hi moutonf,
this is the first time I'm hearing about such an issue. Have you tried disabling all cams and animations in the app?
That would be Settings -> General -> Show animations and Settings -> Chat -> Show Camera Feeds. Disabling your own cam (select "Disabled" from the cam dropdown) might also help. Please give that a try and see if it helps.
As for comparison, have you tried running a hardware intensive game on your Macbook before? The app should not be as demanding as a modern 3D game, but certainly more demanding than just browsing the web. It's hard to estimate how much battery drain is "normal" in this case.
Let me know what you find!

@bra1n bra1n added question Further information is requested and removed triage This issue still needs to be evaluated labels Apr 22, 2024
@moutonf
Copy link
Author

moutonf commented Apr 25, 2024

Hi Bra1n,

I will do some debugging and run a few tests (doing comparisons on idle vs youtube vs botc vs online game . Will report back over the weekend. Will try give some actionable results.

@moutonf
Copy link
Author

moutonf commented Apr 29, 2024

BOTC battery usage

The screenshot shows my battery usage during ±6 - 7ish hours of playing while plugged in. All of the playtime was done on Google Chrome browser, in order to eliminate the native application being the issue. Throughout the session only the microphone was enabled and the camera was disabled both on the macbook (and in the app set to disabled).

Timeline: from 18:00 - 06:20, the macbook was in standby mode. From 06:30ish to 09:30ish games were played using macbook speakers and macbook microphone. From 9:30ish to 15:00, audio was rerouted to my airpods and not the macbook (to eliminate the microphone and speakers being an issue).

Throughout the full session, screen brightness was set to 50 - 60%. Also take note, battery started out at 50% as I played one game the night before, but never plugged in the macbook.

@bra1n
Copy link
Member

bra1n commented Apr 29, 2024

Thanks, that's useful data. Do you have a similar report when running any other game in a similar setting on your Macbook?

@moutonf
Copy link
Author

moutonf commented Apr 29, 2024

Busy creating a similar report running a 4k youtube video at full screen for a few hours. Will post results here.

@moutonf
Copy link
Author

moutonf commented Apr 29, 2024

Battery2

Battery was at 85% at the start of the test at around 14:30. Plugged in the macbook and opened the following Youtube tab: Youtube

Set the video to 4k with the same settings as before (50-60% brightness, medium volume, etc). After about 30 - 45 minutes, came back to the laptop found that it actually managed to fully charge, so I changed the settings to 100% brightness and 100% volume. Left it for another hour and battery still at 100%. Total video runtime during test, 2 hours.

My assumption would be that video processing at 4k from Youtube should probably drain more battery than the BOTC web interface?

Also probably important to add, the official apple charger is rated at 35W, so that would mean BOTC app uses roughly 35W as the laptop does not gain / lose charge while plugged in on the BOTC app.

@bra1n
Copy link
Member

bra1n commented May 2, 2024

Thanks for the additional test. While watching a video at 4K will require a lot of bandwidth to get the video data to your machine, it shouldn't put a lot of strain on your CPU or GPU, as there is not much happening beyond rendering the video stream. Think of it like showing a single app chat feed in a rather high resolution.
A better comparison would be running some kind of (browser) game on your machine for a similar amount of time. Something like https://graebor.itch.io/sort-the-court maybe?

@moutonf
Copy link
Author

moutonf commented May 2, 2024

Battery3

Totally understand, I was just not sure which browser based game would be an accurate measurement. In the image the BOTC section was yesterday playing BOTC and then the right hand side, was me playing Sort the Court. Just some info, background shaded green shows plugged in states, and based on this I was actually able to charge the laptop while playing Sort the Court where as BOTC would have left me in a constant state (as per my first battery image previously). We can also see that BOTC basically consumed battery 30 - 40% estimated faster than Sort the Court.

Might I add that I did join the Council of Crowns in Sort the Court :) Great game suggestion :)

I am happy to do further tests if required.

@bra1n
Copy link
Member

bra1n commented May 2, 2024

Thanks for the further testing! And glad that you liked the game, heh. :-D
It does look like the BOTC app is causing a lot of extra strain on your CPU/GPU, which is weird, because it's mostly "just" a website... Now we have to figure out, which part of it exactly is the source for this. Could you please try disabling both animations and cams and play in an online session for a bit so we can see whether that is the cause? Another thing to try would be to have the app run in "local play" and leave it open like that, maybe click around a bit occasionally to simulate activity?

@moutonf
Copy link
Author

moutonf commented May 2, 2024

Some more testing...

Battery4

--- 1: This section is playing Sort the Court without being plugged in.
--- 2: This section is playing Sort the Court being plugged in.
--- 3: This section is being idle in a game of BOTC. This was just me spectating an ongoing game leaving my macbook fully idle (with screen and audio on).

During --- 3, my macbook lost charge whilst being plugged in. The game was between 10 - 15 players (game called "Games" which was running between 17:00 - 21:00 GMT+2 (not sure how to get game code for you).) During this my camera was disabled (both on macbook and in app) and microphone was not on (as only spectator).

All tests were run at 100% screen brightness, 10% volume, screen always on, full screen, Google Chrome on MacOS Sonoma 14.4.1 on a Macbook M1 Max, 32 gb ram.

Did not notice your comment when posting this, so will disable animations and see if it improves anything.

@bra1n
Copy link
Member

bra1n commented May 3, 2024

Did not notice your comment when posting this, so will disable animations and see if it improves anything.

Don't forget to also disable cams!
image

@moutonf
Copy link
Author

moutonf commented May 3, 2024

Battery5

Yet more data. I am posting this now as I just saw your comment. I was running some more tests last night, but over shorter periods so the graph does not indicate it that well.

Config Changes: (I did not toggle the Show Camera Feeds as I just read your comment now, but I think what I toggled gave similar results (Please indicate if this assumption is correct))
General - Show Animations: On / Off
Streaming - Show Night Phase Clouds: On / Off
Streaming - Show Cameras on Town Square: On / Off

--- Pink Section ---
General - Show Animations: Off
Streaming - Show Night Phase Clouds: Off
Streaming - Show Cameras on Town Square: Off
Comment: With all settings to off, battery % climbed steadily

--- Yellow Section ---
General - Show Animations: Off
Streaming - Show Night Phase Clouds: On
Streaming - Show Cameras on Town Square: On
Comment: First step was to enable cameras, which led to battery % climbing (albeit a bit slower). After noticing this (20ish minutes), I also enabled Night Phase clouds and this did not impact anything.

--- Purple Arrow ---
General - Show Animations: On
Streaming - Show Night Phase Clouds: On
Streaming - Show Cameras on Town Square: On
Comment: Battery started draining again as normal. I just took one data point sample on this as I turned off the macbook after this.

--- General Comments ---
It comes across as the animations is the main culprit impacting usage. It is also significantly more than just enabling cameras. I also want to note that there is not much of a user experience impact with animation being turned off (apart from the audio bars being more animated). I do think that animations off also improves the visibility of who is speaking at any given point.

Anything else you would like me to test? I can also run similar tests over extended time periods, the reason for the shorter tests as I was trying to test some things and seeing whether battery % increases or battery % decreases.

@bra1n
Copy link
Member

bra1n commented May 3, 2024

Thanks for this! There are actually quite a few animations throughout the app, mostly to make the app look 'smooth'. The night clouds, the end of game reveal, the clock hands and one or two other are more visible, but you're of course still able to play when they're all turned off.
Disabling the cams on the town square will not actually disable the data streams, that only happens with the general 'show camera feeds' option I screenshot above, so there's still a chance that this particular setting might have a further impact on your performance. But I can totally understand if you don't want to test this any further. 😉
So the "resolution" for your issue here would be to turn off animations. I don't think there is a lot I could optimize in the app itself - if I remove them from the voice activity levels, there will still be a lot of other animations being used.

@moutonf
Copy link
Author

moutonf commented Jun 12, 2024

I am closing out this issue as I have not been able to conduct further testing.

Initially, I always had animations enabled, but I switched to having them disabled. I found that there is very little difference in the player experience with or without animations. After playing for over a month without animations, I noticed that the battery drain issue has been almost completely resolved. Thank you for this suggestion.

I never got around to testing by disabling the camera streams because doing so significantly detracts from the player experience for those who have specifically enabled cameras. Almost every game features interesting moments captured by the camera feeds, and I felt I was missing out when they were disabled. Therefore, I have not spent enough game time without camera feeds to provide accurate results.

In conclusion, if anyone reads this in the future and has battery drain issues, I suggest disabling animations.

@bra1n
Copy link
Member

bra1n commented Jun 12, 2024

Thank you for all the testing you did, Francois! We'll keep an eye on app performance in the future, but it's good to know that there are already options available that can help with that. 🙂

@bra1n bra1n closed this as completed Jun 12, 2024
@bra1n bra1n pinned this issue Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants