Bug 478223 - Window previews and window screen sharing are flipped vertically
Summary: Window previews and window screen sharing are flipped vertically
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: master
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, wayland-only
: 478067 480787 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-07 16:40 UTC by Alessandro Astone
Modified: 2024-02-15 14:30 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Astone 2023-12-07 16:40:04 UTC
When running Plasma 6 beta in KVM with Virtio video and no 3d acceleration the window previews in the taskbar are mirrored vertically, and likewise sharing window contents with pipewire is also mirrored vertically


STEPS TO REPRODUCE
Create a KVM with
```
<video>
  <model type="virtio" heads="1" primary="yes">
    <acceleration accel3d="no"/>
  </model>
  <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
</video>
```


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora KDE Rawhide
(available in About System)
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
This probably affects real hardware too when using llvmpipe or generally memfd-based pipewire capture.
Comment 1 Alessandro Astone 2023-12-07 20:09:16 UTC
@Nate this is definitely in the kwin wayland backend/screencast plugin, that's why i assigned it to kwin. Unfortunately there's no component in the list that expresses that...

But whatever can get the right people to look into it works, i suppose.

See also: https://invent.kde.org/plasma/kwin/-/merge_requests/3611
Comment 2 fanzhuyifan 2024-02-03 18:23:20 UTC
*** Bug 480787 has been marked as a duplicate of this bug. ***
Comment 3 chriserizo 2024-02-14 22:57:41 UTC
Can confirm this also happens in Nvidia GPUs running the latest stable branch propietary driver (535)

Some users have reported that the latest beta release (550) fixes this issue.
Comment 4 Bug Janitor Service 2024-02-15 08:58:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5204
Comment 5 Alessandro Astone 2024-02-15 13:09:02 UTC
*** Bug 478067 has been marked as a duplicate of this bug. ***
Comment 6 Vlad Zahorodnii 2024-02-15 14:05:48 UTC
Git commit 3388b7643c1e7e6299d98dab9c485b6ae76e8bd0 by Vlad Zahorodnii.
Committed on 15/02/2024 at 13:54.
Pushed by vladz into branch 'master'.

plugins/screencast: Fix window screencasts being vertically mirrored with memfd

WindowScreenCastSource::render(GLFramebuffer) renders windows with the y
axis flipped, but the offscreen has no FlipY flag set.

M  +5    -8    src/plugins/screencast/windowscreencastsource.cpp

https://invent.kde.org/plasma/kwin/-/commit/3388b7643c1e7e6299d98dab9c485b6ae76e8bd0
Comment 7 Vlad Zahorodnii 2024-02-15 14:26:12 UTC
Git commit 1ce25f713787abdc60003bacd14e48ecaef61ea3 by Vlad Zahorodnii.
Committed on 15/02/2024 at 14:18.
Pushed by vladz into branch 'Plasma/6.0'.

plugins/screencast: Fix window screencasts being vertically mirrored with memfd

WindowScreenCastSource::render(GLFramebuffer) renders windows with the y
axis flipped, but the offscreen has no FlipY flag set.
(cherry picked from commit 3388b7643c1e7e6299d98dab9c485b6ae76e8bd0)

M  +5    -8    src/plugins/screencast/windowscreencastsource.cpp

https://invent.kde.org/plasma/kwin/-/commit/1ce25f713787abdc60003bacd14e48ecaef61ea3