我的 MX4 ubuntu 版本不再自动锁定。它会在收到通知时唤醒,并保持屏幕打开。这严重消耗电池电量。这要么是因为我更新到 ubuntu-touch/stable/meizu.en r2,要么是因为我把屏幕锁定时间设置为从不,然后又改回 1 分钟。(我只有在把锁定时间改回 1 分钟时才注意到这种现象,那时我已经更新了)
现在的问题是:哪个进程监控这个?为什么它保持唤醒状态?哪个文件保存实际的超时设置?我该如何调查发生了什么?
编辑
因此,我也在 launchpad 上为此提交了一个错误,但到目前为止,似乎没有其他人受到影响。真的只有我一个人吗?我为 powerd 添加了一些信息,但我不确定这是管理此问题的服务。
当我跑步时,powerd-cli test
除了第一个之外,其他都通过了:
Test: checkForDbusName(test_dbusname, 0, requests, TRUE)
result: FAILED
Test: checkForDbusName(powerd_cli_bus_name, 1, requests, TRUE)
result: PASSED
Test: clearSysState(main_cookie) == TRUE
result: PASSED
Test: checkForDbusName(powerd_cli_bus_name, 0, requests, TRUE)
result: PASSED
Test: requestSysState(name, POWERD_SYS_STATE_ACTIVE, &cookies[i]) == TRUE
result: PASSED
Test: requestSysState(name, POWERD_SYS_STATE_ACTIVE, &cookies[i]) == TRUE
result: PASSED
Test: requestSysState(name, POWERD_SYS_STATE_ACTIVE, &cookies[i]) == TRUE
result: PASSED
Test: requestSysState(name, POWERD_SYS_STATE_ACTIVE, &cookies[i]) == TRUE
result: PASSED
Test: requestSysState(name, POWERD_SYS_STATE_ACTIVE, &cookies[i]) == TRUE
result: PASSED
Test: requests->len >= TEST_NUM_SYS_REQUESTS+1
result: PASSED
Test: checkForDbusName(powerd_cli_bus_name, TEST_NUM_SYS_REQUESTS+1, requests, TRUE)
result: PASSED
Test: clearSysState(cookies[i]) == TRUE
result: PASSED
Test: clearSysState(cookies[i]) == TRUE
result: PASSED
Test: clearSysState(cookies[i]) == TRUE
result: PASSED
Test: clearSysState(cookies[i]) == TRUE
result: PASSED
Test: clearSysState(cookies[i]) == TRUE
result: PASSED
Test: requests->len >= 1
result: PASSED
Test: checkForDbusName(powerd_cli_bus_name, 1, requests, TRUE)
result: PASSED
Test: clearSysState(cookies[i]) == FALSE
result: PASSED
Test: clearSysState(cookies[i]) == FALSE
result: PASSED
Test: clearSysState(cookies[i]) == FALSE
result: PASSED
Test: clearSysState(cookies[i]) == FALSE
result: PASSED
Test: clearSysState(cookies[i]) == FALSE
result: PASSED
Test: clearSysState("bad cookie") == FALSE
result: PASSED
Test: requests->len >= 1
result: PASSED
Test: checkForDbusName(powerd_cli_bus_name, 1, requests, TRUE)
result: PASSED
Test: requestSysState("test-cookie", POWERD_SYS_STATE_SUSPEND, &cookie) == FALSE
result: PASSED
Test: requestSysState("test-cookie", -1, &cookie) == FALSE
result: PASSED
Test: requestSysState("test-cookie", POWERD_NUM_POWER_STATES, &cookie) == FALSE
result: PASSED
Test: requestSysState("test-cookie", POWERD_NUM_POWER_STATES+1, &cookie) == FALSE
result: PASSED
Test: clearSysState(main_cookie) == TRUE
result: PASSED
Test: checkForDbusName(powerd_cli_bus_name, 0, requests, TRUE)
result: PASSED
下面是一段时间内的完整输出和系统日志条目 - 启动一部锁定的手机 - 按下按钮打开屏幕 - 等待 2 分钟,然后再次关闭。(锁定时间为 1 分钟。1 小时后也不会关闭)
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: handle_requestSysState from :1.13 (com.canonical.Unity.Screen) - ACTIVE (1)
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: name_watch_add: looking for :1.13
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: watching :1.13 to see when it disappears on dbus
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: libsuspend: acquire_wake_lock: powerd_power_request
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: handle_requestSysState - SUCCESS
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: Enqueue state change to ACTIVE
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: exiting suspend
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: libsuspend: calling exit_suspend
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: libsuspend: exit_suspend succeeded
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: Emitting signal for transition to state ACTIVE (1)
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: Transition to ACTIVE complete
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: libsuspend: release_wake_lock: powerd_power_request
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: light_dev: setting brightness to 78
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: we get signal from :1.14: DisplayPowerStateChange
Jul 5 22:12:08 ubuntu-phablet powerd[3893]: Received DisplayPowerStateChange: state=1 flags=2
Jul 5 22:12:12 ubuntu-phablet powerd[3893]: handle_requestSysState from :1.22 (usensord) - ACTIVE (1)
Jul 5 22:12:12 ubuntu-phablet powerd[3893]: name_watch_add: looking for :1.22
Jul 5 22:12:12 ubuntu-phablet powerd[3893]: watching :1.22 to see when it disappears on dbus
Jul 5 22:12:12 ubuntu-phablet powerd[3893]: libsuspend: acquire_wake_lock: powerd_power_request
Jul 5 22:12:12 ubuntu-phablet powerd[3893]: handle_requestSysState - SUCCESS
Jul 5 22:12:12 ubuntu-phablet powerd[3893]: Enqueue state change to ACTIVE
Jul 5 22:12:12 ubuntu-phablet powerd[3893]: queue empty && state == current, discarding
Jul 5 22:12:12 ubuntu-phablet powerd[3893]: libsuspend: release_wake_lock: powerd_power_request
Jul 5 22:12:15 ubuntu-phablet powerd[3893]: handle_clearSysState from :1.22, cookie: 8096ad4e-6c90-4852-97e2-dac9866d21e0
Jul 5 22:12:15 ubuntu-phablet powerd[3893]: clear_sys_request: usensord - :1.22
Jul 5 22:12:15 ubuntu-phablet powerd[3893]: name_watch_remove: looking for :1.22
Jul 5 22:12:15 ubuntu-phablet powerd[3893]: name_watch: ref_count for :1.22 is now 0
Jul 5 22:12:15 ubuntu-phablet powerd[3893]: no longer watching :1.22, there are no more requests
Jul 5 22:12:15 ubuntu-phablet powerd[3893]: libsuspend: acquire_wake_lock: powerd_power_request
Jul 5 22:12:15 ubuntu-phablet powerd[3893]: Enqueue state change to ACTIVE
Jul 5 22:12:15 ubuntu-phablet powerd[3893]: queue empty && state == current, discarding
Jul 5 22:12:15 ubuntu-phablet powerd[3893]: libsuspend: release_wake_lock: powerd_power_request
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: light_dev: setting brightness to 0
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: we get signal from :1.14: DisplayPowerStateChange
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: Received DisplayPowerStateChange: state=0 flags=2
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: handle_clearSysState from :1.13, cookie: 28dfac1e-72a2-4e07-81c2-eb50380d620d
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: clear_sys_request: com.canonical.Unity.Screen - :1.13
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: name_watch_remove: looking for :1.13
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: name_watch: ref_count for :1.13 is now 0
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: no longer watching :1.13, there are no more requests
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: libsuspend: acquire_wake_lock: powerd_power_request
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: Enqueue state change to SUSPEND
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: libsuspend: prepare_suspend.
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: Emitting signal for transition to state SUSPEND (0)
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: entering suspend
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: libsuspend: calling enter_suspend
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: libsuspend: enter_suspend succeeded
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: Transition to SUSPEND complete
Jul 5 22:14:27 ubuntu-phablet powerd[3893]: libsuspend: release_wake_lock: powerd_power_request
失败意味着什么testdbus_name
?屏幕自动锁定时会发生什么?其他人可以运行一些类似的测试并在此处发布日志文件吗?
答案1
我可以通过将手机恢复出厂设置来解决这个问题:系统设置 - 重置手机 - 清除并重置所有内容。
这不是一个非常令人满意的答案,因为我必须重新配置各种东西,但无论如何还是完成了工作。