Trixieua/mutter-patched

Description

Mutter with triple buffering support

Installation Instructions

sudo dnf swap mutter mutter.triplebuffer

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

Release Architectures Repo Download Fedora 38 x86_64 (0)* Fedora 38 (0 downloads)

* Total number of packages downloaded in the last seven days.


This is a companion discussion topic for the original entry at https://copr.fedorainfracloud.org/coprs/trixieua/mutter-patched

Hello there, it’s great to see dynamic triple buffering patched for Gnome 45 already.

Quality of Life?

I’m wondering if you’re familiar with Calcastor’s Gnome Patched repo which also contains some Quality of Life and Performance Improvements but seems to be, at least currently, unmantained.

Gnome 44

This is the list of patches they included:

All of these have been merged for Gnome 45 but it could be an idea, until Fedora 39 reaches stability (Gnome Extensions being reworked for ESM compatibility is also to be considered), to backport them as they have a significant impact on the percieved input lag when using Wayland, especially for Gaming.

Gnome 45?

As I’ve said Gnome 45 already includes some very nice improvements to performance such as MR 2777 (Add KMS thread) which could be considered for a backport if reasonable.
Unfortunately there were a few requests which seem very interesting which couldn’t be merged in time; I could be an idea to provide them if the stability allows it:

These two merge requests, when stable to include, possibly optionally, could help lower input lag in situations in which the current direct scanout implementation wouldn’t take place. This is the case for many non-proton games which end up not using a proper fullscreen (Minecraft is one such example) .

These other two are part of the implementation required for Gnome Mobile and, although I currently haven’t tested them, they might be sufficient to provide fully 2d gestures on Touchpads and Touchscreens which would definitely be appreciated.

Conclusion

Thank you for providing Dynamic Triple Buffering for 45 already, I hope you like the suggestions. I would be willing to test some more custom version on a fully AMD laptop and a dual monitor Nvidia setup.

Have a nice day!

Hi!

I would be glad to include more patches, but unfortunately almost nothing compliles if i include it with triple buffer patch.

But as for Gnome 44 almost all of listed patches were backported in 44.3 and more will come in 44.4(I allready included bacports for it Backports for 44.4 (!3132) · Merge requests · GNOME / mutter · GitLab and Backports of fractional scale improvements for 44.4 (!3056) · Merge requests · GNOME / mutter · GitLab).

As for Gnome 45 its too early in development to include anything but triple buffer(as soon as it gets to rc or release i may include more).

Thank for the comment and have a nice day!

PS:
If you will have any suggestions for patches to include i will be glad to try them.

On 44

Thank you for your answer, I’m testing it out and, at least for my empiric and unscientific testing, it does seem very similar but with slightly more input lag.
I’m wondering if it would be possible for you to check whether or not the merge requests included by calcastor for 44 are actually being backported / included in 44.3/4 as some of them are critical for a good gaming experience on Wayland, at least on my Nvidia system.

I would say especially:

On 45

About 45 it’s probably better to wait, I will keep you up to date on interesting merge requests if I spot one but, after reaching enough stability, it could be an idea to explore the ones already proposed.

Silverblue Guide?

Btw you could modify the description of the repo to include a guide for Silverblue similar to the one present here.

For the install, after having downloaded the repo file to /etc/yum.repos.d you need to override a base package as such:

rpm-ostree override replace --experimental --from repo=copr:copr.fedorainfracloud.org:trixieua:mutter-patched gnome-shell mutter xorg-x11-server-Xwayland 

On 44

All patches you asked for were added in 44.3 and 44.4 you can check it in

Also in topic of input lag on wayland its just nvidia beeng random + this mutter is compiled with clang(and it is better with clang), and i dont even know how you could normally game on nvidia with 535 driver because of artifacts and tearing in Direct Scanout(Artifacts in proton opengl games and big horizontal line in every other scenario(this is bug in 535 dirver i hope they will get it fixed)). Also there might be more input lag because of more recent Xwayland but in my experience it just made it much better, but i will not include Xwayland 23.2 because of dependencies not present in F37 and F38 xorg-x11-devel.

Silverblue

I will test it in vm and make a guide for sure i just need some time.

Thank you for checking this, Is this repo’s version of Xwayland identical to your specific repo’s?
I’ve switched back to your specific repo’s version and it seems to be better (It might also just be that, for reasons unbeknownst to me, the direct scanout sometimes fails irrecoverably but it’s not specific to this patched version).

I wonder if you could link to the issues related to Nvidia that are specific to Wayland as I’ve seen serious artifacts on some games using Xwayland (Minecraft, Teardown) or Tearing which shouldn’t be present (Cemu on Xwayland because the driver lacks the color support on Wayland…).

The issues regarding artefacting are directly linked to Direct Scanout but I can get around them by using gamescope although it somehow breaks mouse input on Minecraft; I’m trying to make Wayland on Nvidia on par with Xorg in terms of experience and, in some sense, we’re already there.
Fortunately Elden Ring, the game I play the most, somehow runs a LOT better on Wayland on my system.

I wonder if there is any access, on Fedora, to more up to date, unstable versions of the Nvidia driver.

(I’m not using 39 yet as I have some issues with gdm and I’m a sucker for extensions showcasing future designs)

Nice work, I really like that someone is finally maintaining this for Fedora.

Small fix btw: sudo rpm-ostree override reset mutter gnome-shell should be sudo rpm-ostree override reset mutter gnome-shell xorg-x11-server-Xwayland.

Thank you for adding this quickly.

Unfortunately i can’t link to issues related to this, but i can tell what i have found about it. Crazy artifacts only happen in OpenGL games and the only way to fix it for me was Zink(translation layer from OpenGL to Vulkan) you can use it by applying this variables(but don’t use them systemwide) __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink

Xwayland in this repo was compiled using clang, and one in mutter repo is just rebuild of fedora original which is compiled with gcc by default, if there is a difference i will just make it compile with clang than.

As for latest beta nvidia driver its just to difficult to install(it took me 1 hour) and usualy there is no flatpak part of driver for weeks after nvidia releases new drivers.

As for different games on nvidia wayland it depends on the game, you can play Elden Ring without any issues and then Dave the Diver is suttery mess, very often you realy need to have more FPS than refresh rate of your monitor, but its getting better every month. And i completely given up on idea of using wayland of nvidia and wont try it untin Gnome 45 + 540 driver.

As for F39 it’s not something to use right now because of broken mangohud and gnome beta.

I will definitely try your suggestion, the other unfortunate thing is that is seems as tho every direct scanout instance is limited to the monitor’s framerate (I’m on a dual monitor setup tho, it might be related).
I got Minecraft running with direct scanout without glitches by using the Vulkan mod but the difference between 144 with scanout and 250+ without is such that it’s probably better to not use it until the framerate lock is fixed.

I wonder when the 545 drivers will come out (540 will be skipped) as it seems as tho the fix will the forced Vsync bug .

Hello, I was wondering, as the Xwayland repo hasn’t been updated for 45, if you could provide the patched version included in the latter built with clang.
If this is the case it might be a good idea to also update the description for clarity; Thank you kindly.

Hello! Amazing work on this one, I think this works great, my system is now insanely smooth.

Something that was on my mind though: can this patch possibly influence the mouse pointer’s latency? I’ve read that latency with triple buffering is typically experienced when frame drops occur, and while I’m not having any frame drops, I have been feeling like the pointer feels a bit less responsive than before, though I’m unable to quantify by how much, if at all.

I’m mainly trying to gather whether this is the case or whether this is possible at all, because I haven’t been able to confirm this by myself. What do you think?

I think it could infuence mouse poiter latecy, but in my experience it only got slightly better.

1 Like

Hello, as for latency, as far as I know, it should only cause an increase when the GPU can’t keep up and the Triple Buffering actually kicks in to compensate. I’m not sure if there’s actual tested data on the latency that this patch provides tho.

Btw, when trying to upgrade on my Nvidia Desktop it fails with the following error:

error: importing RPMs: creating importer: Processing file-overrides for package mutter: Invalid absolute filepath '0001-place-Always-center-initial-setup-fedora-welcome.patch'

I’m not sure what causes this but it’s probably a patch that only exists in 44.4+ as I’m still stuck on 44.3-9. This also happens when trying to override mutter from a clean image, at list if it’s being processed from my main one.

Another interesting thing is the fact that overriding gnome-shell actually stopped working:

error: Request to reinstall exact base package versions: gnome-shell

Well, interesting situation.

EDIT:

I can reproduce the issue on my AMD Laptop as well.

On my end everything updated perfectly fine. You could try sudo dnf distro-sync or if that doesnt help you always can delete old packages with sudo rpm -e mutter --allmatches --nodeps && sudo rpm -e mutter-common --nodeps --allmatches && sudo rpm -e gnome-shell --allmatches --nodeps and then install gnome shell and mutter back with sudo dnf install mutter gnome-shell.
Waiting for your feedback.

Hello, I forgot to speficy that I’m running Silverblue, I managed to fix the issue by overriding mutter-common as well, it might be an idea to update the guide with something like this:

rpm-ostree override replace --experimental --from repo=copr:copr.fedorainfracloud.org:trixieua:mutter-patched mutter mutter-common

The issue was likely caused by the way overrides work in Silverblue.
You can overlay packages on top on the base image with rpm-ostree install but, if the package is included in the system image than each package you want to replace needs to be specified.
By just overriding mutter without mutter-common which is also in the base image the issue can be reproduced, at least on my two systems. Also, the system doesn’t replace gnome-shell as it’s the same version as what’s already included.
I’m going to try fully explicit overrides to see if there are any other valid ones.

EDIT:

Looks like the aforemention command is indeed correct as there are no other packages included in the base image. gnome-shell is still not being replaced as rpm-ostree thinks it’s the same package as what’s already included. I don’t know if they check it through hashing or just version checking.

EDIT 2:

I’m trying Fedora 39 but mutter-common doesn’t exist so this would split the ovverrides between the two (The same should apply to rawhide), I will keep you informed.

gnome-shell is 1:1 rebuild of fedora package and its used when fedora repos dont pushed it to stable yet.

Thanks for pointing out problem with mutter-common now f39 and rawhide should have it.

Hello,
Thanks for your work!
Unfortunally, I’m not being able to install your fork on fedora silverblue 39, I type the command for silverblue but I have this error message :

error: No matches for ‘xorg-x11-server-Xwayland’ in repo ‘copr:copr.fedorainfracloud.org:trixieua:mutter-patched’

Does someone achieve to install this on fedora silverblue 39?
Thanks you a lot!

Yeah, i forgot to build Xwayland for f39, thanks for reporting it should work after build is done.

Thanks you a lot!
I have to add that if I remove xorg-x11-server-Xwayland of the command, it tell me :
error: Request to reinstall exact base package versions: gnome-shell

Maybe gnome-shell need to be rebuilded too, or is this related to the lack of the first package?
Thanks you again!

After build are done it should work, please report if it works or not and thanks for feedback.