GWSL-Source icon indicating copy to clipboard operation
GWSL-Source copied to clipboard

[Solution] Service crashes with RDP

Open achalmgucker opened this issue 4 years ago • 21 comments

I installed GWSL from the store to an older PC (Version 1.3.6 (store)). When GWSL is started, then it reports "LoadLibrary failed with error 87: Wrong parameter". Then GWSL says: "Hmm... The GWSL service just crashed or was closed. Do you want to restart the service?". Doing "Yes" repeats the whole process, and saying "No" closes GWSL. As long as the dialogs are open, the system tray menu of GWSL works, and I can also start the "Distro Tools" etc. But no X-Server function.

  1. The log-files (dashboard.log and service.log) are both empty (0 bytes).
  2. It's started on an AMD Phenom(tm) II X4 945 Processor (SSE_42 instructions not supported), 16 GByte RAM, Windows 10 20H2, x64.
  3. In wsl2 a "Ubuntu 20.04.1 LTS" distribution is running, however the WSL instance is still called "Ubuntu-18.04" (I made a distribution upgrade).
  4. The PC on which WSL2 and GWSL are running is used via Microsoft's RemoteDesktop.
  5. A test with commercial X410 X-Server in the same situation has worked without problem, i.e. the Ubuntu distribution should not be a functional problem.

What could I try?

I tried GWSL on another PC with Intel CPU. There everythings works fine! But I would also like to use it on this older system...

I appreciate your help!

(Edited: Added GWSL's version)

achalmgucker avatar Jan 15 '21 09:01 achalmgucker

When you used it on the Intel PC, was it also through remote desktop? I did some quick research and I think it is probably related to remote desktop. Is there a way you can test from the machine itself? If not that's fine.

Pololot64 avatar Jan 15 '21 15:01 Pololot64

I made tests with different configurations. a) The newer/Intel based host made no trouble, no matter if GWSL was started locally or through remote desktop. All fine. b) The older/AMD based host shows a different behavior:

  • Starting GWSL locally (I connected a screen after all...) was fine, the programs inside WSL2 (dolphin/konsole etc.) worked fine.
  • Starting GWSL through remote desktop fails. Only once (out of many many tries) starting GWSL worked. Then again never. Always showing the same error.

BUT: I started GWSL locally on the AMD host, then switched to a remote desktop session. It continued working.

So, only "starting" the service seems to fail. If it runs, then it continues working also in remote desktop.

Would be great, if this helps so finding a reason. Regards.

achalmgucker avatar Jan 15 '21 21:01 achalmgucker

Hmm. I did some looking around and I have one potential solution. Are you running the store or github version?

Pololot64 avatar Jan 15 '21 22:01 Pololot64

At the moment it's the store version. Should I change to the Github version?

achalmgucker avatar Jan 15 '21 22:01 achalmgucker

I am uploading a new release now. I don't think it will fix the issue out of the box but I added more configuration options which may help. I can give steps after it is uploaded.

Pololot64 avatar Jan 15 '21 22:01 Pololot64

Great, thanks!

achalmgucker avatar Jan 15 '21 22:01 achalmgucker

I uploaded it. Note that you must uninstall the store version just so they don't conflict. Also, if you have pre-existing shortcuts, they may not work. I am also releasing the changes on the store. They have to be certified by Microsoft though so that would be sometime soon after Monday. If you can wait, that would save needing to uninstall the other but it can be however you want

Pololot64 avatar Jan 15 '21 22:01 Pololot64

I moved from store version to the traditional version. I checked that it is now the version 1.3.7. The behavior is - as you expected - still the same, i.e. starts on local monitor but not on remote desktop. What could I try to change?

achalmgucker avatar Jan 15 '21 23:01 achalmgucker

Right click the GWSL icon in the system tray, click Xserver profiles >> Add a profile. Give the new profile any name and in the flags entry box paste "-nowgl -multiwindow" without quotes. Then click add. Right click the menu again, hover xserver profiles and click the name of your new profile. Close gwsl and try the testing again. Sorry. I wrote this in a hurry

Pololot64 avatar Jan 15 '21 23:01 Pololot64

Success! Since using the new profile, GWSL starts from within the remote desktop session and dolphin/konsole etc. work correctly. Thanks a lot for your turbo-fast help!

achalmgucker avatar Jan 15 '21 23:01 achalmgucker

Great and no problem! I am glad it works!

Pololot64 avatar Jan 16 '21 00:01 Pololot64

Seems solved, hence should issue be closed to avoid confusions?

mi-hol avatar Jun 30 '21 14:06 mi-hol

This one I want to keep open so people know how to fix the issue on their end

Pololot64 avatar Jun 30 '21 15:06 Pololot64

Maybe adding a github label would make this visible for others and allow later "house keeping"?

mi-hol avatar Jun 30 '21 15:06 mi-hol

Done :)

Pololot64 avatar Jun 30 '21 15:06 Pololot64

As I'm pretty new to this project hence I don't how many such issues have been identified yet. In case there a several, would it make sense to create a Wiki entry under a section like "Troubleshooting common issues" and move the (condensed) content there?

mi-hol avatar Jun 30 '21 15:06 mi-hol

and link from the manual to this Wiki were it currently says: "Troubleshooting Not here yet. But there is alot of material in the GWSL Source Github issues list."

mi-hol avatar Jun 30 '21 15:06 mi-hol

Most of the issues are solved but open for reference so yep. That will be a good idea. The key is when I have time. I am pretty busy

Pololot64 avatar Jun 30 '21 15:06 Pololot64

I'd be happy to help, see for a quickly created "prototype" page on https://github.com/mi-hol/GWSL-Source/wiki/Troubleshooting Any comments or suggestions?

mi-hol avatar Jun 30 '21 16:06 mi-hol

It looks good. Maybe I would add more details like "a) The newer/Intel based host made no trouble, no matter if GWSL was started locally or through remote desktop. All fine. b) The older/AMD based host shows a different behavior:

Starting GWSL locally (I connected a screen after all...) was fine, the programs inside WSL2 (dolphin/konsole etc.) worked fine. Starting GWSL through remote desktop fails. Only once (out of many many tries) starting GWSL worked. Then again never. Always showing the same error. BUT: I started GWSL locally on the AMD host, then switched to a remote desktop session. It continued working.

So, only "starting" the service seems to fail. If it runs, then it continues working also in remote desktop."

Btw thanks. help is always appreciated

Pololot64 avatar Jun 30 '21 16:06 Pololot64

lets continue the conceptual work in new issue 'summarize solved issues as "Troubleshooting Guide" in wiki' #75

mi-hol avatar Jun 30 '21 16:06 mi-hol