More Details On The Proposed Inputfd Protocol For Wayland

Written by Michael Larabel in Wayland on 2 April 2017 at 01:35 AM EDT. 4 Comments
WAYLAND
A few days ago I wrote about Inputfd as a new Wayland protocol proposal for better supporting gaming devices. Peter Hutterer who drafted the proposal has now released a larger overview on this proposed addition.

Hutterer has written a blog post now to describe this protocol for providing direct access to input devices on Wayland. This "Inputfd" protocol would be used for joysticks and other -- largely gaming focused -- peripherals, rather than implementing APIs for these different devices within libinput itself.
First, what is it? inputfd is a protocol for a Wayland compositor to pass a file descriptor (fd) for an input device directly to the client. The client can then read events off this fd and process them, without any additional buffering in between. In the ideal case, the compositor doesn't care (or even notice) that events are flowing between the kernel and the client. Because the compositor sets up the fd, the client does not need any special privileges.

Why is this needed? There are a few input devices that will not be handled by libinput. libinput is the stack for those devices that have a direct interaction with the desktop - mice, keyboards, touchpads, ... But plenty of devices do not want or require desktop interactions. Joysticks/gamepads are the prime example here, but 3D mice or VR input devices also come to mind. These devices don't control the cursor on the desktop, so the compositor doesn't care about the device's events. Note that the current draft only caters for joysticks, 3D mice etc. are TBD.

Those wishing to learn more can read Peter's blog post.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week