mpv-player / mpv-player/mpv

Window X/Y offsets (specified through --geometry) ignored on Wayland

Open
#8,692 19 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

down-upstream:wayland os:linux vo:gpu:wayland
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Important Information

mpv version:

mpv 0.33.0-dirty Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
 built on UNKNOWN
FFmpeg library versions:
   libavutil       56.51.100
   libavcodec      58.91.100
   libavformat     58.45.100
   libswscale      5.7.100
   libavfilter     7.85.100
   libswresample   3.7.100
FFmpeg version: n4.3.2

Linux Distribution and Version: archlinux (updated ~week ago), output of uname -a follows

Linux davos 5.11.10-arch1-1 #1 SMP PREEMPT Fri, 26 Mar 2021 00:11:29 +0000 x86_64 GNU/Linux

Source of the mpv binary: official distribution package

If known which version of mpv introduced the problem: unknown, issue discovered when transitioning from X11 to Wayland

Window Manager and version: sway 1.5.1, installed from official distribution package

GPU driver and version: nothing fancy, using Intel graphics, so i915 + MESA, details follow

$ lspci -vnn | grep VGA -A 12
00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 (Whiskey Lake) [8086:3ea0] (rev 02) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Device [17aa:2279]
	Flags: bus master, fast devsel, latency 0, IRQ 138, IOMMU group 1
	Memory at d7000000 (64-bit, non-prefetchable) [size=16M]
	Memory at b0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at 3000 [size=64]
	Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915
$ glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (WHL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.0.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.0.1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.0.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

Possible screenshot or video of visual glitches: no glitches per se, but I still took a screenshot

20210402_12h10m27s_grim

Reproduction steps

Run the following command:

mpv \
    --no-config \
    -v -v \
    --log-file=mpv-bug.log \
    --geometry=50:40 \
    --image-display-duration=inf \
    /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1136x640.png
Expected behavior

The window of mpv should be placed at x=50, y=40.

Actual behavior

The window of mpv is aligned to the center of the display.

Log file

Attached as mpv-bug.log

NOTE: even though the log was produced with a multi-display setup, I verified earlier that the number of displays does not affect the issue in any way.

Sample files

N/A

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

Reproduce the issue under sway with the exact --geometry=50:40 command and inspect the attached mpv-bug.log alongside the verbose output. Trace the Wayland window-placement entry point and verify that the mpv window honors the requested x=50, y=40 offsets rather than being centered.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.