Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QGuiApplication GUI Begins to Lag on Raspberry Pi 3 When No Input Events

QGuiApplication GUI Begins to Lag on Raspberry Pi 3 When No Input Events

Scheduled Pinned Locked Moved Solved Mobile and Embedded
guiraspberry pi
5 Posts 2 Posters 1.4k 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.
  • J Offline
    J Offline
    John_Snow
    wrote on 17 May 2019, 13:30 last edited by John_Snow
    #1

    Hello,

    I have a strange issue with my QT GUI application when run on the official raspberry pi touchscreen LCD.

    The GUI itself is quite simple, only containing a couple of images and text boxes. A string is updated every 100ms with the current date and time (to the second) and occasionally warning messages appear which flash (swap colour pallet) at a period of 0.5s. A counter is also displayed showing the length of time (to the second) that the warning has been active. Nothing intensive at all. The program does however have a back end that connects it to a controlling server, the socket is kept alive for the entire lifetime of the application.

    The GUI responds completely as expected when the application is run for a short duration however, if left running for any more than a few minutes some noticeable lag begins to appear. The rate at which the warning messages 'flash' and their corresponding counters update slows down to a crawl and stops altogether sometimes. This can be immediately fixed however by simply causing a system interrupt to occur, like touching the touchscreen or moving the mouse. When this happens the warning messages will straight away update as normal and the date time string will 'jump' between a few seconds before settling in on a time a few seconds later than what was originally displayed (leading me to believe that the clock too is slowing down).

    This occurs regardless of whether my back-end server handling code runs, ruling that out as a cause. However, this issue doesn't occur when the application is displayed through HDMI, only the LCD display. I've tried running with the EGLFS platform which actually makes things worse, the GUI freezes after a while. To be honest I am still very much a newbie when it comes to QT and Raspberry Pi development so I have no idea if this could be caused by my QT source code being written poorly or if the Pi and display is set-up incorrectly. I've been googling for hours and can't seem to find any related posts. Any advice on where might be a good place to start would be greatly appreciated.

    Thank you.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 17 May 2019, 20:46 last edited by
      #2

      Hi and welcome to devnet,

      Do you also observe that issue with other application ?
      Are you cross-compiling Qt and your application ?
      What version of Qt are you using ?
      What Linux distribution do you run ?
      Note that it might also be a driver issue since you only observe that on the LCD display.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply 20 May 2019, 07:02
      0
      • S SGaist
        17 May 2019, 20:46

        Hi and welcome to devnet,

        Do you also observe that issue with other application ?
        Are you cross-compiling Qt and your application ?
        What version of Qt are you using ?
        What Linux distribution do you run ?
        Note that it might also be a driver issue since you only observe that on the LCD display.

        J Offline
        J Offline
        John_Snow
        wrote on 20 May 2019, 07:02 last edited by
        #3

        @SGaist
        Thank you for the reply.

        No I don't see the issue with any other applications although this is the only one I've written with a GUI.
        I am not cross compiling. All of the source code is compiled with QT on Linux using GCC.
        I am using QT Creator version 4.2.0 - based on QT 5.7.1 GCC version 6.2.1 32 bit
        The Linux distribution is 4.14.79-v7+ armv71 with the Raspbian OS.

        My initial thought was driver issues. Although would you not also expect to see problems with the inbuilt applications as well if that were the case?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 20 May 2019, 21:28 last edited by
          #4

          Self-built Qt or the one provided by Raspbian ?

          Do you also have that issue with a unmodified default application ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J Offline
            J Offline
            John_Snow
            wrote on 21 May 2019, 10:14 last edited by
            #5

            I've managed to figure out the issue.

            It turns out that I needed to disable power management signalling (dpms). I added the following lines to my /home/pi/.config/lxsession/LXDE-pi/autostart file -

            @xset s off
            @xset -dpms
            @xset s noblank

            The GUI now remains fully responsive even after a full day of running.

            Thank you for your time @SGaist

            1 Reply Last reply
            2

            3/5

            20 May 2019, 07:02

            • Login

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