<div dir="ltr">Hi there,<div><br></div><div>My goal is to try get the frame of a desktop to do low-latency remote desktop. I am interested in using X11 as the window manager.</div><div><br></div><div>When I run nvidia-smi, I noticed that X11 is a process that interacts the GPU:</div><div>+-----------------------------------------------------------------------------+<br>| Processes:                                                       GPU Memory |<br>|  GPU       PID   Type   Process name                             Usage      |<br>|=============================================================================|<br>|    0      3255      G   /usr/lib/xorg/Xorg                            57MiB |<br>|    0      3286      G   /usr/bin/gnome-shell                          81MiB |<br>+-----------------------------------------------------------------------------+</div><div><br></div><div>My question is: Is there a way to get an image of the desktop that returns a pointer that's GPU memory? For example, in Windows 10, there's an API called the Desktop Duplication API which will allows you to do this. Then, it lets you copy the data in that GPU memory block to another one such that you can encode the frame with H264, for example. I am using NVIDIA GPUs and utilizing their NVENC SDK.</div><div><br></div><div>I am looking for an equivalent.</div><div><br></div><div>Right now, it appears that XShmGetImage returns the frame of the desktop in host memory versus device memory which increases latency by 5-10ms. For our purposes, a reduction of 5ms is meaningful.</div><div><br></div><div>Should I use kernel-level APIs like interacting with Direct Rendering Manager and Kernel Mode Setting to accomplish this instead?</div><div><br></div><div>Just looking for options. Thanks!<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">Suhail</div><div dir="ltr"><br></div><div dir="ltr">--</div><div dir="ltr"><br></div><div dir="ltr">Founder</div></div></div></div></div></div></div></div>