Bug 511232 - Show Compositing/FPS are being rendered offscreen on multi-monitor scetups
Summary: Show Compositing/FPS are being rendered offscreen on multi-monitor scetups
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (other bugs)
Version First Reported In: 6.5.0
Platform: Arch Linux Linux
: LO minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-27 18:15 UTC by thederpyworld
Modified: 2025-11-07 22:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.5.2
Sentry Crash Report:


Attachments
Show FPS effect is rendered off-screen (111.95 KB, image/png)
2025-10-27 18:15 UTC, thederpyworld
Details
Monitor setup as shown in the settings (12.08 KB, image/png)
2025-10-27 18:15 UTC, thederpyworld
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thederpyworld 2025-10-27 18:15:00 UTC
Created attachment 186238 [details]
Show FPS effect is rendered off-screen

SUMMARY

Certain debugging effects, such as "Show Compositing" and "Show FPS" will render off screen (as shown in the attachment). It seems to be rendering at the same height as the highest monitor (the right one in attachment).

STEPS TO REPRODUCE
1. Set up monitors so they have differing Y positions
2. Enable Show Compositing/FPS effect
3. Notice that it renders on the highest point of all the monitors

OBSERVED RESULT
The effect is either rendered partially or totally obscured on monitors lower than the highest one

EXPECTED RESULT
The effects being rendered within each of the monitor's boundaries

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.0
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.14.9-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 6800HS with Radeon Graphics
Memory: 16 GiB of RAM (14.9 GiB usable)
Graphics Processor: AMD Radeon 680M

ADDITIONAL INFORMATION
I am also attaching my monitor setup as shown in the settings to better visualize the issue I am facing.
Comment 1 thederpyworld 2025-10-27 18:15:23 UTC
Created attachment 186239 [details]
Monitor setup as shown in the settings
Comment 2 Nate Graham 2025-10-30 16:11:06 UTC
I don't have three screens, but I can't manage to reproduce this with two, and the right-most one rotated as shown in your arrangement.
Comment 3 thederpyworld 2025-10-30 20:00:58 UTC
(In reply to Nate Graham from comment #2)
> I don't have three screens, but I can't manage to reproduce this with two,
> and the right-most one rotated as shown in your arrangement.

I don't think the rotation of the monitors is the key factor here — it's that the effects are not accounting for the monitor's offset.

Did a little testing with `showfpseffect.cpp`, and if I were to offset the scene's geometry as such:

```
diff --git a/src/plugins/showfps/showfpseffect.cpp b/src/plugins/showfps/showfpseffect.cpp
index 9b228ce5a2..a02f2d7c04 100644
--- a/src/plugins/showfps/showfpseffect.cpp
+++ b/src/plugins/showfps/showfpseffect.cpp
@@ -93,7 +93,7 @@ void ShowFpsEffect::paintScreen(const RenderTarget &renderTarget, const RenderVi
     }
 
     const auto rect = viewport.renderRect();
-    m_scene->setGeometry(QRect(rect.x() + rect.width() - 300, 0, 300, 150));
+    m_scene->setGeometry(QRect(rect.x() + rect.width() - 300, rect.y(), 300, 150));
     effects->renderOffscreenQuickView(renderTarget, viewport, m_scene.get());
 }
```

then the effect renders correctly on all monitors.
Comment 4 Nate Graham 2025-10-31 17:58:13 UTC
Would you like to submit a patch to do that?
Comment 5 thederpyworld 2025-11-01 00:52:40 UTC
(In reply to Nate Graham from comment #4)
> Would you like to submit a patch to do that?

I'll give it a shot this weekend once I register myself there.
Comment 6 Bug Janitor Service 2025-11-01 13:10:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/8347
Comment 7 Zamundaaa 2025-11-03 14:28:04 UTC
Git commit 1d94f5c5d69234cf08547815cf4bd8e4de8dde80 by Xaver Hugl, on behalf of Pavel Duong.
Committed on 03/11/2025 at 14:28.
Pushed by zamundaaa into branch 'master'.

plugins/showfps,-compositing: apply vertical offset to geometry

These debugging effects render off-screen if a multi-monitor setup is used, where the monitors' top sides are not aligned. This MR offsets the effects' scene geometry by the viewport's vertical offset.

M  +1    -1    src/plugins/showcompositing/showcompositing.cpp
M  +1    -1    src/plugins/showfps/showfpseffect.cpp

https://invent.kde.org/plasma/kwin/-/commit/1d94f5c5d69234cf08547815cf4bd8e4de8dde80
Comment 8 Zamundaaa 2025-11-03 15:58:26 UTC
Git commit ec2f61b7d5cf8a1df1215ad40cec61b78f4cbc17 by Xaver Hugl.
Committed on 03/11/2025 at 15:58.
Pushed by zamundaaa into branch 'Plasma/6.5'.

plugins/showfps,-compositing: apply vertical offset to geometry

These debugging effects render off-screen if a multi-monitor setup is used, where the monitors' top sides are not aligned. This MR offsets the effects' scene geometry by the viewport's vertical offset.


(cherry picked from commit 1d94f5c5d69234cf08547815cf4bd8e4de8dde80)

Co-authored-by: Pavel Duong <pavel@duong.cz>

M  +1    -1    src/plugins/showcompositing/showcompositing.cpp
M  +1    -1    src/plugins/showfps/showfpseffect.cpp

https://invent.kde.org/plasma/kwin/-/commit/ec2f61b7d5cf8a1df1215ad40cec61b78f4cbc17