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

Issues with multi screen setups after sleep

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.2
    • QPA
    • None
    • macOS 11.1 and 11.2 on Intel based machines
      Qt 5.15.2 binaries from https://www.qt.io/download
    • macOS

    Description

      After waking up from sleep it can happen that QGuiApplications is not emitting the signals screenAdded, screenRemoved and primaryScreenChanged anymore.

      When an application ends up being in this state QGuiApplication::screens also returns a wrong number of attached screens to the system.

      I added a sample application that shows the explained behaviour. It simply outputs some log via qDebug statements on different signals of QGuiApplication.

      So far I only observed this issue on macOS, I can't say if other platforms are affected as well.

      h3. Steps to reproduce

      1. Start the attached sample application on a computer/mac with multiple monitors (i.e. notebook with attached external screen).
      2. Put the machine to sleep.
      3. Wait until the machine "really" sleeps.
      4. Wake up computer from sleep.
      5. Either plugin, detach a screen (by opening/closing the notebook lid or un-/plugging the external screen) or change the primary screen in system settings.
      6. Expected signals from QGuiApplication are not emitted anymore (in case of attached sample application there is no output on the cli anymore).
      7. If the effect does not occur, repeat steps 2-4 (possibly wait longer on step 3).

      After a few cycles of sleep and wakeup this issue is 100% reproducible.

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            jurica.bacurin Jurica Bacurin
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes