Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version xRDP & GCC error #17

Closed
devmalya-b opened this issue Sep 24, 2022 · 14 comments
Closed

New version xRDP & GCC error #17

devmalya-b opened this issue Sep 24, 2022 · 14 comments

Comments

@devmalya-b
Copy link

devmalya-b commented Sep 24, 2022

Installed the new version, but its more unstable than the last version. the crashes still happen, but over that even gcc is not accessible? Error is get is: /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function _start': (.text+0x24): undefined reference to main

Looking for a way around that, adding it to path variables etc. Will try reinstalling as well.

The bigger issue is that xRDP has stops with both the versions after a specific number of logins. The error it gives is:

connecting to sesman ip ... port ...
sesman connect ok
sending login info, please wait
login failed for display 0

it is similar to this here, and some other problems, but none of the solutions worked. Purging and reinstalling doesn't work either. Any clue how to fix the login error?

@DesktopECHO
Copy link
Owner

Can you give me steps to reproduce your GCC issue?

Purging and reinstalling - What do you specifically mean when you did this?

"xRDP has stops with both the versions after a specific number of logins" - Can you provide steps to reproduce?

I need more specific info to assist. None of these issues make sense or are things I have run into, using kWSL daily and extensively.

@DesktopECHO
Copy link
Owner

Also need to confirm you selected a different port for xRDP when you installed a new instance.

@devmalya-b
Copy link
Author

devmalya-b commented Sep 25, 2022

I actually uninstalled the last instance due to the xRDP error. The new instance connected to xRDP fine itself. The xRDP error can't be replicated in any way I know of. It just comes up after I have shutdown WSL too many times without running wsl --shutdown. One way could be to reduce the maxsessions in xrdp.ini but I'm not sure of it. Here, here, and here are some other instances of the same error.

As for GCC in the new instance, you can probably replicate it (given it is a non defunct bug) by just trying to compile a C file, or with ls /usr/bin | grep gcc which had no output for me.

@DesktopECHO
Copy link
Owner

If you're seeing this xRDP error then wsl --shutdown isn't properly terminating the instance.

Instead try wslconfig /t NeonWSL (Or whatever you named the instance)

Regarding your GCC issue, can you try rebuilding an Ubuntu/Neon package to verify your environment is ok? Sounds like you don't have the necessary development tools installed:

sudo apt-get install devscripts debhelper autoconf build-essential dpkg-dev

@DesktopECHO
Copy link
Owner

I have shutdown WSL too many times without running wsl --shutdown.

This might be a WSL2 issue as well. Can you try running the instance in WSL1 first and see if the issue persists? It shouldn't, because there's a logout script in KDE that shuts down WSL completely so new sessions are 'clean'

@devmalya-b
Copy link
Author

devmalya-b commented Sep 26, 2022

The development tools installation worked. Not sure why I needed it, since I've always been able to compile right off the bat on previous versions and other distros.

This might be a WSL2 issue as well. Can you try running the instance in WSL1 first and see if the issue persists? It shouldn't, because there's a logout script in KDE that shuts down WSL completely so new sessions are 'clean'

What do you mean by a logout script? (When I said I shutdown without wsl --shutdown, I meant I shutdown windows with the WSL running as it was. Is there a way to log out of KDE which terminates the xrdp service as well? And that too just on WSL1 or 2 as well?

(Also, wslconfig /t does not free the Vmmem service from the task manager i noticed. Only wsl --shutdown seems to do that.) Is there some universal way where I can free all the memory, terminate all services including xrdp and shutdown the wsl instance together before shutting down windows?

And finally, no matter what precautions exist- if i do face this problem again, how do I really solve it? Increasing the max sessions does not work, purging and reinstalling xrdp does not work either.

@DesktopECHO
Copy link
Owner

When you click "Log Out" in KDE a script is kicked-off that ends the RDP session and terminates the WSL instance.

wslconfig /t Does terminate VMMEM process, but if you look in Task Manager you'll see Windows will take 15-60 seconds to end the process.

I have no idea what's wrong with your xRDP setup. You mentioned in your logs seeing
login failed for display 0
Which makes absoloutely no sense as xrdp-sesman has an offset starting at :10.

@devmalya-b
Copy link
Author

When you click "Log Out" in KDE a script is kicked-off that ends the RDP session and terminates the WSL instance.

Could you tell me where exactly is the option to do this? I seem to not have this option in my main menu, and I've never used KDE natively. Here is a image of my menu.

image

@DesktopECHO
Copy link
Owner

image

...Or restartwsl from the terminal.

@devmalya-b
Copy link
Author

When you click "Log Out" in KDE a script is kicked-off that ends the RDP session and terminates the WSL instance.

So I did try logging out with that button as well as tried restartwsl from the terminal, but even after that trying out wsl -l -v on cmd shows that the instance is still running, and trying sudo service xrdp status shows that both xrdp and sesman are running (even after 5 minutes). How did you make the log out button terminate the wsl instance?

@DesktopECHO
Copy link
Owner

DesktopECHO commented Sep 29, 2022

/usr/local/bin/restartwsl kicks-off schtasks.exe /run /tn NeonWSL

As well, in your install folder there's Init.cmd
Try changing "Start-Sleep 3" to 15, 30 or 60 seconds instead of 3.

@devmalya-b
Copy link
Author

Try changing "Start-Sleep 3" to 15, 30 or 60 seconds instead of 3.

This worked. Now clicking the Log Out button on KDE does terminate the instance. I'm hoping it terminates the xrdp service before doing so, although only time will tell if I face the previous error again. Thank you for the assistance!

@DesktopECHO
Copy link
Owner

Glad to hear your issue is sorted. What value for start-sleep worked for you in the end?

@devmalya-b
Copy link
Author

devmalya-b commented Oct 10, 2022

@DesktopECHO So in the beginning 15 worked out. The VMMEM process would terminate itself. But as time progresses, I've to keep increasing the time for the instance to even close (wsl -l -v shows it's running). 30 does not work anymore so I'm using60 now. Only wsl --shutdown terminates the process now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants