-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
dri3 and glamor #1029
Comments
do you need help, maybe in testing this ? |
Sure, you can use glamor branch |
Finally got around to test on fedora 28 with cinnamon. Basically works great on the first glance. As expected, significant reduction in CPU usage across the board - Thanks for this change! The only issue connecting from win10 mstsc was blank screen depending on client's "connection type":
|
Looks like the glamor branch has been merged into xorgxrdp! That was a lot of work! Can this work with Nvidia? I see provisions in the code for EGL streams (Nvidia's tech), but when I tried it, it's still using llvmpipe (software rendering) on Nvidia's binary drivers (Ubuntu 18.04) |
Yes, it's merge in devel branch but off by default. --enable-glamor to turn it on. |
@jsorg71 That's great that you're working on a solution! Having XRDP work with the Nvidia accelerated ecosystem would unblock remoting scenarios in the Machine Learning Linux world (which is huge). I am happy to test prototypes when the come out, and I can verify that it is perfectly stable with glamor enabled with Nvidia drivers, it just uses software rendering (which is important, too). What does libepoxy and the EGL stream portion do? |
I see this link about 'PRIME render offloading' that looks interesting. This is all really new and relies on xserver bits not yet released. libepoxy is just a helper library for OpenGL. |
--enable-glamor doesn't seem to be present in ubuntu 20.04 xrdp (release 0.9.12). compiled from source. but there's still no --enable-glamor option... have things changed? also: does it work with xwayland or do i need x11? |
With the advent of 1.20.x x11-server/xorg-server xorgxrdp can support dri3/glamor [1] to enable hardware supported OpenGL acceleration with an xorgxrdp desktop. Also add pkg-message to explain how to enable hardware acceleration. While here, fix misuse of "-I" flag to specify LIBDIR. [1] neutrinolabs/xrdp#1029 PR: 244298 Submitted by: Derek Schrock <[email protected]> (initial revision) Approved by: meta (myself, maintainer) Sponsored by: HAW International git-svn-id: svn+ssh://svn.freebsd.org/ports/head@527235 35697150-7ecd-e111-bb59-0022644237b5
With the advent of 1.20.x x11-server/xorg-server xorgxrdp can support dri3/glamor [1] to enable hardware supported OpenGL acceleration with an xorgxrdp desktop. Also add pkg-message to explain how to enable hardware acceleration. While here, fix misuse of "-I" flag to specify LIBDIR. [1] neutrinolabs/xrdp#1029 PR: 244298 Submitted by: Derek Schrock <[email protected]> (initial revision) Approved by: meta (myself, maintainer) Sponsored by: HAW International
With the advent of 1.20.x x11-server/xorg-server xorgxrdp can support dri3/glamor [1] to enable hardware supported OpenGL acceleration with an xorgxrdp desktop. Also add pkg-message to explain how to enable hardware acceleration. While here, fix misuse of "-I" flag to specify LIBDIR. [1] neutrinolabs/xrdp#1029 PR: 244298 Submitted by: Derek Schrock <[email protected]> (initial revision) Approved by: meta (myself, maintainer) Sponsored by: HAW International git-svn-id: svn+ssh://svn.freebsd.org/ports/head@527235 35697150-7ecd-e111-bb59-0022644237b5
With the advent of 1.20.x x11-server/xorg-server xorgxrdp can support dri3/glamor [1] to enable hardware supported OpenGL acceleration with an xorgxrdp desktop. Also add pkg-message to explain how to enable hardware acceleration. While here, fix misuse of "-I" flag to specify LIBDIR. [1] neutrinolabs/xrdp#1029 PR: 244298 Submitted by: Derek Schrock <[email protected]> (initial revision) Approved by: meta (myself, maintainer) Sponsored by: HAW International
Where do you put the --enable-glamor flag? |
to configure script of xorgxrdp, when building from source |
Sorry if not helpful.. A week or so ago I went to rebuild parts of the xrdp stack to test glamor on ubuntu20.04(pre release).. I then stopped after seeing the xorgxrdp package seemed to include glamoregl in: Shrug some directions on how to get testing this would be helpful. I help manage some HPCs ~50 nvidia gpus. Would love to give the users hw accelerated glxgears over rdp. |
Nice! It works! I can see the GPU usage in intel_gpu_top, and it seems to leverage the GPU really nicely (You can even watch videos and run graphical tasks), while the CPU is completely relaxed (It barely uses 3-5% of CPU on average). But the frame-rate seems extremely low in XRDP. It looks like it's running at 5 to 10 FPS or so, no matter if moving windows around or watching a video. I had the same issues in software rendering mode previously. Is that normal? (I'm in LAN, tested with Experience "LAN 10Mbps" and all lower options, have set the minimum security to None in XRDP, and also tried with 16bit colors, all with the same result). |
@rkkoszewski try changing xrdp.ini settings, specifically bitmap_compression bulk_compression and independently try "Detect automatically" instead of "LAN 10Mbs" in client settings Disabling all compression and using "Detect automatically" should be best quality, with enormous bandwidth requirements - but i'm curious what will be your experience |
@paravz Thank you for the suggestions. I tested every possible combination of bitmap_compression, bulk_compression and the "Detect automatically"/"LAN 10Mbs", but the results are nearly always the same. It does look that enabling bulk_compression makes it sligthly slower, but it might be placebo. The only difference was in bandwith usage. It still looks like it's running at a static 5 to 10 FPS. One thing to note is that I'm running the desktop in an LXC container (Glamor is 100% working, as I can see the GPU load change when dragging windows). Tested also with Windows Native RDP client, as also with the open source aRDP client, all with same result. Setting the resolution to 800x600 seems to improve things (Both compressed and uncompressed), but again might be placebo, as the difference is minimal. Any more ideas? How is it working for you? Is it possible to watch smoothly a video (even if it's just in a small window) trough xrdp? Here is a log of xorgxrdp: https://gist.github.com/rkkoszewski/ff4cb6b90e20322b4791895319c0fc1c |
1080p youtube video in firefox works smoothly for me in cinnamon, it might your hardware, kernel or something else |
Interestingly my system uses different "X" drivers with i915 hardware, especially VDPAU for hardware video acceleration. I have not specifically tuned any of it, comes with 5.4.19 kernel
|
@rkkoszewski Have you tried recompiling xrdp with --enable-rfxcodec and enable RemoteFX on the client? |
@seamus-x I thought that option was enabled by default. Is there any way to check that it is indeed missing in my setup? I can't see anything rfx related in the logs I posted. Should it be there? Or somewhere else? EDIT: EDIT 2: In any case, I already tested disabling the "Display Compositor" before in XRDP with RFX and without glamor. With glamor enabled it's the first time that I see such framerate performance, so that's a huge success!! Thank you all for helping out!! BTW: Is there any reason why the glamor changes are not enabled by default in XRDP? |
Unfortunately this does not work for me on Manjaro. Is it possible that with Errors in Xorg log
Packages version
|
Any news on this? Tried compiling.. also missin <gbm.h> |
ive installed libgbm-dev and libepoxy-dev, solved for make however when i log xrdp, after inpu user and pass.. i get a blue (cyan?) screen only.. no go further |
finally i managed to get it.. |
Nvidia is a bit tricky. @jsorg71 created a prototype branch that allows for direct hardware acceleration with Nvidia: https://github.com/jsorg71/xorgxrdp/tree/nvidia_hack But it requires some setup:
Confirm it works by running glxgears. Also note that this doesn't use virtualgl, it's directly integrated with the drivers! Right now this is just a prototype and obviously the awkward setup and other issues such as Gnome compatibility need to be addressed, but it's a massive step in the right direction! |
Thanks @Nexarian ! Will soon try and let all know. Also would like to contribute with coding, despite the fact i dont know nothing on this, if manteiners could provide and describs what else is to be done and where to start i could try. I think this is the only open tech nowadays that enables serius graphics remote working, without goingo to m$ world or online services |
If somebody is struggling to install XRDP with GLAMOR enabled here are my notes on how to install it on a Debian 9: https://gist.github.com/rkkoszewski/aa531cee7126edf329b76bdd0546f502 A question for @jsorg71 : Is there any way to make VAAPI with Hardware acceleration to work in a XRDP session with GLAMOR enabled? From my tests and by using "strace" I can see that VAAPI is working, it is able to open the GPU render node, but then it checks for some "MAGIC" number that is different from the one it is expecting, and it defaults to software encoding/decoding. (I'll upload the log once I find it again) |
Is it thr same for Cinnamon (mint) |
I'm having difficulty getting this running in Arch. It compiles okay but then sesman throws an error when trying to create an x server:
Any tips on how to debug this? EDIT: I'm seeing the same issue as @2X3 here: #1029 (comment) Any fix? |
I see similar errors here: So it seems a bit of a hairy one and is now above my paygrade unfortunately. Edit: fixed here: https://bbs.archlinux.org/viewtopic.php?pid=1937867#p1937867 by using the following configure:
Can this be used to fix something in the source? |
glamor seems great and I really want to see this feature is enabled by default, or configurable at run time, not build time. |
After I made a package for xorgxrdp with glamor, I realized it does not work on nvidia gpu. however, feel free to test it. |
I also made a package for xorgxrdp with nvidia and I can confirm that it works. thx @jsorg71 and @Nexarian |
@jat001 Thanks for this. I've passed some feedback on the aur page for the non nvidia PKGBUILD |
I've been trying to get this to work but once I've logged in, the screen remains with the
Although I don't think that's necessary, I checked that my user is part of the Anything obvious to look for in the logs, or debugging methods for the |
Check instructions from #1029 (comment), including X11 setup. Check your glamor device name and if it's configured and working, ie:
|
Can this be run headless? I mean with something like the Xvnc backend? |
It does run headless with the Xrdp backend. I have been using |
Testing the on Arch with AUR package xorgxrdp-glamor now. |
Make sure you edit [Xorg]
name=Xorg
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1
code=20 (or equivalent) and make sure you select Xorg to login (or just disable VNC altogether). Also, client settings matter: xfreerdp /gfx:rfx +gfx-progressive /sound /dynamic-resolution /v:fedora.lan |
Awesome!!! It's working. |
I honestly don't know why |
Actually i noticed Xrdp is slower than Xvnc to me (opening Firefox for example takes longer, no idea why). But i stay on Xorg to have 3D. |
I think this can now be closed as we've made it easier to use See neutrinolabs/xorgxrdp#295, which is largely the work of @jat001. |
With DRI3, we can enable hardware OpenGL in xrdp sessions. DRI3 allows non root access to video hardware through render nodes(/dev/dri/renderD128).
With Glamor, we can use that hardware OpenGL to accelerate the 2D calls with pixels shaders.
The text was updated successfully, but these errors were encountered: