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

QMessageBox are not displayed if screen is off using xrandr

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.1
    • None
    • Debian Bookworm X64, Mate Desktop and Orca screen reader
    • Linux/X11

    Description

      I am blind and use Orca screen reader on Linux (Debian Bookworm).
      For confidentiality reason, I prefer having my screen switched off so I can choose when sighted people can or cannot read on my screen, which does not mean I don't use any graphical interface.
      To do so, I use a bash script (attached) associated to a keyboard shortcut.
      When the screen is turned off using xrandr (while the desktop environment is still active), QMessageBox are not displayed at all, freezing all the application. With Qt5, QMessageBox was displayed properly even when the screen was off. However, with Qt6, it no longer appears under the same conditions, which seems to indicate a regression.

      To clarify further:

      • The issue only occurs when the screen is turned off with xrandr. When the screen is on, QMessageBox functions as expected.
      • The desktop environment I am using is MATE on Debian Bookworm, with NVIDIA as the graphics card driver.

      To reproduce, switch your screen off using the attached script then run the other attachment which only display a QMessageBox when clicking a button which is the only focusable part of the interface.

      Some other information.
      xrandr output is as follow when screen is off:

      Screen 0: minimum 8 x 8, current 1440 x 900, maximum 16384 x 16384 DVI-I-0 connected primary (normal left inverted right x axis y axis) 1440x900 59.89 + 74.98 1280x1024 75.02 60.02 1024x768 75.03 70.07 60.00 800x600 75.00 72.19 60.32 56.25 640x480 75.00 72.81 59.94 DVI-I-1 disconnected (normal left inverted right x axis y axis) HDMI-0 disconnected (normal left inverted right x axis y axis) HDMI-1 disconnected (normal left inverted right x axis y axis) DVI-D-0 disconnected (normal left inverted right x axis y axis)
      

      The screen is switched off using

      xrandr --output $output --fb $screenSize --off
      

      Display name is got using:

      output=$(xrandr | grep ' connected ' | awk '{print $1}' | head -1)
      

      The ScreenSize variable is:

      screenSize=$(xrandr | awk 'BEGIN {foundOutput=0}
         / '$output' / {foundOutput=1}
         /\*\+/ {print $1}
        /^[^ ]/ {if(foundOutput) exit 0}')
      echo $screenSize >> /tmp/montog
      

      To switch back on:

      xrandr --output $output --auto
      

      Only QMessageBox are making this issue occur, QInputDialog are displayed as expected even if screen is switched off.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            nardol Patrick Zajda
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes