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

QML timer too fast with animation on Ubuntu with NVIDIA Optimus

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.5.1
    • None
    • Ubuntu 15.04
      NVIDIA Optimus
      Driver Version: 346.59

    Description

      The bug is similar to QTBUG-42699, but with some slight modification to the source code that reproduces the issue:

      main.qml
      import QtQuick 2.5
      import QtQuick.Window 2.2
      
      Window {
          visible: true
          Rectangle {
              width: 100
              height: 100
              color: "red"
              Timer {
                  property var lastTime
                  interval: 1000
                  running: true
                  repeat: true
                  onTriggered: {
                      if (lastTime) {
                          console.log(Date.now() - lastTime);
                      }
                      lastTime = Date.now();
                  }
              }
              SequentialAnimation on x {
                  loops: Animation.Infinite
                  NumberAnimation { from: 0; to: 100; duration: 1000 }
              }
          }
      }
      

      Output:

      qml: 304
      qml: 318
      qml: 318
      qml: 321
      qml: 311
      qml: 309
      qml: 310
      qml: 318
      qml: 313
      qml: 316
      qml: 312
      qml: 312
      qml: 315
      qml: 322
      

      The machine is running Ubuntu 15.04 with NVIDIA Optimus driver version 346.59

      The tested machine also has an integrated Intel graphics card. Switching to the Intel card using nvidia-settings (NVIDIA Prime) and logging out and in again makes the issue go away.

      Attachments

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

        Activity

          People

            aalpert Alan Alpert
            dragly Svenn-Arne Dragly
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes