在 Workbench 上手動測試暫停/繼續作業

本指南提供相關操作說明,協助您在執行合適 Workbench 映像檔的裝置上,手動測試暫停及繼續作業。

手動暫停及恢復執行

附序號

  1. 透過 USB 連接裝置。

  2. 透過 ffx power 的輔助元件取得應用程式活動租用:

    ffx power system-activity application-activity start
  3. 捨棄工作階段喚醒租約:

    ffx session drop-power-lease
  4. 拔除 USB 傳輸線,避免 USB 或充電器連線導致持續喚醒租用。

  5. 使用序列,捨棄應用程式活動租約,並在延遲後重新取得:

    powerutil system-activity application-activity restart --wait-time 5s

    這樣一來,只要沒有其他喚醒租約處於啟用狀態,系統就能暫停。

  6. 等待序列記錄顯示系統暫停的證據。系統不一定會在暫停前清除記錄,因此您可能會看到記錄突然停止。

  7. 重新連接 USB 或採取其他適當動作 (觸控、按下按鈕等),即可繼續使用裝置。如果 --wait-time 已過,輔助元件會重新取得應用程式活動租約,並自行防止進一步暫停。

沒有序號

  1. 透過 USB 連接裝置。

  2. 透過 ffx power 的輔助元件取得應用程式活動租用:

    ffx power system-activity application-activity start
  3. 捨棄工作階段喚醒租約:

    ffx session drop-power-lease
  4. 捨棄應用程式活動租約,並在延遲後重新取得:

    ffx power system-activity application-activity restart --wait-time 5s
  5. 拔除 USB 傳輸線,避免 USB 或充電器連線導致持續喚醒租用。

  6. 等待幾秒鐘。如果沒有序列連線,您必須重新插上裝置,才能確認是否發生暫停。

  7. 重新連接 USB。

  8. 使用 ffx log 尋找停權證據。There isn't a canonical message to indicate this, but at time of writing, the kernel message INFO: Suspending non-boot CPUs... is a good indicator.

疑難排解

檢查喚醒租約

如果系統有任何有效的喚醒租用,就無法進入休眠狀態。如要檢查有效喚醒租用:

序號

inspect show bootstrap/system-activity-governor:root/wake_leases

USB

ffx inspect show bootstrap/system-activity-governor:root/wake_leases

增加重新取得喚醒租約前的延遲時間

如要延長系統暫停時間,請使用 --wait-time 選項增加延遲時間:

powerutil system-activity application-activity restart --wait-time 10s