You are not logged in.

#1 2023-11-14 00:54:05

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

[SOLVED] Getting stuttering when moving cursor between screens

I've recently reinstalled Arch onto a new drive, and since then I've been getting a slight lag or frame drops whenever I move my cursor between my screens. When looking at `htop` I do notice a slight jump in CPU usage from xorg when I quickly move my cursor back and forth between screens.

I've tried adding `Option "SWcursor" "on"` to my xorg conf, but that resulted in the cursor glitching out severely, by just displaying wrong (flickering, corrupted cursor)

Any help in trying to figure out the source of this issue would be appreciated. Thanks.

Specs:
CPU: Ryzen 5800X
GPU: Radeon 7900XT
Mouse: Logitech G502 HERO

Relevant Packages:
Xorg 1.21.1.9
KDE Plasma 5.27.9
Linux-Zen 6.6.1

Logs/Configs:
journalctl -b
dmesg
/var/log/Xorg.0.log
glxinfo -B
/etc/X11/xorg.conf.d/20-amdgpu.conf

Last edited by TheTrueColonel (2023-11-21 20:51:14)

Offline

#2 2023-11-14 08:22:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

This is probably down to kwin/plasmashell updating something when you enter the other  desktop window.

Does it happen when you suspend the compositor (shift+alt+f12)
Where exactly do you get the (visible) "frame drops" when this happens?

Offline

#3 2023-11-14 13:37:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,233

Re: [SOLVED] Getting stuttering when moving cursor between screens

What happens if you disable the variablerefresh config? What happens if you remove xf86-video-amdgpu and test the built-in modesetting driver?

FWIW multi-monitor support can quickly get iffy on xorg, and I've been using a wayland session for well over a year now on an amdgpu setup so this might be something to test as well.

Online

#4 2023-11-14 23:29:15

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

Re: [SOLVED] Getting stuttering when moving cursor between screens

seth wrote:

This is probably down to kwin/plasmashell updating something when you enter the other  desktop window.

Does it happen when you suspend the compositor (shift+alt+f12)
Where exactly do you get the (visible) "frame drops" when this happens?

Yeah, it still happens when I suspend the compositor. It's kinda hard to tell if it's causing the entire display to kinda hitch, or if it's something with the cursor itself, since it's very brief but when moving the mouse between displays, there's a visible hitching which is much more noticeable if I'm dragging a window between the two.

V1del wrote:

What happens if you disable the variablerefresh config? What happens if you remove xf86-video-amdgpu and test the built-in modesetting driver?

FWIW multi-monitor support can quickly get iffy on xorg, and I've been using a wayland session for well over a year now on an amdgpu setup so this might be something to test as well.

I've tried disabling/removing both of those separately and together, and the issue is still there, and I'm not sure if a bug like this would be worth migrating display servers. I've seen a lot of software I use have either some limited compatibility, or full incompatibility with Wayland.

Offline

#5 2023-11-14 23:43:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

Can you capture it on camera?
(Use a tripod, otherwise the answer is "no" before you try)

Offline

#6 2023-11-15 01:00:55

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

Re: [SOLVED] Getting stuttering when moving cursor between screens

seth wrote:

Can you capture it on camera?
(Use a tripod, otherwise the answer is "no" before you try)

I don't have a tripod or any other stable way to record my screen with a camera, but I was able to use OBS to record at 120fps to show the hitching I'm seeing. Would you like me to link to the raw file, and if so, what's the preferred file host?

Offline

#7 2023-11-15 07:08:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

Yes & depends on the filesize, but you could abuse youtube, use a google drive or https://wetransfer.com/ pretty much regardless.
But if it shows up in OBS it's rendered this way and not just a scanout issue.

Fyi, you can makeshift a phone-tripod out of two books: -\_
(The only issue is the not-so-steady human hand)

Offline

#8 2023-11-15 23:30:49

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

Re: [SOLVED] Getting stuttering when moving cursor between screens

seth wrote:

Yes & depends on the filesize, but you could abuse youtube, use a google drive or https://wetransfer.com/ pretty much regardless.
But if it shows up in OBS it's rendered this way and not just a scanout issue.

Fyi, you can makeshift a phone-tripod out of two books: -\_
(The only issue is the not-so-steady human hand)

Here's the link to the video.

Offline

#9 2023-11-16 00:11:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

Isn't public.

Offline

#10 2023-11-16 00:14:14

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

Re: [SOLVED] Getting stuttering when moving cursor between screens

seth wrote:

Isn't public.

I updated the permissions, my bad.

Offline

#11 2023-11-16 09:23:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

The window tracks the cursor, that's not actually tied to the output change, it just becomes notably at that point (likely because the sideload causing more delay)

I'd blame vsync and the compositor, but you've ruled that out.
Probably then

[    15.821] (==) AMDGPU(0): TearFree property default: auto
V1del wrote:

What happens if you remove xf86-video-amdgpu and test the built-in modesetting driver?

Otherwise disabling https://man.archlinux.org/man/extra/xf8 … n#Option~6 or enabling https://man.archlinux.org/man/extra/xf8 … n#Option~8 might help.
Not sure whether amdgpu has triple buffering support.

Offline

#12 2023-11-17 01:02:12

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

Re: [SOLVED] Getting stuttering when moving cursor between screens

Unfortunately, neither of those options seemed to change anything.

Offline

#13 2023-11-17 07:38:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

You're now using the modesetting driver?

Edit: and please re-check the uncomposited behavior.
Also monitor the CPU usage while dragging the window - might be a pure KWin eventhandling.
Finally test the behavior w/ an openbox session.

Last edited by seth (2023-11-17 07:40:46)

Offline

#14 2023-11-19 19:39:22

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

Re: [SOLVED] Getting stuttering when moving cursor between screens

Yes, I'm using the modesetting driver.
Still has the issue without the compositor.
If I don't move the mouse between monitors, almost no CPU usage, if I go between monitors, there's a noticeable jump in CPU usage.
In pure Openbox, the issue does not exist, KDE/openbox and Plasma (X11) sessions both have the issue.

I'm thinking this may be a KDE/xorg issue?

Offline

#15 2023-11-19 19:51:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

In pure Openbox, the issue does not exist, KDE/openbox and Plasma (X11) sessions both have the issue.

For the CPU spike i'm pertty sure it's the plasmashell window that causes  that - does plasma/openbox also permanently lag the window behind the cursor (it's notable in your video when you play it frame by frame, the cursor does not maintain its relative position to the window)

Offline

#16 2023-11-19 20:08:19

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

Re: [SOLVED] Getting stuttering when moving cursor between screens

I may not be fully understanding what you're meaning, but both an X11 only and a KDE/Openbox session will have both displays freeze completely until it catches up again. I didn't have any animations playing in my video to show that, but I can take another if needed.
I also ran glxgears to see what it'd report while I rapidly moved my mouse between displays. Here's the results I saw.

Plasma (X11)

837 frames in 5.0 seconds = 167.279 FPS
826 frames in 5.0 seconds = 165.081 FPS
742 frames in 5.0 seconds = 148.290 FPS
760 frames in 5.0 seconds = 151.703 FPS
689 frames in 5.0 seconds = 137.701 FPS
689 frames in 5.0 seconds = 137.312 FPS

KDE/Openbox

884 frames in 5.0 seconds = 176.749 FPS
826 frames in 5.0 seconds = 165.077 FPS
772 frames in 5.0 seconds = 154.286 FPS
757 frames in 5.0 seconds = 151.290 FPS
765 frames in 5.0 seconds = 151.922 FPS

Offline

#17 2023-11-19 20:29:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

Not "between displays", the window is constantly lagging behind the cursor, even while stying on the same output.

Offline

#18 2023-11-19 20:48:03

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

Re: [SOLVED] Getting stuttering when moving cursor between screens

Okay, yeah I see what you mean now. And yeah, recorded another video on KDE/Openbox and the windows do lag behind the cursor.

Offline

#19 2023-11-19 20:48:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

Also in a  pure openbox session?

Offline

#20 2023-11-19 20:52:02

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

Re: [SOLVED] Getting stuttering when moving cursor between screens

Yes, it does as well.

Offline

#21 2023-11-19 21:18:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

Would be sth. in the server. I'd say "tearfree" but that'S (for now and still) not a thing w/ the modesetting driver.

I guess it's also just a minor problem compared to the freeze on output crossing.
Since it happens w/ plasma/openbox you could briefly test whether it's the plasmashell process (by killing it, the desktop and panel should™ disappear) and then try to narrow it down to specific dekstop widget-thingies.
If it's *not* the desktop, the next contender would probably be the kscreen daemon ("kcmshell5 kded" or "kcmshell5 kded5" will hopefully allow you to deactivate that)

Offline

#22 2023-11-19 21:32:55

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

Re: [SOLVED] Getting stuttering when moving cursor between screens

I've tried killing the plasmashell and disabling the kscreen daemon and the issue still persists.

Offline

#23 2023-11-19 21:44:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

Ok so it's related to the plasma session, but not the WM, plasmashell or the kscreen daemon…
What is the vertical window between the outputs you're crossing in the video? Some plasmapanel, conky,  …?

Offline

#24 2023-11-19 21:50:31

TheTrueColonel
Member
Registered: 2023-11-14
Posts: 17

Re: [SOLVED] Getting stuttering when moving cursor between screens

The video was positioned using OBS to capture part of both my displays so the stuttering was more easily visible, as the cursor moved between them. The only things visible in the video are Firefox, Discord, and Konsole.

Offline

#25 2023-11-19 21:53:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,056

Re: [SOLVED] Getting stuttering when moving cursor between screens

Is the presence of discord/any browser, any window beneath the moving window or present on either desktop relevant?

Offline

Board footer

Powered by FluxBB