neutrinolabs / xrdp

xrdp: an open source RDP server
http://www.xrdp.org/
Apache License 2.0
5.59k stars 1.73k forks source link

Unable to connect (xrdp 0.9.13, xorgxrdp 0.2.13) with Glamor enabled #1570

Open seamus-x opened 4 years ago

seamus-x commented 4 years ago

Local: Chrome OS, Xtralogic RD Client Remote: GNOME 3 on Debian 10

sesman initiates successfully, but unable to start session with unspecified error. See attached log.

xrdp.log

metalefty commented 4 years ago

xrdp.log doesn't matter in this case. Xorg log is need to see what's happening.

seamus-x commented 4 years ago

A couple scary lines...

[ 36586.736] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted [ 36586.736] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

xorgxrdp.11.log

seamus-x commented 4 years ago

I should also mention that the system has two discrete graphics card and no integrated GPU, one AMD and one Nvidia. The Nvidia GPU is blacklisted as it is used on a VM via PCI passthrough, and both the guest and the host are accessed solely via remote sessions). The issue persists even with just 1 card installed for either one of them.

jsorg71 commented 4 years ago

I don't see any glamor lines in you log, I don't think it's enabled. But I think that's seperate. The session not starting, did you setup /etc/X11/Xwrapper.config file?

seamus-x commented 4 years ago

That's odd, I used --enable-glamor option on configuring both xrdp and xorgxrdp. I did not alter the stock /etc/X11/Xwrapper.config file, the only active element is "allowed_users=console", though that did not prevent the session from starting using the Debian repository versions (0.9.9 xrdp /0.2.9 xorgxrdp).

jsorg71 commented 4 years ago

I suspect they set sesman.ini to run the non root Xorg. You can do that too, see notes in /etc/xrdp/sesman.ini

seamus-x commented 4 years ago

That did it! sesman.ini defaulted to Xorg instead of /usr/lib/xorg/Xorg; setting it to the latter fixed the session failing to start issue. The log still says nothing about glamor, though, and software rendering is still used. xorgxrdp.log

jsorg71 commented 4 years ago

--enable-glamor does nothing for xrdp but when running ./configure --enable-glamor for xorgxrdp you should see checking for XORG_SERVER... yes checking for XORG_SERVER_GLAMOR... yes

seamus-x commented 4 years ago

Yep... configure.txt

seamus-x commented 4 years ago

And here's /etc/X11/xrdp/xorg.conf xorg.conf.txt

jsorg71 commented 4 years ago

ok, cool, next make sure /dev/dri/renderD128 exists and can be opened by your user. Check the rights on the file, you might have to add your user to 'render' or 'video' group. Also, for you it might be /dev/dri/renderD129, not sure, if it is, that setting is in /etc/X11/xrdp/xorg.conf

seamus-x commented 4 years ago

Adding user to "render" group did it. Thanks for your help!

[ 52396.603] (II) XRDPDEV(0): glamor X acceleration enabled on Radeon RX 580 Series (POLARIS10, DRM 3.27.0, 4.19.0-9-amd64, LLVM 7.0.1) [ 52396.603] rdpPreInit: glamor init ok

lixaotec commented 4 years ago

@seamus-x i think i am passing through the same problem.

Have you accomplished using xRDP with hw acceleration?

lixaotec commented 4 years ago

how sesman.ini should be? would you please share it. @seamus-x

thanks