Skip to content

Forced GPU selection prevents wgpu running on hybrid nvidia laptops #4101

@flukejones

Description

@flukejones

The block at

if cfg!(target_os = "linux") && has_nvidia_dgpu && self.shared.has_nv_optimus {
is an issue. On hybrid nvidia laptops it is preventing running wgpu based applications completely.

So what is happening for every Nvidia hybrid user is:

  1. Intel GPU is blocked so it's impossible to select it
  2. Nvidia will never work either due to WL Vulkan apps are broken with PRIME NVIDIA/egl-wayland#72
  3. wgpu based apps just will not work (such as wgpu surface_configure fails (intel+nvidia hybrid laptop) lapce/floem#100 and all wgpu examples)

Given the above, this commit should be reverted, and be done before the next release of wgpu.

Related: #1215 (nvidia provides ways to force nvidia gpu selection)
Related: #1898 (the commit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions