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

Screen information not correctly updated when resolution changes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 5.6.0, 5.6.1, 5.7.0 Beta
    • QPA: X11/XCB
    • None
    • X11, XCB plugin
      Second screen scaled with: xrandr --output DP-1 --scale 2x2
      QT_SCREEN_SCALE_FACTORS=2;2
    • fae8ee8b428ae7a406199e504b2d0eedd5059dbd

    Description

      Whenever I connect a monitor with X automatic downscaling, already-running Qt applications fail to update "devicePixelRatio" and start thus showing in tiny, unreadable fonts.

      The screenshot shows tests/manual/qscreen dialog of the second monitor. The procedure was:

      1. Start qscreen
      2. Connect the monitor, ensuring 3640x2160 virtual resolution
      3. Start a second qscreen

      To emphasise: the dialog on the left is too small; the one on the right is correct.

      As you can see, the properties are different. There's no reasonable explanation for them to be different: they have to be the same. So either there's a bug in updating or there's a bug in getting the properties in the first place.

      qtdiag excerpt
      Screens: 2, High DPI scaling: active
      # 0 "eDP-1" Depth: 24 Primary: yes
        Geometry: 1600x900+0+0 (native: 3200x1800+0+0) Available: 1600x900+0+0
        Virtual geometry: 5120x1080+0+0 Available: 5120x1080+0+0
        2 virtual siblings
        Physical size: 294x165 mm  Refresh: 59 Hz Power state: 0
        Physical DPI: 138.231,138.545 Logical DPI: 108.901,108.857 (native: 217.803,217.714) Subpixel_None
        High DPI scaling factor: 2 DevicePixelRatio: 2 Pixel density: 3
        Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0
      
      # 1 "DP-1" Depth: 24 Primary: no
        Geometry: 1920x1080+3200+0 (native: 3840x2160+3200+0) Available: 1920x1080+3200+0
        Virtual geometry: 5120x1080+0+0 Available: 5120x1080+0+0
        2 virtual siblings
        Physical size: 598x336 mm  Refresh: 60 Hz Power state: 0
        Physical DPI: 81.5518,81.6429 Logical DPI: 108.901,108.857 (native: 217.803,217.714) Subpixel_None
        High DPI scaling factor: 2 DevicePixelRatio: 2 Pixel density: 2
        Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0
      
      xrandr excerpt
      Screen 0: minimum 320 x 200, current 7040 x 2160, maximum 8192 x 8192
      eDP-1 connected primary 3200x1800+0+0 (normal left inverted right x axis y axis) 294mm x 165mm
         3200x1800     59.98*+
      [...]
      DP-1 connected 3840x2160+3200+0 (normal left inverted right x axis y axis) 598mm x 336mm
         1920x1080     60.00*+  50.00    59.94    30.00    24.00    29.97    23.98  
      [...]
      

      Attachments

        1. double-rendering.png
          double-rendering.png
          179 kB
        2. qscreen.png
          qscreen.png
          439 kB
        3. qscreen-after-one-fix.png
          qscreen-after-one-fix.png
          437 kB

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              thiago Thiago Macieira
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes