Open Xboarder56 opened 2 years ago
First, what video card(s) are you using? Glamor only works for AMD/Intel cards right now, not Nvidia. If you want Nvidia, there's a special prototype that you can use.
This one is with a Intel Iris 655 I have also tried a Radeon Pro V520 and get it to the same point with glamor init ok but high cpu usage and can't even move a window around without stuttering.
My bad! I see it in the logs now. I was searching for it :). Anyway, I assume that XRDP works if you disable glamor?
it actually works even like this just don't see any performance improvement. I have also tried the standard apt-get xrdp way and that works fine as well (lacking glamor though).
I'm testing this on ubuntu 20.04.4 LTS box with the default gnome desktop.
ubuntu@nuc8i5beh:~$ ls -lah /dev/dri/
total 0
drwxr-xr-x 3 root root 100 Mar 2 22:23 .
drwxr-xr-x 21 root root 4.3K Mar 2 22:32 ..
drwxr-xr-x 2 root root 80 Mar 2 22:23 by-path
crw-rw----+ 1 root video 226, 0 Mar 2 22:37 card0
crw-rw----+ 1 root render 226, 128 Mar 2 22:37 renderD128
ubuntu@nuc8i5beh:~$ groups ubuntu
ubuntu : ubuntu adm cdrom sudo dip video plugdev render lxd
ubuntu@nuc8i5beh:~$
@Xboarder56 - depending on how you user is added to those groups, the X server may not have inherited them. There are a few gremlins in this area (e.g. #1978)
You could try setting the permissions on the devices in /dev/dri/
directly with sudo chmod 666
. It won't survive a reboot, but it might at least see if we can get over the permissions errors, and you can see if the performance is any better.
Thanks for the suggestion I tried changing it, then doing a sudo systemctl restart xrdp and no luck. Still getting the same permission denied error but further down in the xorg log glamor init ok.
It may not be a file permissions issue then. Or indeed, it might not be a problem at all. I don't personally know that bit of the code well enough to be sure.
You can find out whether the X server has got the correct group memberships by using ps -ef | grep Xorg
to find the PID, and then looking in /proc/<pid>/status
at the Groups
line. More info on the proc status file is here.
Glamor uses /dev/dri/renderD128 which is the render node. /dev/dri/cardX is used for 'mode setting'. Mode setting is changing the resolution and other things. xorgxrdp does not need access to /dev/dri/cardX, that error is normal. I don't know how to tell Xorg to not query those. I think it's trying to auto-detect stuff even tho we set that off in xorg.conf. I think you are getting an accelerated session. I like to use xvinfo to look for "GLAMOR Textured Video" to see if I got a glamor session. If it's software, it says xorgxrdp something. NVidia wrapper says nv something. Use glxgears to test performance, moving a window around might not be obvious. Note, an easy way to turn glamor off for testing, edit /etc/X11/xrdp/xorg.conf and change the renderD128 to something that does not exist.
So I actually ended up resolve this, but it seems to have hardly increased performance if at any. Is there anything specific I could check to try and see what the issue might be?
This is ubuntu 20.04 + ubuntu gnome variant. I also tried to get audio redirection working and modules are compiled but just doesn't seem to work. Checking audio settings I don't see any output device (not sure if this is an issue?)
I built xrdp + xorgrdp from the most recent releases utilizing this guide: https://gist.github.com/ehoppmann/0b10bcaa1e793f757d1caddbd7ec2300
However I seem to get permission errors for accessing /dev/dri/card0 but glamor_init returns ok, I don't see any improvement with CPU usage when moving windows around making me believe it's not actually accelerating anything.
I have made sure my user is in the video/render groups, I have also changed xorg to /usr/lib/xorg/Xorg. However thing seems to help.