Bug 413577

Summary: Kdenlive, Dragon Player, VLC (and etc.) have no video playback on second/third monitor when Global Scale is set to 2.0
Product: [Plasma] plasmashell Reporter: Frederick Zhang <frederick888>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED FIXED    
Severity: normal CC: frederick888, kde, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.17.1   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Frederick Zhang 2019-10-29 02:39:16 UTC
SUMMARY
If Global Scale is set 2.0 (or any value greater than 1.0?), (Qt based?) video players will only play videos on the leftmost monitor. On other monitors it's usually just a black box or the theme background colour in the case of Kdenlive.

However, if I drag the window to my leftmost monitor and then move it back, videos will continue playing normally as long as I don't resize the window.

My monitor setup is:
┌----------------┐┌--------------------------┐┌------------------┐
| 1920x1080 DP-0 ||                          || 1920x1080 HDMI-0 |
└----------------┘|      3840x2160 DP-3      |└------------------┘
                  |                          |
                  └--------------------------┘
...and I use the following xrandr command to arrange them:
xrandr --fb 11520x2160 \
        --output DP-0 --auto --scale 2.0 --panning 3840x2160+0+0 --pos 0x0 \
        --output DP-3 --auto --primary --scale 1.0 --panning 3840x2160+3840+0 --pos 3840x0 \
        --output HDMI-0 --auto --scale 2.0 --panning 3840x2160+7680+0 --pos 7680x0

I've tried switching off one of the monitors, disabling X scaling, etc., but the issue can be consistently reproduced when I have Global Scale set to 2.0. On the other hand, if I reset Global Scale to 1.0, no matter which monitors are on, or whether X scaling is enabled or not, video playback always works without any problem.

Firefox, Google Chrome, MPlayer, xine, cvlc are not affected, hence I think it's not a codec issue as cvlc and VLC use the same configuration. I've also tested several different video files with different encodings and the results were the same.

This is such a strange issue and I'm actually not sure whether it's caused by Plasma, Qt, X or even the Nvidia driver. Sorry if it's the wrong place.

STEPS TO REPRODUCE
1. Launch an X session
2. Set Global Scale to 2.0
3. Reboot (or logout/restart plasma)
4. Open a video in Kdenlive/Dragon Player/VLC on a non-leftmost monitor

OBSERVED RESULT
Kdenlive/Dragon Player/VLC cannot play videos on non-leftmost monitors. Nothing unusual in VLC logs.

EXPECTED RESULT
Videos play normally on all monitors.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.17.1
KDE Frameworks Version: 5.63.0
Qt Version: 5.13.1
Kernel Version: 5.3.7-arch1-2-ARCH
OS Type: 64-bit

ADDITIONAL INFORMATION
GPU: Nvidia GTX980M
Driver: Nvidia proprietary
Comment 1 Frederick Zhang 2019-10-29 04:25:06 UTC
Using QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=0.5 to disable scaling fixes the issue in all mentioned programs. Is this actually an upstream bug from Qt?

And btw probably related: https://trac.videolan.org/vlc/ticket/17484
Comment 2 Frederick Zhang 2020-04-09 08:33:41 UTC
Just checked again and it's been fixed! Not sure if it was caused by nvidia, qt or plasma though. I'm currently running nvidia 440.82, qt 5.14.2 and plasma 5.18.4 with framework 5.68.0.
Comment 3 Kai Uwe Broulik 2020-04-09 08:36:23 UTC
I'm still having the issue on my system with Qt 5.14
Comment 4 Kai Uwe Broulik 2020-04-09 08:36:42 UTC
Though 5.14.1, maybe 5.14.2 fixes that?
Comment 5 Frederick Zhang 2020-04-09 08:48:47 UTC
Yup I guess that's the reason. Just tried downgrading Qt to 5.14.1 and the issue became reproducible again.