支持在 Linux 双显卡平台上优先使用 NVIDIA 显卡 - #6670
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22d0971ce7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (card0.getType() != null && card1.getType() != null | ||
| && card0.getType() != card1.getType()) { | ||
| GraphicsCard discreteGraphicsCard = card0.getType() == GraphicsCard.Type.Discrete ? card0 : card1; |
There was a problem hiding this comment.
Avoid requiring a missing NVIDIA card type
On the normal Linux sysfs detection path, the NVIDIA card generally has a null type, so this guard prevents the new offload variables from ever being set on the intended Intel/NVIDIA laptop configuration. LinuxGPUDetector.detectPCI constructs names such as NVIDIA GeForce ... (or NVIDIA Device ...) but only marks NVIDIA cards discrete when the name starts directly with GeForce, Quadro, or Tesla; because sysfs usually yields at least one card, the typed fastfetch fallback is not used. Determine the NVIDIA discrete adapter without requiring both existing type values, or correct the detector before applying this guard.
Useful? React with 👍 / 👎.
Merge cached upstream/main through 22275f2 (HMCL-dev#6670), including HMCL-dev#6653. Preserve the XYML Swing UI and branding, port NVIDIA PRIME behavior behind the high-performance GPU preference, and keep explicit renderers and user environment overrides authoritative.
No description provided.