Keep Windows awake when dbus is inhibited from idle, sleep
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cpp, linux
調査の方向性
Start by tracing how /keep-awake currently uses the systemd integration and where it could observe changes to BlockInhibited. The issue proposes responding to idle, sleep, or shutdown inhibition with SetThreadExecutionState, then clearing the state when the property is empty; no files or tests are named. Done means Windows stays awake while the relevant inhibition is active and returns to normal afterward.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
I use Copilot CLI in WSL2 and have /keep-awake enabled. That does call the org.freedesktop.login1.Manager.Inhibit API to inhibit idle detection. This does not, however, prevent my Windows machine from going idle and eventually to sleep.
Describe the solution you'd like
Monitor for property changed to BlockInhibited and SetThreadExecutionState accordingly e.g., probably when you see any of "idle", "sleep", or "shutdown"—which can be combined e.g., "sleep:idle"—call SetThreadExecutionState(ES_SYSTEM_REQUIRED | ES_CONTINUOUS). When the new property value is empty, SetThreadExecutionState(ES_CONTINUOUS) to clear it. As a service, you also have options to "discourage" shutting down when you see dbus signal "shutdown" through SCM messages.
Describe alternatives you've considered
I could use a systemd service to monitor events and write to stdout, listening to it from a WSL plugin. I could also use a number of executables including something like pipeferry or npiperelay to establish a pipe and listen to that from Windows. More moving parts, but no code signing requirement like WSL plugins either.
Additional context
See https://gist.github.com/heaths/b155cb7120b89a2a1c626f9d1cca2a0f (Rust) for how you can filter events to avoid getting flooded. This is a simple sync example but these I would expect would be infrequent enough to warrant proper signaling over overlapped IO.
systemd integration is enabled.
- 主要言語
- C++
- スター
- 34.4k
- フォーク
- 1.9k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 166
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/WSL のほかの issue
-
feature wsl2
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
microsoft/WSL#42306 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/WSL#42114 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
feature kernel wsl2
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/WSL#41107 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature kernel
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microsoft/WSL#41054 · コメント 9 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature GPU
難易度 1/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/WSL#13592 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
HarperFast/rocksdb-js#1131 ·
メンテナーはふだん 1 日以内に返信
-
area/daemon bug good first issue platform/linux priority/p2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ToshiNamura/Deimos#5 ·
-
needs-format
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Niko1221/Strata#6251 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
metasequoiaime/msime#11666 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
patrick-hudson/put.gd-desktop#1679 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信