Keeping the Screen Turned off While Getting Inputs

Alan Coopersmith alan.coopersmith at oracle.com
Sun Aug 27 17:12:41 UTC 2023


On 8/27/23 09:53, Ahmad Nouralizadeh wrote:
> Perhaps I didn't express my question precisely. I understand that you are 
> talking about the mmap function in the kernel which is usually a function 
> pointer in vm_operations...
> 
> My question is about the userspace structure of X11. IIUC, we have X11 clients, 
> which are GUI apps.
> They have a portion of the X11 related libraries (those needed for clients) 
> mapped into their address space. As the app and the X11 libraries (client code 
> in X11) are in the same address space the graphical data are accessible by both. 
> Xserver is a separate process (i.e., Xorg). How are the graphical data sent to 
> the server? Does it use shared memory? Multiple shared memory regions to service 
> each client?

By default, the client writes data into a socket that the server reads from
(Unix domain socket for local connections (including ssh forwarded ones),
  TCP socket for remote).

For local connections, clients can use the MIT-SHM extension to use shared
memory for pixmap data instead, in which case the client creates a shared
memory segment for each image:
https://www.x.org/releases/current/doc/xextproto/shm.html

-- 
         -Alan Coopersmith-                 alan.coopersmith at oracle.com
          Oracle Solaris Engineering - https://blogs.oracle.com/solaris



More information about the xorg mailing list