`autofit-larger=95%x95%` scales to the smallest monitor instead of an active monitor on Wayland
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-78-g7ce58f7a0 Copyright © 2000-2026 mpv/MPlayer/mplayer2 projects
built on Jan 13 2026 22:33:06
libplacebo version: v7.351.0
FFmpeg version: n8.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: Arch Linux
- Kernel Version: 6.18.5-2-cachyos
- GPU Model: RX 6700 X1
- Mesa/GPU Driver Version: Mesa 25.3.3-arch1.5
- Window Manager and Version: KWin 6.5.5
- Source of mpv: Arch Linux repos
- Latest known working version: mpv-git 0.40.0_444_g2e5e2938dd-1 from cachyos repos
Reproduction Steps
I have three monitors: 1920x1080, 2560x1440, 1080x1920 portrait. When I use autofit-larger=95%x95% mpv window is much smaller that 95% of my current (2560) monitor. It seems that autofit-larger compares video size to all monitors and use the one with the smallest width (portrait 1080) to determine window size. When I disable portrait monitor mpv now creates windows with 95% of the next smallest width (1920).
Expected Behavior
mpv should use only the monitor where window is located, not all monitors.
Actual Behavior
mpv uses monitor with the smallest width (1080) and sets window size to 95% of it
Here's screenshot of mpv window without autofit-larger:
Here's screenshot of mpv window with autofit-larger=95%x95%
Log File
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
Start with the autofit-larger option and inspect output.txt alongside the reproduction details for how monitor dimensions are selected on Wayland. Reproduce with the three-monitor layout and compare the selected window size with the active monitor's dimensions. Done means the window uses the monitor where it is located rather than the smallest monitor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100