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

Partial Wakelock on Android #931

Closed
wasedaigo opened this issue Aug 29, 2019 · 3 comments
Closed

Partial Wakelock on Android #931

wasedaigo opened this issue Aug 29, 2019 · 3 comments

Comments

@wasedaigo
Copy link
Contributor

wasedaigo commented Aug 29, 2019

In our project we are seeing a wake lock acquired for AudioMix, which is not necessary for our game. The reason why I believe ebiten is the culprit is because this wake lock goes away when I do not call Mobile.Update().

Wake Locks: size=1
  PARTIAL_WAKE_LOCK              
  'AudioMix' ACQ=-15s316ms (uid=1041 ws=WorkSource{10227})

Repro step:

  1. Run the game
  2. type adb shell dumpsys power
  3. Observe wake lock is acquired after launching the game with ebiten audio.
@hajimehoshi hajimehoshi added this to the v1.10.0 milestone Aug 29, 2019
@hajimehoshi hajimehoshi added the bug label Sep 6, 2019
@hajimehoshi
Copy link
Owner

There were 4 wake locks on go-inovation

Wake Locks: size=4
  PARTIAL_WAKE_LOCK              'AudioIn' ACQ=-7m12s324ms LONG (uid=1041 ws=WorkSource{10035})
  PARTIAL_WAKE_LOCK              '*gms_scheduler*/com.google.android.gms/.instantapps.routing.DomainFilterUpdateService' ACQ=-1m30s320ms LONG (uid=10014 pid=3343 ws=WorkSource{10014 com.google.android.gms})
  SCREEN_BRIGHT_WAKE_LOCK        'WindowManager' ON_AFTER_RELEASE ACQ=-30s33ms (uid=1000 pid=2526 ws=WorkSource{10218})
  PARTIAL_WAKE_LOCK              '*gms_scheduler*/com.google.android.gms/.instantapps.routing.DomainFilterUpdateService' ACQ=-27s649ms (uid=10014 pid=3343 ws=WorkSource{10014 com.google.android.gms})

@hajimehoshi
Copy link
Owner

Confirmed this with "Bear's Restaurant"

Wake Locks: size=1
  PARTIAL_WAKE_LOCK              'AudioMix' ACQ=-19s31ms (uid=1041 ws=WorkSource{10189})

hajimehoshi added a commit that referenced this issue Sep 6, 2019
This avoid to write 0 bytes when the app is in background. This
should reduce CPU usage.

Updates #931
@hajimehoshi
Copy link
Owner

I think this was fixed.

You need to check this by switching the app. Before the fix, PARTIAL_WAKE_LOCK by AudioMix remained even when you tried to switch the applications. After the fix, this is disappeared.

Note that PARTIAL_WAKE_LOCK by AudioMix remains when the app is active (not being switched).

hajimehoshi added a commit that referenced this issue Nov 9, 2019
This reverts commit 529dddd.

Updates #975

Reason: This causes PARTIAL_WAKE_LOCK on Android (AudioDirectOut) (#931)
hajimehoshi added a commit that referenced this issue Nov 9, 2019
This reverts commit 529dddd.

Updates #975

Reason: This causes PARTIAL_WAKE_LOCK on Android (AudioDirectOut) (#931)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants