Skip to content

支持在 Linux 双显卡平台上优先使用 NVIDIA 显卡 - #6670

Merged
Glavo merged 1 commit into
HMCL-dev:mainfrom
Glavo:auto-gpu
Aug 12, 2026
Merged

支持在 Linux 双显卡平台上优先使用 NVIDIA 显卡#6670
Glavo merged 1 commit into
HMCL-dev:mainfrom
Glavo:auto-gpu

Conversation

@Glavo

@Glavo Glavo commented Aug 12, 2026

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added the 40+ label Aug 12, 2026
@Glavo

Glavo commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +692 to +694
if (card0.getType() != null && card1.getType() != null
&& card0.getType() != card1.getType()) {
GraphicsCard discreteGraphicsCard = card0.getType() == GraphicsCard.Type.Discrete ? card0 : card1;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@Glavo
Glavo merged commit 22275f2 into HMCL-dev:main Aug 12, 2026
3 checks passed
@Glavo
Glavo deleted the auto-gpu branch August 12, 2026 13:55
MinecraftSTL added a commit to MinecraftSTL/XYML that referenced this pull request Aug 12, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant