Refactor: Improve UEFI GOP Mode Selection Logic and Configuration
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- リファクタリング
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- rust
調査の方向性
uefi/src/main.rs の init_logger から始め、現在の GOP モードのフィルタリングと設定入力を追跡する。選択戦略を変更する前に、目的のプリセット、アスペクト比、最小値、最大値、および EDID の動作を明確にすること。完了条件には、合意された best-fit 動作と、指定された fallback ケースのカバレッジを含めること。
索引モデルが issue の本文から書いたものです。
説明
Current Behavior
In the current implementation within uefi/src/main.rs -> init_logger, the GOP (Graphics Output Protocol) mode selection relies on a simple filter-and-last strategy:
modes.filter(|m| resolution_meets_minimum).last()
This approach leads to inconsistent experiences across different environments:
- Default/Fallback Issue: When no minimum requirements are set, QEMU defaults to a reasonable 1280x800, but my real hardware often falls back to a legacy 800x600 (SVGA), which is insufficient for modern logging.
- "Last Fit" Bias: When minimum requirements are specified (e.g., 1080p), the code picks the last mode in the list. On high-end displays, this often results in the maximum supported resolution (e.g., 2560x1600 or 3840x2160), which might not be the intended "best" resolution for a bootloader or kernel log.
Proposed Improvement
I suggest introducing a more robust selection mechanism that supports Preferred Resolutions and Aspect Ratio Filtering.
- Predefined Presets: Instead of raw pixel values, allow users to specify common targets like 720p, 1080p, or 2K.
- Aspect Ratio Awareness: Support filtering by ratios such as 16:9, 16:10, or 4:3.
- Optimal Selection Strategy:Find the Closest Match to a target resolution.If no exact match exists, fallback to the highest resolution within a specific aspect ratio.Implement a "Best Fit" instead of "Last Fit" (e.g., preference for (1920\times 1080) over (2560\times 1600) if the user targets FHD).
- Add Maximum Constraint: With only minimum constraints, sometimes it will lead to maximum values. Add maximum constraint to avoid that.
- EDID: I'm not familiar with UEFI EDID. I know this just form some simple lookup. this might be helpful.
Summary
I think adding maximum constraints and using min_by_key abs_diff or thing else to replace last strategy are easy to implement and solve this problem.
Suggested Labels: enhancement, area/uefi
- 主要言語
- Rust
- スター
- 1.7k
- フォーク
- 241
- 平均マージ
- 2日 19時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rust-osdev/bootloader のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
rust-osdev/bootloader#587 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
rust-osdev/bootloader#583 · コメント 3 件 ·
-
help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
rust-osdev/bootloader#581 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
rust-osdev/bootloader#573 · コメント 5 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
rust-osdev/bootloader#555 · コメント 2 件 ·
rust-osdev/bootloader の issue をすべて見る
似ている issue
-
claim
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Nixitov/Riptide-Native#946 ·
メンテナーはふだん 1 日以内に返信
-
area: ai-assistants documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BetaBots-LLC/latticegate#17 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
storytold/craft-libs#5594 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
听歌识曲历史跳转后对应音源界面无法返回オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
LingyunStudio/RustMusic#16 ·