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

运行时间长了就会被系统关闭后台,日志提示 excessive cpu …… #143

Open
423A35C7 opened this issue Oct 16, 2024 · 1 comment

Comments

@423A35C7
Copy link

系统是MIUI14 Android13,使用的是Termux:X11前端,已经按照 https://www.bilibili.com/read/cv20060713/https://github.com/agnostic-apollo/Android-Docs/blob/master/en/docs/apps/processes/phantom-cached-and-empty-processes.md 的方式禁用了Phantom Process Killing ,但运行一段时间后还是会突然提示

未连接
Termux X11偏好设置
Termux X11帮助
返回终端

点返回终端后又自动启动桌面了,但开的东西全没了,终端没有提示 signal 9。全局设置和Termux:X11偏好设置中的保持屏幕常亮都打开了也没用。

查看adb logcat后发现触发时会提示:

Killing 8853:com.fct.tiny/u0a*** (adj 701): excessive cpu 13180 during 300067 dur=1115136 limit=2

于是搜了一下,https://blog.csdn.net/qq_27061049/article/details/91393270 ,应该是因为终端进入后台后占用CPU过高导致的,应该是加个前台服务可以防止被关闭后台。

我也试了一下用Termux和Termux:X11配合使用,长时间使用也不会被系统关闭后台(省电策略都没改,还是智能限制),可能是因为Termux运行时在通知栏会有常驻通知(应该就是前台服务吧)。

(我本来想自己修改一下代码加个前台服务试试的,但是运行flutter build apk的时候一直卡在Running Gradle task 'assembleDebug'...

@jiang794136989
Copy link

jiang794136989 commented Oct 16, 2024 via email

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

No branches or pull requests

2 participants