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

Interface corrupted/incorrect offsets on multi-monitor setups when scaling factor is > 1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.13.0, 5.13.1
    • GUI: High-DPI
    • None
    • Linux/X11

    Description

      I apologize for not getting the 'components' correctly or messing up with this report (this is probably a host of smaller bugs) — I was redirected here from the kde bugtracker because this is an upstream bug.

      I am on multi-monitor, mixed-ppi setup. I've set UI scaling factor to 1.3 via KDE settings. Dimensions and offsets of the monitors are as follows:

      left monitor (DP-0): 2880x1620 +0+275
      center monitor (DP-2, primary): 5120x2160 +2880+0
      right monitor (HDMI-0) 3584x1512 +8000+168

      When trying to pick color using KColorPicker, the place from which the color was picked was offset by some distance. Using the setup configured by commands above, I've approximately measured the offset between color picker cursor and the position it picked color. Offsets between cursor and spot where color gets picked are as follows ( offset to the right x offset to the bottom):

      • DP-0/left monitor: +0x82px
      • DP-2/center monitor: +864x0px
      • HDMI-0/right monitor: +2401x52px

      When taking screenshots using `spectacle --rectangle`, the whole image gets shifted to the left. The offset in 'select rectangular region' view in spectacle is the same as KColorChooser offset, except in the opposite direction.

      • spectacle-screenshot-all.jpg is what I should be seeing.
      • spectacle-screenshot-select-rectangular-region-view.jpg is what I actually see on my monitors.

      The ruler spans from side to side, but it's using imperial instead of metric it incorrectly accounts for qt scale factor (What ruler thinks is 100 pixels is in fact 130 pixels).

      I've been experiencing both of these issues for over a year now, but mostly tolerated them. Recently though — according to my pacman logs, when I updated qt5 packages from 5.13.0-1 to 5.13.1-1), this issue started popping up in just about every video player that uses Qt (VLC, SMPlayer, baka-mplayer). The update happened on 2019-10-11.

      According to my logs, VLC was last updated on 2019-09-06. Last update for SMPlayer was on 2019-05-28, so the issue is probably somewhere with Qt.

      Screenshot `media_player_corruption.jpg` was taken on the center monitor (DP-2). You can see that the UI is duplicated and offset. This looks exactly like what's happening with `spectacle --region`. If you measure the offset, we get the same horizontal offset we got with KColorChooser and Spectacle --region.

      Screenshot `media_player_corruption_left_monitor.jpg` was taken on the left monitor (DP-0). The offset between repeated parts of the UI is the same offset observed in KColorChooser bug: 82px vertical.

      Video that's being played is also being offset. The offset can be seen in the prior example — it's pretty minor. However, on the center (DP-2) and right (HDMI-0) monitors, the offset is much more noticeable. See `media_player_corruption_video_offset.jpg`.

      While the last two screenshots I've referenced only show VLC, both SMPlayer and baka-mplayer exhibit exactly the same behaviour. Offset of the video (and corrupt UI) changes depending on which monitor the video player is. When window is dragged to a different monitor, the offsets change.

      A more minor version of this issue has been present in previous versions of Qt libraries as well, however it was fixed by going to fullscreen (and back). The issue was not present in full screen. As of 5.13.1, this effects both fullscreen and windowed.

      SMPlayer already has its own bug report:

      #Extra testing

      Testing I've done suggests that the offset is mostly affected by the offset/position of the monitor (`-pos` parameter in `xrandr`, or the offset portion of `-panning`)

      When I tried to reproduce this on a fresh user profile and set the QT scaling factor to 1.2. The issue still happened, but it was much more strange. The offset in spectacle was only about 320px to the left. VLC and other media players exhibited much weirder issues. I didn't try KColorChooser again.

      #Xrandr, qtdiag:

      `configuration_1_*.txt` files contain outputs of the commands I ran on my main profile.
      `configuration_2_*.txt` files contain outputs of the commands I ran on the new profile.

      #xrandr commands used to configure the screen (executed at login)

      xrandr --output DP-0 --scale 1.5x1.5 --pos 0x275 --panning 2880x1620+0+275
      xrandr --output DP-2 --mode 5120x2160 --pos 2880x0 --panning 5120x2160+2880+0
      xrandr --output HDMI-0 --scale 1.4x1.4 --pos 8000x168 --panning 3584x1512+8000+168


      #Environment:

      SOFTWARE/OS VERSIONS:
      Linux/KDE Plasma: 5.3.7-2-MANJARO
      (available in About System)
      KDE Plasma Version: 5.17.1
      KDE Frameworks Version: 5.63.0
      Qt Version: 5.13.1
      kcolorchooser: 19.08.2
      spectacle: 19.08.2
      vlc: 3.0.8-1
      smplayer: 19.5.0-1

      (As I was writing this bug report, VLC and SMPlayer both received update. The issue still persists after upgrading to smplayer-19.10.0-1 and vlc-3.0.8-3, respectively)

      HARDWARE:
      AMD Ryzen 7 2700X
      nVidia 2080Ti with proprietary drivers (nvidia-430xx, nvidia-440xx — happens on both)

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            tamius_han Tamius Han
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes