Bug 145220 - SLIDESHOW not working with KDE Plasma 5.23.0
Summary: SLIDESHOW not working with KDE Plasma 5.23.0
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2021-10-19 10:36 UTC by Axel Braun
Modified: 2021-11-03 11:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Little terminal program dumping QScreen info (11.09 KB, application/octet-stream)
2021-10-20 12:08 UTC, Jan-Marek Glogowski
Details
Little terminal program dumping QScreen info with "no" output fix (11.12 KB, application/octet-stream)
2021-10-20 19:22 UTC, Jan-Marek Glogowski
Details
Offset of ext. screen (333.73 KB, application/vnd.oasis.opendocument.text)
2021-10-25 08:14 UTC, Axel Braun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Braun 2021-10-19 10:36:47 UTC
Version: 7.2.2.2 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 12; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

I want to do a presentation with LO 7.2 using a Laptop (ThinkPad X1 Extreme, Optimus Graphic with proprietary nvidia driver) with openSUSE Tumbleweed/KDE and an external monitor

‘Normally’ the presentation was on the external monitor, and the Laptop showed the presenter mode with notes pages etc.

Now I have presentation and presenter page on the external monitor - and no way to get the presenter page back to the laptop screen.

Cross-checking with a second laptop running Tumbleweed and Plasma 5.22.5, that worked as expected. After upgrade to 5.23.0 it is broken as well.

KDE bugreport: https://bugs.kde.org/show_bug.cgi?id=444026

KDE teams asks to open a bug with LO team, as KDE "...don't position those windows on X11. Libreoffice does."
Please align
Comment 1 Jan-Marek Glogowski 2021-10-20 12:08:29 UTC
Created attachment 175848 [details]
Little terminal program dumping QScreen info

Please check both and report, if 

$ SAL_USE_VCLPLUGIN=gen soffice --impress

or SAL_USE_VCLPLUGIN=gtk3 fixes the problem.

Always verify that "Help >> About LO" has either "VCL: x11" (for gen) or "VCL: gtk3".

You might need to install your distributions libreoffice-gtk3 package.

I've also attached a little test program to dump Qt's view of the screen layout (qscreen). If you still have both machines with different KDE Plasma Version, I would like to get a dump of qscreen for both with attached 2nd monitors.

After providing the information, please reset the status of the bug to UNCONFIRMED.
Comment 2 Axel Braun 2021-10-20 15:27:36 UTC
Hello Jan,

after installation of libreoffice-gtk3 I tried both options on the X1 (the machine in trouble) and for both cases the result did not change. Here is the qscreen output:

docb@X1E:~>  /tmp/qscreen/qscreen
Qt: 5.15.2

no: 0 - current
ptr: QScreen(0x557992dfd640, name="eDP-1-1")
manufacturer: "Chimei Innolux Corporation"
model: ""
name: "eDP-1-1"
serialNumber: ""
availableGeometry: QRect(2156,0 1920x1080)
availableSize: QSize(1920, 1080)
availableVirtualGeometry: QRect(0,0 4076x1080)
availableVirtualSize: QSize(4076, 1080)
depth: 24
devicePixelRatio: 1
geometry: QRect(2156,0 1920x1080)
logicalDotsPerInch: 96.28
logicalDotsPerInchX: 96.3073
logicalDotsPerInchY: 96.2526
nativeOrientation: Qt::PrimaryOrientation
orientation: Qt::LandscapeOrientation
orientationUpdateMask: QFlags<Qt::ScreenOrientation>(PrimaryOrientation)
physicalDotsPerInch: 141.951
physicalDotsPerInchX: 141.767
physicalDotsPerInchY: 142.135
physicalSize: QSizeF(344, 193)
primaryOrientation: Qt::LandscapeOrientation
refreshRate: 60.001
size: QSize(1920, 1080)
virtualGeometry: QRect(0,0 4076x1080)
virtualSiblings: (QScreen(0x557992dfd640, name="eDP-1-1"), QScreen(0x557992dfd730, name="HDMI-0"))
virtualSize: QSize(4076, 1080)

no: 0
ptr: QScreen(0x557992dfd730, name="HDMI-0")
manufacturer: "Acer Technologies"
model: "S273HL-"
name: "HDMI-0"
serialNumber: "LQA0C0158001-"
availableGeometry: QRect(0,0 1920x1080)
availableSize: QSize(1920, 1080)
availableVirtualGeometry: QRect(0,0 4076x1080)
availableVirtualSize: QSize(4076, 1080)
depth: 24
devicePixelRatio: 1
geometry: QRect(0,0 1920x1080)
logicalDotsPerInch: 96.28
logicalDotsPerInchX: 96.3073
logicalDotsPerInchY: 96.2526
nativeOrientation: Qt::PrimaryOrientation
orientation: Qt::LandscapeOrientation
orientationUpdateMask: QFlags<Qt::ScreenOrientation>(PrimaryOrientation)
physicalDotsPerInch: 80.9812
physicalDotsPerInchX: 81.28
physicalDotsPerInchY: 80.6824
physicalSize: QSizeF(600, 340)
primaryOrientation: Qt::LandscapeOrientation
refreshRate: 50
size: QSize(1920, 1080)
virtualGeometry: QRect(0,0 4076x1080)
virtualSiblings: (QScreen(0x557992dfd640, name="eDP-1-1"), QScreen(0x557992dfd730, name="HDMI-0"))
virtualSize: QSize(4076, 1080)
Comment 3 Axel Braun 2021-10-20 15:32:24 UTC
And here is the output of the working machine:
docb@T520:~> /tmp/qscreen/qscreen 
Qt: 5.15.2

no: 0 - current
ptr: QScreen(0x556bb4006a00, name="LVDS-1")
manufacturer: "Lenovo Group Limited"
model: ""
name: "LVDS-1"
serialNumber: ""
availableGeometry: QRect(1920,0 1600x900)
availableSize: QSize(1600, 900)
availableVirtualGeometry: QRect(0,0 3520x1080)
availableVirtualSize: QSize(3520, 1080)
depth: 24
devicePixelRatio: 1
geometry: QRect(1920,0 1600x900)
logicalDotsPerInch: 96.1951
logicalDotsPerInchX: 96.1376
logicalDotsPerInchY: 96.2526
nativeOrientation: Qt::PrimaryOrientation
orientation: Qt::LandscapeOrientation
orientationUpdateMask: QFlags<Qt::ScreenOrientation>(PrimaryOrientation)
physicalDotsPerInch: 117.987
physicalDotsPerInchX: 118.14
physicalDotsPerInchY: 117.835
physicalSize: QSizeF(344, 194)
primaryOrientation: Qt::LandscapeOrientation
refreshRate: 59.9995
size: QSize(1600, 900)
virtualGeometry: QRect(0,0 3520x1080)
virtualSiblings: (QScreen(0x556bb4006a00, name="LVDS-1"), QScreen(0x556bb4006a40, name="HDMI-1"))
virtualSize: QSize(3520, 1080)

no: 0
ptr: QScreen(0x556bb4006a40, name="HDMI-1")
manufacturer: "Acer Technologies"
model: "S273HL-"
name: "HDMI-1"
serialNumber: "LQA0C0158001-"
availableGeometry: QRect(0,0 1920x1080)
availableSize: QSize(1920, 1080)
availableVirtualGeometry: QRect(0,0 3520x1080)
availableVirtualSize: QSize(3520, 1080)
depth: 24
devicePixelRatio: 1
geometry: QRect(0,0 1920x1080)
logicalDotsPerInch: 96.1951
logicalDotsPerInchX: 96.1376
logicalDotsPerInchY: 96.2526
nativeOrientation: Qt::PrimaryOrientation
orientation: Qt::LandscapeOrientation
orientationUpdateMask: QFlags<Qt::ScreenOrientation>(PrimaryOrientation)
physicalDotsPerInch: 81.6656
physicalDotsPerInchX: 81.6884
physicalDotsPerInchY: 81.6429
physicalSize: QSizeF(597, 336)
primaryOrientation: Qt::LandscapeOrientation
refreshRate: 60
size: QSize(1920, 1080)
virtualGeometry: QRect(0,0 3520x1080)
virtualSiblings: (QScreen(0x556bb4006a00, name="LVDS-1"), QScreen(0x556bb4006a40, name="HDMI-1"))
virtualSize: QSize(3520, 1080)
Comment 4 Jan-Marek Glogowski 2021-10-20 19:22:35 UTC
Created attachment 175853 [details]
Little terminal program dumping QScreen info with "no" output fix

