Bug 516067

Summary: Jerky video playback of 60FPS video on 120Hz monitor
Product: [Plasma] kwin Reporter: Michael Marley <michael>
Component: performanceAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: michael, xaver.hugl
Priority: NOR    
Version First Reported In: 6.5.91   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Michael Marley 2026-02-16 02:14:40 UTC
SUMMARY
When I play a 60FPS video on my 120Hz monitor, I get stuttering that randomly ranges from apparent random frame drops all the way down to 30FPS.  I've tested this with the latest git builds of mpv and VLC and the issue is present with both.  In mpv, it works significantly better (but not perfectly) if "--gpu-api=opengl --hwdec=vaapi" is passed rather than "--gpu-api=vulkan --hwdec=vulkan".  If OpenGL and VAAPI are used in combination with VRR, the problem is eliminated.  The problem also does not occur on a 60Hz screen.  While reproducing the problem, mpv does not report any frame drops.

I initially reported this as a bug in mpv (https://github.com/mpv-player/mpv/issues/17410) and they suggested I try a different compositor to prove whether the bug was in mpv or not.  When I tried Jay as they suggested, I got smooth playback of the same video using Vulkan for both the GPU output and the decoding, which seems to indicate that kwin is at fault here.

The issue occurs on both 6.5.5 and 6.5.91.

STEPS TO REPRODUCE
1. Play a 60FPS video on a 120Hz screen in mpv or VLC.

OBSERVED RESULT
Frame drops and/or near-30FPS peformance

EXPECTED RESULT
Smooth playback like with a 60Hz screen

SOFTWARE/OS VERSIONS
Linux: Linux mamarley-laptop 6.19.0-061900-generic #202602081706 SMP PREEMPT_DYNAMIC Sun Feb  8 17:30:59 EST 2026 x86_64 x86_64 x86_64 GNU/Linux
KDE Plasma Version: 6.5.91
KDE Frameworks Version: 6.23
Qt Version: 6.10.2

ADDITIONAL INFORMATION
The video I tested with was https://4kmedia.org/samsung-travel-with-my-pet-hdr-uhd-4k-demo/, but any 60FPS video with smooth motion will reproduce the issue.  For that video, the first 2 scenes with camera pans are the most obvious.
Comment 1 Zamundaaa 2026-02-16 15:07:17 UTC
On my laptop I see some individual frame drops from time to time with the Vulkan decoder, but it uses the CPU quite heavily (maybe Mesa isn't set up to support the codec or something), so it's not particularly surprising to me.
VLC (apart from not playing back HDR videos correctly) seems to be fine though.

How did you determine it drops to 30FPS? Just based on visuals, or also measurements of some sort?
If you run mpv with mangohud, do you see the frame drops in the frame time graph?

> While reproducing the problem, mpv does not report any frame drops.
Maybe the frames are presented at the wrong time, rather than dropped. Like 12--34--56--78-- instead of 1-2-3-4-5-6-7-8-. Or something more chaotic... It's possible that mpv doesn't handle a lack of commit-timing support well, and this will be gone once it's implemented in Plasma 6.7.
Comment 2 Michael Marley 2026-02-16 15:42:20 UTC
(In reply to Zamundaaa from comment #1)
> On my laptop I see some individual frame drops from time to time with the
> Vulkan decoder, but it uses the CPU quite heavily (maybe Mesa isn't set up
> to support the codec or something), so it's not particularly surprising to
> me.
> VLC (apart from not playing back HDR videos correctly) seems to be fine
> though.
I checked both the CPU and GPU usage while this was happening and there was no indication that the system wasn't powerful enough to play the video smoothly.

> How did you determine it drops to 30FPS? Just based on visuals, or also
> measurements of some sort?
> If you run mpv with mangohud, do you see the frame drops in the frame time
> graph?
Just based on visuals.  I ran it with mangohud and it showed a nearly-flat green line for the entire video (while the problem was definitely being reproduced) with a CPU usage of <5% and a GPU usage of ~40%, so it doesn't seem to be showing any frame drops if I am understanding the graph correctly.  I also tried it with Vulkan/VAAPI and OpenGL/VAAPI.  The line was still green and flat for both of those and the problem still occurred (except for OpenGL/VAAPI fullscreen with VRR).
 
> > While reproducing the problem, mpv does not report any frame drops.
> Maybe the frames are presented at the wrong time, rather than dropped. Like
> 12--34--56--78-- instead of 1-2-3-4-5-6-7-8-. Or something more chaotic...
> It's possible that mpv doesn't handle a lack of commit-timing support well,
> and this will be gone once it's implemented in Plasma 6.7.
That sounds promising.  It isn't 12--34--56--78--, but it feels like some more chaotic form of frames being displayed at the wrong times and/or for the wrong amount of time sounds right.  The commit-timing thing sounds right as the mpv people specifically requested I try a compositor with wp_commit_timing support.  I'm very happy to hear that this extension will be supported in 6.7.  I will anxiously await that.
Comment 3 Zamundaaa 2026-02-16 15:47:36 UTC
Alright, then let's mark it as a duplicate of bug 513283 for now. If commit timing doesn't fix it for you, then you can just re-open this again.

*** This bug has been marked as a duplicate of bug 513283 ***