neutrinolabs / xrdp

xrdp: an open source RDP server
http://www.xrdp.org/
Apache License 2.0
5.6k stars 1.73k forks source link

Implement GFX graphics pipeline in xrdp #1422

Closed jsorg71 closed 6 months ago

jsorg71 commented 4 years ago

https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpegfx/da5c75f9-cd99-450c-98c4-014a496942b0

Related issues. GFX issues https://github.com/neutrinolabs/xrdp/issues/1174 https://github.com/neutrinolabs/xrdp/issues/1272 https://github.com/neutrinolabs/xrdp/issues/1420

BloodyIron commented 4 years ago

Yay excited! :D

metalefty commented 4 years ago

@jsorg71 How big do you estimate the volume of implementing GFX?

jsorg71 commented 4 years ago

@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.

Nexarian commented 4 years ago

I'm excited about this as well!

jsorg71 commented 4 years ago

I'll try to update here the progress. I can get a client connection and open the channel. Here is a screen shot of xrdp drawing 2 green boxes with gfx. egfx-drawing

jsorg71 commented 4 years ago

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.

Nexarian commented 4 years ago

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 notifications@github.com 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 https://github.com/neutrinolabs/xrdp/issues/1422?email_source=notifications&email_token=AA4UBHKDHBVFNFF6GXLZWQDQUTQYBA5CNFSM4JAT7VQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEQ7OGI#issuecomment-555874073, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4UBHKNIPMDBARYM3M5QILQUTQYBANCNFSM4JAT7VQA .

iFrozenPhoenix commented 4 years ago

@jsorg71 Are there any updates?

jsorg71 commented 4 years ago

login screen drawing with gfx gfx-login

jsorg71 commented 4 years ago

Got an h264 session running now using FreeRDP with /gfx-h264 option

BloodyIron commented 4 years ago

Can that be GPU accelerated on the server-side? :O!

Nexarian commented 4 years ago

Likewise, does it work with the nvidia_hack? :)

BloodyIron commented 4 years ago

Well I mean nVidia/AMD/intel/whatever...

jsorg71 commented 4 years ago

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. https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpegfx/954d7546-6873-4466-95c8-20a7569c43e5

Nexarian commented 4 years ago

@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?

jsorg71 commented 4 years ago

git clone --branch egfx --recursive https://github.com/jsorg71/xrdp.git you need to configure with --enable-x264 git clone --branch egfx --recursive https://github.com/jsorg71/xorgxrdp.git configure with --enable-glamor optional

example connection with freerdp 3.0, not sure what version freerdp added /gfx:avc420 or /gfx-h264 xfreerdp /gfx:avc420 /v:192.168.1.1

Nexarian commented 4 years ago

I'm trying to use it right now and can't seem to get either /gfx:avc420 or /gfx-h264 working -- it appears neither flag exists (and I can find no references to either in the xfreerdp documentation). I'm running xfreerdp on Mac OS Catalina 1.15.5 and installing it with brew install freerdp --HEAD so I have what I believe to be the latest version.

Nexarian commented 4 years ago

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.

jsorg71 commented 4 years ago

@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. Note, with the latest push, MSTSC on windows works, that's big.

Nexarian commented 4 years ago

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.

matt335672 commented 4 years ago

Hi @Nexarian

I'm not really following this thread in any detail, but commit 5cd36c511cab76ae4a7c14a792055449077e4fc1 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.

Nexarian commented 4 years ago

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.

Nexarian commented 4 years ago

Ok, interesting. It works with this command line:

/usr/local/bin/xfreerdp /ipv6 /bpp:32 /v:[server] /p:[password] /w:2560 /h:1396 /gfx:avc420 +glyph-cache

But it hangs for A LONG time before it might start rendering. It may never start. I think maybe there is a deadlock happening.

Nexarian commented 4 years ago

After further testing, adding /sec:rdp seems to slow down the communication by a lot.

Nexarian commented 4 years ago

Actually, with /sec:rdp on Gnome isn't functional at all and I rarely get the title bar.

jsorg71 commented 4 years ago

I think I updated the repos last week they should be fairly recent. @Nexarian the login screen is not compressed so that might be the slow part at beginning. Is that a typeo? I think /v: is the server name to connect to. Can you try a smaller window size for now like 1024x768?

Nexarian commented 4 years ago

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!

Nexarian commented 4 years ago

I just had another strange incident when reconnecting. The mouse cursor would change to correspond to the actual elements that were on the screen (such as change to a capital "i" icon when hovering over a textbox, but the screen itself was blank. It took another minute for the actual UI to become active.

Also /sec:rdp doesn't seem to matter anymore.

derekschrock commented 4 years ago

I have this running on FreeBSD 12.1 with glamor (i915) and the MS client. I see the egfx logs in xrdp logs however like when using RFX you see an RFX message in xorg log. Does EGFX do the same or you know you're egfx because of the egfx messages in the log?

I've also tested with the latest macOS client and it will connect, display the painter/login screen, freeze for a second then disconnect. Didn't check the logs to see if anything was different between MS and macOS client. A quick glance didn't show much. The same is true with macOS beta client Version 10.4.1 (1817) connects, login screen, disconnects.

Edits... spoke too soon I forgot to kill the system xrdp. The beta client doesn't work it acts the same as the current 10.4.0.

derekschrock commented 4 years ago

Does this give anything when it comes to the macOS client?

MS macOS client 10.4.0:

xrdp_mm_drdynvc_up: gfx capable client
xrdp:xrdp_egfx [1992667619]: xrdp_egfx_create: error 0 channel_id 1
xrdp:xrdp_egfx [1992667624]: xrdp_egfx_open_response:
xrdp:xrdp_egfx [1992667624]: xrdp_egfx_process_capsadvertise:
xrdp:xrdp_mm [1992667624]: xrdp_mm_egfx_caps_advertise:
xrdp:xrdp_mm [1992667624]:   version 0x00080004 flags 0x00000002
xrdp:xrdp_mm [1992667624]:   version 0x00080105 flags 0x00000002
xrdp:xrdp_mm [1992667624]:   version 0x000a0002 flags 0x00000022
xrdp:xrdp_mm [1992667624]:   version 0x000a0200 flags 0x00000022
xrdp:xrdp_mm [1992667624]:   version 0x000a0301 flags 0x00000020
xrdp:xrdp_mm [1992667624]:   version 0x000a0400 flags 0x00000002
xrdp:xrdp_mm [1992667624]:   replying version 0x000a0400 flags 0x00000002
...

Windows Client:

xrdp_mm_drdynvc_up: gfx capable client  
xrdp:xrdp_egfx [1992583769]: xrdp_egfx_create: error 0 channel_id 1                                                                                                                                         xrdp:xrdp_egfx [1992583771]: xrdp_egfx_open_response:                                                                                                                                                       xrdp:xrdp_egfx [1992583782]: xrdp_egfx_process_capsadvertise:                                                                                                                                               xrdp:xrdp_mm [1992583782]: xrdp_mm_egfx_caps_advertise:                                                                                                                                                     xrdp:xrdp_mm [1992583782]:   version 0x00080004 flags 0x00000000                                                                                                                                            xrdp:xrdp_mm [1992583782]:   version 0x00080105 flags 0x00000000                                                                                                                                            
xrdp:xrdp_mm [1992583782]:   version 0x000a0002 flags 0x00000000                                                                                                                                            xrdp:xrdp_mm [1992583782]:   version 0x000a0200 flags 0x00000000                                                                                                                                            xrdp:xrdp_mm [1992583782]:   version 0x000a0301 flags 0x00000000                                                                                                                                            xrdp:xrdp_mm [1992583782]:   version 0x000a0400 flags 0x00000000                                                                                                                                            
xrdp:xrdp_mm [1992583782]:   version 0x000a0502 flags 0x00000000                                                                                                                                            xrdp:xrdp_mm [1992583782]:   version 0x000a0600 flags 0x00000000                                                                                                                                            
xrdp:xrdp_mm [1992583782]:   replying version 0x000a0400 flags 0x00000000

Two less versions and however the same is used (replyed?) 0x000a0400. macOS has extra flags set? 0x0...2

Nexarian commented 3 years ago

After a lot more testing, I've determined that with mate on Ubuntu 20.04, it takes somewhere from 20 - 30 seconds for the session to "wake up" after connecting, with the most common time somewhere around 28 seconds. This is very consistent.

This is why at first, I thought it wasn't working. I am used to the connection being established and working immediately. It feels like there's some polling check or timeout that happens every 30 seconds or so that might be the reason for this.

jsorg71 commented 3 years ago

I pushed some changes so login screen is compressed using planar codec. Hopefully the pause is gone.

Nexarian commented 3 years ago

That does fix it! Awesome! What's next to get this moved into the devel branch? And then next, nvidia_hack!

Also out of curiosity, why is it that the login screen caused such a delay? I was hard-coding my username and password with the freerdp command line, so the login screen shouldn't even appear, right? Or does it flash briefly imperceptibly?

Nexarian commented 3 years ago

I just tested it with the Microsoft Mac OS X client instead of FreeRDP, and it does connect and it does work, but it's so slow as to be essentially unusable. Perhaps the Mac OS X client doesn't support x264?

Can I help debug that?

derekschrock commented 3 years ago

What version of the client?

Nexarian commented 3 years ago

Ah, not the latest! 10.3.12. I'll see if I can update to 10.4.0

Nexarian commented 3 years ago

Seems that 10.4.0 doesn't work at all now. I once got the screen background to flash when I connected first with FreeRDP and then with MS Remote Desktop, but it always says "Your session ended because of an error. If this keeps happening, contact your network administrator for assistance."

derekschrock commented 3 years ago

On Tue, Sep 22, 2020 at 05:05:23PM EDT, Nexarian wrote:

Seems that 10.4.0 doesn't work at all now. I once got the screen background to flash when I connected first with FreeRDP and then with MS Remote Desktop, but it always says "Your session ended because of an error. If this keeps happening, contact your network administrator for assistance."

Yeah, that's what I was getting with the current and beta version.

jsorg71 commented 3 years ago

@Nexarian I did a couple of cherry-picks, you should be able to use xorgxrdp branch nvidia_hack with xrdp branch egfx although I did not try.

Nexarian commented 3 years ago

Tried it, and seems like something is still wrong. Thanks for trying to combine them!

In any case, I think the more urgent problem is that this doesn't work with the Microsoft Remote Desktop client on Mac. I think that might mean there's a protocol difference.

Nexarian commented 3 years ago

And of course, let me know how I can help in any way.

Nexarian commented 3 years ago

Sep 23 21:28:44 [hostname] kernel: [108319.803020] xrdp[150762]: segfault at 6c ip 0000558f31b58ffe sp 00007ffdd2816980 error 4 in xrdp[558f31b4d000+23000] Sep 23 21:28:44 [hostname] kernel: [108319.803031] Code: 89 82 04 49 00 00 31 c0 c3 0f 1f 00 f3 0f 1e fa 41 54 49 89 fc 55 89 d5 53 48 83 ec 10 48 8b 5f 78 83 fe ff 0f 84 9a 00 00 00 <8b> 53 6c 48 89 d8 85 d2 75 58 8b 53 5c 85 ed 78 04 39 d5 7e 3d 44

Now to figure out what code path that kernel segfault corresponds to...

derekschrock commented 3 years ago

Since you can't control the experience setting (it's 7, auto) on the macOS client xrdp won't create a gfx/rfx encoder. No encoder means sigfault with self->encoder.

(lldb) bt                                                                                                                                                                                                   
* thread #1, name = 'xrdp', stop reason = signal SIGSEGV                                                                                                                                                    
  * frame #0: 0x0000000000218f3a xrdp`xrdp_mm_egfx_frame_ack(user=0x0000000801562000, queue_depth=-411041792, frame_id=1, frames_decoded=1) at xrdp_mm.c:1251:13                                            
    frame #1: 0x00000000002285f4 xrdp`xrdp_egfx_process [inlined] xrdp_egfx_process_frame_ack(egfx=<unavailable>, s=<unavailable>) at xrdp_egfx.c:560:9                                                     
    frame #2: 0x00000000002285c2 xrdp`xrdp_egfx_process(egfx=<unavailable>, s=0x00007fffffffe2a0) at xrdp_egfx.c:667                                                                                        
    frame #3: 0x00000000002284a2 xrdp`xrdp_egfx_data(id=<unavailable>, chan_id=<unavailable>, data="\r", bytes=20) at xrdp_egfx.c:750:16                                                                    
    frame #4: 0x00000008002bd14a libxrdp.so.0`xrdp_rdp_recv(self=0x00000008014b6000, s=0x0000000800ddc320, code=0x00007fffffffe36c) at xrdp_rdp.c:471:21                                                    
    frame #5: 0x00000008002a63d6 libxrdp.so.0`libxrdp_process_data(session=0x0000000800df3000, s=0x0000000800ddc320) at libxrdp.c:212:13                                                                    
    frame #6: 0x000000000021ff88 xrdp`xrdp_process_data_in [inlined] xrdp_process_loop(self=<unavailable>, s=<unavailable>) at xrdp_process.c:76:14
    frame #7: 0x000000000021ff77 xrdp`xrdp_process_data_in(self=<unavailable>) at xrdp_process.c:204
    frame #8: 0x0000000800292eb4 libcommon.so.0`trans_check_wait_objs(self=0x000000080147a300) at trans.c:426:26
    frame #9: 0x000000000021fe7b xrdp`xrdp_process_main_loop(self=<unavailable>) at xrdp_process.c:287:17
    frame #10: 0x0000000000214c78 xrdp`xrdp_listen_main_loop [inlined] xrdp_process_run(in_val=<unavailable>) at xrdp_listen.c:151:5
    frame #11: 0x0000000000214c59 xrdp`xrdp_listen_main_loop [inlined] xrdp_listen_fork(self=<unavailable>, server_trans=0x000000080147a300) at xrdp_listen.c:803
    frame #12: 0x0000000000214bc1 xrdp`xrdp_listen_main_loop(self=0x0000000800de4450) at xrdp_listen.c:952
    frame #13: 0x000000000020de2a xrdp`main(argc=<unavailable>, argv=<unavailable>) at xrdp.c:679:19
    frame #14: 0x000000000020c10f xrdp`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1.c:76:7

https://github.com/neutrinolabs/xrdp/blob/627da8da3e1b96719e142ce4481da613588a16da/xrdp/xrdp_encoder.c#L70

Hacking it and just adding a ...if (0 && ... to xrdp_encoder_create to by-pass the check, the encoder is created and makes it so xrdp doesn't crash but now we're left with a green screen which tells me there's something odd going on with xorgxrdp.

metalefty commented 3 years ago

Regarding RFX, connectionType must be set to 6 (LAN). However, it might be different for GFX. We may need to change the code. I think GFX will work when connectionType != 6. I'm looking for the document.

Furthermore, if the connectionType field is set to any value other than CONNECTION_TYPE_LAN (0x06), then the RemoteFX server SHOULD NOT indicate that the RemoteFX codec is supported, https://msdn.microsoft.com/en-us/library/ff635369.aspx

hottestchilipepper commented 3 years ago

git clone --branch egfx --recursive https://github.com/jsorg71/xrdp.git you need to configure with --enable-x264 git clone --branch egfx --recursive https://github.com/jsorg71/xorgxrdp.git configure with --enable-glamor optional

example connection with freerdp 3.0, not sure what version freerdp added /gfx:avc420 or /gfx-h264 xfreerdp /gfx:avc420 /v:192.168.1.1

Hi, I did that you explained. And I install linux nvidia driver from official web site on my Ubuntu 20.04. With successful build of xrdp and xorgxrdp on branch egfx, I can connect via Windows mstsc. However, It seems that it uses software rendering.

~$ glxgears -info
GL_RENDERER   = llvmpipe (LLVM 10.0.0, 128 bits)
GL_VERSION    = 3.1 Mesa 20.0.8
GL_VENDOR     = VMware, Inc.
GL_EXTENSIONS = GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_compression_s3tc GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_ATI_fragment_shader GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_depth_clamp GL_NV_fog_distance GL_APPLE_packed_pixels GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture GL_NV_primitive_restart GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_ATI_texture_compression_3dc GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_mirror_clamp GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_ATI_texture_mirror_once GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_texture_array GL_EXT_texture_compression_latc GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_EXT_texture_buffer_object GL_AMD_texture_texture4 GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_buffer_object GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_AMD_conservative_depth GL_AMD_draw_buffers_blend GL_AMD_seamless_cubemap_per_texture GL_AMD_shader_stencil_export GL_ARB_ES2_compatibility GL_ARB_blend_func_extended GL_ARB_compatibility GL_ARB_debug_output GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_shader_stencil_export GL_ARB_shader_texture_lod GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_multisample GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_ARB_draw_indirect GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_texture_compression_bptc GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_viewport_array GL_EXT_direct_state_access GL_AMD_multi_draw_indirect GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_base_instance GL_ARB_compressed_texture_pixel_storage GL_ARB_conservative_depth GL_ARB_internalformat_query GL_ARB_map_buffer_alignment GL_ARB_shader_atomic_counters GL_ARB_shader_image_load_store GL_ARB_shading_language_420pack GL_ARB_shading_language_packing GL_ARB_texture_storage GL_ARB_transform_feedback_instanced GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_transform_feedback GL_AMD_query_buffer_object GL_AMD_shader_trinary_minmax GL_ARB_ES3_compatibility GL_ARB_arrays_of_arrays GL_ARB_clear_buffer_object GL_ARB_compute_shader GL_ARB_copy_image GL_ARB_explicit_uniform_location GL_ARB_fragment_layer_viewport GL_ARB_framebuffer_no_attachments GL_ARB_invalidate_subdata GL_ARB_multi_draw_indirect GL_ARB_program_interface_query GL_ARB_shader_image_size GL_ARB_shader_storage_buffer_object GL_ARB_stencil_texturing GL_ARB_texture_buffer_range GL_ARB_texture_query_levels GL_ARB_texture_storage_multisample GL_ARB_texture_view GL_ARB_vertex_attrib_binding GL_KHR_debug GL_KHR_texture_compression_astc_ldr GL_ARB_buffer_storage GL_ARB_clear_texture GL_ARB_enhanced_layouts GL_ARB_indirect_parameters GL_ARB_internalformat_query2 GL_ARB_multi_bind GL_ARB_query_buffer_object GL_ARB_seamless_cubemap_per_texture GL_ARB_shader_draw_parameters GL_ARB_shader_group_vote GL_ARB_shading_language_include GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_stencil8 GL_ARB_vertex_type_10f_11f_11f_rev GL_EXT_shader_integer_mix GL_ARB_clip_control GL_ARB_conditional_render_inverted GL_ARB_cull_distance GL_ARB_derivative_control GL_ARB_direct_state_access GL_ARB_get_texture_sub_image GL_ARB_pipeline_statistics_query GL_ARB_transform_feedback_overflow_query GL_EXT_polygon_offset_clamp GL_KHR_context_flush_control GL_ARB_parallel_shader_compile GL_ARB_shader_atomic_counter_ops GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_MESA_shader_integer_functions GL_ARB_polygon_offset_clamp GL_KHR_parallel_shader_compile GL_EXT_EGL_image_storage GL_EXT_texture_sRGB_R8 GL_EXT_EGL_sync 
VisualID 693, 0x2b5
6375 frames in 5.0 seconds = 1274.630 FPS
6046 frames in 5.0 seconds = 1209.105 FPS
X connection to :10.0 broken (explicit kill or server shutdown).
~$ lspci
00:00.0 Host bridge: Intel Corporation Core Processor DMI (rev 11)
00:03.0 PCI bridge: Intel Corporation Core Processor PCI Express Root Port 1 (rev 11)
00:08.0 System peripheral: Intel Corporation Core Processor System Management Registers (rev 11)
00:08.1 System peripheral: Intel Corporation Core Processor Semaphore and Scratchpad Registers (rev 11)
00:08.2 System peripheral: Intel Corporation Core Processor System Control and Status Registers (rev 11)
00:08.3 System peripheral: Intel Corporation Core Processor Miscellaneous Registers (rev 11)
00:10.0 System peripheral: Intel Corporation Core Processor QPI Link (rev 11)
00:10.1 System peripheral: Intel Corporation Core Processor QPI Routing and Protocol Registers (rev 11)
00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)
00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a6)
00:1f.0 ISA bridge: Intel Corporation P55 Chipset LPC Interface Controller (rev 06)
00:1f.2 IDE interface: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA IDE Controller (rev 06)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)
00:1f.5 IDE interface: Intel Corporation 5 Series/3400 Series Chipset 2 port SATA IDE Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GK106 [GeForce GTX 660] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK106 HDMI Audio Controller (rev a1)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-Core Registers (rev 04)
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 04)
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 04)
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 04)
ff:03.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller (rev 04)
ff:03.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Target Address Decoder (rev 04)
ff:03.4 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Test Registers (rev 04)
ff:04.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Control Registers (rev 04)
ff:04.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Address Registers (rev 04)
ff:04.2 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Rank Registers (rev 04)
ff:04.3 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 0 Thermal Control Registers (rev 04)
ff:05.0 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Control Registers (rev 04)
ff:05.1 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Address Registers (rev 04)
ff:05.2 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Rank Registers (rev 04)
ff:05.3 Host bridge: Intel Corporation Core Processor Integrated Memory Controller Channel 1 Thermal Control Registers (rev 04)
~$ nvidia-smi
Thu Oct 29 06:07:49 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.28       Driver Version: 455.28       CUDA Version: 11.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 660     Off  | 00000000:01:00.0 N/A |                  N/A |
| 30%   31C    P8    N/A /  N/A |     55MiB /  1991MiB |     N/A      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
# cat .xorgxrdp.10.log
[    96.216] 
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[    96.216] Build Operating System: Linux 4.15.0-115-generic x86_64 Ubuntu
[    96.216] Current Operating System: Linux ubuntu 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64
[    96.216] Kernel command line: BOOT_IMAGE=/vmlinuz-5.4.0-52-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro maybe-ubiquity
[    96.216] Build Date: 04 September 2020  01:34:27PM
[    96.216] xorg-server 2:1.20.8-2ubuntu2.4 (For technical support please see http://www.ubuntu.com/support) 
[    96.216] Current version of pixman: 0.38.4
[    96.216]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    96.216] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    96.216] (++) Log file: ".xorgxrdp.10.log", Time: Thu Oct 29 05:29:24 2020
[    96.256] (++) Using config file: "/etc/X11/xrdp/xorg.conf"
[    96.256] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    96.267] (==) ServerLayout "X11 Server"
[    96.267] (**) |-->Screen "Screen (xrdpdev)" (0)
[    96.267] (**) |   |-->Monitor "Monitor"
[    96.267] (**) |   |-->Device "Video Card (xrdpdev)"
[    96.267] (**) |-->Input Device "xrdpMouse"
[    96.267] (**) |-->Input Device "xrdpKeyboard"
[    96.267] (**) Option "DontVTSwitch" "on"
[    96.267] (**) Option "AutoAddDevices" "off"
[    96.267] (**) Not automatically adding devices
[    96.267] (==) Automatically enabling devices
[    96.267] (==) Automatically adding GPU devices
[    96.267] (==) Automatically binding GPU devices
[    96.267] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    96.267] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    96.267]    Entry deleted from font path.
[    96.267] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    96.267]    Entry deleted from font path.
[    96.267] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    96.267]    Entry deleted from font path.
[    96.268] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    96.268]    Entry deleted from font path.
[    96.268] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    96.268]    Entry deleted from font path.
[    96.268] (==) FontPath set to:
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/Type1,
    built-ins
[    96.268] (==) ModulePath set to "/usr/lib/xorg/modules"
[    96.268] (II) Loader magic: 0x55d3d7b2c020
[    96.268] (II) Module ABI versions:
[    96.268]    X.Org ANSI C Emulation: 0.4
[    96.268]    X.Org Video Driver: 24.1
[    96.268]    X.Org XInput driver : 24.1
[    96.268]    X.Org Server Extension : 10.0
[    96.273] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c2
[    96.273] (II) xfree86: Adding drm device (/dev/dri/card0)
[    96.275] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
[    96.279] (--) PCI:*(1@0:0:0) 10de:11c0:0000:0000 rev 161, Mem @ 0xfa000000/16777216, 0xd8000000/134217728, 0xd6000000/33554432, I/O @ 0x0000dc00/128, BIOS @ 0x????????/131072
[    96.279] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[    96.279] (II) LoadModule: "dbe"
[    96.279] (II) Module "dbe" already built-in
[    96.279] (II) LoadModule: "ddc"
[    96.280] (II) Module "ddc" already built-in
[    96.280] (II) LoadModule: "extmod"
[    96.280] (II) Module "extmod" already built-in
[    96.280] (II) LoadModule: "glx"
[    96.280] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    96.280] (II) Module glx: vendor="X.Org Foundation"
[    96.280]    compiled for 1.20.8, module version = 1.0.0
[    96.281]    ABI class: X.Org Server Extension, version 10.0
[    96.281] (II) LoadModule: "int10"
[    96.281] (II) Loading /usr/lib/xorg/modules/libint10.so
[    96.315] (II) Module int10: vendor="X.Org Foundation"
[    96.315]    compiled for 1.20.8, module version = 1.0.0
[    96.315]    ABI class: X.Org Video Driver, version 24.1
[    96.315] (II) LoadModule: "record"
[    96.315] (II) Module "record" already built-in
[    96.315] (II) LoadModule: "vbe"
[    96.315] (II) Loading /usr/lib/xorg/modules/libvbe.so
[    96.329] (II) Module vbe: vendor="X.Org Foundation"
[    96.329]    compiled for 1.20.8, module version = 1.1.0
[    96.329]    ABI class: X.Org Video Driver, version 24.1
[    96.329] (II) LoadModule: "xorgxrdp"
[    96.329] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[    96.398] (II) Module XORGXRDP: vendor="X.Org Foundation"
[    96.398]    compiled for 1.20.8, module version = 0.2.13
[    96.398]    ABI class: X.Org Video Driver, version 24.1
[    96.398] xorgxrdpSetup:
[    96.398] (II) LoadModule: "fb"
[    96.398] (II) Loading /usr/lib/xorg/modules/libfb.so
[    96.398] (II) Module fb: vendor="X.Org Foundation"
[    96.398]    compiled for 1.20.8, module version = 1.0.0
[    96.398]    ABI class: X.Org ANSI C Emulation, version 0.4
[    96.398] (II) LoadModule: "xrdpdev"
[    96.399] (II) Loading /usr/lib/xorg/modules/drivers/xrdpdev_drv.so
[    96.477] (II) Module XRDPDEV: vendor="X.Org Foundation"
[    96.477]    compiled for 1.20.8, module version = 0.2.13
[    96.477]    ABI class: X.Org Video Driver, version 24.1
[    96.477] xrdpdevSetup:
[    96.477] (II) LoadModule: "xrdpmouse"
[    96.477] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[    96.544] (II) Module XRDPMOUSE: vendor="X.Org Foundation"
[    96.544]    compiled for 1.20.8, module version = 0.2.13
[    96.544]    Module class: X.Org XInput Driver
[    96.544]    ABI class: X.Org XInput driver, version 24.1
[    96.544] rdpmousePlug:
[    96.544] (II) LoadModule: "xrdpkeyb"
[    96.544] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[    96.583] (II) Module XRDPKEYB: vendor="X.Org Foundation"
[    96.583]    compiled for 1.20.8, module version = 0.2.13
[    96.583]    Module class: X.Org XInput Driver
[    96.583]    ABI class: X.Org XInput driver, version 24.1
[    96.583] rdpkeybPlug:
[    96.583] rdpIdentify:
[    96.583] (II) XRDPDEV: driver for xrdp: XRDPDEV
[    96.583] rdpDriverFunc: op 10
[    96.583] (WW) Falling back to old probe method for XRDPDEV
[    96.583] rdpProbe:
[    96.583] (II) Loading sub module "fb"
[    96.583] (II) LoadModule: "fb"
[    96.583] (II) Loading /usr/lib/xorg/modules/libfb.so
[    96.584] (II) Module fb: vendor="X.Org Foundation"
[    96.584]    compiled for 1.20.8, module version = 1.0.0
[    96.584]    ABI class: X.Org ANSI C Emulation, version 0.4
[    96.584] rdpProbe: found DRMDevice xorg.conf value [/dev/dri/renderD128]
[    96.584] rdpProbe: found DRI3 xorg.conf value [1]
[    96.584] (II) XRDPDEV(0): using default device
[    96.584] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    96.584] rdpPreInit:
[    96.584] rdpPreInit: /dev/dri/renderD128 open failed
[    96.584] (**) XRDPDEV(0): Depth 24, (--) framebuffer bpp 32
[    96.584] (==) XRDPDEV(0): RGB weight 888
[    96.584] (==) XRDPDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[    96.584] (==) XRDPDEV(0): Default visual is TrueColor
[    96.584] (==) XRDPDEV(0): DPI set to (96, 96)
[    96.584] (II) XRDPDEV(0):   mode "640x480" ok
[    96.584] (II) XRDPDEV(0):   mode "800x600" ok
[    96.584] (II) XRDPDEV(0): Virtual size is 800x600 (pitch 800)
[    96.584] (**) XRDPDEV(0):  Default mode "800x600": 36.0 MHz (scaled from 0.0 MHz), 35.2 kHz, 56.2 Hz
[    96.584] (II) XRDPDEV(0): Modeline "800x600"x0.0   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz d)
[    96.584] rdpScreenInit: virtualX 800 virtualY 600 rgbBits 8 depth 24
[    96.584] rdpScreenInit: pfbMemory bytes 1920000
[    96.584] rdpScreenInit: pfbMemory 0x7fa61b998010
[    96.584] rdpSimdInit: assigning yuv functions
[    96.584] rdpSimdInit: cpuid ax 1 cx 0 return ax 0x000106e5 bx 0x06100800 cx 0x0098e3fd dx 0xbfebfbff
[    96.584] rdpSimdInit: sse2 amd64 yuv functions assigned
[    96.584] (==) XRDPDEV(0): Backing store enabled
[    96.584] rdpClientConInit: disconnect idle session after [0] sec
[    96.584] rdpClientConInit: kill disconnected [0] timeout [0] sec
[    96.584] rdpXvInit: depth 24
[    96.584] rdpScreenInit: out
[    96.584] (II) Initializing extension Generic Event Extension
[    96.584] (II) Initializing extension SHAPE
[    96.584] (II) Initializing extension MIT-SHM
[    96.584] (II) Initializing extension XInputExtension
[    96.585] (II) Initializing extension XTEST
[    96.585] (II) Initializing extension BIG-REQUESTS
[    96.585] (II) Initializing extension SYNC
[    96.585] (II) Initializing extension XKEYBOARD
[    96.585] (II) Initializing extension XC-MISC
[    96.585] (II) Initializing extension SECURITY
[    96.585] (II) Initializing extension XFIXES
[    96.585] (II) Initializing extension RENDER
[    96.586] (II) Initializing extension RANDR
[    96.586] (II) Initializing extension COMPOSITE
[    96.586] (II) Initializing extension DAMAGE
[    96.586] (II) Initializing extension MIT-SCREEN-SAVER
[    96.586] (II) Initializing extension DOUBLE-BUFFER
[    96.586] (II) Initializing extension RECORD
[    96.586] (II) Initializing extension DPMS
[    96.586] (II) Initializing extension Present
[    96.587] (II) Initializing extension DRI3
[    96.587] (II) Initializing extension X-Resource
[    96.587] (II) Initializing extension XVideo
[    96.587] (II) Initializing extension XVideo-MotionCompensation
[    96.587] (II) Initializing extension SELinux
[    96.587] (II) SELinux: Disabled on system
[    96.587] (II) Initializing extension GLX
[    96.587] (II) AIGLX: Screen 0 is not DRI2 capable
[    99.016] (II) IGLX: Loaded and initialized swrast
[    99.016] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[    99.016] (II) Initializing extension XFree86-VidModeExtension
[    99.017] (II) Initializing extension XFree86-DGA
[    99.017] (II) Initializing extension XFree86-DRI
[    99.017] (II) Initializing extension DRI2
[    99.017] rdpCreateScreenResources:
[    99.065] (II) Using input driver 'XRDPMOUSE' for 'xrdpMouse'
[    99.065] (**) Option "CorePointer"
[    99.065] (**) xrdpMouse: always reports core events
[    99.065] rdpmousePreInit: drv 0x55d3d8d82f40 info 0x55d3d8ef63f0, flags 0x0
[    99.065] (II) XINPUT: Adding extended input device "xrdpMouse" (type: Mouse, id 6)
[    99.065] rdpmouseControl: what 0
[    99.065] rdpmouseDeviceInit:
[    99.065] rdpmouseCtrl:
[    99.065] rdpRegisterInputCallback: type 1 proc 0x7fa61bfee430
[    99.065] (**) xrdpMouse: (accel) keeping acceleration scheme 1
[    99.065] (**) xrdpMouse: (accel) acceleration profile 0
[    99.065] (**) xrdpMouse: (accel) acceleration factor: 2.000
[    99.065] (**) xrdpMouse: (accel) acceleration threshold: 4
[    99.065] rdpmouseControl: what 1
[    99.065] rdpmouseDeviceOn:
[    99.065] (II) Using input driver 'XRDPKEYB' for 'xrdpKeyboard'
[    99.065] (**) Option "CoreKeyboard"
[    99.065] (**) xrdpKeyboard: always reports core events
[    99.065] rdpkeybPreInit: drv 0x55d3d8d7e400 info 0x55d3d9067010, flags 0x0
[    99.065] (II) XINPUT: Adding extended input device "xrdpKeyboard" (type: Keyboard, id 7)
[    99.065] rdpkeybControl: what 0
[    99.065] rdpkeybDeviceInit:
[    99.085] rdpkeybChangeKeyboardControl:
[    99.085] rdpkeybChangeKeyboardControl: autoRepeat on
[    99.085] rdpRegisterInputCallback: type 0 proc 0x7fa61bfe9900
[    99.085] rdpkeybControl: what 1
[    99.085] rdpkeybDeviceOn:
[    99.102] (II) config/udev: Adding input device Power Button (/dev/input/event1)
[    99.102] (II) AutoAddDevices is off - not adding device.
[    99.103] (II) config/udev: Adding input device Power Button (/dev/input/event0)
[    99.103] (II) AutoAddDevices is off - not adding device.
[    99.103] (II) config/udev: Adding drm device (/dev/dri/card0)
[    99.103] (II) xfree86: Adding drm device (/dev/dri/card0)
[    99.103] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
[    99.104] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event15)
[    99.104] (II) AutoAddDevices is off - not adding device.
[    99.104] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event16)
[    99.104] (II) AutoAddDevices is off - not adding device.
[    99.105] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=8 (/dev/input/event17)
[    99.105] (II) AutoAddDevices is off - not adding device.
[    99.105] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=9 (/dev/input/event18)
[    99.105] (II) AutoAddDevices is off - not adding device.
[    99.106] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=10 (/dev/input/event19)
[    99.106] (II) AutoAddDevices is off - not adding device.
[    99.106] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=11 (/dev/input/event20)
[    99.106] (II) AutoAddDevices is off - not adding device.
[    99.107] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=12 (/dev/input/event21)
[    99.107] (II) AutoAddDevices is off - not adding device.
[    99.107] (II) config/udev: Adding input device HDA Intel MID Front Mic (/dev/input/event7)
[    99.107] (II) AutoAddDevices is off - not adding device.
[    99.107] (II) config/udev: Adding input device HDA Intel MID Rear Mic (/dev/input/event8)
[    99.107] (II) AutoAddDevices is off - not adding device.
[    99.108] (II) config/udev: Adding input device HDA Intel MID Line (/dev/input/event9)
[    99.108] (II) AutoAddDevices is off - not adding device.
[    99.108] (II) config/udev: Adding input device HDA Intel MID Line Out Front (/dev/input/event10)
[    99.108] (II) AutoAddDevices is off - not adding device.
[    99.109] (II) config/udev: Adding input device HDA Intel MID Line Out Surround (/dev/input/event11)
[    99.109] (II) AutoAddDevices is off - not adding device.
[    99.109] (II) config/udev: Adding input device HDA Intel MID Line Out CLFE (/dev/input/event12)
[    99.109] (II) AutoAddDevices is off - not adding device.
[    99.109] (II) config/udev: Adding input device HDA Intel MID Line Out Side (/dev/input/event13)
[    99.109] (II) AutoAddDevices is off - not adding device.
[    99.110] (II) config/udev: Adding input device HDA Intel MID Front Headphone (/dev/input/event14)
[    99.110] (II) AutoAddDevices is off - not adding device.
[    99.111] (II) config/udev: Adding input device UZiTech Gkeyboard II No Ghost Key Keyboard (/dev/input/event2)
[    99.111] (II) AutoAddDevices is off - not adding device.
[    99.112] (II) config/udev: Adding input device UZiTech Gkeyboard II No Ghost Key Keyboard Consumer Control (/dev/input/event3)
[    99.112] (II) AutoAddDevices is off - not adding device.
[    99.112] (II) config/udev: Adding input device UZiTech Gkeyboard II No Ghost Key Keyboard System Control (/dev/input/event4)
[    99.112] (II) AutoAddDevices is off - not adding device.
[    99.113] (II) config/udev: Adding input device UZiTech Gkeyboard II No Ghost Key Keyboard Mouse (/dev/input/event5)
[    99.113] (II) AutoAddDevices is off - not adding device.
[    99.114] (II) config/udev: Adding input device UZiTech Gkeyboard II No Ghost Key Keyboard Mouse (/dev/input/mouse0)
[    99.114] (II) AutoAddDevices is off - not adding device.
[    99.115] (II) config/udev: Adding input device USB OPTICAL MOUSE  (/dev/input/event6)
[    99.115] (II) AutoAddDevices is off - not adding device.
[    99.116] (II) config/udev: Adding input device USB OPTICAL MOUSE  (/dev/input/mouse1)
[    99.116] (II) AutoAddDevices is off - not adding device.
[    99.123] rdpDeferredRandR:
[    99.124] rdpResizeSession: width 1024 height 768
[    99.124]   calling RRScreenSizeSet
[    99.124] rdpRRScreenSetSize: width 1024 height 768 mmWidth 271 mmHeight 203
[    99.124] rdpRRGetInfo:
[    99.124]   screen resized to 1024x768
[    99.125]   RRScreenSizeSet ok 1
[    99.125] rdpResizeSession: width 1920 height 1080
[    99.125]   calling RRScreenSizeSet
[    99.125] rdpRRScreenSetSize: width 1920 height 1080 mmWidth 508 mmHeight 286
[    99.125] rdpRRGetInfo:
[    99.125]   screen resized to 1920x1080
[    99.128]   RRScreenSizeSet ok 1
[    99.128] rdpClientConGotConnection:
[    99.128] rdpClientConGotConnection: g_sck_accept ok new_sck 7
[    99.128] rdpClientConGetConnection: idle_disconnect_timeout set to non-positive value, idle timer turned off
[    99.128] rdpAddClientConToDev: adding first clientCon 0x55d3d90d5200
[    99.128] rdpClientConProcessMsgVersion: version 0 0 0 1
[    99.129] rdpClientConProcessScreenSizeMsg: set width 1920 height 1080 bpp 32
[    99.129] rdpClientConProcessScreenSizeMsg: shmemid 2 shmemptr 0x7fa610021000
[    99.129] rdpClientConProcessMsgClientInput: invalidate x 0 y 0 cx 1920 cy 1080
[    99.129] KbdSync: toggling num lock
[    99.129] rdpClientConProcessMsgClientInfo:
[    99.129]   got client info bytes 7040
[    99.129]   jpeg support 0
[    99.129]   offscreen support 1
[    99.129]   offscreen size 10485760
[    99.129]   offscreen entries 100
[    99.129] rdpClientConProcessMsgClientInfo: got H264 capture
[    99.129]   cap_width 1920 cap_height 1080
[    99.129] rdpClientConProcessMsgClientInfo: shmemid 3 shmemptr 0x7fa610415000 bytes 4147200
[    99.129]   client can not do offscreen to offscreen blits
[    99.129]   client can do new(color) cursor
[    99.129]   client can not do multimon
[    99.129] rdpRRSetRdpOutputs: numCrtcs 0 numOutputs 0 monitorCount 0
[    99.129] rdpRRSetRdpOutputs: add output 0 left 0 top 0 width 1920 height 1080
[    99.129] rdpLoadLayout: keylayout 0xe0010412 variant  display 10
[    99.129] rdpkeybChangeKeyboardControl:
[    99.129] rdpkeybChangeKeyboardControl: autoRepeat on
[    99.130] rdpkeybChangeKeyboardControl:
[    99.130] rdpkeybChangeKeyboardControl: autoRepeat on
[    99.130] rdpkeybChangeKeyboardControl:
[    99.130] rdpkeybChangeKeyboardControl: autoRepeat on
[    99.130] rdpkeybChangeKeyboardControl:
[    99.130] rdpkeybChangeKeyboardControl: autoRepeat on
[    99.185] rdpInDeferredRepeatCallback:
[    99.185] rdpkeybChangeKeyboardControl:
[    99.185] rdpkeybChangeKeyboardControl: autoRepeat off
[    99.229] rdpInDeferredRepeatCallback:
[    99.229] rdpkeybChangeKeyboardControl:
[    99.229] rdpkeybChangeKeyboardControl: autoRepeat off
/etc/X11/xrdp# cat xorg.conf 

