Skip to content
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

Attempt at fixing corruption when minmized #277

Conversation

Nexarian
Copy link
Contributor

No description provided.

@matt335672
Copy link
Member

Looks OK to me, but I'd suggest using an enumerated type before we merge it. I find it makes it easier to locate things in the code.

@metalefty
Copy link
Member

Same point with Matt.

@Nexarian
Copy link
Contributor Author

Sounds good, I'll update it with an enum.

Can you all confirm that:

  • Without this fix, minimizing MSTSC and then restoring it results in corruption
  • With this fix, that no longer occurs?

I want to make sure what I'm seeing is accurate.

@metalefty
Copy link
Member

Let me check again.

@matt335672
Copy link
Member

I'm getting quite a bit of corruption before I even get as far as minimising the session.

Can I just check I'm building the same thing?

xrdp : branch gfx_mainline_merge_work, commit neutrinolabs/xrdp@67d044b
xorgxrdp : branch Nexarian:nexarian/fix-suppress-output-keyframe-gen commit 31c6530

Using Windows 10 mstsc.exe, settings 32-bit colour, connection quality automatic.

  Configure options:
      --enable-devel-all
      --enable-fuse
      --enable-ipv6
      --enable-jpeg
      --with-imlib2
      --enable-vsock
      --with-freetype2
      --enable-neutrinordp

  Compiled with OpenSSL 3.0.2 15 Mar 2022

Log:-

[2024-01-25T10:31:18.196+0000] [INFO ] [xrdp_egfx_create(xrdp_egfx.c:1069)] xrdp_egfx_create: error 0 channel_id 1
[2024-01-25T10:31:18.233+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1265)] xrdp_mm_egfx_caps_advertise:
[2024-01-25T10:31:18.262+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1292)]   version 0x00080004 flags 0x00000000 (index: 0)
[2024-01-25T10:31:18.287+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1292)]   version 0x00080105 flags 0x00000000 (index: 1)
[2024-01-25T10:31:18.312+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1292)]   version 0x000a0002 flags 0x00000000 (index: 2)
[2024-01-25T10:31:18.337+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1292)]   version 0x000a0200 flags 0x00000000 (index: 3)
[2024-01-25T10:31:18.362+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1292)]   version 0x000a0301 flags 0x00000000 (index: 4)
[2024-01-25T10:31:18.387+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1292)]   version 0x000a0400 flags 0x00000000 (index: 5)
[2024-01-25T10:31:18.427+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1292)]   version 0x000a0502 flags 0x00000000 (index: 6)
[2024-01-25T10:31:18.456+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1292)]   version 0x000a0600 flags 0x00000000 (index: 7)
[2024-01-25T10:31:18.485+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1347)]   replying version 0x000a0600 flags 0x00000000
[2024-01-25T10:31:18.514+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1352)] xrdp_mm_egfx_caps_advertise: xrdp_egfx_send_capsconfirm error 0 best_index 7
[2024-01-25T10:31:18.539+0000] [INFO ] [xrdp_egfx_reset_graphics(xrdp_egfx.c:669)] xrdp_egfx_reset_graphics:
[2024-01-25T10:31:18.564+0000] [INFO ] [xrdp_egfx_reset_graphics(xrdp_egfx.c:727)] xrdp_egfx_reset_graphics: width 1280 height 1024 monitorcount 1
[2024-01-25T10:31:18.589+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1358)] xrdp_mm_egfx_caps_advertise: xrdp_egfx_send_reset_graphics error 0 monitorCount 0
[2024-01-25T10:31:18.614+0000] [INFO ] [xrdp_mm_egfx_create_surfaces(xrdp_mm.c:1212)] xrdp_mm_egfx_create_surfaces: monitor count 0
[2024-01-25T10:31:18.639+0000] [INFO ] [xrdp_mm_egfx_create_surfaces(xrdp_mm.c:1225)] xrdp_mm_egfx_create_surfaces: map surface_id 0 left 0 top 0 width 1280 height 1024
[2024-01-25T10:31:18.669+0000] [INFO ] [xrdp_encoder_create(xrdp_encoder.c:123)] xrdp_encoder_create: starting gfx rfx pro codec session
[2024-01-25T10:31:18.698+0000] [INFO ] [xrdp_encoder_create(xrdp_encoder.c:167)] init_xrdp_encoder: initializing encoder codec_id 0
[2024-01-25T10:31:18.728+0000] [INFO ] [xrdp_mm_egfx_invalidate_all(xrdp_mm.c:1095)] xrdp_mm_egfx_invalidate_all:
[2024-01-25T10:31:18.728+0000] [INFO ] [proc_enc_msg(xrdp_encoder.c:523)] proc_enc_msg: thread is running
[2024-01-25T10:31:18.756+0000] [INFO ] [xrdp_mm_egfx_caps_advertise(xrdp_mm.c:1371)] xrdp_mm_egfx_caps_advertise: egfx created.

@matt335672
Copy link
Member

I've added Jay's patch to remove the timeout check in rdpScheduleDeferredUpdate() now.

I'm unable to reproduce corruption on minimising and maximising with or without #277 (but I'm seeing other issues). @Nexarian - what applications are you running? I've tried glxgears.

@metalefty
Copy link
Member

I tried this combination of xrdp and xorgxrdp but I can't reproduce the corruption. Also this patch don't cause any corruption.

xrdp: neutrinolabs/xrdp@67d044b
xorgxrdp: 26b41d7 + this PR

image

{
LLOGLN(10, ("rdpDeferredUpdateCallback: suppress_output set"));
return 0;
}
else if (clientCon->suppress_output == 2)
{
id.flags = KEY_FRAME_REQUESTED;
Copy link
Member

@metalefty metalefty Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about some log like this here?

LLOGLN(0, ("rdpDeferredUpdateCallback: KEY_FRAME_REQUESTED"));

@metalefty metalefty deleted the branch neutrinolabs:gfx_mainline_merge_work February 8, 2024 13:11
@metalefty metalefty closed this Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants