microsoft / WSA

Developer-related issues and feature requests for Windows Subsystem for Android
MIT License
1.58k stars 841 forks source link

Not working with Nvidia gpus #202

Closed Miki5PM closed 1 year ago

nieubank commented 1 year ago

If this is your app that you're developing, could you please provide additional details, e.g. what app, error messages in logcat, bugreport, etc.

Otherwise, please file a feedback hub report.

jaholme commented 1 year ago

@MikiTime Can you upgrade to 2211.40000.11.0 which is publicly available and let us know if this resolves the issues you are seeing with the Nvidia GPU

rp1231 commented 1 year ago

I am facing the same problem. The last build I recall working correctly was 2208, but since then I have been facing problems on My laptop with the same config. It exists for the 2211.40000.7.0 build as well. Config: Windows 11, Nvidia gtx 960m gpu, CPU Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz Laptop: Asus GL552VW Also I want to mention that this laptop config doesn't officially support windows 11, I had to use a workaround to install it. Would that have anything to do with the problem?

I switched to the intel integrated gpu after reading this post and it started working.

Strangely I didn't face this issue with my newer laptop with an nvidia gpu as well: Lenovo legion 5 pro : AMD Ryzen 7-6800H , RTX 3070 Ti

So maybe this is an nvidia 60's series graphic card issue?

jaholme commented 1 year ago

@rp1231 Can you file a Feedback Hub report (Windows Key + F) under the category Apps > Windows Subsystem for Android. If you can also click "Start recording" and attempt to launch an app with the Nvidia GPU

image

Please share a link to your feedback report and this will provide us with the necessary logs to be able to determine why WSA is unable to start.

jaholme commented 1 year ago

Also, I misquoted the version number above, it should have been 2211.40000.11.0. If you're able to try on this build it would be helpful as we believe we have a change to address some of these startup issues.

rp1231 commented 1 year ago

@jaholme I misquoted the number above as well and I've updated the number to 2211.40000.11.0 in the original post.

After experimenting a bit I found out that WSA works fine for me when I choose either the nvidia or intel gpu. It doesn't work when "dynamic" option is selected. (Even though the text on the button states : Dynamic (currently NVIDIA GeForce GTX 960M))

I'll file a feedback report shortly as soon as I get done with work.

rp1231 commented 1 year ago

@jaholme I'm using a sideloaded version of WSA, which is why it doesn't show up in the list of apps for me.............

Also I've mistakenly refered to my old gpu as 3060, but it is actually a 960m, and have corrected my first post with this info.

MustardChef commented 1 year ago

This is still a huge problem for users with Nvidia RTX and GTX GPUs + Windows Subsystem For Android v2211.40000.11.0 The only solution to this problem for the time being, is switching to Microsoft Basic Renderer or another GPU/iGPU.

nieubank commented 1 year ago

This is still a huge problem for users with Nvidia RTX and GTX GPUs + Windows Subsystem For Android v2211.40000.11.0 The only solution to this problem for the time being, is switching to Microsoft Basic Renderer or another GPU/iGPU.

To confirm, it still doesn't launch if you explicitly select the Nvidia GPU in settings (and not leaving it on dynamic)?

We still haven't received a feedback hub report link here for this issue so we're limited in the ability to help resolve it since we haven't been able to repro on our Nvidia devices.

MustardChef commented 1 year ago

This is still a huge problem for users with Nvidia RTX and GTX GPUs + Windows Subsystem For Android v2211.40000.11.0 The only solution to this problem for the time being, is switching to Microsoft Basic Renderer or another GPU/iGPU.

To confirm, it still doesn't launch if you explicitly select the Nvidia GPU in settings (and not leaving it on dynamic)?

We still haven't received a feedback hub report link here for this issue so we're limited in the ability to help resolve it since we haven't been able to repro on our Nvidia devices.

Yes, when dynamic is selected (which reads "Dynamic (currently NVIDIA GeForce RTX 3060)") or the GPU is explicitly selected: it does not launch and immediately crashes. Initially, I suspected it was a problem caused by a corrupted installation but the problem persists even with reinstallation of WSA and Windows. I will file a feedback hub report. I know multiple other people affected by the same problem and will ask them to do the same.

