Bug 168887 - Position and size of playing animations are wrongly scaled with the screen's scaling factor, resulting in shifted positions and wrong dimensions on Wayland.
Summary: Position and size of playing animations are wrongly scaled with the screen's ...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
25.8.1.1 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 166110 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-10-16 10:22 UTC by postix
Modified: 2025-12-14 14:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (175% scaling) (412.90 KB, image/jpeg)
2025-10-16 10:22 UTC, postix
Details
Test file with an animation (1016.25 KB, application/vnd.oasis.opendocument.presentation)
2025-10-16 10:26 UTC, postix
Details
Screenshot of dual screen while presenting (848.91 KB, image/jpeg)
2025-10-23 11:55 UTC, postix
Details
Screenshot: Annotated with measurements (45.95 KB, image/jpeg)
2025-10-23 12:48 UTC, postix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2025-10-16 10:22:45 UTC
Created attachment 203358 [details]
Screenshot (175% scaling)

I got a pptx presentation, with some embedded animations.

When playing these animations, they appear offset at a different location and leave a black rectangle at their origin. This happens both in the default editor mode and presentation mode.

In the screenshot you can see two animations, both are shifted to the bottom right direction.

There's another issue for the 2nd animation on the right side, its associated black rectangle does not appear at the original position but in the center of the sheet.

The animations are played at the position of the black rectangles when using 100% scaling.

Please see the screenshot taken with a scale factor of 1.75.

Unfortunately I cannot share the original file, but if I manage to create a test file, which I can share, I will do that later if needed.

---

Version: 25.8.1.1 (X86_64) / LibreOffice Community
Build ID: 580(Build:1)
CPU threads: 24; OS: Linux 6.17; UI render: default; VCL: kf6 (cairo+wayland)
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Operating System: openSUSE Tumbleweed 20251013
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.1-1-default (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX 580 Series
Comment 1 postix 2025-10-16 10:26:49 UTC
Created attachment 203359 [details]
Test file with an animation
Comment 2 postix 2025-10-16 10:27:46 UTC
Another note: While playing the animation, the background behind the sheet turns from gray to black.
Comment 3 postix 2025-10-16 11:18:01 UTC
When playing the animation, the following gets logged:

```
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/gbtoI2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:00:10.20, start: 0.000000, bitrate: 414 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1008x1008, 412 kb/s, 10 fps, 10 tbr, 10240 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
[h264 @ 0x5645dadc9a00] No support for codec h264 profile 100.
```
Comment 4 postix 2025-10-16 11:19:14 UTC
[h264 @ 0x559637aa3740] Failed setup for format vaapi: hwaccel initialisation returned error.

(Forgot the last line)
Comment 5 postix 2025-10-16 11:55:51 UTC
Just confirmed again on 

Version: 25.8.2.2 (X86_64) / LibreOffice Community
Build ID: 580(Build:2)
Comment 6 WillieHawkins 2025-10-23 07:37:09 UTC
Sounds like a clear scaling-related rendering bug in LibreOffice Impress on Wayland — the animation offset and leftover black rectangles likely stem from incorrect coordinate calculations at display scales other than 100%. You’ve provided great diagnostic info (especially noting that it works correctly at 100% scaling). 
https://download.cnet.com/emf-parser/3000-2383_4-10558240.html https://sloperider.io
Once you can reproduce it with a shareable test file, that’ll make it much easier for developers to confirm and fix.
Comment 7 postix 2025-10-23 11:53:06 UTC
> Once you can reproduce it with a shareable test file, that’ll make it much easier for developers to confirm and fix.

I've already attached a Test ODT file with an mp4/h264 animation above.
Comment 8 postix 2025-10-23 11:55:05 UTC
Created attachment 203497 [details]
Screenshot of dual screen while presenting

The animation was placed in the upper left corner of the sheet. 

When playing, the animation is stretched by the scale factor for both screens.
On the control screen (left) the animation appears additionally shifted downwards.
Comment 9 postix 2025-10-23 12:01:57 UTC
I've measured, LO scaled with factor of 2 instead of 1.75, so likely it additionally rounds up or only uses integer scaling.
Comment 10 postix 2025-10-23 12:48:33 UTC
Created attachment 203499 [details]
Screenshot: Annotated with measurements

Apparently LO sets the origin of the coord system to the upper left corner of the main window.

Then it scales all vector points for the animation wrongly with the scale factor (rounded up to next nearest integer?).
Comment 11 Dāvis 2025-12-14 14:07:41 UTC
I'm experiencing this exact same bug on latest LibreOffice 25.8.3.2
Inserted videos are played at wrong location and original location contains black area. This happens in both editing mode and presentation mode.

I'm using PLasma Desktop with 175% scaling (KWin with Wayland) on Arch Linux with single monitor.
I tested that this bug actually happens in both Wayland and in XWayland (ie. `WAYLAND_DISPLAY= QT_PLATFORM_PLUGIN=xcb libreoffice`) for any scaling that is above 100%. So even with 105% scaling it's at wrong location. But it doesn't happen with scaling below 100% (eg. 50% scaling no bug).

I also found that you can workaround it by using `QT_SCALE_FACTOR=0.5 libreoffice` and that will fix it no matter what scaling you're actually using because it's not proportional...
Comment 12 Dāvis 2025-12-14 14:10:48 UTC
*** Bug 166110 has been marked as a duplicate of this bug. ***