Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-64377

Enabling libinput prevents font rendering

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.9.2
    • QPA: EGLFS
    • None

    Description

      I build Qt-5.9.2 on Ubuntu 16.04.3 LTS with EGLFS QPA enabled. Hardware is AMD A10-7850K Radeon R7, 12 Compute Cores 4C+8G:

      OpenGL Information
      GL_VENDOR: X.Org
      GL_RENDERER: Gallium 0.4 on AMD KAVERI (DRM 2.43.0 / 4.4.0-98-generic, LLVM 4.0.0)
      GL_VERSION: 3.0 Mesa 17.0.7
      

      I switch to terminal on Ctrl+Alt+F1 screen. Then I run my Qt application app (Qt Quick based, if matters):

      # to debug input
      export QT_LOGGING_RULES=qt.qpa.input=true
      # to be able to close by Ctrl+C my application
      export QT_QPA_ENABLE_TERMINAL_KEYBOARD=1 ~/app -platform eglfs

      So far so good: it starts normally and all looks fine. But touchscreen and mouse input are not handled by Qt. Debug output:

      debug: libinput: opening input device '/dev/input/event1' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event1'.
      debug: libinput: opening input device '/dev/input/event2' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event2'.
      debug: libinput: opening input device '/dev/input/event0' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event0'.
      debug: libinput: opening input device '/dev/input/event8' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event8'.
      debug: libinput: opening input device '/dev/input/event3' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event3'.
      debug: libinput: opening input device '/dev/input/event4' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event4'.
      debug: libinput: opening input device '/dev/input/event7' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event7'.
      debug: libinput: opening input device '/dev/input/event5' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event5'.
      debug: libinput: opening input device '/dev/input/event6' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event6'.
      debug: libinput: opening input device '/dev/input/event9' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event9'.
      debug: libinput: opening input device '/dev/input/event10' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event10'.
      debug: libinput: opening input device '/dev/input/event11' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event11'.
      debug: libinput: opening input device '/dev/input/event12' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event12'.
      debug: libinput: opening input device '/dev/input/event13' failed (Operation not permitted).
      debug: libinput: failed to create input device '/dev/input/event13'.
      debug: Using xkbcommon for key mapping

      Then I press Ctrl+C.

      The next step is to check file permissions for device files:

      $ ll /dev/input/event*
      crw-rw---- 1 root input 13, 64 ноя  8 17:53 /dev/input/event0
      crw-rw---- 1 root input 13, 65 ноя  8 17:53 /dev/input/event1
      crw-rw---- 1 root input 13, 74 ноя  8 17:53 /dev/input/event10
      crw-rw---- 1 root input 13, 75 ноя  8 17:53 /dev/input/event11
      crw-rw---- 1 root input 13, 76 ноя  8 17:53 /dev/input/event12
      crw-rw---- 1 root input 13, 77 ноя  8 17:53 /dev/input/event13
      crw-rw---- 1 root input 13, 66 ноя  8 17:53 /dev/input/event2
      crw-rw---- 1 root input 13, 67 ноя  8 17:53 /dev/input/event3
      crw-rw---- 1 root input 13, 68 ноя  8 18:38 /dev/input/event4
      crw-rw---- 1 root input 13, 69 ноя  8 17:53 /dev/input/event5
      crw-rw---- 1 root input 13, 70 ноя  8 17:53 /dev/input/event6
      crw-rw---- 1 root input 13, 71 ноя  8 18:38 /dev/input/event7
      crw-rw---- 1 root input 13, 72 ноя  8 17:53 /dev/input/event8
      crw-rw---- 1 root input 13, 73 ноя  8 17:53 /dev/input/event9

       Okay. I decided to add current user to group input:

      sudo usermod -a -G input $USER 

      Then I relogin on Ctrl+Alt+F1 screen. Now output of groups command contains input group.

      I try again to run my application:

      ~/app -platform eglfs 

      Now it correctly react on mouse and touchscreen input events, but fonts are not rendered - there are even no correctly sized rectangles as placeholders instead of corresponding letters.

      I remove the user from group input:

      sudo deluser $USER input

      Then (after relogin) I try to just change file permissions for input devices:

      sudo chmod o=g /dev/input/event*

      Effect is the same. Rollback:

      sudo chmod o= /dev/input/event*

      Providing ad-hoc fonts also has no effect:

      wget https://github.com/dejavu-fonts/dejavu-fonts/releases/download/version_2_37/dejavu-fonts-ttf-2.37.tar.bz2
      sudo mkdir -p /usr/local/Qt-5.9.2/lib/fonts
      sudo tar --extract --verbose --strip-components=2 -C /usr/local/Qt-5.9.2/lib/fonts --file dejavu-fonts-ttf-2.37.tar.bz2 dejavu-fonts-ttf-2.37/ttf/
      export QT_QPA_FONTDIR=/usr/local/Qt-5.9.2/lib/fonts
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            tomilovanatoliy Anatoliy Tomilov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes