-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kwin Wayland: mpv going off wrong monitor in mixed refresh multi monitor setup #10444
Comments
According to your log, the surface instantly enters the other output for some reason. Can you check and see if the same thing happens on master? |
Unfortunately, I can't seem to figure out all the dependencies needed to successfully build mpv myself on Fedora. |
This was happening to me as well, using master it is fixed for me. |
Since I made this issue, I had found that I'm now on Fedora 37, and got mpv v0.35.0. kwin is 5.26.3 and mesa is 22.2.3. The above is still the case for me, as well as the problem with |
Looking at your log, it still has the same issue of instantly entering two different outputs.
I presume when you open the video, you're not actually rapidly switching monitors within milliseconds. I'm not sure why kwin is reporting entrance events to us like this, but it would definitely screw things up. Could you try another compositor (like GNOME or sway/wlroots) and see if it has this same behavior? |
Added rpmfusion to a standard Gnome Fedora 37 live environment. Installed mpv, ran with default config and |
According to this log: Which looks correct. It's just that Gnome has this monitor configured to 59.95 Hz.
So presumably if you just change the settings of that monitor, it'll be correct. So far, your issue looks like an upstream kwin issue (although I can't reproduce it myself). |
Ah, I forgot to check display settings and it defaults to that. Changed to 144hz in gnome's display settings and mpv was reporting Display FPS 144. |
Oh okay so the autofit thing is actually a totally different issue. When doing autofit calculations, we have to use some sort of monitor dimensions, but there's no way in wayland to know what monitor we're on before we actually draw the surface. So we currently just pick one and guess it (which might not be necessarily correct of course). However, this is supposed to correct itself later when we do actually get a surface enter event. That doesn't seem to be the case for you for some reason. I'll have to look at the numbers again. |
I believe #10943 will unintentionally also fix the autofit issue. Of course, that requires all the fractional scaling support stuff to land in kwin, mpv, etc. first. |
Do you know if this is still a problem for you? |
Fedora 38's build of mpv is still on 0.35.1. |
Automatic VRR won't work with plasma. You have to set it to always. |
I switched to CachyOS (arch fork) and still had my issues while on Plasma 5.27. mpv 0-37.0. |
Any difference if you use master by any chance? I'd expect no. What sounds like what is happening here is that during initialization mpv thinks it is on your primary monitor and calculates coordinates based on that. This is normally fixed once we get the actual surface event and know what monitor we are on, but in your case it isn't because it happens to overlap with the other one. Not sure what the best way to deal with this would be. As a workaround, you could try using the |
I tried mpv-git through the AUR and it behaved the same. After I made that last post, a restart had mpv behaving like before. I eventually figured out what's going on in regards to that. Unfortunately the effects of screen and screen-name seemed to flip when the display order did. When the order is 1>2, I can use either to get the initial autofit to use the primary display's resolution. But mpv still sets the refresh rate to 60Hz on it. So that's a report for the KDE team. But even with a locked output order, I still have my problems with the autofit options and mpv's refresh rate on Wayland with multiple refresh rates and resolutions. Now I think I get that most of it is just limitations with mpv? To reiterate: With a 2>1 order, opening a file on either monitor uses the resolution of the primary screen for the initial autofit. If opening a file on the second monitor would result in a resolution higher than it, it crosses screens and encounters the above refresh rate thing. In this case, mpv then has a refresh rate of 144Hz on the 60Hz second monitor.
X11 shares some of my problems, but as I'm essentially forced into Wayland I don't feel like getting into it. |
The order for outputs is always random. That's just how it is when you get it from the kernel. With regards to the As for the general multi monitor stuff. It's been on the TODO list to look at it again. On sway, I found it was generally working (certainly never encountered problems with the refresh rate), but I guess maybe plasma is different. The case of the window overlapping outputs has never been handled well really. I plan to change that. |
Important Information
Provide following Information:
Reproduction steps
In my setup, I now have a 2560x1440 144hz monitor as primary, and a 1920x1080 60hz monitor extended to the right.
Open a video. It opens on the primary monitor. The info overlay says
Display FPS: 60 (specified) 144 (estimated)
. Tons of frames are mistimed/delayed as a result. Same Display FPS results with --no-config.A 1080p video opened with
autofit-larger
set assumes it needs to take effect even though it shouldn't on a 1440p display.Dragging the mpv window to the second monitor, then back to the main monitor, Display FPS (specified) goes to 144. No more mistmed and delayed frames.
Log file
output.txt
The text was updated successfully, but these errors were encountered: