Opticos / GWSL-Source

The actual code for GWSL. And some prebuilt releases.
https://opticos.github.io/gwsl/
Other
1.16k stars 80 forks source link

[Solution] Service crashes with RDP #30

Open achalmgucker opened 3 years ago

achalmgucker commented 3 years ago

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)

Pololot64 commented 3 years ago

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.

achalmgucker commented 3 years ago

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:

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.

Pololot64 commented 3 years ago

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

achalmgucker commented 3 years ago

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

Pololot64 commented 3 years ago

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.

achalmgucker commented 3 years ago

Great, thanks!

Pololot64 commented 3 years ago

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

achalmgucker commented 3 years ago

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?

Pololot64 commented 3 years ago

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

achalmgucker commented 3 years ago

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!

Pololot64 commented 3 years ago

Great and no problem! I am glad it works!

mi-hol commented 3 years ago

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

Pololot64 commented 3 years ago

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

mi-hol commented 3 years ago

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

Pololot64 commented 3 years ago

Done :)

mi-hol commented 3 years ago

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 commented 3 years ago

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

Pololot64 commented 3 years ago

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

mi-hol commented 3 years ago

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?

Pololot64 commented 3 years ago

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

mi-hol commented 3 years ago

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