KWin Fractional Scaling: mpv resolution 1px too large, renders wrong
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv Information
mpv v0.41.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
built on Jan 1 1980 00:00:00
libplacebo version: v7.351.0
FFmpeg version: 8.0.1
FFmpeg library versions:
libavcodec 62.11.100
libavdevice 62.1.100
libavfilter 11.4.100
libavformat 62.3.100
libavutil 60.8.100
libswresample 6.1.100
libswscale 9.1.100
Other Information
- Linux version: NixOS 26.05 (Yarara)
- Kernel Version: 6.12.70
- GPU Model: Radeon RX 5500/5500M / Pro 5500M
- Mesa/GPU Driver Version: Mesa 26.0.0
- Window Manager and Version: KWin Wayland Plasma 6.5.5
- Source of mpv: nixpkgs
- Latest known working version: Unknown
- Issue started after the following happened: Fractional scaling adjusted in KDE Plasma
Reproduction Steps
Set fractional scaling to 185% on my 3072 x 1920 laptop display.
Expected Behavior
Video plays back identically to without fractional scaling.
Actual Behavior
Info reads resolution of 3073 horizontally, and a a tiny slither of the video is cut off (since my display is not 3073 px wide) and the video is not rendered to the pixel grid as it would without scaling.
I can confirm screenshots are correct to what I see on the screen.
Other Tests
I also tested at 190% scaling factor, which should also be fractional scaling, and the resolution of the video reads correctly in mpv info as 3072 across, and it looks pixel perfect compared to using integer scaling.
I also tested Krita (although it does use XWayland) at 185% to see if it would display a canvas the size of my screen at 100% zoom correctly, and it did, so it does seem to be an mpv problem. However, I do wonder if it is related to https://bugs.kde.org/show_bug.cgi?id=505810 or https://bugs.kde.org/show_bug.cgi?id=480171
Log File
Could not play the video with --gpu-debug.
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with mpv on a 3072×1920 display at 185% and 190% fractional scaling, then read output.txt from the matching --gpu-debug attempt. Compare the resolution reported by mpv and the rendered edge against the expected 3072-pixel width; done means 185% scaling renders on the pixel grid without cropping or reporting 3073 pixels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- computer-graphics, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100