Bug 480599 - Spectacle Screen Recording with Dual Monitors Ignores Monitor Choice
Summary: Spectacle Screen Recording with Dual Monitors Ignores Monitor Choice
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 24.01.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-01-31 14:20 UTC by Dashon
Modified: 2024-02-15 08:29 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dashon 2024-01-31 14:20:05 UTC
SUMMARY
I have been having various issues with recording my plasma 6 wayland session using spectacle on my dual monitor setup with an Nvidia gpu. Mainly, if I choose the full screen option, then no matter which monitor I choose. It only records the second monitor. If I choose the "window" option, then the resulting video is upside down.

STEPS TO REPRODUCE
1. Have a dual monitor setup and open spectacle on your wayland session.
2. Click on the recording tab.
3. Select "full screen".
4. Record a video.
5. Record another video while choosing "full screen" again, but this time select the other monitor.
6. Open both videos.

OBSERVED RESULT
Only one monitor is recorded regardless of which one you selected.

EXPECTED RESULT
The monitor you selected should be recorded.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 5.92.0
KDE Frameworks Version: 5.248.0
Qt Version: 6.7.0
Kernel Version: 6.7.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080/PCIe/SSE2
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C95
System Version: 1.0

ADDITIONAL INFORMATION
Also give the "window" option a try when recording. For me the resulting video is upside down.
Comment 1 Dashon 2024-01-31 14:22:14 UTC
I'll open a different bug report for the upside down issue.
Comment 2 Nate Graham 2024-01-31 22:19:31 UTC
Cannot reproduce; it takes a recording of whichever screen I target. Are you making sure you click somewhere on the screen you want to record?
Comment 3 Dashon 2024-01-31 23:03:57 UTC
(In reply to Nate Graham from comment #2)
> Cannot reproduce; it takes a recording of whichever screen I target. Are you
> making sure you click somewhere on the screen you want to record?

I'm certain that I'm clicking on the screen. I tried on a new virtual desktop that is mostly empty with the exception of one window, so that I can tell them apart in the recording. However, it seems like no matter where I click, only my second monitor gets recorded. Perhaps its an issue with the arch package?
Comment 4 Doug 2024-02-01 05:13:22 UTC
I can confirm.  Neon Testing, Plasma 5.92.90, Frameworks 5.249.0, Qt 6.6.1, AMD GPU.
Comment 5 Doug 2024-02-01 05:21:50 UTC
After playing around with it a bit more, I think that Spectacle is recording whichever monitor has the active window on it (not counting the Spectacle window).
Comment 6 Dashon 2024-02-01 15:02:46 UTC
(In reply to Doug from comment #5)
> After playing around with it a bit more, I think that Spectacle is recording
> whichever monitor has the active window on it (not counting the Spectacle
> window).

Wow nice find, that seems to be it. I made sure the active window minus the spectacle window was on my first monitor instead of the second one. This time it actually recorded the first monitor.
Comment 7 Noah Davis 2024-02-01 15:44:30 UTC
(In reply to Doug from comment #5)
> After playing around with it a bit more, I think that Spectacle is recording
> whichever monitor has the active window on it (not counting the Spectacle
> window).

Is the window partly on one screen and partly on another?
Comment 8 Dashon 2024-02-01 15:49:26 UTC
(In reply to Noah Davis from comment #7)
> (In reply to Doug from comment #5)
> > After playing around with it a bit more, I think that Spectacle is recording
> > whichever monitor has the active window on it (not counting the Spectacle
> > window).
> 
> Is the window partly on one screen and partly on another?

In my case it was not. Each window was firmly on exactly one monitor at any given time.
Comment 9 Doug 2024-02-02 04:30:20 UTC
(In reply to Noah Davis from comment #7)
> (In reply to Doug from comment #5)
> > After playing around with it a bit more, I think that Spectacle is recording
> > whichever monitor has the active window on it (not counting the Spectacle
> > window).
> 
> Is the window partly on one screen and partly on another?

No, I had all windows on one screen only
Comment 10 Noah Davis 2024-02-15 08:17:26 UTC
Git commit e238cceb0bd65f88236d2ebf4202b9979bd79ce2 by Noah Davis.
Committed on 15/02/2024 at 08:17.
Pushed by ndavis into branch 'master'.

Fix always recording the screen at (0,0) with screen recording

On wayland, you can't get the cursor position from QCursor::pos(), so we
use selected window geometry instead. However, using selected window
geometry can sometimes select the wrong screen if the window is between
screens. We'll need to come up with a better solution someday.

M  +9    -3    src/Platforms/VideoPlatformWayland.cpp

https://invent.kde.org/graphics/spectacle/-/commit/e238cceb0bd65f88236d2ebf4202b9979bd79ce2
Comment 11 Noah Davis 2024-02-15 08:29:16 UTC
Git commit b8f9a672b6d15aa16b1bb22d226198bc1cf62f9e by Noah Davis.
Committed on 15/02/2024 at 08:21.
Pushed by ndavis into branch 'release/24.02'.

Fix always recording the screen at (0,0) with screen recording

On wayland, you can't get the cursor position from QCursor::pos(), so we
use selected window geometry instead. However, using selected window
geometry can sometimes select the wrong screen if the window is between
screens. We'll need to come up with a better solution someday.
(cherry picked from commit e238cceb0bd65f88236d2ebf4202b9979bd79ce2)

M  +9    -3    src/Platforms/VideoPlatformWayland.cpp

https://invent.kde.org/graphics/spectacle/-/commit/b8f9a672b6d15aa16b1bb22d226198bc1cf62f9e