Closed paul-hansen closed 11 months ago
You might need to edit sesman.ini as hinted in comments.
[Xorg]
; Specify the path of non-suid Xorg executable. It might differ depending
; on your distribution and version. Find out the appropreate path for your
; environment. The typical path is known as follows:
;
; Fedora 26 or later : param=/usr/libexec/Xorg
; Debian 9 or later : param=/usr/lib/xorg/Xorg
; Ubuntu 16.04 or later : param=/usr/lib/xorg/Xorg
; Arch Linux : param=/usr/lib/Xorg
; CentOS 7 : param=/usr/bin/Xorg or param=Xorg
; CentOS 8 : param=/usr/libexec/Xorg
;
Thanks for looking at this!
I tried /usr/lib/Xorg
as suggested for Arch based distros. It didn't seem to change anything, I still get the same result with the same errors in the xrdp-sesman.log:
[ERROR] waitforx: Unable to find any RandR outputs
[ERROR] An error occurred waiting for the X server
I verified /usr/lib/Xorg
does exist:
Here's my full /etc/xrdp/sesman.ini
Then, what will you get when executing following command in the terminal (via SSH or something)? Outputs will help to investivate what's happening. Try both /usr/lib/Xorg
and `Xorg.
$ /usr/lib/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
$ Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
I was able to run them in my local terminal. Results are below:
Thanks, both look working fine. So it is an issue of waitforx
recently added to the development version. 0.9.80 is a tentative version of the development snapshot.
[ERROR] waitforx: Unable to find any RandR outputs
[ERROR] An error occurred waiting for the X server
Quick solution is to use 0.9.23 instead, it is stable version.
However, I would be glad if you would be willing to help us debug the development version.
Oh wow, I didn't realize I ended up on the development version actually. Looks like trying to install the xorgxrdp-nvidia
AUR pulled in xrdp-git
, I should have noticed that.
Installed stable version and it seems to be working now! (after a reboot and making sure I wasn't logged into a local session)
However, I would be glad if you would be willing to help us debug the development version.
Happy to help any way I can!
@matt335672 @derekschrock thoughts on waitforx?
Yes - I have.
@paul-hansen - here's a bit of background for you.
The versions of xrdp before the development version start the X server and the session at the same time. That's normally fine, although if there's a problem with the X server it's only discovered when it's to late to report it on the login screen.
The development version starts sub-processes in this order:-
waitforx
waitforx
not only checks the X server is available - it checks it works properly. If a problem is found this can then be reported back before the session is started.
When we put this architecture together we found a problem with xorgxrdp - see #2580 and neutrinolabs/xorgxrdp#254. The error exactly matches what you are reporting.
This is fixed in the non-NVidia xorgxrdp development version. However, because you're using NVidia, you aren't running quite the same code paths. Rather than the randr module you're using a local replacement called lrandr. I don't believe this currently creates an output at startup under all situations - see this comment.
@Nexarian - does my analysis above sound plausible to you? You know more about this area than I do.
There's currently no option to not check for RandR outputs in waitforx
. The reason it was added in the first place is that some window managers need these to be present when starting up.
A possible workaround would be:-
/usr/libexec/xrdp/waitforx
to /usr/libexec/xrdp/watforx.orig
Create this script in /usr/libexec/xrdp/waitforx
:-
#!/bin/sh
exit 0
This effectively makes waitforx
a NOP. It may give you other problems down the line however.
The waitforx issue was reproduced for me. In my case, the cause is I'm not using xorgxrdp with https://github.com/neutrinolabs/xorgxrdp/pull/254 applied.
[2023-09-21T12:50:23.728+0000] [INFO ] Received sys login status for almalinux : logged in
[2023-09-21T12:50:23.733+0000] [INFO ] Received request from xrdp to create a session for user almalinux
[2023-09-21T12:50:23.784+0000] [INFO ] Starting X server on display 10: /usr/libexec/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[2023-09-21T12:50:34.848+0000] [ERROR] waitforx: Unable to find any RandR outputs
[2023-09-21T12:50:34.885+0000] [ERROR] An error occurred waiting for the X server
[2023-09-21T12:50:34.902+0000] [INFO ] Session on display 10 has finished.
@paul-hansen When using xrdp 0.9.80 development snapshot, xorgxrdp also must be latest development snapshot. Do you remember which version did you use?
That was likely the cause. As I mentioned, I hadn't realized that the failed attempt to install xorgxrdp-nvidia pulled in a dev version of xrpd after I had installed the non-dev version so they would have been mis-matched. (See my repro steps in OP)
Sounds like this is solved so I'll go ahead and close this. Feel free to reopen if there's something outstanding though. Thanks all!
HI @paul-hansen, please can you clarify exactly what packages you have installed? I'm on Arch Linux, and getting the same errors as in your original post, with almost identical hardware (RTX 3070 though) and package choices as you earlier.
$ pacman -Qs xrdp
local/xorgxrdp-nvidia 0.2.18.r55.g3a4d465-1
Xorg drivers for xrdp, with NVIDIA GPU support.
local/xrdp-git 0.9.18.r597.g04db78f6-1
An open source remote desktop protocol (RDP) server. Git version, devel branch.
As you mentioned, xorgxrdp-nvidia
depends on xrdp-git
. Are you using different packages / versions from the AUR? Did you decide to just use xorgxrdp
in the end? i.e. the non-nvidia version?
Thanks
I believe I just used the non Nvidia from what I remember. I've done a system wipe since then and I didn't end up using this project since it seems to require always being logged in to be able to connect meaning I'd have to leave my PC unlocked and restarting would have to auto login which was too insecure for me.
Ended up just installing Linux on both machines and using ssh with x11 forwarding. Not a long term solution as x11 will eventually be retired for Wayland.
same Problem here, but... install and start/enable sddm
the waitforx nop from above is also needed
then the login works for me
xrdp version
0.9.80
Detailed xrdp version, build options
Operating system & version
EndeavorOS
Installation method
other
Which backend do you use?
xorgxrdp
What desktop environment do you use?
KDE
Environment xrdp running on
Physical machine. Nvidia GeForce RTX 3080
What's your client?
Windows 11 default rdp client (mstsc.exe)
Area(s) with issue?
No response
Steps to reproduce
I followed these instructions: https://wiki.archlinux.org/title/xrdp
Specifically I used these steps:
Next I opened
~/.xinitrc
and commented out the last 5 lines starting withtwm &
and added these lines:Finally I attempted to connect with a Windows RDP client.
✔️ Expected Behavior
I was expecting the windows rdp client to connect
❌ Actual Behavior
On the windows client after entering credentials it waits for ~5-10 seconds on a blue screen then shows the connection log with this log:
See the attached xrdp-sesman.log for an additional message
It looks like I previously got the error:
I'm not sure what I did to change that error message, I wasn't watching those logs so I didn't notice the change.
Anything else?
/var/log/xrdp-sesman.log /var/log/xrdp.log /etc/X11/xrdp/xorg.conf