Windows: "Keep this computer awake" does not prevent Modern Standby (S0) sleep on display-off
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 59/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- desktop
調査の方向性
Read electron/main.mjs and compare syncCompanionKeepAwake with createRoutineWakeHold in electron/routine-wake.mjs and the power handling in electron/vps-link-awake.mjs. Check Chromium’s Windows power request behavior described in the issue, including battery events. Done looks like the keep-awake settings prevent Modern Standby on AC and handle battery transitions consistently.
索引モデルが issue の本文から書いたものです。
説明
Environment
- OS: Windows 11 x64 with Modern Standby (
Standby (S0 Low Power Idle) Network Connected, S3 unavailable) - App: dusk bot desktop
v0.2.31 - Settings:
- Settings -> Phone -> Advanced -> Remote access enabled, Keep this computer awake enabled (
companion-settings.jsonhas"enabled": true, "keepAwake": true), app running in the Windows system tray - Also affects Settings -> Computer -> Keep this computer awake for scheduled automations and Keep PC awake while plugged in (
routine-wake.json)
- Settings -> Phone -> Advanced -> Remote access enabled, Keep this computer awake enabled (
Symptoms
With Keep this computer awake (or Keep PC awake while plugged in) turned on and the laptop plugged into AC power, the screen still turns off once Windows reaches its idle display-off timeout (e.g., 1 hour on AC / 2 minutes on battery). On a Windows Modern Standby (S0) machine, turning off the display immediately transitions the system into Modern Standby (Kernel-Power Event ID 506, Reason: Idle Timeout).
Once Windows enters Modern Standby, dusk bot's background processes are suspended and the phone cannot connect from outside. Desktop logs show:
routines: held while this computer sleeps[companion] bonjour: no LAN addresses: advertising paused until a network appearsphone relay: link: phone channel read retrying
Closing the window to the system tray does not disable the setting (keepAwake stays enabled), so this happens whenever the PC sits idle past its display-off timeout.
Steps to reproduce
- On a Windows 11 laptop using Modern Standby (
powercfg /areportsStandby (S0 Low Power Idle)), enable Settings -> Phone -> Advanced -> Remote access and Keep this computer awake (and/or Settings -> Computer -> Keep PC awake while plugged in). - Leave the laptop plugged in (with dusk bot open or minimized to the system tray).
- Wait past Windows' "Turn off my screen after" idle timeout.
- Check Windows Event Viewer (
Microsoft-Windows-Kernel-Power, Event ID506) or attempt to reach the desktop from the phone app.
Root cause
- Both
syncCompanionKeepAwakeinelectron/main.mjsandcreateRoutineWakeHoldinelectron/routine-wake.mjs(ROUTINE_WAKE_BLOCKER) startpowerSaveBlocker.start("prevent-app-suspension"). - On Windows, Chromium's
power_save_blocker_win.ccmapskPreventAppSuspensiontoPowerRequestExecutionRequiredrather thanPowerRequestDisplayRequired. PowerRequestExecutionRequiredpermits the display to turn off. On Windows 11 Modern Standby (S0) hardware, display-off idle timeout still enters Modern Standby, throttling/suspending dusk bot's child processes (local server, companion sidecar, relay/tunnel) and dropping network connectivity. As documented in Chromium'spower_save_blocker_win.cc, on Windows 11 onlyPowerRequestDisplayRequired(powerSaveBlocker.start("prevent-display-sleep")) prevents Modern Standby entry on idle.- Additionally,
syncCompanionKeepAwakeinelectron/main.mjsdoes not observepowerMonitorAC/battery power state (isOnBatteryPower,on-battery,on-ac), unlikeelectron/routine-wake.mjsandelectron/vps-link-awake.mjs(on Modern Standby, Windows also terminates execution power requests on battery 5 minutes after the sleep timeout).
- 主要言語
- TypeScript
- スター
- 277
- フォーク
- 27
- 平均マージ
- 15時間 30分
- マージ済み PR(30日)
- 147
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DuskBotAI/duskbot のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
DuskBotAI/duskbot#353 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
DuskBotAI/duskbot#352 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
DuskBotAI/duskbot#351 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
DuskBotAI/duskbot の issue をすべて見る
似ている issue
-
area/ci bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
melgarafael/DeskcommCRM#5290 ·
メンテナーはふだん 1 日以内に返信
-
Add Alice&Botオープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
easy enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
bot:ai-assisted component:faucet github_actions security status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
midnightntwrk/midnight-faucet-api#215 ·
メンテナーはふだん 1 日以内に返信