Section "ServerLayout"
    Identifier "X11 Server"
    Screen "Screen (xrdpdev)"
    InputDevice "xrdpMouse" "CorePointer"
    InputDevice "xrdpKeyboard" "CoreKeyboard"
EndSection

Section "ServerFlags"
    Option "DontVTSwitch" "on"
    Option "AutoAddDevices" "off"
EndSection

Section "Module"
    Load "dbe"
    Load "ddc"
    Load "extmod"
    Load "glx"
    Load "int10"
    Load "record"
    Load "vbe"
    Load "xorgxrdp"
    Load "fb"
EndSection

Section "InputDevice"
    Identifier "xrdpKeyboard"
    Driver "xrdpkeyb"
EndSection

Section "InputDevice"
    Identifier "xrdpMouse"
    Driver "xrdpmouse"
EndSection

Section "Monitor"
    Identifier "Monitor"
    Option "DPMS"
    HorizSync 30-80
    VertRefresh 60-75
    ModeLine "1920x1080" 138.500 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync
    ModeLine "1280x720" 74.25 1280 1720 1760 1980 720 725 730 750 +HSync +VSync
    Modeline "1368x768" 72.25 1368 1416 1448 1528 768 771 781 790 +hsync -vsync
    Modeline "1600x900" 119.00 1600 1696 1864 2128 900 901 904 932 -hsync +vsync
