-
-
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
Implement GFX graphics pipeline in xrdp #1422
Comments
Yay excited! :D |
@jsorg71 How big do you estimate the volume of implementing GFX? |
@metalefty To complete all of it yes it's big. To complete progressive RemoteFX and H264 it's not too bad. I think we can have something by the end of year. |
I'm excited about this as well! |
I do see from the connection caps that MSTSC claims it can decode h264. That great and it makes things easier as we don't have to implement progressive rfx yet. Then I noticed that the Mac and Android client(from Microsoft) say they don't support h264 in the caps. |
The MacOS remote desktop client was just updated this week. Maybe the added
that feature?
…On Tue, Nov 19, 2019 at 11:23 PM jsorg71 ***@***.***> wrote:
I do see from the connection caps that MSTSC claims it can decode h264.
That great and it makes things easier as we don't have to implement
progressive rfx yet. Then I noticed that the Mac and Android client(from
Microsoft) say they don't support h264 in the caps.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1422?email_source=notifications&email_token=AA4UBHKDHBVFNFF6GXLZWQDQUTQYBA5CNFSM4JAT7VQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEQ7OGI#issuecomment-555874073>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4UBHKNIPMDBARYM3M5QILQUTQYBANCNFSM4JAT7VQA>
.
|
@jsorg71 Are there any updates? |
Got an h264 session running now using FreeRDP with /gfx-h264 option |
Can that be GPU accelerated on the server-side? :O! |
Likewise, does it work with the nvidia_hack? :) |
Well I mean nVidia/AMD/intel/whatever... |
GPU accelerate encoding, of course but for now, using x264. I have experience with libva h264 encode and NVIDIA nvenc. Best performance will be using either dri/glamor or nvidia_hack and pass Xorg dirty area directly to encoder, no CPU processing. Odd thing about GFX h264, they use a strange RGB to YUV conversion, see 3.3.8.3.1 in MS-RDPEGFX, so that might be a problem. |
@jsorg71 Do you want help writing those conversion functions? Also, would it be possible to merge these changes with nvidia_hack so that we can test this with Nvidia? |
git clone --branch egfx --recursive https://github.com/jsorg71/xrdp.git example connection with freerdp 3.0, not sure what version freerdp added /gfx:avc420 or /gfx-h264 |
I'm trying to use it right now and can't seem to get either |
I also couldn't get it to work with the Microsoft Remote Desktop client on my Mac as well, but that might simply be my fault as I need to debug more what might be wrong with the setup. |
@Nexarian For freerdp, I had to enable build with -DWITH_OPENH264=1 before you get the command line options. Also the MS remote desktop on Mac sets the RDPGFX_CAPS_FLAG_AVC_DISABLED flag so they don't support H264. I didn't check latest client yet. |
That is big! I rebuilt freerdp and I still can't seem to get it to work, either with mate or with Gnome. I simply get an empty black screen. |
Hi @Nexarian I'm not really following this thread in any detail, but commit 5cd36c5 which J has in his xrdp repository (mainlined in v0.9.14) requires xorgxrdp to be rebuilt against xrdp. Where there's a mismatch this is something that can happen (e.g. see #1681 and #1674). I'm not saying for sure this is the cause of your problem but it sounds similar enough to me that I thought I should mention it. |
Thanks @matt335672! I rebuilt both from source as that's required for the egfx change. Looking into the logs it looks like everything is fine (I see no obvious errors), but the problem is that either Xorg isn't starting or the transmission is garbled and something is wrong with the freerdp build on Mac. I do know that if I run FreeRDP without the avc420 flag I get errors related to H264. |
Ok, interesting. It works with this command line:
But it hangs for A LONG time before it might start rendering. It may never start. I think maybe there is a deadlock happening. |
After further testing, adding |
Actually, with |
I think I updated the repos last week they should be fairly recent. |
Yes, you're right. In my rush to sanitize data, I forgot which flag was which (and I edited it). Interestingly, it seems to be working just fine now. It's possible there were issues with my network connection. It could be related to the login screen. Anyway, keep up the good work! |
@akarl10 The default framerate of Nexarian's branch is limited to 25. I think it's okay to change it to 60 to have a better experience. Besides Nexrarian uses Nvidia's xorg configuration by default(can be easily changed) which is not suitable for every hardware, I think. |
@seflerZ I could change that, but currently I left that how it is. Regarding the xorg.conf, there is a postinstall script that takes care of it (checks if its nvidia, changes sesman.ini, patches bus id). In theory it should work oob for "everyone". |
Hello, I'm having a weird problem that nvenc works fine on one machine but fails to open a encode session on the other. Both of them run the latest Debian 11, and their software setups are nearly identical, GPU details are as follows:
My xrdp and xorgxrdp are built from @Nexarian's latest mainline_merge branches, with some downstream Debian patches applied, the forks can be found at https://github.com/MoetaYuko/xrdp/tree/mainline_merge and https://github.com/MoetaYuko/xorgxrdp/tree/mainline_merge. Hardware rendering works on both machines according to The command to connect from client side is
Hence, the XRDP stack works okay in general, except for nvenc accelerated h264 encoding. The returned In addition, I compiled and tested the official nvenc example for OpenGL, and I'm pretty sure Are there any ideas to fix the issue? |
For example, if you already have 3 NVENC sessions running, |
Thanks for the reply!
T600 supports most NVENC capabilities according to https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new
I think there aren't other programs using NVENC, and |
It is literally in the link with the matrix, that you posted (
I don't see a T600 here in that table. General note: After NVIDIA released the 470 driver, all Kepler cards were removed from that table. They still support NVENC though.
Don't know what that example really calls under the hood. In any case, if the driver tells you, that the device does not support NVENC, it is either the driver or the device, i.e. nothing API user related. |
T600 is listed in the second
The example app sets the options for opengl variant (the one used by xrdp) from here and calls Besides, I tested the scenario with over 3 nvenc sessions on my K420 machine, and |
Ah, right.
For the variant with the GL device, the GL context needs to be current. The other way is using NVENC with a CUDA device. |
Well, they're implementation-wise considerations. Now that the same program worked on one machine but not on the other... |
I have good news! After a lot of testing and working with @jsorg71, I've been able to get a prototype script for Intel YAMI H264 acceleration working on XRDP on Ubuntu 22.04! I've also codified the latest updates for Nvidia acceleration as well, and it appears to work though there may be some funny business on systems that have more than one video card: |
Not sure if this is the right place to report this, but issues and discussions don't seem to be available on the fork. I've noticed that it becomes impossible to connect to a remote host running the nvidia xrdp/xorgxrdp variant if the host has been suspended and re-awakened. Prior to suspend, it's perfectly reachable. After suspend, Remmina goes into a reconnection loop and this never succeeds. I do not notice this behavior so far with regular xrdp/xorgxrdp - suspending and awakening seems to be OK. I'm not sure how to debug this or provide sufficient information in case this is not already known (a search here didn't turn up mentions of suspend other than pipewire) (EDIT : fixed annoying typos late in the day) |
@Nexarian : just a nudge because I forgot to tag you in the previous comment and I hoped you might have some ideas. |
@philstopford Sorry for the late reply! I've had my hands full debugging AVC444, which is still not working unfortunately. Anyway, to answer your question, it's very likely that the culprit is something @jsorg71 created to enable Gnome 3 to work in the first place called The other thing you can try is switching your session to use Mate or Cinnamon instead of Gnome 3, which doesn't require LRandR for Nvidia use-cases (https://ubuntu-mate.org/, https://github.com/linuxmint/Cinnamon) To do this, rebuild and install xorgxrdp without the Then, in ~/.xsession change the command to Then reboot. |
@Nexarian : will investigate. I was remiss in not noting that I've been using Plasma for the RDP sessions. I used to use Cinnamon for RDP, but couldn't get that going in recent attempts. I will re-check that as well. |
I don't know if Plasma NEEDS the LRandR extension or not. You can also try rebuilding |
@Nexarian : nonNV.xorgxrdp.10.log is from the default xrdp/xorgxrdp pairing. NV.xorgxrdp.10.log is after I removed the default xrdp/xorgxrdp, and install using the script (without lrandr), then reboot. In the former, Cinnamon is started nicely and works, although slowly. In the latter, I get an error that the X server could not be started. The xorg_nvidia.conf file looks OK. |
@akarl10 - Thanks for this, a few years ago I created a batchfile to build XFCE and KDE Neon desktops in WSL that use xrdp instead of requiring an xserver. I just switched to a rebuild of your DEBs and rendering only with Mesa in WSL1. Even with a sofware-only GPU pipeline, there is a very noticable performance improvement over main. I can force full desktop composition in both desktop environments and they're flying on modest hardware. Basic games like TuxRacer are actualy playable --Excellent work @Nexarian! |
@DesktopECHO Most of the credit goes to @jsorg71. I largely took his code and maintained a branch that works off of rebased devel. The resizing code was mostly my work though. I appreciate the +1 :) |
I see now almost a decade in the making... https://xrdp-devel.narkive.com/kAr4I3mP/codec-mode-xrdp
I use a Mac and accicdentally ran into this grabbing an RDP window. When the window resized and the RDP resolution snapped along with it I was in shock! |
:) It took me over a year to get that code stable! In any case, the next things we're working on:
Then very long term we're thinking:
|
@Nexarian - I've had some thoughts about NLA recently which I'll be happy to share with you when the time comes. |
@Nexarian @jsorg71 I can't express how much I wanted good RDP performance on Linux hosts. You guys did an amazing job by bringing this to Linux! As I'm not very technical, could you please clarify which of those features have been integrated into the main XRDP project, if any? If they haven't been integrated yet, what is the timeline for this? so I can just apt install it. |
I'm also curious to know whether this is getting upstreamed. |
Awesome work on all the progress so far! Thanks for your time I'm just curious, why would AV1 be faster than H264? I thought H264 would be using hardware codec and the latency would be hard to beat? Or do you mean compression/efficiency improvements? |
#2891 has been merged. The next version v0.10.0 supports GFX. H264 is not yet supported at the moment. |
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpegfx/da5c75f9-cd99-450c-98c4-014a496942b0
Related issues.
GFX issues
#1174
#1272
#1420
The text was updated successfully, but these errors were encountered: