mpv-player / mpv-player/mpv

gpu/gpu-next: Frame timing issues and processor affinity/power management

Open
#16,204 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core:video meta:no-bug os:linux vo:gpu:wayland
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv Information
mpv 0.40.0+git20250406.b09e06a920 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0
FFmpeg version: 7.1.1
FFmpeg library versions:
   libavcodec      61.19.101
   libavdevice     61.3.100
   libavfilter     10.4.100
   libavformat     61.7.100
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100
Other Information
- Linux version: openSUSE Tumbleweed
- Kernel Version: Linux nue 6.14.0-1-default #1 SMP PREEMPT_DYNAMIC Tue Mar 25 06:23:18 UTC 2025 (ab99d4c) x86_64 x86_64 x86_64 GNU/Linux
- GPU Model: Intel Haswell (Gen7)
- Mesa/GPU Driver Version: 25.0.3
- CPU Model: Intel Core i5-4210U
- Window Manager and Version: niri 25.02
- Source of mpv: openSUSE packages (rebuilt with git snapshot)
Reproduction Steps

Play any video with video-sync=display-resample on old enough hardware…

Expected Behavior

Smooth video playback with few or no mistimed/delayed frames.

Actual Behavior

Severe judder.

This can be mitigated by either setting mpv’s processor affinity to a single CPU core and also pinning its power state, or causing significant enough system load (e.g. with stress-ng). Changing process priority and rt scheduling has no effect.

Clearly this is a problem with both Linux and Intel’s crappy processors, but perhaps there’s something mpv could do here to inform the scheduler and CPU power management about its latency requirements?

Log File

judder.log

Sample Files

No response

I carefully read all instruction and confirm that I did the following:
  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the judder with video-sync=display-resample on comparable hardware and inspect judder.log alongside the reported CPU affinity, power-state, and system-load changes. Determine whether mpv has an identified entry point or existing test for scheduler and latency behavior; done means establishing a reproducible cause and a validated improvement without regressing playback timing.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.