EndSection

Section "Device"
    Identifier "Video Card (xrdpdev)"
    Driver "xrdpdev"
    Option "DRMDevice" "/dev/dri/renderD128"
    Option "DRI3" "1"
EndSection

Section "Screen"
    Identifier "Screen (xrdpdev)"
    Device "Video Card (xrdpdev)"
    Monitor "Monitor"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "640x480" "800x600" "1024x768" "1280x720" "1280x1024" "1600x900" "1920x1080"
    EndSubSection
EndSection

Is there anything else that I have to do?

hottestchilipepper commented 3 years ago

I reinstalled Ubuntu 20.04 and do not install official nvidia driver. After building on egfx branch, GPU work well!

However, after few seconds or a minute, xrdp screen stopped. No interactions. I can't reconnect so I have to reboot. After rebooting, also xrdp screen stopped. I can't use.

Below is syslog

Oct 29 13:01:52 ubuntu systemd[2903]: Starting Sound Service...
Oct 29 13:01:52 ubuntu dbus-daemon[2919]: [session uid=1000 pid=2919] Successfully activated service 'org.gtk.vfs.AfcVolumeMonitor'
Oct 29 13:01:52 ubuntu systemd[1]: Started Session 3 of user meungochoo.
Oct 29 13:01:52 ubuntu dbus-daemon[706]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.156' (uid=1000 pid=2912 comm="/usr/bin/pulseaudio --daemonize=no --log-target=jo" label="unconfined")
Oct 29 13:01:52 ubuntu systemd[2903]: Starting Tracker metadata extractor...
Oct 29 13:01:52 ubuntu rtkit-daemon[1002]: Supervising 2 threads of 1 processes of 2 users.
Oct 29 13:01:52 ubuntu systemd[2903]: Starting Tracker file system data miner...
Oct 29 13:01:52 ubuntu rtkit-daemon[1002]: Supervising 2 threads of 1 processes of 2 users.
Oct 29 13:01:52 ubuntu tracker-miner-f[2914]: Set scheduler policy to SCHED_IDLE
Oct 29 13:01:52 ubuntu rtkit-daemon[1002]: Supervising 2 threads of 1 processes of 2 users.
Oct 29 13:01:52 ubuntu tracker-miner-f[2914]: Setting priority nice level to 19
Oct 29 13:01:52 ubuntu rtkit-daemon[1002]: Supervising 2 threads of 1 processes of 2 users.
Oct 29 13:01:52 ubuntu tracker-extract[2913]: Set scheduler policy to SCHED_IDLE
Oct 29 13:01:52 ubuntu rtkit-daemon[1002]: Supervising 2 threads of 1 processes of 2 users.
Oct 29 13:01:52 ubuntu tracker-extract[2913]: Setting priority nice level to 19
Oct 29 13:01:52 ubuntu systemd[2903]: Started D-Bus User Message Bus.
Oct 29 13:01:52 ubuntu systemd[2903]: Starting Virtual filesystem service...
Oct 29 13:01:52 ubuntu systemd[2903]: Started Virtual filesystem service.
Oct 29 13:01:52 ubuntu systemd[2903]: Starting Virtual filesystem service - disk device monitor...
Oct 29 13:01:52 ubuntu systemd[2903]: Started Virtual filesystem service - disk device monitor.
Oct 29 13:01:52 ubuntu systemd[2903]: Starting Virtual filesystem service - digital camera monitor...
Oct 29 13:01:52 ubuntu systemd[2903]: Started Virtual filesystem service - digital camera monitor.
Oct 29 13:01:52 ubuntu systemd[2903]: Starting Virtual filesystem service - GNOME Online Accounts monitor...
Oct 29 13:01:52 ubuntu goa-daemon[2971]: goa-daemon version 3.36.0 starting
Oct 29 13:01:52 ubuntu systemd[2903]: Started Virtual filesystem service - GNOME Online Accounts monitor.
Oct 29 13:01:52 ubuntu systemd[2903]: Starting Virtual filesystem service - Media Transfer Protocol monitor...
Oct 29 13:01:52 ubuntu systemd[2903]: Started Virtual filesystem service - Media Transfer Protocol monitor.
Oct 29 13:01:52 ubuntu systemd[2903]: Starting Virtual filesystem service - Apple File Conduit monitor...
Oct 29 13:01:52 ubuntu systemd[2903]: Started Virtual filesystem service - Apple File Conduit monitor.
Oct 29 13:01:52 ubuntu systemd[1]: Condition check resulted in Bluetooth service being skipped.
Oct 29 13:01:52 ubuntu systemd[2903]: Started Sound Service.
Oct 29 13:01:53 ubuntu dbus-daemon[2919]: [session uid=1000 pid=2919] Activating via systemd: service name='org.freedesktop.Tracker1' unit='tracker-store.service' requested by ':1.2' (uid=1000 pid=2914 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Oct 29 13:01:53 ubuntu dbus-daemon[2919]: [session uid=1000 pid=2919] Successfully activated service 'org.freedesktop.Tracker1'
Oct 29 13:01:53 ubuntu systemd[2903]: Starting Tracker metadata database store and lookup manager...
Oct 29 13:01:53 ubuntu systemd[2903]: Started Tracker metadata database store and lookup manager.
Oct 29 13:01:53 ubuntu systemd[2903]: Started Tracker file system data miner.
Oct 29 13:01:53 ubuntu systemd[2903]: Started Tracker metadata extractor.
Oct 29 13:01:53 ubuntu systemd[2903]: Reached target Main User Target.
Oct 29 13:01:53 ubuntu systemd[2903]: Startup finished in 1.654s.
Oct 29 13:01:55 ubuntu systemd[1]: systemd-timedated.service: Succeeded.
Oct 29 13:02:03 ubuntu systemd[2903]: tracker-extract.service: Succeeded.
Oct 29 13:02:17 ubuntu pulseaudio[2912]: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Oct 29 13:02:24 ubuntu tracker-store[3000]: OK
Oct 29 13:02:24 ubuntu systemd[2903]: tracker-store.service: Succeeded.
Oct 29 13:02:47 ubuntu gnome-shell[1638]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x3a0039d
Oct 29 13:03:05 ubuntu gnome-shell[1638]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x3a003ab
Oct 29 13:04:39 ubuntu PackageKit: daemon quit
Oct 29 13:04:39 ubuntu systemd[1]: packagekit.service: Succeeded.
Oct 29 13:05:04 ubuntu kernel: [  816.109020] nouveau 0000:01:00.0: fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]
Oct 29 13:05:04 ubuntu kernel: [  816.109038] nouveau 0000:01:00.0: fifo: runlist 0: scheduled for recovery
Oct 29 13:05:04 ubuntu kernel: [  816.109054] nouveau 0000:01:00.0: fifo: channel 6: killed
Oct 29 13:05:04 ubuntu kernel: [  816.109063] nouveau 0000:01:00.0: fifo: engine 7: scheduled for recovery
Oct 29 13:05:04 ubuntu kernel: [  816.109067] nouveau 0000:01:00.0: fifo: engine 0: scheduled for recovery
Oct 29 13:05:04 ubuntu kernel: [  816.109105] nouveau 0000:01:00.0: fifo: fault 01 [WRITE] at 000000000241e000 engine 1b [CE2] client 0f [GPC2/PROP_0] reason 02 [PTE] on channel 6 [023f60a000 Xorg[1464]]
Oct 29 13:05:04 ubuntu kernel: [  816.109953] nouveau 0000:01:00.0: Xorg[1464]: channel 6 killed!
Oct 29 13:06:32 ubuntu kernel: [  904.603804] perf: interrupt took too long (2600 > 2500), lowering kernel.perf_event_max_sample_rate to 76750
Oct 29 13:06:35 ubuntu systemd[1]: Starting Cleanup of Temporary Directories...
Oct 29 13:06:35 ubuntu systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Oct 29 13:06:35 ubuntu systemd[1]: Finished Cleanup of Temporary Directories.
jsorg71 commented 3 years ago