martin-honnen commented 1 year ago

Here is my link to a feedback report https://aka.ms/AAjsnsj. On my Windows 11 laptop WSA apps don't start if the NVIDIA graphics card GeForce RTX 3060 is used.

jaholme commented 1 year ago

Here is my link to a feedback report https://aka.ms/AAjsnsj. On my Windows 11 laptop WSA apps don't start if the NVIDIA graphics card GeForce RTX 3060 is used.

Does it work if you explicitly select the RTX 3060 device, or are you using the basic render driver when WSA is able to work?

martin-honnen commented 1 year ago

I have tested in more detail now, after the requests and looking in more detail at the various options:

The default WSA graphics rendering setting seems to be dynamic (with listing a GPU, which on this system is the Nvidia GeForce RTX 3060), with that setting WSA application don't come up, if you have reset it for the first app you are trying to start a window appears saying e.g. "Windows Subsystem for Android is being started" (my translation of the German message my German version of Windows shows) but that Window then vanishes and nothing more happens, any further attempts to start the same app or another don't show any window; task manager indeed show at least two entries related to WSA (VmmemWSA and Windows Subsystem for Android).

Any other remaining option, which here are using the Nvidia card explicitly or the Intel Iris Xe explicitly or that Microsoft Basic Render Driver explicitly, do make WSA apps show up.

I will next try to find the Windows setting that currently makes Nvidia the preferred card showing up under dynamic and test again and report back.

martin-honnen commented 1 year ago

I had to change a setting in Nvidia system control to make the internal GPU the preferred one, that way in WSA under the default "dynamic" setting the Intel Iris Xe graphics shows up and with that setting all four WSA graphics options (i.e. dynamic (currently Intel Iris Xe), Intel Iris Xe, Nvidia GeForce RTX 3060, Microsoft Basic Render Driver) do let WSA apps show up and run.

jaholme commented 1 year ago

@martin-honnen @MustardChef @rp1231 We've released the 2302 WSA build which should address some of these issues. Can you report back if the default settings of "High Performance" works correctly for you?

rp1231 commented 1 year ago

Yep, It's working fine for me now! Thanks

rp1231 commented 1 year ago

Also just out of curiosity would like to know what the problem was, If it's not overly technical or difficult to explain.

MustardChef commented 1 year ago

@martin-honnen @MustardChef @rp1231 We've released the 2302 WSA build which should address some of these issues. Can you report back if the default settings of "High Performance" works correctly for you?

It has indeed been fixed and WSA now works with the default settings of "High Performance". Thank you to the WSA team for their hard work!

martin-honnen commented 1 year ago

We've released the 2302 WSA build which should address some of these issues.

@jaholme, would Windows update or updating my Windows/Microsoft app store apps install that WSA 2302 build? I looked for updates both ways but none were installed and my WSA settings show 2301.40000.7.0. Or is there a difference between US versions of WSA and international (in my case German) ones?

nieubank commented 1 year ago

Also just out of curiosity would like to know what the problem was, If it's not overly technical or difficult to explain.

Without going into too many details here, WSA issues multiple process for graphics rendering, one in a protected process that handles all the virtualization coming from Android and another for presentation on Windows. In multi-gpu configurations there was one D3D device that was default initialized rather than using the explicit adapter which could get users into this state.

rp1231 commented 1 year ago

Thanks for the explanation!

jaholme commented 1 year ago

We've released the 2302 WSA build which should address some of these issues.

@jaholme, would Windows update or updating my Windows/Microsoft app store apps install that WSA 2302 build? I looked for updates both ways but none were installed and my WSA settings show 2301.40000.7.0. Or is there a difference between US versions of WSA and international (in my case German) ones?

We typically roll out updates to the Windows Insider Program and WSA Preview Program first prior to releasing them to the general audience. If you're not in one of those preview programs the update will start being available over the next few weeks.