Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Raspberry Pi 4 touchscreen with Qt5.15 embedded is not working
QtWS25 Last Chance

Raspberry Pi 4 touchscreen with Qt5.15 embedded is not working

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
16 Posts 3 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ronel_qtmaster
    wrote on 29 May 2024, 12:26 last edited by
    #2

    you need to install drivers for your touch screen

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Axel Spoerl
      Moderators
      wrote on 29 May 2024, 14:43 last edited by
      #3

      @Ronel_qtmaster I think @Alexey_Golubev has installed the drivers here

      apt-get install evtest libts-bin
      apt-get install libts-dev
      

      @Alexey_Golubev
      ts_calibrate and ts_test have meaningful outputs, and the TS works e.g. hooked up to a PC.

      Touchscreen not working.

      What's not working? Display? Touch? Both?

      export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event1
      

      => what is intended here? I use this env variable for parameters, e.g. /dev/input/event1:rotate=180
      IMHO, you don't have to pass anything here, unless you want to pass a parameter.

      Software Engineer
      The Qt Company, Oslo

      A 1 Reply Last reply 29 May 2024, 15:10
      0
      • A Axel Spoerl
        29 May 2024, 14:43

        @Ronel_qtmaster I think @Alexey_Golubev has installed the drivers here

        apt-get install evtest libts-bin
        apt-get install libts-dev
        

        @Alexey_Golubev
        ts_calibrate and ts_test have meaningful outputs, and the TS works e.g. hooked up to a PC.

        Touchscreen not working.

        What's not working? Display? Touch? Both?

        export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event1
        

        => what is intended here? I use this env variable for parameters, e.g. /dev/input/event1:rotate=180
        IMHO, you don't have to pass anything here, unless you want to pass a parameter.

        A Offline
        A Offline
        Alexey_Golubev
        wrote on 29 May 2024, 15:10 last edited by Alexey_Golubev
        #4

        @Axel-Spoerl said in Raspberry Pi 4 touchscreen with Qt5.15 embedded is not working:

        ts_calibrate and ts_test have meaningful outputs, and the TS works e.g. hooked up to a PC.

        ts_calibrate and ts_test output correct data. When connected to a PC, the touch works correctly.

        @Axel-Spoerl said in Raspberry Pi 4 touchscreen with Qt5.15 embedded is not working:

        What's not working? Display? Touch? Both?

        The touchscreen is not working. The display is working.
        When running the qt 5.15 program, the display works. The touchscreen doesn't work.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Axel Spoerl
          Moderators
          wrote on 29 May 2024, 16:02 last edited by
          #5

          Which XInput driver are you using? libinput (wrong), or evdev(right).

          Software Engineer
          The Qt Company, Oslo

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Alexey_Golubev
            wrote on 30 May 2024, 00:53 last edited by Alexey_Golubev
            #6

            @Axel-Spoerl said in Raspberry Pi 4 touchscreen with Qt5.15 embedded is not working:

            evdev(right)

            I installed it first evdev:
            sudo apt-get install xserver-xorg-input-evdev

            change the driver in a config file:
            sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf

            at the lines with touchscreen driver replace libinput by evdev

              Section "InputClass"
                  Identifier "evdev tablet catchall"
                  MatchIsTablet "on"
                  MatchDevicePath "/dev/input/event*"
                  Driver "evdev"
              EndSection
            
            1 Reply Last reply
            0
            • A Offline
              A Offline
              Axel Spoerl
              Moderators
              wrote on 30 May 2024, 08:25 last edited by
              #7

              Hm, that looks just fine.
              The only thing left would be to try /dev/input/event0 and /dev/input/event2 respectively.
              Maybe the "stylus" device reacts only to a pen.

              Software Engineer
              The Qt Company, Oslo

              A 1 Reply Last reply 30 May 2024, 08:33
              0
              • A Axel Spoerl
                30 May 2024, 08:25

                Hm, that looks just fine.
                The only thing left would be to try /dev/input/event0 and /dev/input/event2 respectively.
                Maybe the "stylus" device reacts only to a pen.

                A Offline
                A Offline
                Alexey_Golubev
                wrote on 30 May 2024, 08:33 last edited by
                #8

                @Axel-Spoerl said in Raspberry Pi 4 touchscreen with Qt5.15 embedded is not working:

                The only thing left would be to try /dev/input/event0 and /dev/input/event2 respectively.

                How can this be done? You can learn more for beginners.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  Axel Spoerl
                  Moderators
                  wrote on 30 May 2024, 08:37 last edited by
                  #9

                  To begin with, you're not a beginner, @Alexey_Golubev ;-)

                  Replace this

                  export TSLIB_TSDEVICE=/dev/input/event1
                  

                  and try this

                  export TSLIB_TSDEVICE=/dev/input/event0
                  

                  and this

                  export TSLIB_TSDEVICE=/dev/input/event2
                  

                  Software Engineer
                  The Qt Company, Oslo

                  A 1 Reply Last reply 30 May 2024, 09:23
                  0
                  • A Offline
                    A Offline
                    Alexey_Golubev
                    wrote on 30 May 2024, 08:48 last edited by Alexey_Golubev
                    #10

                    if export TSLIB_TSDEVICE=/dev/input/event1 that ts_calibrate work.
                    if export TSLIB_TSDEVICE=/dev/input/event0 that ts_calibrate notwork.
                    if export TSLIB_TSDEVICE=/dev/input/event2 that ts_calibrate notwork.
                    1.png

                    1 Reply Last reply
                    0
                    • A Axel Spoerl
                      30 May 2024, 08:37

                      To begin with, you're not a beginner, @Alexey_Golubev ;-)

                      Replace this

                      export TSLIB_TSDEVICE=/dev/input/event1
                      

                      and try this

                      export TSLIB_TSDEVICE=/dev/input/event0
                      

                      and this

                      export TSLIB_TSDEVICE=/dev/input/event2
                      
                      A Offline
                      A Offline
                      Alexey_Golubev
                      wrote on 30 May 2024, 09:23 last edited by
                      #11

                      @Axel-Spoerl said in Raspberry Pi 4 touchscreen with Qt5.15 embedded is not working:

                      export TSLIB_TSDEVICE=/dev/input/event1

                      What should I do next?

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        Axel Spoerl
                        Moderators
                        wrote on 30 May 2024, 10:56 last edited by
                        #12

                        I am kinda lost.
                        Maybe try Qt 6, even though I wouldn't know of a long standing bug that prevents touch from working.

                        Software Engineer
                        The Qt Company, Oslo

                        A 2 Replies Last reply 30 May 2024, 13:12
                        0
                        • A Axel Spoerl
                          30 May 2024, 10:56

                          I am kinda lost.
                          Maybe try Qt 6, even though I wouldn't know of a long standing bug that prevents touch from working.

                          A Offline
                          A Offline
                          Alexey_Golubev
                          wrote on 30 May 2024, 13:12 last edited by
                          #13

                          @Axel-Spoerl said in Raspberry Pi 4 touchscreen with Qt5.15 embedded is not working:

                          I wouldn't know of a long standing bug that prevents touch from working

                          I can't use Qt6.
                          Maybe you need special keys for qt 5.15?

                          1 Reply Last reply
                          0
                          • A Axel Spoerl
                            30 May 2024, 10:56

                            I am kinda lost.
                            Maybe try Qt 6, even though I wouldn't know of a long standing bug that prevents touch from working.

                            A Offline
                            A Offline
                            Alexey_Golubev
                            wrote on 31 May 2024, 07:24 last edited by
                            #14

                            @Axel-Spoerl said in Raspberry Pi 4 touchscreen with Qt5.15 embedded is not working:

                            I am kinda lost.

                            Can you help?

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              Axel Spoerl
                              Moderators
                              wrote on 31 May 2024, 09:42 last edited by
                              #15

                              No, I have no more ideas.

                              Software Engineer
                              The Qt Company, Oslo

                              A 1 Reply Last reply 4 Jun 2024, 13:29
                              0
                              • A Axel Spoerl
                                31 May 2024, 09:42

                                No, I have no more ideas.

                                A Offline
                                A Offline
                                Alexey_Golubev
                                wrote on 4 Jun 2024, 13:29 last edited by Alexey_Golubev 6 Apr 2024, 13:32
                                #16

                                @Axel-Spoerl said in Raspberry Pi 4 touchscreen with Qt5.15 embedded is not working:

                                No, I have no more ideas.

                                I found that "-plugin tslib" touchscreen works.
                                "export QT_QPA_FB_TSLIB=1" does not work.
                                If I write "root@pi:~# /home/pi/Qt_Projects/kiab/kia -plugin tslib" then the touchscreen works.

                                1 Reply Last reply
                                0

                                11/16

                                30 May 2024, 09:23

                                • Login

                                • Login or register to search.
                                11 out of 16
                                • First post
                                  11/16
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Search
                                • Get Qt Extensions
                                • Unsolved