nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

[Feature] Trick to tell AMD and Nvidia drivers to use the most powerful GPU instead of a lower-performance (such as integrated) GPU

Open shellka opened this issue 7 years ago • 16 comments

Hello. It would be great if we will have options to enable powerful GPU https://gist.github.com/statico/6809850727c708f08458

shellka avatar Feb 27 '17 16:02 shellka

yup, I need it too

StrategJuvty avatar Feb 27 '17 16:02 StrategJuvty

This should be enabled in 0.21.0 rc versions with Chromium 57: https://skia.googlesource.com/skia/+/chrome/m57/tools/gpu/GrContextFactory.cpp#33 https://skia.googlesource.com/skia/+/chrome/m57/BUILD.gn#30

Please try with our latest 0.21.0 nightly build: http://dl.nwjs.io/live-build/02-28-2017/nw21-0a37a7f-6a70483-e6f163e-1c48b0a/v0.21.0/

rogerwang avatar Feb 28 '17 01:02 rogerwang

@rogerwang This build doesn't work. GPU Nvidia Optimus started on integrated driver as usual. And a can't see any export of NvOptimusEnablement in binaries. Could you check it please?

StrategJuvty avatar Feb 28 '17 10:02 StrategJuvty

Will do. How did you test it besides checking the symbols?

On Tue, Feb 28, 2017, 6:23 PM Strateg [email protected] wrote:

@rogerwang https://github.com/rogerwang This build doesn't work. GPU Nvidia Optimus started on integrated driver as usual. And a can't see any export of NvOptimusEnablement in binaries. Could you check it please?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/nwjs/nw.js/issues/5732#issuecomment-283001141, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKGGakBuaLkaNWxaKhQH9l5hK6rh2i2ks5rg_WGgaJpZM4MNUmi .

rogerwang avatar Feb 28 '17 10:02 rogerwang

@rogerwang By text search "NvOptimusEnablement" in files. You can check any hardware-accelerated game exe file for that string. This string is always present for trick the drivers.

StrategJuvty avatar Feb 28 '17 12:02 StrategJuvty

To complete test you need to have laptop with built-in and nvidia GPU - you should see that by default it launch with built-in GPU, but if the app has this constant - it should launch on nvidia (amd).

shellka avatar Mar 01 '17 08:03 shellka

I would like to request an update about the current progress of this feature. Is it already available in nightly builds and does it run as intended?

TheRealDannyyy avatar Mar 15 '17 01:03 TheRealDannyyy

No. It's still not fixed. The code I referred to previously was for skia testing tools. Will keep this issue updated.

rogerwang avatar Mar 15 '17 01:03 rogerwang

How's this option enabled in the latest version?

Danwood87 avatar Apr 22 '17 13:04 Danwood87

@rogerwang I would appreciate a quick update for this one. Is it perhaps already implemented but requires to be enabled manually?

TheRealDannyyy avatar Jun 18 '17 12:06 TheRealDannyyy

We didn't fix it. Will see it soon.

rogerwang avatar Jun 18 '17 13:06 rogerwang

btw, could you please check the status in Chrome? Currently we don't have the hardware to check it.

rogerwang avatar Jun 18 '17 13:06 rogerwang

Hey! This issue is very old and still open. Are there any news about this?

We're creating a game with NW.js and by default, it always uses integrated GPU on Windows (mostly on Laptops)

lachsen avatar Mar 23 '22 09:03 lachsen

That just controls the default setting. In the system, a tool (such as Nvidia panel) is used to control which gpu is used by each program.

rogerwang avatar Mar 23 '22 14:03 rogerwang

I found that the --force_high_performance_gpu flag seems to make NW.js run with a discrete graphics card by default, but with the --in-process-gpu flag it will not work.

lisliz avatar Aug 17 '22 13:08 lisliz