incorrectly-enabled-hires.rst 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. .. _incorrectly_enabled_hires:
  2. ==============================================================================
  3. Incorrectly enabled high-resolution scroll
  4. ==============================================================================
  5. Some devices might announce support for high-resolution scroll wheel by enabling
  6. ``REL_WHEEL_HI_RES`` and/or ``REL_HWHEEL_HI_RES`` but never send a
  7. high-resolution scroll event.
  8. When the first low-resolution scroll event is received without any previous
  9. high-resolution event, libinput prints a bug warning with the text **"device
  10. supports high-resolution scroll but only low-resolution events have been
  11. received"** and a link to this page.
  12. .. note:: This warning will be printed only once
  13. In most cases this is a bug on the device firmware, the kernel driver or in a
  14. software used to create user-space devices through uinput.
  15. Once the bug is detected, libinput will start emulating high-resolution scroll
  16. events.
  17. ------------------------------------------------------------------------------
  18. Detecting and fixing the issue
  19. ------------------------------------------------------------------------------
  20. Events sent by a buggy device can be shown in the
  21. :ref:`libinput record <libinput-record>` output for the device. Notice that
  22. ``REL_WHEEL_HI_RES`` and ``REL_HWHEEL_HI_RES`` are set but only ``REL_WHEEL``
  23. events are sent: ::
  24. # Supported Events:
  25. # Event type 0 (EV_SYN)
  26. # Event type 1 (EV_KEY)
  27. # Event code 272 (BTN_LEFT)
  28. # Event type 2 (EV_REL)
  29. # Event code 0 (REL_X)
  30. # Event code 1 (REL_Y)
  31. # Event code 6 (REL_HWHEEL)
  32. # Event code 8 (REL_WHEEL)
  33. # Event code 11 (REL_WHEEL_HI_RES)
  34. # Event code 12 (REL_HWHEEL_HI_RES)
  35. [...]
  36. quirks:
  37. events:
  38. - evdev:
  39. - [ 0, 0, 2, 8, 1] # EV_REL / REL_WHEEL 1
  40. - [ 0, 0, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +0ms
  41. - evdev:
  42. - [ 0, 15126, 2, 8, 1] # EV_REL / REL_WHEEL 1
  43. - [ 0, 15126, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +15ms
  44. - evdev:
  45. - [ 0, 30250, 2, 8, 1] # EV_REL / REL_WHEEL 1
  46. - [ 0, 30250, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +15ms
  47. The issue can be fixed by adding a quirk to unset the ``REL_WHEEL_HI_RES`` and
  48. ``REL_HWHEEL_HI_RES`` event codes: ::
  49. AttrEventCode=-REL_WHEEL_HI_RES;-REL_HWHEEL_HI_RES;
  50. Please see :ref:`device-quirks` for details.