working on egfx progressive RFX codec, I created egfx branch in librfxcodec here https://github.com/jsorg71/librfxcodec/tree/egfx

Nexarian commented 3 years ago

I wish I had the ability to understand the type of coding you do on this. I've been hacking code since the 5th grade and have over 10 years of developer experience, but most of the work you do on XRDP in this regard still looks like pure magic to me.

Thank you for all you contribute :). I only wish I could be of more help.

On Mon, Dec 7, 2020 at 4:09 AM jsorg71 notifications@github.com wrote:

working on egfx progressive RFX codec, I created egfx branch in librfxcodec here https://github.com/jsorg71/librfxcodec/tree/egfx

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/neutrinolabs/xrdp/issues/1422#issuecomment-739782643, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4UBHPRINWPIL634Z3WXP3STSLTVANCNFSM4JAT7VQA .

jsorg71 commented 3 years ago

I added librfxcodec issue here https://github.com/neutrinolabs/librfxcodec/issues/45 ongoing work is here https://github.com/jsorg71/librfxcodec/tree/egfx

I have a simple tiles working with tile diffing so it's looking good.

Nexarian commented 3 years ago

I just tried this new branch, and I'm getting the corruption below. On first login the UI looks normal, but any update causes this glitch. From clicking around I can tell the UI is still responsive, but not usable obviously.

On Ubuntu 20.04.01 LTS

image