(In reply to Axel Braun from comment #2)
> after installation of libreoffice-gtk3 I tried both options on the X1 (the
> machine in trouble) and for both cases the result did not change.

Hmm. That seems to prove it's not a problem with LO's Qt integration and no general Qt problem, because all three, Qt, Gtk and direct X11, produce the same error. You should have noticed, that LO looked at least very different for SAL_USE_VCLPLUGIN=gen (VCL: x11).

The output from my qscreen program is strange (I fixed a little bug in the output, where "no:" wasn't correctly increased; no need to re-run it):

(In reply to Axel Braun from comment #2)
> ... (the machine in trouble) ...
> docb@X1E:~>  /tmp/qscreen/qscreen
> Qt: 5.15.2
> 
> no: 0 - current
> geometry: QRect(2156,0 1920x1080)
>
> no: 1
> geometry: QRect(0,0 1920x1080)

(In reply to Axel Braun from comment #3)
> And here is the output of the working machine:
> docb@T520:~> /tmp/qscreen/qscreen 
> Qt: 5.15.2
> 
> no: 0 - current
> geometry: QRect(1920,0 1600x900)
> 
> no: 1
> geometry: QRect(0,0 1920x1080)

For both setups the external HDMI monitor (no: 1) is left of the laptop (no: 0 / eDP and LVDS). Both external rectangles start at 0,0, but for whatever reason the offset of the broken laptop screen is at 2156,0 (the expected is 1920x0, like the working setup). So the configured layout is - from left to right: external HDMI (width: 1920) + 236 pixel nothing + laptop screen (width: 1920). This is also visible in the xrandr output in the KDE bug report.
AFAIK nothing generally wrong, just unusual, but I guess it might be the reason why the positioning code in LO fails.

Maybe someone else can emulate this setup. If there is no specific reason for the gap, I suggest you try to "fix" your monitor setup, so that they are right next to each other. That might workaround the bug more general.

It would be interesting to know, if the gap of 236 pixels was somehow introduced by the KDE update. If that is the case, it suggests there might be a bug in KDE, maybe kwin / compositor related in the widest sense.

I might not be able to fix this without the setup for direct debugging, so I hope someone else can reproduce and eventually fix this. I have to check, where the presentation window is actually positioned in the LO code. Quite possible it mixes up width and offset, as these tend to be identical.
Comment 5 Axel Braun 2021-10-21 06:55:05 UTC
I have upgraded the T520, it is now showing the same behaviour as the X1. Here is the output of qscreen 'after':
(IMO it is showing the same offset as before, but behaves different....)

docb@T520:~> /tmp/qscreen/qscreen 
Qt: 5.15.2

no: 0 - current
ptr: QScreen(0x55e397946ba0, name="LVDS-1")
manufacturer: "Lenovo Group Limited"
model: ""
name: "LVDS-1"
serialNumber: ""
availableGeometry: QRect(1920,0 1600x900)
availableSize: QSize(1600, 900)
availableVirtualGeometry: QRect(0,0 3520x1080)
availableVirtualSize: QSize(3520, 1080)
depth: 24
devicePixelRatio: 1
geometry: QRect(1920,0 1600x900)
logicalDotsPerInch: 96.1951
logicalDotsPerInchX: 96.1376
logicalDotsPerInchY: 96.2526
nativeOrientation: Qt::PrimaryOrientation
orientation: Qt::LandscapeOrientation
orientationUpdateMask: QFlags<Qt::ScreenOrientation>(PrimaryOrientation)
physicalDotsPerInch: 117.987
physicalDotsPerInchX: 118.14
physicalDotsPerInchY: 117.835
physicalSize: QSizeF(344, 194)
primaryOrientation: Qt::LandscapeOrientation
refreshRate: 59.9995
size: QSize(1600, 900)
virtualGeometry: QRect(0,0 3520x1080)
virtualSiblings: (QScreen(0x55e397946ba0, name="LVDS-1"), QScreen(0x55e397946be0, name="HDMI-1"))
virtualSize: QSize(3520, 1080)

no: 0
ptr: QScreen(0x55e397946be0, name="HDMI-1")
manufacturer: "Acer Technologies"
model: "S273HL-"
name: "HDMI-1"
serialNumber: "LQA0C0158001-"
availableGeometry: QRect(0,0 1920x1080)
availableSize: QSize(1920, 1080)
availableVirtualGeometry: QRect(0,0 3520x1080)
availableVirtualSize: QSize(3520, 1080)
depth: 24
devicePixelRatio: 1
geometry: QRect(0,0 1920x1080)
logicalDotsPerInch: 96.1951
logicalDotsPerInchX: 96.1376
logicalDotsPerInchY: 96.2526
nativeOrientation: Qt::PrimaryOrientation
orientation: Qt::LandscapeOrientation
orientationUpdateMask: QFlags<Qt::ScreenOrientation>(PrimaryOrientation)
physicalDotsPerInch: 81.6656
physicalDotsPerInchX: 81.6884
physicalDotsPerInchY: 81.6429
physicalSize: QSizeF(597, 336)
primaryOrientation: Qt::LandscapeOrientation
refreshRate: 60
size: QSize(1920, 1080)
virtualGeometry: QRect(0,0 3520x1080)
virtualSiblings: (QScreen(0x55e397946ba0, name="LVDS-1"), QScreen(0x55e397946be0, name="HDMI-1"))
virtualSize: QSize(3520, 1080)
docb@T520:~>
Comment 6 Axel Braun 2021-10-25 08:14:47 UTC
Created attachment 175903 [details]
Offset of ext. screen

Hi Jan, 
coming back on the offset you mentioned in your comment #4: In KDE one can place the second screen a bit freely, and this happened here. 
After moving it next to the monitor the offset is gone, but that does not fix the issue, unfortunately
Comment 7 Michael Weghorn 2021-11-03 11:12:31 UTC
Today, Plasma 5.23 reached Debian testing, and I could reproduce the issue here.

Turns out this is not a LibreOffice problem, but a KWin regression, already fixed in the 'Plasma/5.23' branch by this commit:

    commit 2958881264caf8d3bd83a34411e9586f8fcb7211
    Author: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
    Date:   Fri Oct 15 17:18:43 2021 +0300

        Restore old behavior of Workspace::clientArea(clientOpt, Toplevel)
        
        When geometry updates are blocked, the output doesn't get updated. This
        breaks Workspace::clientArea() overload that takes only the window.
        
        Previously, clientArea() would look up the output where the window is
        every time it's called, so the fact that the screen id or AbstractOutput
        is unsynchronized with the frame geometry was irrelevant.
        
        This change restores the old behavior as 5.23 is affected by the
        output() being out of sync with the frameGeometry(). Specifically, when
        kwin starts managing an X11 window, it will block geometry updates,
        setup the window, e.g. make it fullscreen, and unblock geometry updates.
        
        Since Workspace::clientArea(clientArea, Toplevel) uses the output(),
        X11Client::setFullScreen() will most likely put the X11 window at a
        wrong output if it's called inside X11Client::manage().
        
        BUG: 443787
        
        
        (cherry picked from commit 6d5fc9fd3000cf32ecb63a8252a6f50368f3604d)

     src/workspace.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)

see also https://bugs.kde.org/show_bug.cgi?id=443787 which describes a different use case