-
-
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
GFX tidy-ups #2921
GFX tidy-ups #2921
Conversation
Thanks for the tidy-up! All the changes you made are significant for stability. |
I've worked out what's happening with NeutrinoRDP. The neutrinordp target is sending a DVC Capabilities Request PDU [MS-RDPEDYC] through xrdp to the other end. This is responding with a DVC Capabilities Response PDU which we are unpacking and then not forwarding to the target (via neutrinordp) but processing it ourselves. This results in a second call to As fas as I can tell, this won't have worked properly since #1224 was merged for v0.9.9 in Oct 2018. So the simplest fix for now is probably:-
|
I'll take a look at this today. There's A LOT of code here that make what look to be significant changes to the workflow. That being said, all of this looks super important for stability and thanks for doing so! |
Also update the comment on the PR about "what's not working" :) |
Header comment updated! The only significant change to the workflow is the encoder I think.
|
Something in this breaks resize-on-the-fly with RFX Progressive with the Mac OS client. There are multiple really good fixes here. I will cherry-pick and merge the ones that I've verified don't break anything. To test resize-on-the-fly if you don't have a MacBook you can use FreeRDP. Unfortunately Microsoft put DRM protection on the .RDP files for the Azure Windows RDP client (yes, DRM for an RDP client...) so there is still no easy-to-access Windows client (other than FreeRDP) that supports resize-on-the-fly for testing. |
That sounds good - thanks. I'll wait for you. Once you've done the cherry-picking I'll slim these commits down, rebase them and figure out what the problem is (if it happens on FreeRDP). |
cf7bcf5 works but if you switch between 16 bit and 32 bit the session will still crash. Still, it's a good fix and I'll merge it in. We need to fix that bug though (it might also be in devel/release as of today though) |
bab04ed seems to cause issues with resize, skipping that one. |
c17fb9c worked great. Merged. |
3ddf526 broke resizing. Skipping. |
45e7412 also breaks resizing. At this point I think it's probably appropriate to rebase and get a copy of FreeRDP to validate the rest of these changes work with resizing. That's all I'll do for now. |
You comment bout switching between 16 and 32 bit is interesting - this means switching between GFX and non-GFX sessions. Possibly there's some state info hanging around in xorgxrdp which causes it. I'll rebase and reproduce the problems you mention above. |
I'm having problems getting dynamic resizing working at all with FreeRDP. xrdp: 7277860 Command line I'm using is:-
With FreeRDP 3.2, when I try to resize the client I get a blank screen and this in the log:-
with FreeRDP 2.90 I don't get the messages, but I get a blank screen. @Nexarian - I'll carry on investigating, but if you could post what version of FreeRDP works for you (and what the command line is) that might be useful. |
See #2929 - I'll come back to the above when I've got a better handle on how resize is supposed to work - at the moment I'm not convinced I'm on top of the spec. |
9753559
to
54acca4
Compare
This change ensures that the window manager login screen state machine always waits for the GFX virtual channel to come up before starting, rather than making autologin a special case. Autlogin isn't commonly used when testing, so this simplifies that codepath slightly.
Tested the codepath related to a GFX version not being agreed on.
xrdp_encoder_create() is split into two functions to allow for easier flow control (e.g. checking for a LAN connection type for the RFX codec)
Passing the client_info to the modules by reference (rather than by value) allows changes made by xrdp_encoder_create() to be picked up in the client_info message sent by xup to xorgxrdp.
This change doesn't try to restart the encoder on a resize if it wasn't running when we started the resize
The encoder is now started if required by the module by using server_start_encoder(). At present, only XUP does this as the other modules do not receive screen updates in a suitable form for calling server_paint_rects() / server_paint_rects_ex()
c17fb9c
to
2ce287d
Compare
Rebased, but please ignore for now. I'm going to look into whether I can optimise the GFX path through the resize state machine first. |
I'm going to close this now. Given the way resize is going to work, I think we're going to need the encoder for all GFX codepaths. We're working a lot on client-initiated dynamic resize at the moment. The server-initiated resizes (i.e. via xrandr) also need some looking at, possibly after our first GFX drop. If we keep the GFX instructions in xorgxrdp rather than moving them into xrdp we'll need to add corresponding code to the vnc module. This doesn't feel quite right to me, but we can look into that later. |
Agreed. |
A number of tidy-ups to the GFX code:-
Edit 2024-1-25 : NeutrinoRDP is now working with GFX. Comment updated
Fixes
Don't enable GFX if the client doesn't support 32 bpp.
mstsc.exe sets 'GFX available' in the early capability flags for bpp < 32, but when you try to use it, mstsc.exe fails.
Add error checking to the
xrdp_mm_egfx_send_planar_bitmap()
codepathsWithout this, you can end up with xrdp processes which don't exit when the client exits.
Improved codec logging when creating an encoder thread.
Fixed behaviour if a GFX codec cannot be chosen.
Changes
If using GFX, always wait for the egfx virtual channel to come up before starting the Window Manager state machine.
This keeps the codepath for autologin the same as the non-autologin case, and makes sure the channel is up before we draw anything.
Only start the encoder thread for xorgxrdp as other session types don't need it.
This is a fairly significant change and encompasses 4 commits in this PR.
Update NeutrinoRDP to not pass the "drdynvc" virtual channel through to the target.
Dynamic virtual channels for neutrinordp have not been working since v0.9.9. This doesn't fix that, but it does prevent a target which attempts to use drdynvc from blowing up GFX.
What's working
What's not working