1
0

faqs.rst 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. .. _faq:
  2. ==============================================================================
  3. FAQs - Frequently Asked Questions
  4. ==============================================================================
  5. Frequently asked questions about libinput.
  6. .. contents::
  7. :local:
  8. :backlinks: entry
  9. .. _faq_feature:
  10. ------------------------------------------------------------------------------
  11. Why doesn't libinput support ...?
  12. ------------------------------------------------------------------------------
  13. First, read :ref:`what_is_libinput` If you have a feature that you think
  14. libinput needs to support, please file a bug report. See :ref:`reporting_bugs`
  15. for more details.
  16. .. _faq_fast_mouse:
  17. ------------------------------------------------------------------------------
  18. My mouse moves too fast, even at the slowest setting
  19. ------------------------------------------------------------------------------
  20. This is a symptom of high-dpi mice (greater than 1000dpi). These devices
  21. need a udev hwdb entry to normalize their motion. See
  22. :ref:`motion_normalization` for a detailed explanation.
  23. .. _faq_fast_trackpoint:
  24. ------------------------------------------------------------------------------
  25. My trackpoint moves too slow or too fast
  26. ------------------------------------------------------------------------------
  27. This is a symptom of an invalid trackpoint multiplier. These devices need
  28. :ref:`device-quirks` to specify the range available so libinput can adjust the
  29. pointer acceleration accordingly. See :ref:`trackpoint_range` for a detailed
  30. explanation.
  31. .. _faq_pointer_acceleration:
  32. ------------------------------------------------------------------------------
  33. Why is libinput's pointer acceleration worse than synaptics/evdev
  34. ------------------------------------------------------------------------------
  35. This is a known problem affecting some devices and/or use-case but the exact
  36. cause is still unknown. It may be a device-specific issue, it may be a bug
  37. in libinput's acceleration code, it may be a disagreement about how pointer
  38. acceleration should feel. Unfortunately this is something that affected
  39. users need to investigate and analyze.
  40. .. _faq_enable_tapping:
  41. ------------------------------------------------------------------------------
  42. Why isn't touchpad tap-to-click enabled by default
  43. ------------------------------------------------------------------------------
  44. See :ref:`tapping_default`
  45. .. _faq_touchpad_pressure:
  46. ------------------------------------------------------------------------------
  47. Why does my touchpad lose track of touches
  48. ------------------------------------------------------------------------------
  49. The most common cause for this is an incorrect pressure threshold range.
  50. See :ref:`touchpad_pressure` for more info.
  51. .. _faq_kinetic_scrolling:
  52. ------------------------------------------------------------------------------
  53. Kinetic scrolling does not work
  54. ------------------------------------------------------------------------------
  55. The X.Org synaptics driver implemented kinetic scrolling in the driver. It
  56. measures the scroll speed and once the finger leaves the touchpad the driver
  57. keeps sending scroll events for a predetermined time. This effectively
  58. provides for kinetic scrolling without client support but triggers an
  59. unfixable `bug <https://bugs.freedesktop.org/show_bug.cgi?id=38909>`_: the
  60. client cannot know that the events are from a kinetic scroll source. Scroll
  61. events in X are always sent to the current cursor position, a movement of the
  62. cursor after lifting the finger will send the kinetic scroll events to the
  63. new client, something the user does not usually expect. A key event during
  64. the kinetic scroll procedure causes side-effects such as triggering zoom.
  65. libinput does not implement kinetic scrolling for touchpads. Instead it
  66. provides the **libinput_event_pointer_get_axis_source()** function that enables
  67. callers to implement kinetic scrolling on a per-widget basis, see
  68. :ref:`scroll_sources`.
  69. .. _faq_gpl:
  70. ------------------------------------------------------------------------------
  71. Is libinput GPL-licensed?
  72. ------------------------------------------------------------------------------
  73. No, libinput is MIT licensed. The Linux kernel header file linux/input.h in
  74. libinput's tree is provided to ensure the same behavior regardless of which
  75. kernel version libinput is built on. It does not make libinput GPL-licensed.
  76. .. _faq_config_options:
  77. ------------------------------------------------------------------------------
  78. Where is the configuration stored?
  79. ------------------------------------------------------------------------------
  80. libinput does not store configuration options, it is up to the caller to
  81. manage these and decide which configuration option to apply to each device.
  82. This must be done at startup, after a resume and whenever a new device is
  83. detected.
  84. One commonly used way to configure libinput is to have the Wayland
  85. compositor expose a compositor-specific configuration option. For example,
  86. in a GNOME stack, the gnome-control-center modifies dconf entries. These
  87. changes are read by mutter and applied to libinput. Changing these entries
  88. via the gsettings commandline tool has the same effect.
  89. Another commonly used way to configure libinput is to have xorg.conf.d
  90. snippets. When libinput is used with the xf86-input-libinput driver in an
  91. X.Org stack, these options are read on startup and apply to each device.
  92. Changing properties at runtime with the xinput commandline tool has the same
  93. effect.
  94. In both cases, the selection of available options and how they are exposed
  95. depends on the libinput caller (e.g. mutter or xf86-input-libinput).
  96. .. graphviz:: libinput-stack-gnome.gv
  97. This has an effect on the availability of configuration options: if an
  98. option is not exposed by the intermediary, it cannot be configured by the
  99. client. Also some configuration options that are provided by the
  100. intermediary may not be libinput-specific configuration options.
  101. .. _faq_configure_wayland:
  102. ------------------------------------------------------------------------------
  103. How do I configure my device on Wayland?
  104. ------------------------------------------------------------------------------
  105. See :ref:`faq_config_options` Use the configuration tool provided by your
  106. desktop environment (e.g. gnome-control-center) or direct access to your
  107. desktop environment's configuration storage (e.g. gsettings).
  108. .. _faq_configure_xorg:
  109. ------------------------------------------------------------------------------
  110. How do I configure my device on X?
  111. ------------------------------------------------------------------------------
  112. See :ref:`faq_config_options` If your desktop environment does not provide a
  113. graphical configuration tool you can use an
  114. `xorg.conf.d snippet <https://www.x.org/archive/current/doc/man/man5/xorg.conf.5.xhtml>`_.
  115. Usually, such a snippet looks like this:
  116. ::
  117. $> cat /etc/X11/xorg.conf.d/99-libinput-custom-config.conf
  118. Section "InputClass"
  119. Identifier "something to identify this snippet"
  120. MatchDriver "libinput"
  121. MatchProduct "substring of the device name"
  122. Option "some option name" "the option value"
  123. EndSection
  124. The identifier is merely a human-readable string that shows up in the log
  125. file. The MatchProduct line should contain the device name or a substring of
  126. the device name that the snippet should apply to. For a full list of option
  127. names and permitted values, see the
  128. `libinput man page <https://www.mankier.com/4/libinput>`_.
  129. xorg.conf.d snippets like the above apply to hotplugged devices but can be
  130. overwritten at runtime by desktop tools. Multiple snippets may be placed
  131. into the same file.
  132. For run-time configuration and testing, the
  133. `xinput <https://www.x.org/archive/X11R7.5/doc/man/man1/xinput.1.html>`_
  134. debugging tool can modify a devices' properties. See the
  135. `libinput man page <https://www.mankier.com/4/libinput>`_
  136. for supported property names and values. Usually, an invocation looks like
  137. this:
  138. ::
  139. $> xinput set-prop "the device name" "the property name" value [value2] [value3]
  140. .. note:: Changes performed by xinput do not persist across device hotplugs. xinput
  141. is considered a debugging and testing tool only and should not be used
  142. for permanent configurations.
  143. .. _faq_configuration:
  144. ------------------------------------------------------------------------------
  145. Can you add a configuration option for $FEATURE?
  146. ------------------------------------------------------------------------------
  147. No. At least that's going to be the initial answer. Read
  148. `Why libinput doesn't have a lot of configuration options <http://who-t.blogspot.com/2016/04/why-libinput-doesnt-have-lot-of-config.html>`_
  149. first. Configuration options for most features are a signal that we are incapable
  150. of handling it correctly. To get to that point, we want to be sure we're
  151. truly incapable of doing so. libinput has several features that
  152. are handled automatically (and correctly) that users wanted to have
  153. configuration options for initially.
  154. So the answer to this question will almost always be 'no'. A configuration
  155. option is, in most cases, a cop-out.
  156. .. _faq_synclient:
  157. ------------------------------------------------------------------------------
  158. Why don't synclient and syndaemon work with libinput?
  159. ------------------------------------------------------------------------------
  160. Synclient and syndaemon rely on X input device properties that are specific
  161. to the xf86-input-synaptics X.Org input driver. Both were written when the
  162. synaptics driver was the only common touchpad driver in existence. They
  163. assume that if the properties aren't available, no touchpad is available
  164. either. The xf86-input-libinput X.Org input driver does not export these
  165. driver-specific properties, synclient/syndaemon will thus not detect the
  166. touchpad and refuse to work. Other tools that rely on synclient/syndaemon or
  167. those same properties also do not work with xf86-input-libinput.
  168. Most of syndaemon's functionality is built into libinput, see
  169. :ref:`disable-while-typing`. synclient is merely a configuration tool, see
  170. :ref:`faq_configure_xorg` for similar functionality.
  171. See also the blog posts
  172. `The definitive guide to synclient <http://who-t.blogspot.com.au/2017/01/the-definitive-guide-to-synclient.html>`_ and
  173. `The future of xinput, xmodmap, setxkbmap, xsetwacom and other tools under Wayland <http://who-t.blogspot.com.au/2016/12/the-future-of-xinput-xmodmap-setxkbmap.html>`_
  174. .. _faq_tablets:
  175. ------------------------------------------------------------------------------
  176. Does libinput support non-Wacom tablets?
  177. ------------------------------------------------------------------------------
  178. Yes, though unfortunately many non-Wacom tablets suffer from bad firmware
  179. and don't send the required events. But they should all work nonetheless. If
  180. you have a tablet that does not work with libinput, please
  181. :ref:`file a bug <reporting_bugs>`.
  182. .. _faq_tablet_capabilities:
  183. ------------------------------------------------------------------------------
  184. My tablet doesn't work
  185. ------------------------------------------------------------------------------
  186. If you see the message
  187. ::
  188. libinput bug: device does not meet tablet criteria. Ignoring this device.
  189. or the message
  190. ::
  191. missing tablet capabilities [...] Ignoring this device.
  192. your tablet device does not have the required capabilities to be treated as
  193. a tablet. This is usually a problem with the device and the kernel driver.
  194. See :ref:`tablet-capabilities` for more details.
  195. .. _faq_hwdb_changes:
  196. ------------------------------------------------------------------------------
  197. How to apply hwdb changes
  198. ------------------------------------------------------------------------------
  199. Sometimes users are asked to test updates to the
  200. `udev hwdb <https://www.freedesktop.org/software/systemd/man/hwdb.html>`_
  201. or patches that include a change to the hwdb. See :ref:`hwdb` for
  202. details on the hwdb and how to modify it locally.
  203. .. note:: As of libinput 1.12, libinput-specific properties are now stored in
  204. the :ref:`device-quirks` system. There are no libinput-specific hwdb
  205. entries anymore and any changes to the hwdb must be merged into the
  206. systemd repository.
  207. .. _faq_timer_offset:
  208. ------------------------------------------------------------------------------
  209. What causes the "your system is too slow" warning?
  210. ------------------------------------------------------------------------------
  211. libinput relies on the caller to call **libinput_dispatch()** whenever data is
  212. available. **libinput_dispatch()** will process the state of all devices,
  213. including some time-sensitive features (e.g. palm detection, tap-to-click,
  214. disable-while-typing, etc.).
  215. If the time between the event and the call to **libinput_dispatch()**
  216. is excessive, those features may not work correctly. For example, a delay in
  217. touch event processing may cause wrong or missing tap-to-click events or
  218. a palm may not be detected correctly.
  219. When this warning appears, it simply means that too much time has passed
  220. between the event occurring and the current time. In almost all cases this
  221. is an indication of the caller being overloaded and not handling events as
  222. speedily as required.
  223. The warning has no immediate effect on libinput's behavior but some of the
  224. functionality that relies on the timer may be impeded. This is not a bug in
  225. libinput. libinput does not control how quickly **libinput_dispatch()** is
  226. called.
  227. .. _faq_wayland:
  228. ------------------------------------------------------------------------------
  229. Is libinput required for Wayland?
  230. ------------------------------------------------------------------------------
  231. Technically - no. But for your use-case - probably.
  232. Wayland is a display server communication protocol. libinput is a low-level
  233. library to simplify handling input devices and their events. They have no
  234. direct connection. As a technical analogy, the question is similar to "is
  235. glibc required for HTTP", or (stretching the analogy a bit further) "Is a
  236. pen required to write English". No, it isn't.
  237. You can use libinput without a Wayland compositor, you can write a Wayland
  238. compositor without libinput. On most major distributions, libinput is the
  239. standard input stack used with the X.Org X server through the
  240. xf86-input-libinput driver.
  241. So why "for your use-case - probably"? All general-purpose Wayland
  242. compositors use libinput for their input stack. Wayland compositors that
  243. are more specialized (e.g. in-vehicle infotainment or IVI) can handle input
  244. devices directly but the compositor you want to use
  245. on your desktop needs an input stack that is more complex. And right now,
  246. libinput is the only input stack that exists for this use-case.
  247. .. _faq_separate_contexts:
  248. ------------------------------------------------------------------------------
  249. Can I write a program to make libinput do $FOO
  250. ------------------------------------------------------------------------------
  251. A common question is whether it's possible to write a program that can change
  252. libinput's behavior - specifically the libinput that is used inside the
  253. compositor. This indicates a misunderstanding of how libinput works:
  254. libinput is a library that converts kernel events into libinput events, much
  255. like ``sed`` reads data in, modifies it, and provides it to stdout.
  256. .. graphviz:: libinput-contexts.gv
  257. A libinput context is private to the process and cannot be modified from the
  258. outside. To use the ``sed`` analogy again: if ``sed`` is used by a
  259. shell-script, that script has full control over how ``sed`` processes data. In
  260. this analogy, ``sed`` is libinput and the shell script is the compositor. It is
  261. not possible to write a program to modify the behavior of the ``sed`` instance
  262. used inside that shell script.
  263. Writing a program that uses libinput is akin to writing a new script that
  264. invoke ``sed``. It will not have any effect on the original ``sed`` instance.
  265. The only way to modify libinput's behavior is to use the configuration options
  266. exposed by the respective compositor. Those affect the libinput context inside
  267. the compositor and thus have an effect on the input device behavior.
  268. .. _faq_debug_events_not_showing_configuration:
  269. ------------------------------------------------------------------------------
  270. Why doesn't libinput debug-events show my configuration
  271. ------------------------------------------------------------------------------
  272. See :ref:`faq_separate_contexts`.
  273. ------------------------------------------------------------------------------
  274. Can I configure scroll speed?
  275. ------------------------------------------------------------------------------
  276. No, or at least, not as a libinput option.
  277. When using a mouse, libinput notifies callers about physical scroll wheel
  278. movement. When using another device, libinput notifies scroll in scroll units.
  279. It is up to the caller to transform those events into a number of pixels to
  280. scroll and, if desired, provide a way to adjust scroll speed.
  281. This transformation cannot be done in libinput because it may depend on context
  282. only known by the caller. For example, a caller may want to scroll faster
  283. depending on how many pages a document has or depending on the widget that
  284. receives the scroll events.